Error: Cloud assembly schema version mismatch
I was upgrading my project's CDK version to the latest (v2.154.1) and this action has failed.
Run corymhall/[email protected]
with:
failOnDestructiveChanges: false
githubToken: ***
noFailOnDestructiveChanges: List of stages where breaking changes will not fail the build
cdkOutDir: cdk.out
env:
AWS_DEFAULT_REGION: ap-southeast-2
AWS_REGION: ap-southeast-2
AWS_ACCESS_KEY_ID: ***
AWS_SECRET_ACCESS_KEY: ***
AWS_SESSION_TOKEN: ***
ENVIRONMENT_NAME: live
Error performing diff: Error: Cannot read integ manifest 'cdk.out/manifest.json': Cloud assembly schema version mismatch: Maximum schema version supported is 36.0.0, but found 36.0.16
at Function.fromFile (/home/runner/work/_actions/corymhall/cdk-diff-action/v1.2.10/lib/assembly.js:44:1)
at Function.fromPath (/home/runner/work/_actions/corymhall/cdk-diff-action/v1.2.10/lib/assembly.js:61:1)
at run (/home/runner/work/_actions/corymhall/cdk-diff-action/v1.2.10/lib/action.js:45:1)
at Object.94822 (/home/runner/work/_actions/corymhall/cdk-diff-action/v1.2.10/lib/index.js:28:1)
at __nccwpck_require__ (/home/runner/work/_actions/corymhall/cdk-diff-action/v1.2.10/webpack/bootstrap:21:1)
at /home/runner/work/_actions/corymhall/cdk-diff-action/v1.2.10/webpack/startup:4:1
at Object.<anonymous> (/home/runner/work/_actions/corymhall/cdk-diff-action/v1.2.10/dist/index.js:88980:12)
at Module._compile (node:internal/modules/cjs/loader:1358:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
at Module.load (node:internal/modules/cjs/loader:1208:32)
This is how I use this action.
- name: Diff against prod
if: steps.diffset.outputs.cdk_files
uses: corymhall/[email protected]
env:
ENVIRONMENT_NAME: prod
with:
failOnDestructiveChanges: false
githubToken: ${{ secrets.GITHUB_TOKEN }},
It was working with no problems with v2.153.0 so I have reverted to that version in the mean time.
Looks like this is back:
Run corymhall/cdk-diff-action@v2
with:
failOnDestructiveChanges: false
githubToken: ***
stackSelectionStrategy: all-stacks
cdkOutDir: cdk.out
diffMethod: change-set
defaultStageDisplayName: DefaultStage
[15:55:27] Starting Synthesis ...
[15:55:27] --app points to a cloud assembly, so we bypass synth
Error running process stages: Error: Cloud assembly schema version mismatch: Maximum schema version supported is 44.x.x, but found 45.0.0. You need at least CLI version 2.1020.2 to read this manifest.
at Function.validate (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/node_modules/@aws-cdk/cloud-assembly-schema/lib/manifest.js:142:1)
Error: Cloud assembly schema version mismatch: Maximum schema version supported is 44.x.x, but found 45.0.0. You need at least CLI version 2.1020.2 to read this manifest.
at Function.loadManifest (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/node_modules/@aws-cdk/cloud-assembly-schema/lib/manifest.js:185:1)
at Function.loadAssemblyManifest (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/node_modules/@aws-cdk/cloud-assembly-schema/lib/manifest.js:50:1)
at new CloudAssembly (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/node_modules/@aws-cdk/cx-api/lib/cloud-assembly.js:40:1)
at NestedCloudAssemblyArtifact.get (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/node_modules/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact-aug.js:14:1)
at /home/runner/work/_actions/corymhall/cdk-diff-action/v2/node_modules/@aws-cdk/cx-api/lib/cloud-assembly.js:123:1
at Array.map (<anonymous>)
at search (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/node_modules/@aws-cdk/cx-api/lib/cloud-assembly.js:123:1)
at CloudAssembly.get stacksRecursively [as stacksRecursively] (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/node_modules/@aws-cdk/cx-api/lib/cloud-assembly.js:126:1)
at StackAssembly.selectStacksV2 (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/node_modules/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/stack-assembly.js:39:1)
Error performing diff: Error: Cloud assembly schema version mismatch: Maximum schema version supported is 44.x.x, but found 45.0.0. You need at least CLI version 2.1020.2 to read this manifest.
at Function.validate (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/node_modules/@aws-cdk/cloud-assembly-schema/lib/manifest.js:142:1)
at Function.loadManifest (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/node_modules/@aws-cdk/cloud-assembly-schema/lib/manifest.js:185:1)
at Function.loadAssemblyManifest (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/node_modules/@aws-cdk/cloud-assembly-schema/lib/manifest.js:50:1)
at new CloudAssembly (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/node_modules/@aws-cdk/cx-api/lib/cloud-assembly.js:40:1)
at NestedCloudAssemblyArtifact.get (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/node_modules/@aws-cdk/cx-api/lib/artifacts/nested-cloud-assembly-artifact-aug.js:14:1)
at /home/runner/work/_actions/corymhall/cdk-diff-action/v2/node_modules/@aws-cdk/cx-api/lib/cloud-assembly.js:123:1
at Array.map (<anonymous>)
at search (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/node_modules/@aws-cdk/cx-api/lib/cloud-assembly.js:123:1)
at CloudAssembly.get stacksRecursively [as stacksRecursively] (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/node_modules/@aws-cdk/cx-api/lib/cloud-assembly.js:126:1)
at StackAssembly.selectStacksV2 (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/node_modules/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/stack-assembly.js:39:1)
@EHadoux are you using nested stacks?
Not per se, my hierarchy is Stage-[1 - n]-Stacks-[1 - n]-Constructs. So not literally a NestedStack.
If any useful, here are the outputs for npm ls
That said I now receive this, not sure if this is related.
Run corymhall/cdk-diff-action@v2
with:
failOnDestructiveChanges: false
githubToken: ***
stackSelectionStrategy: all-stacks
cdkOutDir: cdk.out
diffMethod: change-set
defaultStageDisplayName: DefaultStage
env:
NPM_CONFIG_USERCONFIG: /home/runner/work/_temp/.npmrc
NODE_AUTH_TOKEN: XXXXX-XXXXX-XXXXX-XXXXX
AWS_DEFAULT_REGION: eu-west-2
AWS_REGION: eu-west-2
AWS_ACCESS_KEY_ID: ***
AWS_SECRET_ACCESS_KEY: ***
AWS_SESSION_TOKEN: ***
Error performing diff: TypeError: Cannot read properties of undefined (reading 'head')
at new Comments (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/lib/comment.js:12:1)
at run (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/lib/action.js:75:1)
at Object.51188 (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/lib/index.js:38:1)
at __nccwpck_require__ (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/webpack/bootstrap:21:1)
Error: Cannot read properties of undefined (reading 'head')
at /home/runner/work/_actions/corymhall/cdk-diff-action/v2/webpack/startup:4:1
at Object.<anonymous> (/home/runner/work/_actions/corymhall/cdk-diff-action/v2/dist/index.js:375423:12)
at Module._compile (node:internal/modules/cjs/loader:1529:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1613:10)
at Module.load (node:internal/modules/cjs/loader:1275:32)
at Function.Module._load (node:internal/modules/cjs/loader:1096:12)
Same thing here. Using newest aws-cdk and aws-cdk-lib
Ok I've tracked this down and created an issue for it https://github.com/aws/aws-cdk-cli/issues/749.
For now i'll try to keep the dependencies up to date to try and avoid this issue. There was an issue that prevented this action from releasing for the last couple of weeks, but that's been fixed now.