Skip to content

feat(pipelines): cdk-assets version is configurable #34802

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

Merged
merged 2 commits into from
Jun 24, 2025

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Jun 24, 2025

Make it possible to configure the version of cdk-assets CLI used by the CDK Pipeline.

This is only useful for versions of cdk-assets newerthan3.3.1`, as older versions have wildcard ranges in their transitive dependencies and may install different versions of packages depending on what is currently available on npmjs.com.

The first cdk-assets version after 3.3.1 will bundle its dependencies so that the install operation will be deterministic.

We recommend you don't use this feature and just leave it at latest. The bundling of dependencies of cdk-assets will already remove any install failures around the release time of a new SDKv3 version, that used to plague cdk-assets in the past.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Make it possible to configure the version of `cdk-assets` CLI used by
the CDK Pipeline.

This is only useful for versions of `cdk-assets` *newer*` than `3.3.1`,
as older versions have wildcard ranges in their transitive dependencies
and may install different versions of packages depending on what is
currently available on npmjs.com.

The first `cdk-assets` version after `3.3.1` will bundle its
dependencies so that the install operation will be deterministic.

We recommend you don't use this feature and just leave it at `latest`.
The bundling of dependencies of `cdk-assets` will already remove any
install failures around the release time of a new SDKv3 version, that
used to plague `cdk-assets` in the past.
@rix0rrr rix0rrr requested a review from a team June 24, 2025 10:25
@rix0rrr rix0rrr added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Jun 24, 2025
@github-actions github-actions bot added the p2 label Jun 24, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team June 24, 2025 10:25
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jun 24, 2025
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

@rix0rrr rix0rrr added the pr-linter/exempt-readme The PR linter will not require README changes label Jun 24, 2025
@rix0rrr rix0rrr changed the title feat(pipelines): configure version of cdk-assets feat(pipelines): cdk-assets version is configurable Jun 24, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review June 24, 2025 10:28

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@@ -411,6 +426,7 @@ export class CodePipeline extends PipelineBase {
this.dockerCredentials = props.dockerCredentials ?? [];
this.singlePublisherPerAssetType = !(props.publishAssetsInParallel ?? true);
this.cliVersion = props.cliVersion ?? preferredCliVersion();
this.cdkAssetsCliVersion = props.cdkAssetsCliVersion ?? 'latest';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use a similar algorithm to cliVersion i.e. preferredCliVersion?

Copy link
Contributor

mergify bot commented Jun 24, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: d0ed306
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

mergify bot commented Jun 24, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit a361c9c into main Jun 24, 2025
17 checks passed
@mergify mergify bot deleted the huijbers/configurable-cdk-assets branch June 24, 2025 11:27
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
contribution/core This is a PR that came from AWS. p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes pr-linter/exempt-readme The PR linter will not require README changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants