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
exit with correct exit code on plugin failure #54094
exit with correct exit code on plugin failure #54094
Conversation
Hi @juanvallejo. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
b4cf35c
to
092b9fc
Compare
/ok-to-test |
/assign |
if exiterr, ok := err.(*exec.ExitError); ok { | ||
// check for (and exit with) the correct exit code | ||
// from a failed plugin command execution | ||
if status, ok := exiterr.Sys().(syscall.WaitStatus); ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hrm, need to check if this works on Mac and Windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will go ahead and test this on both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fabianofranz works as expected on mac:
@sg00dwin thanks for helping me test on mac
/test pull-kubernetes-unit |
092b9fc
to
96d3f45
Compare
/lgtm |
/test all Tests are more than 96 hours old. Re-running tests. |
/approve no-issue |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabianofranz, juanvallejo Associated issue requirement bypassed by: fabianofranz The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue (batch tested with PRs 54107, 54184, 54377, 54094, 54111). If you want to cherry-pick this change to another branch, please follow the instructions here. |
Release note:
Correctly exits after a plugin command execution failure with the correct exit code.
Related downstream bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1501756
Before
After
cc @fabianofranz