Skip to content

chore: pin @aws/agentcore-cdk version and auto-sync on release#811

Merged
notgitika merged 1 commit intomainfrom
chore/pin-agentcore-cdk-version
Apr 10, 2026
Merged

chore: pin @aws/agentcore-cdk version and auto-sync on release#811
notgitika merged 1 commit intomainfrom
chore/pin-agentcore-cdk-version

Conversation

@notgitika
Copy link
Copy Markdown
Contributor

Summary

  • Pins @aws/agentcore-cdk in the vended CDK template (src/assets/cdk/package.json) to an exact version (0.1.0-alpha.17) instead of a caret range (^0.1.0-alpha.1)
  • Adds an auto-sync step to the release workflow that fetches the latest @aws/agentcore-cdk from npm during release prep, so each CLI release PR automatically includes the latest CDK version
  • Updates snapshot test to match

Why

The caret range (^) creates a release-ordering race condition: if the CLI is released before the CDK constructs package is published to npm, users running agentcore create would get a stale or missing CDK version. Pinning eliminates this entirely.

How it works

During prepare-release in the release workflow (before the version bump), a new step:

  1. Runs npm view @aws/agentcore-cdk version to get the latest published version
  2. If it differs from the pin, updates src/assets/cdk/package.json
  3. The change is included in the same release commit/PR — no separate PRs needed

Release flow after this change

1. Release CDK constructs → publishes to npm
2. Trigger CLI release → auto-syncs CDK pin → release PR includes the bump

Test plan

  • CI passes (build, lint, typecheck, tests)
  • Snapshot test matches pinned version
  • Verify release workflow YAML is valid

Pin the @aws/agentcore-cdk dependency in the vended CDK project template
to an exact version (0.1.0-alpha.17) instead of using a caret range.
This eliminates the release-ordering race condition where the CLI release
references a CDK version that hasn't been published to npm yet.

Also adds an auto-sync step to the release workflow that fetches the
latest @aws/agentcore-cdk version from npm during release preparation,
so the pinned version is always up-to-date in each CLI release PR.
@notgitika notgitika requested a review from a team April 10, 2026 19:18
@github-actions github-actions Bot added the size/s PR size: S label Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.8.0.tgz

How to install

npm install https://github.com/aws/agentcore-cli/releases/download/pr-811-tarball/aws-agentcore-0.8.0.tgz

@github-actions
Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 44.49% 7044 / 15832
🔵 Statements 43.96% 7473 / 16999
🔵 Functions 41.88% 1260 / 3008
🔵 Branches 43.44% 4727 / 10880
Generated in workflow #1719 for commit 7e06854 by the Vitest Coverage Report Action

@notgitika notgitika merged commit 1e5c631 into main Apr 10, 2026
23 checks passed
@notgitika notgitika deleted the chore/pin-agentcore-cdk-version branch April 10, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants