[MISC] Reject no-op OSS releases when there are no new commits#2117
Conversation
create-release.yaml computed and published a new tag even when the branch had no commits beyond the last release, producing empty releases (e.g. v0.177.1 points at the exact same commit as v0.177.0). Add a guard after "Fetch base release version": use the compare API's ahead_by (the workflow has no local checkout) to count commits on the branch beyond the latest release tag. If zero, abort with a clear error (dry-run only warns). Works for main and hotfix branches alike. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Summary by CodeRabbit
WalkthroughAdds a release-workflow step that compares ChangesRelease workflow guard
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
|
Companion cloud PR (RC build skips the OSS release instead of failing when there are no OSS changes): https://github.com/Zipstack/unstract-cloud/pull/1610 |
…ed value PR review (Greptile + internal): `[[ "$AHEAD" -eq 0 ]]` mishandled a non-integer ahead_by — an empty value evaluated true ([[ "" -eq 0 ]]) and would wrongly reject a legitimate release, and a literal "null" aborted with a cryptic "integer expression expected" / unbound-variable error. Use `--jq '.ahead_by // empty'`, fail loudly if the compare API call fails, and require ahead_by to match ^[0-9]+$ (error out otherwise) before a string compare against "0". A transient/auth/shape error now fails the step with a clear message instead of being mistaken for "no new commits". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Unstract test resultsPer-group results
Critical paths
|
|



What
create-release.yamlwhen the branch has no new commits since the last release.Why
v0.177.1points at the same commit asv0.177.0(git rev-list v0.177.0..v0.177.1 --count→0). See v0.177.0...v0.177.1.How
ahead_by) — the workflow has no local checkout, so this is the clean way to count new commits. Ifahead_by == 0, abort with a clear error;dry_runonly warns. Works formainandvX.Y.Z-hotfixbranches.Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
ahead_byagainst live data:v0.177.0...main→ 0 (would reject),v0.176.0...main→ 15,v0.176.5...main→ 5 (allowed).Database Migrations
Env Config
Relevant Docs
Related Issues or PRs
Dependencies Versions
Notes on Testing
ghtest of the new step:ahead_by=0+ real run →exit 1;ahead_by=0+ dry-run → warn only;ahead_by>0→ proceed.Screenshots
Checklist
I have read and understood the Contribution Guidelines.
🤖 Generated with Claude Code