Skip to content

Conversation

moelasmar
Copy link
Contributor

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


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

@moelasmar moelasmar requested a review from a team as a code owner May 15, 2025 03:07
@github-actions github-actions bot added the p2 label May 15, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team May 15, 2025 03:07
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label May 15, 2025
@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label May 15, 2025
Copy link
Contributor

mergify bot commented May 15, 2025

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-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: cdcf0cd
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 40e8c26 into main May 15, 2025
16 checks passed
Copy link
Contributor

mergify bot commented May 15, 2025

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).

@mergify mergify bot deleted the melasmar/property-injector-fix branch May 15, 2025 04:16
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 May 15, 2025
@aws aws unlocked this conversation May 15, 2025
@@ -1140,6 +1141,7 @@ export enum RestApiMode {
}

class RootResource extends ResourceBase {

Choose a reason for hiding this comment

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

  1. Do we need to also add the @propertyInjectable decorator above the class just like we do for other constructs?
  2. [Minor] To be consistent, we should include the below comment above the PROPERTY_INJECTION_ID declaration:
/**
 * Uniquely identifies this class.
 */

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label May 15, 2025
maharajhaider pushed a commit to maharajhaider/aws-cdk that referenced this pull request May 15, 2025
…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*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

4 participants