-
Notifications
You must be signed in to change notification settings - Fork 44
Use only one of ID or Name while updating Nodegroup #181
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
base: main
Are you sure you want to change the base?
Use only one of ID or Name while updating Nodegroup #181
Conversation
Hi @sudohikumar. Thanks for your PR. I'm waiting for a aws-controllers-k8s 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. |
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.
Thank you @sudohikumar !
/ok-to-test
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: a-hilaly, sudohikumar 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 |
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.
@sudohikumar Thank you for very much for another contribution!
input.LaunchTemplate = &svcsdktypes.LaunchTemplateSpecification{} | ||
|
||
// set only one out of ID or Name (priority to ID) | ||
if desired.ko.Spec.LaunchTemplate.ID != nil { |
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.
I think we'll also need to cover the case where a user has changed the desired state for LaunchTemplate.ID
and/or LaunchTemplate.Name
. While it will lead to an error from the AWS API I think it would be best to attempt the requested change and present API error to the user. As is, if LaunchTemplate.Name
is changed in the Spec populate the current LaunchTemplate.ID
and silently ignore the change to the desired state.
cc: @a-hilaly thoughts on this?
/hold Until this comment has been resolved. |
From one of the other testing, it seems while creation, when we set both id and name of the Launch Template, it errors out with same message |
IMO, I think it's fine to surface that error when the user creates a new Nodegroup with both initially set. I'd rather the user see an error than silently ignore their input and take an action they didn't intend. For example, if someone accidentally sets a The reason we need to make a priority call when no deltas are detected with either |
3e23d52
to
026cb7f
Compare
Hi @knottnt |
@sudohikumar: The following test failed, say
Full PR test history. Your PR dashboard. 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. |
@sudohikumar Thanks for reverting that. I think this comment still needs to be handled. The reasoning is similar to why the create change was reverted. If the user makes a change we don't want to silently ignore it. |
Issue #, if available:
Description of changes:
Use only one of ID or Name while updating Nodegroup. ID is the priority here.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Yes