Skip to content

Commit 0a606c9

Browse files
authored
chore(release): 2.161.1 (#31659)
See CHANGELOG
2 parents be5ad8b + 681664e commit 0a606c9

25 files changed

+236
-1124
lines changed

CHANGELOG.v2.alpha.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [2.161.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.161.0-alpha.0...v2.161.1-alpha.0) (2024-10-05)
6+
57
## [2.161.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.160.0-alpha.0...v2.161.0-alpha.0) (2024-10-03)
68

79

CHANGELOG.v2.md

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [2.161.1](https://github.com/aws/aws-cdk/compare/v2.161.0...v2.161.1) (2024-10-05)
6+
7+
8+
### Reverts
9+
10+
* feat(cli): cdk rollback ([#31407](https://github.com/aws/aws-cdk/issues/31407)) ([#31657](https://github.com/aws/aws-cdk/issues/31657)) ([29bf223](https://github.com/aws/aws-cdk/commit/29bf2233a33d3ded20639279fa712a5b036fe041))
11+
512
## [2.161.0](https://github.com/aws/aws-cdk/compare/v2.160.0...v2.161.0) (2024-10-03)
613

714

packages/@aws-cdk-testing/cli-integ/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Test suites are written as a collection of Jest tests, and they are run using Je
3737

3838
### Setup
3939

40-
Building the @aws-cdk-testing package is not very different from building the rest of the CDK. However, If you are having issues with the tests, you can ensure your environment is built properly by following the steps below:
40+
Building the @aws-cdk-testing package is not very different from building the rest of the CDK. However, If you are having issues with the tests, you can ensure your enviornment is built properly by following the steps below:
4141

4242
```shell
4343
yarn install # Install dependencies

packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts

+2-17
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ export const EXTENDED_TEST_TIMEOUT_S = 30 * 60;
2424
* For backwards compatibility with existing tests (so we don't have to change
2525
* too much) the inner block is expected to take a `TestFixture` object.
2626
*/
27-
export function withSpecificCdkApp(
28-
appName: string,
27+
export function withCdkApp(
2928
block: (context: TestFixture) => Promise<void>,
3029
): (context: TestContext & AwsContext & DisableBootstrapContext) => Promise<void> {
3130
return async (context: TestContext & AwsContext & DisableBootstrapContext) => {
@@ -37,7 +36,7 @@ export function withSpecificCdkApp(
3736
context.output.write(` Test directory: ${integTestDir}\n`);
3837
context.output.write(` Region: ${context.aws.region}\n`);
3938

40-
await cloneDirectory(path.join(RESOURCES_DIR, 'cdk-apps', appName), integTestDir, context.output);
39+
await cloneDirectory(path.join(RESOURCES_DIR, 'cdk-apps', 'app'), integTestDir, context.output);
4140
const fixture = new TestFixture(
4241
integTestDir,
4342
stackNamePrefix,
@@ -88,16 +87,6 @@ export function withSpecificCdkApp(
8887
};
8988
}
9089

91-
/**
92-
* Like `withSpecificCdkApp`, but uses the default integration testing app with a million stacks in it
93-
*/
94-
export function withCdkApp(
95-
block: (context: TestFixture) => Promise<void>,
96-
): (context: TestContext & AwsContext & DisableBootstrapContext) => Promise<void> {
97-
// 'app' is the name of the default integration app in the `cdk-apps` directory
98-
return withSpecificCdkApp('app', block);
99-
}
100-
10190
export function withCdkMigrateApp<A extends TestContext>(language: string, block: (context: TestFixture) => Promise<void>) {
10291
return async (context: A) => {
10392
const stackName = `cdk-migrate-${language}-integ-${context.randomString}`;
@@ -199,10 +188,6 @@ export function withDefaultFixture(block: (context: TestFixture) => Promise<void
199188
return withAws(withTimeout(DEFAULT_TEST_TIMEOUT_S, withCdkApp(block)));
200189
}
201190

202-
export function withSpecificFixture(appName: string, block: (context: TestFixture) => Promise<void>) {
203-
return withAws(withTimeout(DEFAULT_TEST_TIMEOUT_S, withSpecificCdkApp(appName, block)));
204-
}
205-
206191
export function withExtendedTimeoutFixture(block: (context: TestFixture) => Promise<void>) {
207192
return withAws(withTimeout(EXTENDED_TEST_TIMEOUT_S, withCdkApp(block)));
208193
}

packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/app.js

-100
This file was deleted.

packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/rollback-test-app/cdk.json

-7
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This patch brings the [fix](https://github.com/aws/aws-cdk/issues/31654) into the regression suite.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Skipping the test to fix issue https://github.com/aws/aws-cdk/issues/31654.
2+
# cli-integ tests failing for the old tests with the new cli changes for nested stacks.
3+
4+
test cdk rollback
5+
test cdk rollback --force

packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts

+1-80
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import {
3232
withCDKMigrateFixture,
3333
withExtendedTimeoutFixture,
3434
randomString,
35-
withSpecificFixture,
3635
withoutBootstrap,
3736
} from '../../lib';
3837

@@ -2285,85 +2284,7 @@ integTest(
22852284
}),
22862285
);
22872286

2288-
integTest(
2289-
'test cdk rollback',
2290-
withSpecificFixture('rollback-test-app', async (fixture) => {
2291-
let phase = '1';
2292-
2293-
// Should succeed
2294-
await fixture.cdkDeploy('test-rollback', {
2295-
options: ['--no-rollback'],
2296-
modEnv: { PHASE: phase },
2297-
verbose: false,
2298-
});
2299-
try {
2300-
phase = '2a';
2301-
2302-
// Should fail
2303-
const deployOutput = await fixture.cdkDeploy('test-rollback', {
2304-
options: ['--no-rollback'],
2305-
modEnv: { PHASE: phase },
2306-
verbose: false,
2307-
allowErrExit: true,
2308-
});
2309-
expect(deployOutput).toContain('UPDATE_FAILED');
2310-
2311-
// Rollback
2312-
await fixture.cdk(['rollback'], {
2313-
modEnv: { PHASE: phase },
2314-
verbose: false,
2315-
});
2316-
} finally {
2317-
await fixture.cdkDestroy('test-rollback');
2318-
}
2319-
}),
2320-
);
2321-
2322-
integTest(
2323-
'test cdk rollback --force',
2324-
withSpecificFixture('rollback-test-app', async (fixture) => {
2325-
let phase = '1';
2326-
2327-
// Should succeed
2328-
await fixture.cdkDeploy('test-rollback', {
2329-
options: ['--no-rollback'],
2330-
modEnv: { PHASE: phase },
2331-
verbose: false,
2332-
});
2333-
try {
2334-
phase = '2b'; // Fail update and also fail rollback
2335-
2336-
// Should fail
2337-
const deployOutput = await fixture.cdkDeploy('test-rollback', {
2338-
options: ['--no-rollback'],
2339-
modEnv: { PHASE: phase },
2340-
verbose: false,
2341-
allowErrExit: true,
2342-
});
2343-
2344-
expect(deployOutput).toContain('UPDATE_FAILED');
2345-
2346-
// Should still fail
2347-
const rollbackOutput = await fixture.cdk(['rollback'], {
2348-
modEnv: { PHASE: phase },
2349-
verbose: false,
2350-
allowErrExit: true,
2351-
});
2352-
2353-
expect(rollbackOutput).toContain('Failing rollback');
2354-
2355-
// Rollback and force cleanup
2356-
await fixture.cdk(['rollback', '--force'], {
2357-
modEnv: { PHASE: phase },
2358-
verbose: false,
2359-
});
2360-
} finally {
2361-
await fixture.cdkDestroy('test-rollback');
2362-
}
2363-
}),
2364-
);
2365-
2366-
integTest('cdk bootstrap notice is displayed correctly', withDefaultFixture(async (fixture) => {
2287+
integTest('cdk notices are displayed correctly', withDefaultFixture(async (fixture) => {
23672288

23682289
const cache = {
23692290
expiration: 4125963264000, // year 2100 so we never overwrite the cache

0 commit comments

Comments
 (0)