-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws-cdk-lib > codepipeline: Setting cliVersion
can cause an invalid version of cdk-assets
to attempt to be installed
#31253
aws-cdk-lib > codepipeline: Setting cliVersion
can cause an invalid version of cdk-assets
to attempt to be installed
#31253
Comments
cliVersion
can cause an invalid version of cdk-assets
to attempt tp be installed
cliVersion
can cause an invalid version of cdk-assets
to attempt tp be installedcliVersion
can cause an invalid version of cdk-assets
to attempt to be installed
Could be an issue since running ...
mypipelineAssetsFileAsset18008F02D:
Type: AWS::CodeBuild::Project
Properties:
Artifacts:
Type: CODEPIPELINE
Cache:
Type: NO_CACHE
Description: Pipeline step cdk-assets-bug-dev/Pipeline/Assets/FileAsset1
EncryptionKey: alias/aws/s3
Environment:
ComputeType: BUILD_GENERAL1_SMALL
Image: aws/codebuild/standard:7.0
ImagePullCredentialsType: CODEBUILD
PrivilegedMode: false
Type: LINUX_CONTAINER
ServiceRole:
Fn::GetAtt:
- mypipelineAssetsFileRole7EA0DD74
- Arn
Source:
BuildSpec: |-
{
"version": "0.2",
"phases": {
"install": {
"commands": [
"npm install -g [email protected]"
]
},
"build": {
"commands": [
"cdk-assets --path \"assembly-cdk-assets-bug-dev-my-codepipeline-stage/cdkassetsbugdevmycodepipelinestagemycodepipelinestackCAF97708.assets.json\" --verbose publish \"4cfc7e5d073ec23fbedf66061a6290221275ac87a2477bf6b9aae76b4ca74ddf:current_account-current_region\""
]
}
}
}
Type: CODEPIPELINE
Metadata:
aws:cdk:path: cdk-assets-bug-dev/my-pipeline/Assets/FileAsset1/Resource
... Perhaps we should try to avoid using |
Thanks for raising this issue. We are working on a fix for it, however, we do not recommend use of See:
|
Yup, we 100% get that (In fact I pasted that same comment to my team in Slack as we were investigating this 😄). We started using this during a period where minor releases were impacting the stability of our deploy pipeline. Since it is been a while since this has been the case, we are going to stop setting Thanks for following up so quickly! We'll keep an eye out for updates. |
Comments on closed issues and PRs are hard for our team to see. |
1 similar comment
Comments on closed issues and PRs are hard for our team to see. |
Describe the bug
The property
cliVersion
inCodePipeline
is used to infer the version ofcdk-assets
to install in thepublishAssetsAction
.Since #31119 was released, this causes the install to fail and the pipeline to break.
Regression Issue
Last Known Working CDK Version
2.153.0
Expected Behavior
The pipeline buildspec will be generated with a command to install a version of
cdk-assets
that is appropriate for the given version ofaws-cdk
.Current Behavior
The pipeline buildspec will be generated with a command to install
cdk-assets
with an invalid version string. This causes the build to fail with the following error.Reproduction Steps
Building this CDK Stack will generate a buildspec with the invalid
npm install
command. Note thatCrossAccountZoneDelegationRecord
is what triggers the behavior.The full repo can be found here.
Possible Solution
Either don't try to infer the version of
cdk-assets
at all or allow it to be set explicitly ifcliVersion
is set.Additional Information/Context
This commit was the source of this issue (PR #31119).
CDK CLI Version
2.154.1
Framework Version
No response
Node.js Version
v20.15.1
OS
Linux
Language
TypeScript
Language Version
5.5.4
Other information
No response
The text was updated successfully, but these errors were encountered: