-
Notifications
You must be signed in to change notification settings - Fork 9.9k
Handle 64bit on 32bit, broken builds #45617
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
Conversation
Community GuidelinesThis comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Pull Request Authors
|
|
Couldn't find SDK int64 validator. If there is one, we could use that instead. But, one thing we know, |
johnsonaj
left a comment
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.
LGTM 🚀
|
Warning This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the library.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
Description
The build error occurred because
validation.IntBetween(1, 4294967295)was trying to pass the literal4294967295(which equals 2^32- 1, the maximum 32-bit unsigned integer value) as anintparameter to the validation function. On 32-bit architectures, Go'sinttype is only 32 bits and has a maximum value of 2^31 - 1 (2147483647), so the literal4294967295overflows when used as anintargument. The fix creates a newIntBetween64validation function that acceptsint64parameters instead ofintparameters, allowing it to handle the full 32-bit ASN range (1-4294967295) without overflow issues. The function still validatesintvalues from the schema, but internally converts them toint64for range checking, maintaining backward compatibility while supporting the complete ASN value range on all architectures.Relations
Problem introduced by #45246
References
Output from Acceptance Testing