-
Notifications
You must be signed in to change notification settings - Fork 212
Refactor reference resolution into Go code #417
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
Refactor reference resolution into Go code #417
Conversation
Co-authored-by: Amine <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RedbackThomson The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test iam-controller-test |
I expect that This pull request puts a panic condition in, so that no new controllers can add fields before this condition is possible. |
All 3 test failures of the IAM controller are due to missing policy ARNs - unrelated to these changes but worthy of an investigation. All the failures of the Lambda controller are within the |
Regarding IAM, tests are not failing in this PR @RedbackThomson maybe let's test with one commit earlier? #394 |
You were right to suspect this. Thank you for pointing out that we were overwriting the |
@RedbackThomson: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
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.
Nice and neat!
"Nil": func() interface{} { | ||
return nil | ||
}, |
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.
Interesting how this is returning an interface{}
and plays well with AddToMap
/lgtm |
Continuation of #401
Refactors the
resolveReferenceFor<Field>
Go template code into direct Go code. This way we can be more intelligent about nested field references and support unit testing its output.Breaking change:
The previous Go template produced valid, but ultimately faulty, code for references within lists of structs. These are not supported (see aws-controllers-k8s/community#1291). As such, this update produces a panic when it detects those types of references.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.