Fix incorrect shape name in bad default filtering#671
Fix incorrect shape name in bad default filtering#671ack-prow[bot] merged 4 commits intoaws-controllers-k8s:mainfrom
Conversation
|
/retest |
|
/test ec2-controller-test |
1 similar comment
|
/test ec2-controller-test |
michaelhtm
left a comment
There was a problem hiding this comment.
nice work @gustavodiaz7722
left one nit below
|
/test ec2-controller-test |
2 similar comments
|
/test ec2-controller-test |
|
/test ec2-controller-test |
knottnt
left a comment
There was a problem hiding this comment.
@gustavodiaz7722 Functional change and tests look good, just need to move them to be with the existing set_sdk test cases.
|
/retest |
|
Test are failing due to known issue. Pending fix here #669 |
|
/test s3-controller-test |
|
/test ec2-controller-test |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: a-hilaly, gustavodiaz7722, knottnt, michaelhtm The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test s3-controller-test |
|
/retest |
3 similar comments
|
/retest |
|
/retest |
|
/retest |
Issue #, if available:
Description of changes:
Fix incorrect shape name in bad default filtering
Issue
The EMR Serverless controller was failing to build with type errors like:
Root Cause
AWS SDK Go v2 has a
RemoveDefaultscustomization that removes default values from certain shapes where the default is incompatible with the shape's range constraints. This makes those fields nillable (pointers) in the generated SDK code.The ACK code generator had the wrong shape name in its
BadDefaultsAssignmentmap:"WorkerCounts": true(the Smithy shape name)"WorkerCount": true(the actual member name used in Go structs)Reference: AWS SDK Go v2 Source
Changes
pkg/apiv2/remove_defaults.go: Fixed the member name fromWorkerCountstoWorkerCountto match the actual struct field name in the SDK.pkg/generate/code/set_sdk.go: Fixed map value type generation to use the original shape name for SDK struct types when available.Testing
WorkerCountas a pointer type (*int64).By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.