fix: make release PR creation robust against race conditions #19

Merged
argoyle merged 1 commits from fix/release-pr-robustness into main 2026-03-23 15:52:26 +00:00
Owner

Two fixes for intermittent release workflow failures:

  • Use BASE_BRANCH instead of DEFAULT_BRANCH for the PR base field — BASE_BRANCH has a :-main fallback, preventing an empty base from causing a 404
  • Replace fixed sleep 3 with proper polling and retry — polls for branch readiness (up to 10 attempts) before creating the PR, then retries PR creation (up to 5 attempts) with backoff

Fixes the Error creating PR (HTTP 404) seen when Gitea hasn't fully indexed the next-release branch by the time the PR creation request fires.

🤖 Generated with Claude Code

Two fixes for intermittent release workflow failures: - **Use `BASE_BRANCH` instead of `DEFAULT_BRANCH`** for the PR `base` field — `BASE_BRANCH` has a `:-main` fallback, preventing an empty base from causing a 404 - **Replace fixed `sleep 3` with proper polling and retry** — polls for branch readiness (up to 10 attempts) before creating the PR, then retries PR creation (up to 5 attempts) with backoff Fixes the `Error creating PR (HTTP 404)` seen when Gitea hasn't fully indexed the `next-release` branch by the time the PR creation request fires. 🤖 Generated with [Claude Code](https://claude.ai/claude-code)
argoyle added 1 commit 2026-03-23 15:52:09 +00:00
Two fixes:
- Use BASE_BRANCH (with fallback) instead of DEFAULT_BRANCH for the
  PR base field, preventing empty base causing 404
- Replace fixed sleep with branch readiness poll (up to 10 attempts)
  and add retry loop for PR creation (up to 5 attempts), fixing
  intermittent 404 when Gitea hasn't indexed the branch yet

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
argoyle merged commit e3c17ceaa0 into main 2026-03-23 15:52:26 +00:00
argoyle deleted branch fix/release-pr-robustness 2026-03-23 15:52:27 +00:00
Sign in to join this conversation.