Commit 6a5638a
authored
fix(core): does not generate a valid artifact id from some construct IDs (#33863)
### Issue
Closes #32808
Minimal reproduction:
```ts
const app = new cdk.App();
const stack = new cdk.Stack(app, 'Stack:Test', { stackName: "valid" });
assert(!stack.artifactId.match(/[^A-Za-z0-9_\-\.]/g))
```
### Reason for this change
When users create a `Stack` with an id containing certain special characters, the produced artifact file name would contain invalid characters.
### Description of changes
Ensure only valid artifact files names are produces, no matter the input.
### Describe any new or updated permissions being added
n/a
### Description of how you validated changes
New unit tests, existing test suite
I have updated the integ test using `--dry-run` as per instructions in the test file.
I have deployed the integ test using the instructions in the test file.
### 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*1 parent 3ff5501 commit 6a5638a
File tree
10 files changed
+409
-1000
lines changed- packages
- @aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.codepipeline-with-nested-stack.js.snapshot
- aws-cdk-lib/core
- lib
- test
10 files changed
+409
-1000
lines changedLines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments