Retry release sync after concurrent branch updates - #1701
David Pine (IEvangelist) with Copilot wants to merge 2 commits into
Conversation
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The retry implementation can become non-deterministic (re-pinning main on each attempt) and currently retries on any push failure rather than confirming a push race, which can mask real failures.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Improves the release-branch sync GitHub Actions workflow to better tolerate concurrent updates to the release branch by adding a refresh-and-retry loop around the merge/push, and adds lightweight regression assertions to ensure the workflow retains this behavior.
Changes:
- Add a 3-attempt loop that re-fetches and re-checks out the release branch before re-running the sync and pushing.
- Emit workflow warnings on transient push rejection and fail after exhausting retries.
- Add script assertions that the workflow includes retry/refresh/push-handling logic.
| File | Description |
|---|---|
| .github/workflows/update-release-branch.yml | Adds refresh-and-retry behavior around the merge helper + push to handle non-fast-forward races. |
| .github/scripts/test-merge-main-into-release.sh | Adds grep-based assertions to enforce the workflow’s retry/refresh contract. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| for attempt in {1..3}; do | ||
| git fetch origin main "$BRANCH" | ||
| git checkout -B "$BRANCH" "origin/$BRANCH" | ||
| MAIN_SHA="$(git rev-parse origin/main)" |
| if git push origin "HEAD:refs/heads/$BRANCH"; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| echo "::warning::Release branch changed while syncing; retrying ($attempt/3)." |
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |

The release-sync job failed when
release/13.6advanced after checkout but before the automated merge push. The workflow now refreshes the release tip and retries the sync instead of failing on a transient non-fast-forward rejection.mainand the active release branch for each attempt.