fix(mixin): use withMixin in Stack to set mixin metadata in its constructs#37269
fix(mixin): use withMixin in Stack to set mixin metadata in its constructs#37269mergify[bot] merged 3 commits intomainfrom
Conversation
Previously, if a stack has a mixin applied, the stack's constructs will not have its mixin metadata applied as Stack used applyTo directly instead of applyMixin which adds the metadata. Using withMixins calls the correct applyMixin function.
✅ 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). |
Merge Queue Status
This pull request spent 45 minutes 48 seconds in the queue, including 45 minutes 37 seconds running CI. Required conditions to merge
|
|
Comments on closed issues and PRs are hard for our team to see. |
Reason for this change
Previously, if a stack has a mixin applied (using
with), the stack's child constructs will not have its mixin metadata set. Stack usedapplyTodirectly instead ofapplyMixinwhich adds the metadata viaaddMetadatain https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/core/lib/mixins/private/mixin-metadata.ts#L30.Description of changes
Use withMixins, which calls the correct applyMixin function. Reflects the behaviour in
CfnElementandResource.Describe any new or updated permissions being added
No new permissions are added.
Description of how you validated changes
No new permissions are added.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license