Skip to content
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

MIGRATION ISSUE: imagebuilder.LaunchTemplateConfiguration.SetDefaultVersion not sending false value #2734

Closed
2 tasks done
ewbankkit opened this issue Aug 6, 2024 · 6 comments · Fixed by #2838
Closed
2 tasks done
Assignees
Labels
bug This issue is a bug. p1 This is a high priority issue service-api This issue is due to a problem in a service API, not the SDK implementation.

Comments

@ewbankkit
Copy link

Pre-Migration Checklist

Go Version Used

go1.22.5

Describe the Migration Issue

If the bool SetDefaultVersion field of the imagebuilder.LaunchTemplateConfiguration structure is set to false, that value is not being serialized and sent to the AWS service. The means that it is impossible to update the value from true to false via v2 of the Go SDK.

Code Comparison

v1

	apiObject := &imagebuilder.LaunchTemplateConfiguration{}

	if v, ok := tfMap["launch_template_id"].(string); ok && v != "" {
		apiObject.LaunchTemplateId = aws.String(v)
	}

	if v, ok := tfMap["default"].(bool); ok {
		apiObject.SetDefaultVersion = aws.Bool(v)
	}

v2

	apiObject := &awstypes.LaunchTemplateConfiguration{}

	if v, ok := tfMap["launch_template_id"].(string); ok && v != "" {
		apiObject.LaunchTemplateId = aws.String(v)
	}

	if v, ok := tfMap["default"].(bool); ok {
		apiObject.SetDefaultVersion = v
	}

Observed Differences/Errors

v1

{"distributionConfigurationArn":"arn:aws:imagebuilder:us-west-2:...:distribution-configuration/ewbankkit-test-001","distributions":[{"launchTemplateConfigurations":[{"accountId":"...","launchTemplateId":"lt-00c9b21fbf4907bdb","setDefaultVersion":false}],"region":"us-west-2"}]}

v2

{"distributionConfigurationArn":"arn:aws:imagebuilder:us-west-2:...:distribution-configuration/ewbankkit-test-001","distributions":[{"launchTemplateConfigurations":[{"accountId":"...","launchTemplateId":"lt-00c9b21fbf4907bdb"}],"region":"us-west-2"}]}

Additional Context

No response

@ewbankkit ewbankkit added needs-triage This issue or PR still needs to be triaged. v1-v2-inconsistency v1-v2-inconsistency Behavior has changed from v1 to v2, or feature is missing altogether labels Aug 6, 2024
@RanVaknin RanVaknin self-assigned this Aug 6, 2024
@ewbankkit
Copy link
Author

ewbankkit commented Aug 6, 2024

Relates aws/aws-sdk#736.
Relates #2162.

@RanVaknin
Copy link
Contributor

Hi @ewbankkit ,

Thanks for raising this once again.
I will re-raise this issue internally to see how we should go about fixing this.

Ran~

@RanVaknin RanVaknin added needs-review This issue or pull request needs review from a core team member. p2 This is a standard priority issue bug This issue is a bug. and removed needs-triage This issue or PR still needs to be triaged. needs-review This issue or pull request needs review from a core team member. labels Aug 6, 2024
@RanVaknin
Copy link
Contributor

RanVaknin commented Aug 8, 2024

We have an internal ticket with the ec2 service team.

V1479153907

Thanks,
Ran~

@RanVaknin RanVaknin closed this as not planned Won't fix, can't repro, duplicate, stale Aug 8, 2024
@lucix-aws lucix-aws reopened this Aug 8, 2024
@RanVaknin RanVaknin added the service-api This issue is due to a problem in a service API, not the SDK implementation. label Aug 8, 2024
@aws aws deleted a comment from github-actions bot Aug 8, 2024
@codymaust
Copy link

@RanVaknin has there been any recent update on this?
thanks!

@lucix-aws lucix-aws assigned lucix-aws and unassigned RanVaknin Oct 15, 2024
@lucix-aws lucix-aws added p1 This is a high priority issue and removed p2 This is a standard priority issue v1-v2-inconsistency v1-v2-inconsistency Behavior has changed from v1 to v2, or feature is missing altogether labels Oct 15, 2024
@lucix-aws
Copy link
Contributor

I'm not waiting for the service team to deliberate. Will patch this locally as we did for #2250.

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p1 This is a high priority issue service-api This issue is due to a problem in a service API, not the SDK implementation.
Projects
None yet
4 participants