-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
Adds breadcrumb to crictl warning #58883
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. |
CLA signed. |
/ok-to-test |
cmd/kubeadm/app/preflight/checks.go
Outdated
_, err := ipc.exec.LookPath(ipc.executable) | ||
if err != nil { | ||
if ipc.mandatory { | ||
// Return as an error: | ||
return nil, []error{fmt.Errorf("%s not found in system path", ipc.executable)} | ||
} | ||
// Return as a warning: | ||
return []error{fmt.Errorf("%s not found in system path", ipc.executable)}, nil | ||
errorMessage := fmt.Sprintf("%s not found in system path", ipc.executable) |
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.
This is technically a warning message, since it's being returned in the first slice and not the second. Not sure if that's too nit-picky :)
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.
+1
/retest |
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.
minor nits, then lgtm .
cmd/kubeadm/app/preflight/checks.go
Outdated
_, err := ipc.exec.LookPath(ipc.executable) | ||
if err != nil { | ||
if ipc.mandatory { | ||
// Return as an error: | ||
return nil, []error{fmt.Errorf("%s not found in system path", ipc.executable)} | ||
} | ||
// Return as a warning: | ||
return []error{fmt.Errorf("%s not found in system path", ipc.executable)}, nil | ||
errorMessage := fmt.Sprintf("%s not found in system path", ipc.executable) |
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.
+1
cmd/kubeadm/app/preflight/checks.go
Outdated
@@ -347,6 +348,7 @@ type InPathCheck struct { | |||
mandatory bool | |||
exec utilsexec.Interface | |||
label string | |||
fix string |
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.
Might want to call this suggestion|advice
, b/c your applying it in a generic way to all checks.
@timothysc updated |
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chuckha, timothysc 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 57500, 58840, 58883). If you want to cherry-pick this change to another branch, please follow the instructions here. |
Signed-off-by: Chuck Ha ha.chuck@gmail.com
What this PR does / why we need it:
This PR adds a breadcrumb to a
kubeadm
preflight check.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes kubernetes/kubeadm#613
Special notes for your reviewer:
Release note: