ci: auto-update asset snapshots during release#876
Open
aidandaly24 wants to merge 2 commits intomainfrom
Open
Conversation
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.
Contributor
Package TarballHow to installnpm install https://github.com/aws/agentcore-cli/releases/download/pr-876-tarball/aws-agentcore-0.8.2.tgz |
Contributor
Coverage Report
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/workflows/release.ymlthat regenerates the CDK asset snapshot right after the existing@aws/agentcore-cdkversion sync.src/assets/cdk/package.jsonis now captured in the same release commit — the existinggit add -Aon line 162 picks it up automatically.Assets Directory Snapshotsdescribe block via-tso 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 requiredist/cli/index.mjs.Context
Follow-up to #852 (CDK version pin bump) and #875 (manual snapshot regen). The release workflow bumps
@aws/agentcore-cdkin the vended template on every release but never refreshed the snapshot, so contributors had to catch the drift after the fact.Test plan
npx vitest run --project unit --update -t "Assets Directory Snapshots"locally — exit 0,Test Files: 1 passed | 229 skipped, 90 tests passedgit add -Aso regenerated snapshot files are included in the release commit