-
Notifications
You must be signed in to change notification settings - Fork 4.2k
chore: update metadata_updater to skip some L2 constructs from being injectable #34463
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
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). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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. |
@@ -1140,6 +1141,7 @@ export enum RestApiMode { | |||
} | |||
|
|||
class RootResource extends ResourceBase { |
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.
- Do we need to also add the
@propertyInjectable
decorator above the class just like we do for other constructs? - [Minor] To be consistent, we should include the below comment above the
PROPERTY_INJECTION_ID
declaration:
/**
* Uniquely identifies this class.
*/
…injectable (aws#34463) ### Issue # (if applicable) N/A ### Reason for this change Release was failing because when metadata_updater job got executed to automatically mark L2 constructs as injectables, it failed to update some constructs because they do not follow the normal patterns of L2 constructors. ### Description of changes - Added skip logic to skip some L2 constructs from being marked as Injectables. - Applied the injectables logic manually to `RootResource` since it's constructor does not follow the common constructors pattern for L2s, and should support the injectable logic. - Skipped `lib/function-base.LatestVersion`, as in my opinion it does not need to support the injectable feature. The constructor does not accept any props, and so It does not support any injected property injection. - Added some changes to the metadata_updater tool itself to fix some linter errors. ### Description of how you validated changes executed the metadata_updater job locally to verify the generated L2 constructs. ### Checklist - [X] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Issue # (if applicable)
N/A
Reason for this change
Release was failing because when metadata_updater job got executed to automatically mark L2 constructs as injectables, it failed to update some constructs because they do not follow the normal patterns of L2 constructors.
Description of changes
RootResource
since it's constructor does not follow the common constructors pattern for L2s, and should support the injectable logic.lib/function-base.LatestVersion
, as in my opinion it does not need to support the injectable feature. The constructor does not accept any props, and so It does not support any injected property injection.Description of how you validated changes
executed the metadata_updater job locally to verify the generated L2 constructs.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license