fix(release): add bump=none to iterate pre-release trains#1909
Conversation
Repeated `next` pre-releases on a patch-level release advanced the base instead of iterating the counter: 0.19.5-next.1 -> 0.19.6-next.1, so the stable promote landed 0.19.6 instead of 0.19.5. Cause: the `patch` path always re-bumps cur.base, and the manifest carries the in-flight pre-release version, so each repeated patch+next re-bumped the base. Add a `none` bump that iterates an in-flight pre-release train (highest pre-release base above the latest stable) without advancing the base, falling back to the latest stable when no train exists (preserves alpha-release semantics). patch/minor/major still START a train; none ITERATES it. - calculate_release_version.py: highest_inflight_prerelease_base() helper + rewritten bump="none" path. - create-tag.yml: 4th bump option `none`; pre-flight rejects none+none. - tests: helper, in-flight iteration, prefix isolation, full sequence.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdds ChangesIn-flight prerelease base anchoring for bump_type="none"
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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
A stable release landed
0.19.6when it should have been0.19.5.Sequence that broke:
0.19.4next→0.19.5-next.1nextagain →0.19.6-next.1(should be0.19.5-next.2)0.19.6(should be0.19.5)Root cause
Two compounding factors:
bump_manifests.pywrites the pre-release version (0.19.5-next.1) intoengine/Cargo.toml, which is the calculator's source for "current".patchpath incalculate_release_version.pyalways doesbump_base(cur.base, "patch")— it cannot iterate an existing train (calculate_versiononly iterates forminor/major). So a secondpatch + nexton top of0.19.5-next.1computesbump_base("0.19.5")=0.19.6.Single
nextper patch worked (that's why earlier patch releases were fine); the bug only surfaces with multiplenextpre-releases on the same patch release.Fix
Add a
nonebump that iterates an in-flight pre-release train without advancing the base:patch/minor/majorstart a train (they pick the base).noneiterates it (0.19.5-next.1→.2→.3), then promote →0.19.5.noneanchors on the highest pre-release base above the latest stable; when none exists it falls back to the latest stable, preservingalpha-release.ymlsemantics (which relies on--bump noneanchoring on the current stable, in its owniii-alpha/namespace).Changes
calculate_release_version.py: newhighest_inflight_prerelease_base()helper + rewrittenbump="none"path.create-tag.yml: 4th bump optionnone; pre-flight rejectsbump=none+prerelease=none.Usage
Note
Residual footgun unchanged: using
patch(instead ofnone) to iterate still re-bumps the base.noneis the correct iterate path. Not blocked here because changing the base mid-train is sometimes intended.Summary by CodeRabbit
New Features
nonerelease option that continues an existing prerelease line instead of always moving to a new patch version.noneand added clearer guidance for how it behaves.Bug Fixes
nonerelease combinations.