Skip to content
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

chore(aws-cdk-lib): add metadata import and statement updater #32895

Conversation

GavinZZ
Copy link
Contributor

@GavinZZ GavinZZ commented Jan 13, 2025

Issue # (if applicable)

Reason for this change

As a follow up to #32827. We need to add metadata statement to the constructor to every L2 constructs that inherits Resource class. We used ts-morph as the typescript parser to parse all CDK files and find the constructs that match the requirements.

Add import statement and this.node.addMetadata( statement to the file.

Description of changes

Main change is a one-time tool metadata-updater to automatically find the right classes and add import statements and add metadata statements. The tool can be run multiple times and should not add additional import or add metadata statements to files that already been added.

Description of how you validated changes

  1. Went through every changed file to verify the changes.
  2. Tests regarding the metadata-updater tool
  3. Existing tests

Checklist


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

@GavinZZ GavinZZ requested a review from a team as a code owner January 13, 2025 19:52
@github-actions github-actions bot added the p2 label Jan 13, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team January 13, 2025 19:53
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 13, 2025
@GavinZZ GavinZZ changed the base branch from main to yuanhaoz/feat/metadata-collection-1 January 13, 2025 19:55
@GavinZZ GavinZZ closed this Jan 13, 2025
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
contribution/core This is a PR that came from AWS. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant