-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
exec credential provider: handle wrapped exec errors #103772
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ankeesler The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/sig auth |
) | ||
|
||
case os.IsPermission(err): | ||
return fmt.Errorf("exec: binary %s not executable", a.cmd) |
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.
I'm not in love with changing this error message to say "binary" instead of "executable" (because the plugin could be a bash script, which I would not consider to be a binary), but I wanted to avoid the redundancy of the error message "executable blah is not executable". Any suggestions?
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.
A new unit test message binary ./testdata/not-executable.sh not executable
seems a little odd as @ankeesler pointed at the above.
How about keeping "executable" for the other places and removing "executable" from the above case os.IsPermission
only to avoid unnecessary confusions?
) | ||
|
||
case os.IsPermission(err): |
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.
Is this how you were hoping to use os.IsPermission()
?
execError := &exec.Error{} | ||
exitError := &exec.ExitError{} | ||
switch { | ||
case errors.As(err, &execError): // Binary does not exist (see exec.Error). |
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.
I couldn't figure out how to work in os.IsNotExist()
here. I tried both errors.As(err, &execError) && os.IsNotExist(err)
and errors.As(err, &execError) && os.IsNotExist(execError)
, but these logical expressions never evaluated to true
for me.
Signed-off-by: Andrew Keesler <[email protected]>
ff74cc3
to
b8fb5f3
Compare
/remove-sig api-machinery |
I think this is a small enough issue that can wait until 1.23. /triage accepted |
Hi 👋 I'm the bug triage shadow. I wanted to check in and see if this PR is targeted for milestone 1.23 . |
@jyotimahapatra sure! That would be great if we could target this at 1.23 |
@ankeesler Im checking in again to check if we can coordinate with sig auth to get this PR approved and merge this in 1.23 time frame |
@jyotimahapatra - sorry for the delay. i am having trouble finding time to devote to kube currently, but i think this pr seems small enough. i wonder if @enj would be able to review this for 1.23? |
/milestone v1.24 Ran out of time in 1.23 |
@enj @ankeesler what more does this need? /retest |
@ankeesler: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. |
It is on my list of things to review in 1.24 |
Hi 👋 I'm checking in from the bug triage team for release 1.24. Is this PR targeted for release 1.24? |
Hi @enj 👋 I'm from bug triage team. I wanted to check if we're tracking this for milestone 1.24. |
I will try to review this for 1.24 but this does not block the release. /milestone v1.25 |
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.
/cc @oomichi
) | ||
|
||
case os.IsPermission(err): | ||
return fmt.Errorf("exec: binary %s not executable", a.cmd) |
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.
A new unit test message binary ./testdata/not-executable.sh not executable
seems a little odd as @ankeesler pointed at the above.
How about keeping "executable" for the other places and removing "executable" from the above case os.IsPermission
only to avoid unnecessary confusions?
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/milestone clear |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
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. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: