-
Notifications
You must be signed in to change notification settings - Fork 578
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(taint deletion): allow taint changes and prevent panic by handling nil values #5022
base: main
Are you sure you want to change the base?
Conversation
Hi @nueavv. 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-sigs/prow repository. |
/ok-to-test |
Thanks for the this @nueavv . When you have time could you respond to @fiunchinho suggestion? Then i think we can look to get this merged. |
Okay. @richardcase |
@nueavv - there's a couple of failures with the checks. If you run the following locally (which is what he checks are running):
Ping me on slack if i can help with anything. |
@richardcase I have fixed the issue. Can you please check if the commit message is appropriate? |
/test ? |
@richardcase: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
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-sigs/prow repository. |
/test pull-cluster-api-provider-aws-e2e-eks |
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.
Regarding the issue and according release note: I don't quite get whether the issue is about deletion (the taint shouldn't even exist in the slice?!) or an empty value
string – let's please clarify. The GitHub issue says it's about an empty string, and it looks like this is not a deletion issue?!
Hi @AndiDog, I was trying to delete the taint, but it failed because of the empty string. What made you confused? The issue is about taint deletion. |
You can reproduce it by first creating a taint without a value and then trying to delete it. |
@dlipovetsky Hi! can you review this? |
The change now looks straightforward. Can you please make this a single commit? I'll take a look very soon – it's on my list 😉. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AndiDog 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 |
Hi, @dlipovetsky Could you please review this PR when you have time? |
Thanks for this. The change looks good. I noticed this file has no unit tests. In my experience, unit tests are especially helpful for functions that transform data. Would you please consider writing a unit test; it should fail without your fix, and pass with it. |
On second thought, this PR has been open for a while, and I don't want to add a new requirement this late. But a unit test would help future maintenance. If it can be done before the /hold is removed, great; otherwise, a follow-up PR would be fine. /lgtm |
New changes are detected. LGTM label has been removed. |
/retest |
/retest-required |
@dlipovetsky I've added test codes. Can you review them again? |
@dlipovetsky Hi.. Can you take a look at it? |
Signed-off-by: nueavv <[email protected]>
This commit addresses a panic error that occurs when attempting to delete a taint in AWSManagedMachinePool. The issue was caused by a nil pointer dereference when the taint's value was nil. By handling nil values for taint fields, this fix ensures that taints with nil values are correctly processed, preventing runtime errors.
Fixes #5021
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR resolves a panic error that occurs when attempting to delete a taint in AWSManagedMachinePool. The error was due to a nil pointer dereference when the taint's value was nil. By handling nil values for taint fields, this fix ensures that taints with nil values are correctly processed, preventing runtime errors.
Which issue(s) this PR fixes:
Fixes #5021
Special notes for your reviewer:
Checklist:
Release note: