Skip to content

Retry release-bump push with --rebase on concurrent contention#277

Merged
niksedk merged 1 commit into
mainfrom
feature/workflow-push-retry
May 24, 2026
Merged

Retry release-bump push with --rebase on concurrent contention#277
niksedk merged 1 commit into
mainfrom
feature/workflow-push-retry

Conversation

@niksedk

@niksedk niksedk commented May 24, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to merged #275. When several SE5 plugin workflows are dispatched at the same time (as just happened during the 1.1.0 release run), they all check out the same SHA, all create their bump commits, and only one wins the push. The other 4 failed with ! [rejected] main -> main (fetch first) and had to be retriggered serially.

This PR wraps the bump push in a small retry-with-rebase loop in all 5 prepare jobs:

attempts=0
while ! git push 2>/tmp/push.err; do
  attempts=$((attempts + 1))
  if [ "$attempts" -ge 5 ]; then
    echo "Failed to push after $attempts attempts:" >&2
    cat /tmp/push.err >&2
    exit 1
  fi
  echo "Push rejected (attempt $attempts), pulling --rebase and retrying..."
  git pull --rebase --no-edit
done

Different plugins touch different plugin.json files, so the rebase never conflicts. Same-plugin double-dispatch is not a realistic case (you wouldn't release the same plugin twice in parallel).

Test plan

  • After merge, dispatch all 5 release workflows in quick succession again — all 5 prepare jobs should now succeed, with the later ones logging "Push rejected (attempt N), pulling --rebase and retrying...".
  • Single-workflow release path is unchanged (one push attempt, no retry).

🤖 Generated with Claude Code

When multiple SE5 plugin workflows are dispatched at the same time
(e.g. 'release them all') they all check out the same SHA, all create
bump commits, and only one wins the push. The others got 'rejected
(fetch first)' and failed the run.

Wrap the push in a small retry loop: on rejection, git pull --rebase
to fold the other plugin's bump under our own and try again. Up to 5
attempts, then fail loudly.

Different plugins touch different plugin.json files so the rebase
never conflicts; same-plugin double-dispatch is not a realistic case.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@niksedk niksedk merged commit ac5f2a4 into main May 24, 2026
36 checks passed
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