Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(kubectl-plugin): non-zero exit code on error #694

Conversation

datacore-vvarakantham
Copy link
Contributor

Returning non zero exit code with an error from plugin with kubectl command.

Copy link
Member

@Abhinandan-Purkait Abhinandan-Purkait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be rather a wrapper function which logs an error message and returns an exit code, rather than calling exit everywhere. In that way we can reuse the same method? @tiagolobocastro wdyt?

@tiagolobocastro
Copy link
Contributor

Should it be rather a wrapper function which logs an error message and returns an exit code, rather than calling exit everywhere. In that way we can reuse the same method? @tiagolobocastro wdyt?

hmm yeah...
I think we can take one step further, and simply return an error up the call stack

Signed-off-by: Vandana Varakantham <vandana.varakantham@datacore.com>
@datacore-vvarakantham
Copy link
Contributor Author

bors merge

bors-openebs-mayastor bot pushed a commit that referenced this pull request Dec 11, 2023
694: fix(kubectl-plugin): non-zero exit code on error r=datacore-vvarakantham a=datacore-vvarakantham

Returning non zero exit code with an error from plugin with kubectl command. 

Co-authored-by: Vandana Varakantham <vandana.varakantham@datacore.com>
@bors-openebs-mayastor
Copy link

Build failed:

@datacore-vvarakantham
Copy link
Contributor Author

bors merge

@bors-openebs-mayastor
Copy link

Build succeeded:

@bors-openebs-mayastor bors-openebs-mayastor bot merged commit 2a98aa1 into openebs:develop Dec 12, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants