Skip to content

Commit 8ab84ec

Browse files
author
Elad Ben-Israel
authored
refactor(cx-api): bump cli <=> cdk protocol version (#2956)
following up on #2922, manifest may include "env" that indicates unknown-account/unknown-region, which will cause old CLIs to fail, so we must bump the version to ensure compatibility. BREAKING CHANGE: Previous versions of the CDK CLI will not be fully compatible with this version of the framework and vice versa.
1 parent a942e4c commit 8ab84ec

File tree

17 files changed

+19
-19
lines changed

17 files changed

+19
-19
lines changed

packages/@aws-cdk/cdk/test/test.synthesis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export = {
7878
]);
7979
test.deepEqual(readJson(session.directory, 'foo.json'), { bar: 123 });
8080
test.deepEqual(session.manifest, {
81-
version: '0.34.0',
81+
version: '0.36.0',
8282
artifacts: {
8383
'my-random-construct': {
8484
type: 'aws:cloudformation:stack',

packages/@aws-cdk/cx-api/lib/cloud-assembly.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export class CloudAssemblyBuilder {
209209

210210
// "backwards compatibility": in order for the old CLI to tell the user they
211211
// need a new version, we'll emit the legacy manifest with only "version".
212-
// this will result in an error "CDK Toolkit >= 0.34.0 is required in order to interact with this program."
212+
// this will result in an error "CDK Toolkit >= CLOUD_ASSEMBLY_VERSION is required in order to interact with this program."
213213
fs.writeFileSync(path.join(this.outdir, 'cdk.out'), JSON.stringify({ version: CLOUD_ASSEMBLY_VERSION }));
214214

215215
return new CloudAssembly(this.outdir);

packages/@aws-cdk/cx-api/lib/versioning.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import semver = require('semver');
1616
* updated (as the current verison in package.json has already been released!)
1717
* - The request does not have versioning yet, only the response.
1818
*/
19-
export const CLOUD_ASSEMBLY_VERSION = '0.34.0';
19+
export const CLOUD_ASSEMBLY_VERSION = '0.36.0';
2020

2121
/**
2222
* Look at the type of response we get and upgrade it to the latest expected version

packages/@aws-cdk/cx-api/test/__snapshots__/cloud-assembly.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Array [
3939

4040
exports[`empty assembly 1`] = `
4141
Object {
42-
"version": "0.34.0",
42+
"version": "0.36.0",
4343
}
4444
`;
4545

packages/@aws-cdk/cx-api/test/cloud-assembly.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ test('fails for invalid dependencies', () => {
8787
});
8888

8989
test('verifyManifestVersion', () => {
90-
verifyManifestVersion('0.34.0');
91-
expect(() => verifyManifestVersion('0.31.0')).toThrow('CDK CLI can only be used with apps created by CDK >= 0.34.0');
92-
expect(() => verifyManifestVersion('0.35.0')).toThrow('CDK CLI >= 0.35.0 is required to interact with this app');
90+
verifyManifestVersion(CLOUD_ASSEMBLY_VERSION);
91+
expect(() => verifyManifestVersion('0.31.0')).toThrow(`CDK CLI can only be used with apps created by CDK >= ${CLOUD_ASSEMBLY_VERSION}`);
92+
expect(() => verifyManifestVersion('99.99.99')).toThrow(`CDK CLI >= 99.99.99 is required to interact with this app`);
9393
});

packages/@aws-cdk/cx-api/test/fixtures/assets/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.34.0",
2+
"version": "0.36.0",
33
"artifacts": {
44
"MyStackName": {
55
"type": "aws:cloudformation:stack",

packages/@aws-cdk/cx-api/test/fixtures/depends/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.34.0",
2+
"version": "0.36.0",
33
"artifacts": {
44
"StackA": {
55
"type": "aws:cloudformation:stack",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "0.34.0"
2+
"version": "0.36.0"
33
}

packages/@aws-cdk/cx-api/test/fixtures/invalid-artifact-type/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.34.0",
2+
"version": "0.36.0",
33
"artifacts": {
44
"MyArt": {
55
"type": "who:am:i",

packages/@aws-cdk/cx-api/test/fixtures/invalid-depends/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.34.0",
2+
"version": "0.36.0",
33
"artifacts": {
44
"StackA": {
55
"type": "aws:cloudformation:stack",

0 commit comments

Comments
 (0)