fix(ci): rebase before pushing recorded baselines (push race) - #418
Conversation
The ~17-min record run loses to any master push made while it runs: run 30632854418 recorded and committed all baselines, then failed at git push (non-fast-forward) and the work was discarded. Rebase onto the moved ref and retry up to 3x - baseline PNGs cannot conflict with content commits. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PXHeUErqoiyH9xN1mjC8cH
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe workflow file test.yml changes the "Commit updated baselines" step. It replaces a single git push command with a retry loop. The loop runs git pull --rebase and git push up to 3 times, with a 5-second wait between attempts. ChangesCI Workflow Retry
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 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 |
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/test.yml:
- Around line 118-122: Update the retry loop around the git push in the workflow
to track whether any attempt succeeds, set that state when git pull and push
complete successfully, and exit with status 1 after the loop if all three
attempts fail. Preserve the existing retry logging and delay behavior.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 0417e7f2-f659-40bf-a64b-50bcc1ac9bf8
📒 Files selected for processing (1)
.github/workflows/test.yml
The retry loop's last command was 'sleep 5', so three failed push attempts still exited 0 and the workflow reported success with nothing pushed. Track the push outcome and exit 1 when all attempts fail. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PXHeUErqoiyH9xN1mjC8cH
Screenshot diffs detected
|
Summary
The second baseline-record dispatch (run 30632854418) got all the way through: pinned stack installed, full suite recorded, baselines committed — then failed at
git pushwith a non-fast-forward rejection and discarded everything. Root cause: the record run takes ~17 minutes and master routinely moves underneath it (two merges landed mid-run).Fix: in the commit step,
git pull --rebase origin ${GITHUB_REF_NAME}before pushing, with 3 retries. Baseline PNGs cannot conflict with content commits, so the rebase is always clean.One file, +9 lines. After merge, the third
update-baselinesdispatch should finally land the pinned-stacklinux/baselines.Verification
workflow_dispatch+update-baselines), which is the only path withcontents: writeusage.chore: update screenshot baselines [ci skip]commit on master.🤖 Generated with Claude Code
https://claude.ai/code/session_01PXHeUErqoiyH9xN1mjC8cH
Generated by Claude Code
Summary by CodeRabbit