Skip to content

fix: prevent release push race condition#151

Merged
rhuanbarreto merged 1 commit into
mainfrom
fix/release-race-condition
Mar 23, 2026
Merged

fix: prevent release push race condition#151
rhuanbarreto merged 1 commit into
mainfrom
fix/release-race-condition

Conversation

@rhuanbarreto

Copy link
Copy Markdown
Contributor

Summary

  • Adds git pull --rebase origin main before the release step in the release workflow
  • Prevents non-fast-forward push failures when PRs are merged during the release workflow

Problem

The release workflow checks out main at the start, then runs validate + release. If a PR is merged between checkout and the final git push main (done internally by simple-release-action), the push is rejected as non-fast-forward. This happened during the v0.22.0 release when GEN-003 (#149) was merged during the release window.

Fix

A git pull --rebase right before the release step ensures the local checkout includes any commits that landed on main since the workflow started. The release action's push is then guaranteed to be fast-forward.

Test plan

  • CI passes
  • Next release completes without push failures

🤖 Generated with Claude Code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Mar 23, 2026

Copy link
Copy Markdown

Deploying archgate-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8e7a837
Status: ✅  Deploy successful!
Preview URL: https://71a8ed96.archgate-cli.pages.dev
Branch Preview URL: https://fix-release-race-condition.archgate-cli.pages.dev

View logs

Add git pull --rebase before the release step so that any PRs
merged between workflow start and release push are included.
Without this, the push fails as non-fast-forward when main
moves forward during the release workflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rhuanbarreto rhuanbarreto force-pushed the fix/release-race-condition branch from 7fa3ab5 to 8e7a837 Compare March 23, 2026 14:02
@rhuanbarreto rhuanbarreto merged commit 0405f75 into main Mar 23, 2026
8 checks passed
@rhuanbarreto rhuanbarreto deleted the fix/release-race-condition branch March 23, 2026 14:06
@github-actions github-actions Bot mentioned this pull request Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant