-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(core): cfn constructs (L1s) can now accept constructs as parameters for known resource relationships #35838
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
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.
(This review is outdated)
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.
Is there something we can do in the codegen to not change the identity of the input array, so we don't have to go down all the places where our change has affected the L2s?
| afterEach(() => { | ||
| getPrototypeOfSpy.mockRestore(); | ||
| }); |
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.
Probably jest.restoreAll() in the beforeEach?
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.
Added a restore in afterEach: a mock for one test should not affect the others
ff89ec5 to
a3ee607
Compare
277cfe2 to
a3ee607
Compare
a3ee607 to
2803c85
Compare
|
The codegen has been updated to modify the arrays in place rather than creating new ones (see description) |
a90f858 to
0d45114
Compare
4cf8802 to
0f04ed6
Compare
0f04ed6 to
f1c1786
Compare
f1c1786 to
6d3176d
Compare
|
➡️ PR build request submitted to A maintainer must now check the pipeline and add the |
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #.
Reason for this change
Reintroduces #35713
Description of changes
This generates code that looks like this for non nested properties:
In the properties:
readonly role: IamIRoleRef | string;This is then used in the constructor:
If there were multiple possible IxxRef:
For arrays
Nested properties are currently disabled as they are backwards incompatible in the state of this PR
For nested properties
The props behave the same way, "flatten" functions are generated to recursively perform the same role that was done in the constructor for non nested properties:
For arrays of nested props:
Description of how you validated changes
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license