cluster-api-provider-aws
cluster-api-provider-aws copied to clipboard
🌱 Update ASG when subnets are changed in AWSMachinePool
What type of PR is this?
/kind feature What this PR does / why we need it:
Updates ASG when subnets are changed in AWSMachinePool
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 #3315
Special notes for your reviewer: would like to test using github
Checklist:
- [ ] squashed commits
- [ ] includes documentation
- [ ] adds unit tests
- [ ] adds or updates e2e tests
@DiptoChakrabarty: This issue is currently awaiting triage.
If CAPA/CAPI contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.
The triage/accepted label can be added by org members by writing /triage accepted in a comment.
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 @DiptoChakrabarty. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
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.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign fabriziopandini after the PR has been reviewed.
You can assign the PR to them by writing /assign @fabriziopandini in a comment when ready.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/ok-to-test
@DiptoChakrabarty can you squash your commits?
can you squash your commits?
done
@DiptoChakrabarty can you please run the tests locally and see the issue, it's something to do with these changes only.
@Ankitasw based on the change I should add a test to check Subnet != asg.Subnet right ?
@Ankitasw based on the change I should add a test to check Subnet != asg.Subnet right ?
Yes please.
@Ankitasw based on the change I should add a test to check Subnet != asg.Subnet right ?
Is this change yet to be done?
Is this change yet to be done?
yes , added the testcase but encountering an error , will push the test soon
the tests are failing because I set the machinePoolScope.AWSMachinePool.Spec.Subnets as []infrav1.AWSResourceReference{ { ID: pointer.String("subnet1"), }, { ID: pointer.String("subnet2"), }, }, and the existingASG.Subnets as []string{"subnet1", "subnet2"}, do they have to be set in another format for this case
@DiptoChakrabarty: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| pull-cluster-api-provider-aws-test | 6361a8cc57582318c5c63450f4b265e5feca1aef | link | true | /test pull-cluster-api-provider-aws-test |
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.
the tests are failing because I set the machinePoolScope.AWSMachinePool.Spec.Subnets as []infrav1.AWSResourceReference{ { ID: pointer.String("subnet1"), }, { ID: pointer.String("subnet2"), }, }, and the existingASG.Subnets as []string{"subnet1", "subnet2"}, do they have to be set in another format for this case
I am not sure how cmp.Equal will work with different types of structs. @shivi28 I remember you making a doc on go cmp usage, can you let us know if you came across any such examples as used in this PR?
I am not sure how cmp.Equal will work with different types of structs. @shivi28 I remember you making a doc on go cmp usage, can you let us know if you came across any such examples as used in this PR?
I can make a go cmp comparer function to compare the AWSResourceReference.ID and AutoScalingGroup.Subnets however I was suggested to do something like this https://github.com/kubernetes-sigs/cluster-api-provider-aws/issues/3315#issuecomment-1074293015 just making sure
@DiptoChakrabarty were you able to figure out the issue?
@DiptoChakrabarty: PR needs rebase.
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.
@DiptoChakrabarty would you like to continue this PR?