fix: build release image from the version tag so its stamp matches#78
Conversation
deploy.yml checked out the default github.sha. On a manual release that is the pre-bump dispatch commit, so the built image's package.json was stamped one version behind the release it ships as (the v0.15.13 release shipped an image reporting 0.15.12). Pin the checkout to the release tag (v<version>), which bump-and-tag creates before deploy runs. auto_release is tag-triggered and already builds the tagged commit, so this is a no-op on that path. Generated with Claude Code Co-authored-by: Claude <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 19 minutes and 36 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
The published Docker image's baked
package.jsonversion lags the release tag by one. Thev0.15.13release shipped an image whosepackage.jsonreads0.15.12(confirmed: a fresh:latestpull on Apple Silicon ran the new multi-arch image butnode -p require('/app/package.json').versionreturned0.15.12).Cause:
deploy.yml'sactions/checkoutuses the default ref (github.sha). On a manual release,manual_release.ymlrunsbump-and-tag(bumppackage.json→ commitrelease: vX→ tag) and then callsdeploy— butgithub.shafor the run is still the pre-bump dispatch commit. So the image is built from source wherepackage.jsonis the previous version, yet tagged/shipped as the new one.This is purely a version-stamp issue (the code is current), but it's misleading — the
package.jsonversion probe is an unreliable "which release am I on" signal, and it made diagnosing a stale-image problem murkier during testing.Fix
Pin
deploy.yml's checkout to the release tag:bump-and-tagpushes the tag beforedeployruns (deployneeds: bump-and-tag), so the ref always resolves. The image is then built from the bumped commit and stamps the correct version.Safety for both callers
manual_release.yml(the affected path) — tag exists beforedeploy; now builds the bumped commit. ✅ fixes the lag.auto_release.yml— triggered by the tag push, so itsgithub.shais already the bumped/tagged commit (it even assertspackage.json == tag). Pinning to the same tag is a no-op. ✅ no regression.One-line workflow change; affects future releases only.
🤖 Generated with Claude Code
Generated by Claude Code