Repository navigation
Check the tag, version, and latest tags before publishing a release image - #2603
Merged
Merged
Conversation
kmcginnes
marked this pull request as ready for review
November 13, 2026 23:38
This was referenced Nov 14, 2026
Layer: check-release-image-publish
…mage Layer: check-release-image-publish
A two-platform build with the arm64 stages under emulation takes about 5 to 7 minutes, so 20 minutes leaves 3x headroom.
The release image checks join the version script in scripts/, with one test project. The runtime image copies only named paths, so scripts/ stays out of it.
kmcginnes
force-pushed
the
check-release-image-publish
branch
from
November 17, 2026 01:42
ad8a7ef to
0545909
Compare
read -ra splits TAGS explicitly, so the push and verify steps quote every use and need no ShellCheck exception.
The workflow sets IMAGE for the whole job, and scripts/releaseImage.ts reads it instead of its own copy. testing.md goes back to main's wording, which already lists scripts.
Layer: check-release-image-publish
Layer: check-release-image-publish
Layer: check-release-image-publish
Layer: check-release-image-publish
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
A release run of
build_docker.ymlpublished whatever ref it ran on under that ref'spackage.jsonversion and always movedlatest, so a run onmaincould push over a published version, and a patch to an older line could movelatestback.Release mode now calls
scripts/releaseImage.ts, which has no dependencies and runs on the Node from.node-version:"Above every published numeric tag" uses the order of the SageMaker notebook lifecycle script, which pulls
sagemaker-<highest numeric tag>and never readslatest. A tag that isn't all numeric parts, such aslatestorsagemaker-3.3.2, ranks lowest. Solatestalways matches what notebooks pull.Snapshot runs push the same
latest-SNAPSHOTandsagemaker-latest-SNAPSHOTtags as before, and skip the new steps.The script reads the ref from
GITHUB_REF, which isrefs/tags/<tag>on arelease: publishedevent too, so publishing on release later only needs a new trigger.To publish a release, dispatch on its tag, as the workflow header now says:
The script sits next to the release version script in
scripts/, in the same Vitest project. The runtime image copies only named paths, soscripts/stays out of it.The job sets
IMAGE: public.ecr.aws/neptune/graph-exploreronce. The push step and the script both read it, so the image is named in one place.Evidence
Before: nothing checked the ref or the version, and
latestmoved on every release run.After:
scripts/releaseImage.test.tscovers a run on a branch, a tag that doesn't matchpackage.json, a version already published, a non-X.Y.Z version, an older version (nolatestmove), the newest version (moveslatest), numeric rather than text order, non-numeric tags, mixed or missing digests, a paged tag list, and throttled registry reads.Verified live: read-only, against the public ECR Public API, with a
package.jsonholding each version. No image was built or pushed, and the workflow was not run.3.3.2and3.3.1fail as already published3.3.3and3.4.0plan<version> sagemaker-<version> latest sagemaker-latestrefs/heads/mainfails the ref checkverify 3.3.2 sagemaker-3.3.2 latest sagemaker-latestpasses on one digestverify 3.3.2 latest-SNAPSHOTfails with two digests, andverify 3.3.3fails as missingactionlint passes on the workflow.
Merge Danger
Door: two-way
Impact: release process
Image consumers see no change. Every release still publishes
<version>andsagemaker-<version>, andlatestandsagemaker-latestnow always point to the highest version.A release dispatched on a branch now fails. Dispatch on the
v<version>tag instead. Two release runs started at once can still both pass the plan before either pushes, so start one release at a time.Related
🤖 Written by an AI agent on my behalf.