Skip to content

Conversation

@jaypipes
Copy link
Collaborator

If fields were renamed in some operations, the code generated for
SetResource() was not properly looking up the renamed field. This
patch updates SetResource() to first check if the field has
renamed for the referred Operation and if so, look up the CRDField
object in the CRD.SpecFields collection instead of the StatusFields
collection.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Simple correction of a typo that was introduced way back when.
If fields were renamed in some operations, the code generated for
`SetResource()` was not properly looking up the renamed field. This
patch updates `SetResource()` to first check if the field has been
renamed for the referred Operation and if so, look up the CRDField
object in the CRD.SpecFields collection instead of the StatusFields
collection.
@jaypipes
Copy link
Collaborator Author

Note to reviewers: I've included a unit test of this functionality, but also note that the RDS controller has been generated with this code and the DBSubnetGroup resource is properly handling renamed Name and Description fields for that resource.

@jaypipes jaypipes merged commit 7edaa44 into aws-controllers-k8s:main Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants