Skip to content

ci: rebase before push in screenshots workflow#1942

Merged
Lee-W merged 1 commit intomasterfrom
fix/screenshots-push-race-condition
May 3, 2026
Merged

ci: rebase before push in screenshots workflow#1942
Lee-W merged 1 commit intomasterfrom
fix/screenshots-push-race-condition

Conversation

@bearomorphism
Copy link
Copy Markdown
Collaborator

@bearomorphism bearomorphism commented May 3, 2026

Description

Fixes the race condition in the update-cli-screenshots job where git push fails with a non-fast-forward rejection when another commit lands on master during the workflow run.

Added git pull --rebase origin master before git push so the screenshot commit is rebased on top of any new remote commits.

Checklist

Was generative AI tooling used to co-author this PR?

  • Yes (please specify the tool below)

Generated-by: GitHub Copilot following the guidelines

Code Changes

  • Manually test the changes:
    • Verify the feature/bug fix works as expected in real-world scenarios
    • Ensure backward compatibility is maintained
  • N/A: No test cases needed (CI workflow YAML change only)
  • N/A: No documentation update needed

Expected Behavior

When another commit is pushed to master while the screenshots workflow is running, the workflow should rebase its screenshot commit on top and push successfully instead of failing.

Steps to Test This Pull Request

  1. Trigger the docs workflow while another commit lands on master
  2. Observe the push step succeeds after rebasing

Additional Context

@codecov
Copy link
Copy Markdown

codecov Bot commented May 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.10%. Comparing base (b4f4209) to head (6cb0ab3).
⚠️ Report is 2 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1942   +/-   ##
=======================================
  Coverage   98.10%   98.10%           
=======================================
  Files          61       61           
  Lines        2748     2748           
=======================================
  Hits         2696     2696           
  Misses         52       52           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bearomorphism bearomorphism changed the title fix(ci): rebase before push in screenshots workflow ci: rebase before push in screenshots workflow May 3, 2026
Add git pull --rebase before pushing updated CLI screenshots to avoid push rejections when master receives commits during the workflow run.

Co-authored-by: Copilot <[email protected]>
@bearomorphism bearomorphism force-pushed the fix/screenshots-push-race-condition branch from b97902a to 6cb0ab3 Compare May 3, 2026 07:15
@Lee-W Lee-W merged commit 9b53b63 into master May 3, 2026
20 checks passed
@Lee-W Lee-W deleted the fix/screenshots-push-race-condition branch May 3, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants