-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(integ-runner): ignoring asset changes doesn't work with new style…
… assets (#21638) The integ-runner has the ability to ignore changes to assets since asset changes can lead to a lot of snapshot failures and we don't always need to re-deploy the integ test when this occurs. The `canonicalizeTemplate` function only worked with the v1 (`@aws-cdk/core:newStyleStackSynthesis:false`) assets which were stored in CFN parameters. This PR updates the logic to also account for the new style assets. Because we now have a list of the actual assets in the asset manifest the logic simply reads the list of assets from the manifest and replaces substitutes those values. I also refactored some things: - The `canonicalizeTemplate` function was moved into a private method of `IntegSnapshotRunner` since that is the only place it is used. - The CloudAssemblyManifest asset methods were refactored so that we could either return the asset location or the asset id ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
38 changed files
with
1,205 additions
and
95 deletions.
There are no files selected for viewing
71 changes: 0 additions & 71 deletions
71
packages/@aws-cdk/integ-runner/lib/runner/private/canonicalize-assets.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...ages/@aws-cdk/integ-runner/test/test-data/cdk-integ.out.test-with-new-assets-diff/cdk.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"version":"18.0.0"} |
13 changes: 13 additions & 0 deletions
13
...s/@aws-cdk/integ-runner/test/test-data/cdk-integ.out.test-with-new-assets-diff/integ.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"version": "v1.0.0", | ||
"testCases": { | ||
"xxxxx.test-with-new-assets": { | ||
"stacks": ["test-stack"], | ||
"stackUpdateWorkflow": false, | ||
"diffAssets": true, | ||
"allowDestroy": [ | ||
"AWS::IAM::Role" | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.