-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
awssdkpatch: enum type validation patch #37209
Conversation
This enhancement adds patches to migrate validation functions for enum types to the `enum.Validate` function. Due to a `gopatch` limitation, the field which the validation function is assigned to (`ValidateFunc`) cannot be migrated to the proper field (`ValidateDiagFunc`). The generated patches include a comment indicating that this step will need to be done manually once the patch is applied, at least until the underlying `gopatch` limitation is addressed. Related section in the AWS SDK migration guide: - https://hashicorp.github.io/terraform-provider-aws/aws-go-sdk-migrations/#validation-functions
Community NoteVoting for Prioritization
For Submitters
|
# Step 4: Migrate enum validation | ||
# | ||
# This will only be partially correct. The enum.Validate function implements | ||
# ValidateDiagFunc, while StringInSliace implements ValidateFunc. Due to |
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.
# ValidateDiagFunc, while StringInSliace implements ValidateFunc. Due to | |
# ValidateDiagFunc, while StringInSlice implements ValidateFunc. Due to |
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.
Thanks for catching these - too quick on the merge 🤦 . I just came across another patch to add and will fix as part of that PR.
# | ||
# This will only be partially correct. The enum.Validate function implements | ||
# ValidateDiagFunc, while StringInSliace implements ValidateFunc. Due to | ||
# limitiations with how gopatch handles multiple matches within an elision, we |
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.
# limitiations with how gopatch handles multiple matches within an elision, we | |
# limitations with how gopatch handles multiple matches within an elision, we |
This functionality has been released in v5.48.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
This enhancement adds patches to migrate validation functions for enum types to the
enum.Validate
function.Due to a
gopatch
limitation, the field which the validation function is assigned to (ValidateFunc
) cannot be migrated to the proper field (ValidateDiagFunc
). The generated patches include a comment indicating that this step will need to be done manually once the patch is applied, at least until the underlyinggopatch
limitation is addressed.Related section in the AWS SDK migration guide:
Relations
Relates #32976