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: asgNeedsUpdates invalid condition (pointers) #3264
Conversation
@mweibel: This issue is currently awaiting triage. If CAPA/CAPI contributors determines this is a relevant issue, they will accept it by applying the The 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. |
Hi @mweibel. 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. |
/ok-to-test |
As existingASG.DesiredCapacity is a pointer, it can be nil. Same for MachinePool replicas spec. When a field is defined as a pointer, it is usually to distinguish between explicit zero and not specified. Whether that is a real use case is a different story but we will need to check those conditions. |
FYI, MachinePool spec replicas is defaulted to 1 if nil. |
`machinePoolScope.MachinePool.Spec.Replicas` and `existingASG.DesiredCapacity` are both pointers. The previous condition compared memory addresses instead of integer values.
9c936bc
to
831193e
Compare
Makes sense. I added another condition to ensure it does return true when Replicas is nil, even though the Webhook should take care of this part. Hope that's fine, otherwise please let me know :) |
restarting the timed out test (not sure if I can do that) /test pull-cluster-api-provider-aws-verify |
/test pull-cluster-api-provider-aws-test |
Thanks for adding missing tests in addition to what you are fixing in the PR. /lgtm |
/assign @enxebre |
/unassign @enxebre |
/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/test-infra repository. |
/test pull-cluster-api-provider-aws-e2e-eks |
tests ran through 👍 thanks for retesting. |
Both sets of e2e are passing so: /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: richardcase 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 type of PR is this?
/kind bug
What this PR does / why we need it:
machinePoolScope.MachinePool.Spec.Replicas
andexistingASG.DesiredCapacity
are both pointers.The previous condition compared memory addresses instead of integer values.
Special notes for your reviewer:
I'm not sure if the check for
existingASG.DesiredCapacity == nil
is needed (i.e. can it happen at all?) but I played a bit on the safe side here. The check could still fail overall ifmachinePoolScope.MachinePool.Spec.Replicas
is nil, but I guess that should never happen. Or does it?Checklist:
Release note: