fix(cua-driver-rs): bake release version via API - #2123
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe Release job in ChangesRelease workflow bake-back push fix
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
e8bc8c8 to
29ecd48
Compare
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/cd-rust-cua-driver.yml (1)
706-719: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winRetry the fast-forward update on 422 conflicts.
force=falsewill reject this PATCH withUpdate is not a fast forwardifmainadvances after the fetch, so this release can still fail on a race. Re-fetch/rebase onto the latestorigin/mainand retry before failing, and make the error message distinguish that conflict from a ruleset or permission denial.🤖 Prompt for 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. In @.github/workflows/cd-rust-cua-driver.yml around lines 706 - 719, The fast-forward update in the release workflow can still fail on a race because the current gh api PATCH to update main only tries once with force=false. Update the release step around the main-branch ref patch to detect a 422 “Update is not a fast forward” conflict, then re-fetch/rebase against the latest origin/main and retry the fast-forward before giving up; keep the existing cleanup_temp_branch trap behavior intact. Also adjust the failure message in this section so it clearly distinguishes a fast-forward conflict from a ruleset or permission denial, using the main update logic and TEMP_BRANCH cleanup path as the key symbols to locate the change.
🤖 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.
Nitpick comments:
In @.github/workflows/cd-rust-cua-driver.yml:
- Around line 706-719: The fast-forward update in the release workflow can still
fail on a race because the current gh api PATCH to update main only tries once
with force=false. Update the release step around the main-branch ref patch to
detect a 422 “Update is not a fast forward” conflict, then re-fetch/rebase
against the latest origin/main and retry the fast-forward before giving up; keep
the existing cleanup_temp_branch trap behavior intact. Also adjust the failure
message in this section so it clearly distinguishes a fast-forward conflict from
a ruleset or permission denial, using the main update logic and TEMP_BRANCH
cleanup path as the key symbols to locate the change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1672aee0-123d-441e-8722-1afaf4baa660
📒 Files selected for processing (1)
.github/workflows/cd-rust-cua-driver.yml
29ecd48 to
c16c8fe
Compare
Summary
Fixes #2121.
Updates the
cua-driver-rsrelease bake-back step so it does not directly push to protectedmainafter publishing release assets.What changed
persist-credentials: falseso the defaultGITHUB_TOKENdoes not linger in checkout auth state.mainvia the GitHub refs API using the release App token.Validation
git diff --check.github/workflows/cd-rust-cua-driver.ymlbash -nNote: did not trigger an actual release. This mirrors the temp-branch/API update pattern that succeeded in the prior bump workflow with the same release App identity.
Summary by CodeRabbit