-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(core): allow overriding the stage name #22223
Conversation
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.
The Pull Request Linter fails with the following errors:
❌ Features must contain a change to a README file.
❌ Features must contain a change to an integration test file and the resulting snapshot.
PRs must pass status checks before we can provide a meaningful review.
The README of core doesn't describe |
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.
Please make sure that your PR body describes the problem the PR is solving, and the design approach and alternatives considered. Explain why the PR solves the problem. A link to an issue is helpful, but does not replace an explanation of your thought process (See Contributing Guide, Pull Requests)
@TheRealAmazonKendra thanks for helping me. I updated the PR to explain my PR better. I hope its enough? |
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.
The Pull Request Linter fails with the following errors:
❌ Features must contain a change to a README file.
❌ Features must contain a change to an integration test file and the resulting snapshot.
PRs must pass status checks before we can provide a meaningful review.
comments addressed
Pull Request updated. Dissmissing 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). |
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). |
Currently the stage name is derived from the id of the stage and later becomes part of each stack name inside the stage: https://github.com/aws/aws-cdk/blob/c425e8ca1a3d296eb6a7fd7e005d07c1eadd16aa/packages/%40aws-cdk/core/lib/stage.ts#L139 https://github.com/aws/aws-cdk/blob/c425e8ca1a3d296eb6a7fd7e005d07c1eadd16aa/packages/%40aws-cdk/core/lib/stack.ts#L1139-L1143 Since the ids in a scope must be different, deploying the same stage in the same scope to multiple regions would require different ids and would then lead to different stack names in the end. To keep stack names uniform across regions, a stack already allows customising the stack name uncoupled from the id: https://github.com/aws/aws-cdk/blob/c425e8ca1a3d296eb6a7fd7e005d07c1eadd16aa/packages/%40aws-cdk/core/lib/stack.ts#L106-L111 This PR follows up on that concept and also allows customising the stage name. This would then allow to deploy the same stage in the same scope to multiple regions while keeping the resulting stack names the same across regions. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Currently the stage name is derived from the id of the stage and later becomes part of each stack name inside the stage: https://github.com/aws/aws-cdk/blob/c425e8ca1a3d296eb6a7fd7e005d07c1eadd16aa/packages/%40aws-cdk/core/lib/stage.ts#L139 https://github.com/aws/aws-cdk/blob/c425e8ca1a3d296eb6a7fd7e005d07c1eadd16aa/packages/%40aws-cdk/core/lib/stack.ts#L1139-L1143 Since the ids in a scope must be different, deploying the same stage in the same scope to multiple regions would require different ids and would then lead to different stack names in the end. To keep stack names uniform across regions, a stack already allows customising the stack name uncoupled from the id: https://github.com/aws/aws-cdk/blob/c425e8ca1a3d296eb6a7fd7e005d07c1eadd16aa/packages/%40aws-cdk/core/lib/stack.ts#L106-L111 This PR follows up on that concept and also allows customising the stage name. This would then allow to deploy the same stage in the same scope to multiple regions while keeping the resulting stack names the same across regions. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Currently the stage name is derived from the id of the stage and later becomes part of each stack name inside the stage:
aws-cdk/packages/@aws-cdk/core/lib/stage.ts
Line 139 in c425e8c
aws-cdk/packages/@aws-cdk/core/lib/stack.ts
Lines 1139 to 1143 in c425e8c
Since the ids in a scope must be different, deploying the same stage in the same scope to multiple regions would require different ids and would then lead to different stack names in the end. To keep stack names uniform across regions, a stack already allows customising the stack name uncoupled from the id:
aws-cdk/packages/@aws-cdk/core/lib/stack.ts
Lines 106 to 111 in c425e8c
This PR follows up on that concept and also allows customising the stage name.
This would then allow to deploy the same stage in the same scope to multiple regions while keeping the resulting stack names the same across regions.
All Submissions:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license