Skip to content
This repository was archived by the owner on Apr 22, 2025. It is now read-only.

Commit a8d4f39

Browse files
authored
fix(cli-integ): hardcoded qualifier and toolkit stack name in cdk diff with large changeset... test (#79)
When these are hardcoded, it makes the test less stable in case of potential cleanup failures. For example, canary runs now exhibit this error: ```console ailed resources: -- 751 | custom-stack2 \| 4:57:43 AM \| CREATE_FAILED \| AWS::S3::Bucket \| StagingBucket Resource handler returned message: "cdk-abc1111-assets-222461455105-us-east-1 already exists (Service: S3, Status Code: 0, Request ID: null)" (RequestToken: 98d6b74c-97d6-2b80-9e9f-a4d4eb550e2b, HandlerErrorCode: AlreadyExists) 752 | ❌ Environment aws://222461455105/us-east-1 failed bootstrapping: _ToolkitError: The stack named custom-stack2 failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Resource handler returned message: "cdk-abc1111-assets-222461455105-us-east-1 already exists (Service: S3, Status Code: 0, Request ID: null)" (RequestToken: 98d6b74c-97d6-2b80-9e9f-a4d4eb550e2b, HandlerErrorCode: AlreadyExists) 753 | at FullCloudFormationDeployment.monitorDeployment (/tmp/tmpcdkXE8YYD/node_modules/aws-cdk/lib/index.js:140591:17) 754 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 755 | at async _BootstrapStack.update (/tmp/tmpcdkXE8YYD/node_modules/aws-cdk/lib/index.js:172482:21) 756 | at async /tmp/tmpcdkXE8YYD/node_modules/aws-cdk/lib/index.js:333085:29 { 757 | type: 'toolkit', 758 | source: 'toolkit', 759 | cause: undefined 760 | } ``` I cleaned up the environment, but lets also make the test create a unique stack every time it runs.
1 parent e90034a commit a8d4f39

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cdk-cdk-diff-with-large-changeset-and-custom-toolkit-stack-name-and-qualifier-does-not-fail.integtest.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-c
44

55
integTest('cdk diff with large changeset and custom toolkit stack name and qualifier does not fail', withoutBootstrap(async (fixture) => {
66
// Bootstrapping with custom toolkit stack name and qualifier
7-
const qualifier = 'abc1111';
8-
const toolkitStackName = 'custom-stack2';
7+
const qualifier = fixture.qualifier;
8+
9+
const toolkitStackName = fixture.bootstrapStackName;
910
await fixture.cdkBootstrapModern({
1011
verbose: true,
1112
toolkitStackName: toolkitStackName,

0 commit comments

Comments
 (0)