fix(ci): change staging tag format to avoid release-please collision#326
Conversation
Staging tags previously used `v{version}-staging-rc-{N}` format which
matches release-please's root package tag pattern `v{version}`. This
caused release-please to match staging pre-releases to path "." during
release discovery, preventing it from finding the actual root release
and blocking tag creation with "untagged merged release PRs outstanding".
New format: `staging-v{version}-rc-{N}` (e.g., `staging-v0.26.0-rc-1`).
The `staging-` prefix ensures no collision with `v{version}`.
Also adds packages/crypto to release-please config for independent
semver versioning (was removed from extra-files in #316 but never
added as its own package entry).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 78733a8d9174
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
WalkthroughThis PR updates staging deployment workflows to use a new tag naming pattern ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Pull request overview
Adjusts CI/release tooling to prevent staging pre-release tags from being mistaken for production release tags by release-please, and enables independent versioning for packages/crypto.
Changes:
- Updates staging tag format to
staging-v{version}-rc-{N}to avoid collisions withv{version}. - Extends release-please configuration/manifests to include
packages/cryptoas an independently versioned package. - Updates staging deploy workflow tag trigger to match the new staging tag prefix.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
release-please-config.json |
Adds packages/crypto to release-please packages config for independent releases. |
.release-please-manifest.json |
Adds an initial tracked version entry for packages/crypto. |
.github/workflows/tag-staging.yml |
Changes how staging RC tags are computed/created to use the new staging- prefix. |
.github/workflows/deploy-staging.yml |
Updates tag trigger filter to staging-v* to match new staging tag format. |
| LAST_RC=$(git tag -l "${TAG}-staging-rc-*" | sed "s/${TAG}-staging-rc-//" | sort -n | tail -1) | ||
| # New format: staging-v0.26.0-rc-N (avoids collision with release-please v{version} pattern) | ||
| STAGING_PREFIX="staging-${TAG}-rc" | ||
| LAST_RC=$(git tag -l "${STAGING_PREFIX}-*" | sed "s/${STAGING_PREFIX}-//" | sort -n | tail -1) |
There was a problem hiding this comment.
sed "s/${STAGING_PREFIX}-//" treats STAGING_PREFIX as a regex; since TAG contains dots (e.g. v0.26.0), . will match any character and can strip the wrong prefix if similarly-named tags exist, leading to an incorrect LAST_RC/NEXT_RC. Prefer a non-regex approach (e.g., bash ${t#${STAGING_PREFIX}-}) or escape/anchor the pattern before passing it to sed.
| LAST_RC=$(git tag -l "${STAGING_PREFIX}-*" | sed "s/${STAGING_PREFIX}-//" | sort -n | tail -1) | |
| LAST_RC=$( | |
| git tag -l "${STAGING_PREFIX}-*" | | |
| while read -r t; do | |
| t=${t#${STAGING_PREFIX}-} | |
| echo "$t" | |
| done | | |
| sort -n | | |
| tail -1 | |
| ) |
Summary
v{version}-staging-rc-{N}tostaging-v{version}-rc-{N}packages/cryptoto release-please config for independent semver versioningRoot Cause
Release-please scans all GitHub Releases to find the "latest release" for each configured package path. The root package (
.) usesinclude-component-in-tag: false, so its tag pattern isv{version}. Staging pre-release tags likev0.26.0-staging-rc-1matched this pattern, causing release-please to either match them to path.(wrong version) or skip the actualv0.26.0release entirely. This resulted in "Missing 1 paths: ." followed by "There are untagged, merged release PRs outstanding - aborting".The
staging-prefix ensures staging tags never collide withv{version}.Cleanup performed
v0.26.2-staging-rc-1,v0.26.0-staging-rc-1,v0.25.2-staging-rc-1,v0.25.1-staging-rc-1) and their tagsv0.26.1release to unblock release-pleaseautorelease: pendingtoautorelease: taggedTest plan
staging-v{version}-rc-1🤖 Generated with Claude Code
Summary by CodeRabbit