[MISC] Mark current-line hotfix releases as latest (semver supersession)#2116
Conversation
create-release.yaml marked every non-main release latest=false, so a hotfix on the current production OSS line never became GitHub "latest" even when it should. Mark the release as latest when its computed tag supersedes the current releases/latest by semver, instead of only on main-branch releases. Hotfixes on the current line (e.g. latest v0.176.3, hotfix -> v0.176.4) now become latest; hotfixes on older lines stay latest=false. Main-line releases are unchanged. 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
WalkthroughThe release workflow now checks GitHub’s current latest release tag before creating a release. It sets ChangesRelease latest tag selection
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/create-release.yaml:
- Around line 240-243: The release selection logic in the create-release
workflow is treating any `gh api` failure as if there were no existing latest
release. Update the `CURRENT_LATEST` fetch so `gh api` errors are not swallowed,
and only add `RELEASE_ARGS+=(--latest=true)` when `gh api` succeeds and returns
an empty tag; keep the existing behavior in the `CURRENT_LATEST`/`RELEASE_ARGS`
block but separate “no release” from transient API or auth failures.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d80598ae-bd07-4511-a573-cfdaba9e8ced
📒 Files selected for processing (1)
.github/workflows/create-release.yaml
When reading releases/latest to decide the "latest" flag, a transient gh API failure (rate limit / 5xx) previously collapsed to empty and wrongly marked the release latest=true — which could let a back-version hotfix steal "latest". Now distinguish a genuine 404 (no latest release yet) from a transient failure and fail the job loudly on the latter, mirroring the guarded releases/latest pattern already used in the "Fetch base release version" step. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…t dead branch - A pre-release is never GitHub "latest": guard the supersession decision behind the PRERELEASE check so we never emit --latest=true alongside --prerelease (previously a superseding pre-release could get both). - Comment the NEW_TAG == CURRENT_LATEST branch as a defensive guard unreachable in practice (the tag-collision check rejects a duplicate NEW_TAG upstream). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Round-2 review fix (bed282a): addressed the Greptile 4/5 note about pre-releases. The |
Unstract test resultsPer-group results
Critical paths
|
|



What
create-release.yamlso a hotfix release on the current production line is marked GitHublatest.Why
mainreleaselatest=false, so a hotfix on the current production OSS line never became GitHublatesteven when it superseded the existing latest.How
latestiff its computed tag supersedes the currentreleases/latestby semver (was: only whenMODE == main). Current-line hotfixes (e.g. latestv0.176.3, hotfix →v0.176.4) now become latest; hotfixes on older lines staylatest=false.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)
--latestflag decision in the "Create GitHub release" step. Main-line releases are always the newest by semver, so they remainlatest=trueexactly as before. Only new behavior: current-line hotfixes correctly become latest. Verified the decision logic with a mockedghacross current-line hotfix (→true), older-line hotfix (→false), main release (→true), and no-existing-latest (→true).Database Migrations
Env Config
Relevant Docs
Related Issues or PRs
latestfix inpromote-rc-build-to-stable.yaml, plus the/devkit:hotfixskill): Zipstack/unstract-cloud#1608Dependencies Versions
Notes on Testing
gh(mirroring the Actionsbash -euo pipefailshell); all cases produced the expected--latestflag. YAML validated.Screenshots
Checklist
I have read and understood the Contribution Guidelines.
🤖 Generated with Claude Code