Skip to content

Conversation

@GavinZZ
Copy link
Contributor

@GavinZZ GavinZZ commented Jan 10, 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

@aws-cdk-automation aws-cdk-automation requested a review from a team January 10, 2025 00:54
@github-actions github-actions bot added the p2 label Jan 10, 2025
@GavinZZ GavinZZ changed the base branch from main to yuanhaoz/feat/metadata-collection-1 January 10, 2025 00:55
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 10, 2025
@GavinZZ GavinZZ force-pushed the yuanhaoz/feat/metadata-collection-2 branch from a74b3c0 to 9ffe3f8 Compare January 10, 2025 00:56
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@GavinZZ GavinZZ changed the title feat: add metadata import and statement updater [do-not-review] feat: add metadata import and statement updater Jan 10, 2025
@GavinZZ GavinZZ changed the title [do-not-review] feat: add metadata import and statement updater [WIP] feat: add metadata import and statement updater Jan 10, 2025
@GavinZZ GavinZZ force-pushed the yuanhaoz/feat/metadata-collection-1 branch from ae763b0 to f9f14d4 Compare January 10, 2025 17:42
@GavinZZ GavinZZ force-pushed the yuanhaoz/feat/metadata-collection-2 branch from 9ffe3f8 to be91a8f Compare January 10, 2025 19:20
@GavinZZ GavinZZ changed the title [WIP] feat: add metadata import and statement updater [WIP] chore: add metadata import and statement updater Jan 10, 2025
@GavinZZ GavinZZ force-pushed the yuanhaoz/feat/metadata-collection-2 branch from be91a8f to 02bb486 Compare January 10, 2025 22:09
@GavinZZ GavinZZ changed the title [WIP] chore: add metadata import and statement updater chore: add metadata import and statement updater [WIP] Jan 10, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review January 10, 2025 22:13

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@GavinZZ GavinZZ changed the base branch from yuanhaoz/feat/metadata-collection-1 to main January 10, 2025 22:57
@GavinZZ GavinZZ marked this pull request as ready for review January 10, 2025 23:51
@GavinZZ GavinZZ requested a review from a team as a code owner January 10, 2025 23:51
@GavinZZ
Copy link
Contributor Author

GavinZZ commented Jan 10, 2025

@mergify refresh

@mergify
Copy link
Contributor

mergify bot commented Jan 10, 2025

refresh

✅ Pull request refreshed

@aws aws deleted a comment from aws-cdk-automation Jan 10, 2025
@GavinZZ GavinZZ changed the title chore: add metadata import and statement updater [WIP] chore: add metadata import and statement updater Jan 10, 2025
@GavinZZ GavinZZ closed this Jan 13, 2025
@GavinZZ GavinZZ deleted the yuanhaoz/feat/metadata-collection-2 branch January 13, 2025 19:52
@github-actions
Copy link
Contributor

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.

2 participants