简体   繁体   中英

Github action failed on aws-cdk dependency

we executed the same workflow an hour apart. The initial run was successful and then we received the following error in the subsequent execution:

This CDK CLI is not compatible with the CDK library used by your application. Please upgrade the CLI to the latest version. (Cloud assembly schema version mismatch: Maximum schema version supported is 15.0.0, but found 16.0.0)

This error occurs in the cdk synth stage. As far as I can tell, we are installing aws-cdk@latest (2.5.0) and our requirements.txt is installing a number of packages. When I compared the dependencies between the two runs I found the following:

Successful build: Collecting aws-cdk.cloud-assembly-schema== 1.138.2
Downloading aws_cdk.cloud_assembly_schema- 1.138.2 -py3-none-any.whl (150 kB)

Failed build: Collecting aws-cdk.cloud-assembly-schema== 1.139.0
Downloading aws_cdk.cloud_assembly_schema- 1.139.0 -py3-none-any.whl (153 kB)

I'm assuming the "latest" version was picked up? However, how can I track this type of information? I have tried a number of searches include aws-cdk versions, aws-cdk 1.139.0 release date, etc... Perhaps, I don't understand the package versioning?

Any feedback is appreciated. Thank you!

This is because the new 1.139 release upgraded the schema version to 16.0.0, whereas 2.5.0 is still on 15.0.0. 16.0.0 in CDKv2 will be released with 2.6.0. In the meantime, install the 1.139 version of the CLI, it will work.

A general way to solve this would be to upgrade your constructs to v2 to never have this mismatch.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM