Skip to content

ci: auto-update asset snapshots during release#876

Open
aidandaly24 wants to merge 2 commits intomainfrom
chore/auto-update-snapshots-on-release
Open

ci: auto-update asset snapshots during release#876
aidandaly24 wants to merge 2 commits intomainfrom
chore/auto-update-snapshots-on-release

Conversation

@aidandaly24
Copy link
Copy Markdown
Contributor

Summary

  • Adds a step to .github/workflows/release.yml that regenerates the CDK asset snapshot right after the existing @aws/agentcore-cdk version sync.
  • Any version drift in src/assets/cdk/package.json is now captured in the same release commit — the existing git add -A on line 162 picks it up automatically.
  • Scoped to the Assets Directory Snapshots describe block via -t so only the one snapshot file that can drift from a CDK version bump runs. ~35s instead of a full ~65s unit-test run, and not blocked by unrelated tests that require dist/cli/index.mjs.

Context

Follow-up to #852 (CDK version pin bump) and #875 (manual snapshot regen). The release workflow bumps @aws/agentcore-cdk in the vended template on every release but never refreshed the snapshot, so contributors had to catch the drift after the fact.

Test plan

  • Ran npx vitest run --project unit --update -t "Assets Directory Snapshots" locally — exit 0, Test Files: 1 passed | 229 skipped, 90 tests passed
  • Verified the step is placed before git add -A so regenerated snapshot files are included in the release commit
  • Pre-commit typecheck + prettier + secretlint passed

Regenerates the CDK package.json snapshot to match the version bump
landed in #852, which pinned @aws/agentcore-cdk to 0.1.0-alpha.19 in
the vended CDK template but did not refresh the corresponding snapshot.
Adds a step to the Release workflow that regenerates the CDK asset
snapshot immediately after the @aws/agentcore-cdk version sync, so any
version drift in src/assets/cdk/package.json is captured in the same
release commit (picked up by the existing `git add -A` on line 162).

Scoped to the `Assets Directory Snapshots` describe block via `-t` so
only the one snapshot file that can drift from a CDK version bump runs
— ~35s instead of a full ~65s unit-test run, and not blocked by
unrelated tests that require `dist/cli/index.mjs` (e.g., dev.test.ts).

Follow-up to #852 and #875, which had to manually regenerate this
snapshot after the 0.1.0-alpha.18 → 0.1.0-alpha.19 pin landed.
@aidandaly24 aidandaly24 requested a review from a team April 16, 2026 22:43
@github-actions github-actions bot added the size/xs PR size: XS label Apr 16, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.8.2.tgz

How to install

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

@github-actions
Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 44.57% 7060 / 15840
🔵 Statements 44.04% 7491 / 17007
🔵 Functions 41.98% 1262 / 3006
🔵 Branches 43.59% 4752 / 10900
Generated in workflow #1819 for commit 9f870fa by the Vitest Coverage Report Action

Copy link
Copy Markdown
Contributor

@notgitika notgitika left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants