-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 Cleanup unused variable in bootstrap/kubeadm/api/v1alpha4/kubeadmconfig_webhook.go #4606
Conversation
Signed-off-by: chymy <[email protected]>
Hi @chymy. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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. |
Seems to depend on if we want to support creating empty files. I'm not sure about that. /ok-to-test |
After testing, it supports creating empty files. Maybe some users just want to create empty files. |
/retest |
Yup, right now it works, because we don't block it. It's fine for me to keep that behavior as is. I'm just not sure what our intention was when we added the error constant initially, because it seems to indicate that we had different plans then. But I think someone else can provide more context. |
/test pull-cluster-api-apidiff-main |
@chymy: 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. |
@alexeldeib What about you? |
From what I can remember, I think Right now the var is unused because only secrets are supported so we can directly check that the secret name & key are set. I think it's okay to remove the unused var for now. If we ever add another FileSource type, we can re-add an error specific no file source being specified. |
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
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
The variable
MissingFileSourceMsg
is not used in bootstrap/kubeadm/api/v1alpha4/kubeadmconfig_webhook.go.If
file.Content
andfile.ContentFrom
are allowed to benil
at the same time, theMissingFileSourceMsg
variable is redundant. Otherwise, we should verify thatfile.Content
cannot benil
whenfile.ContentFrom
isnil
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 #