Skip to content

Harden update-bindings PR publishing against transient GitHub 502s#414

Merged
wravery merged 2 commits into
devfrom
copilot/fix-publish-pr-job
May 29, 2026
Merged

Harden update-bindings PR publishing against transient GitHub 502s#414
wravery merged 2 commits into
devfrom
copilot/fix-publish-pr-job

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 29, 2026

The update-bindings / publish-pr job was failing intermittently when gh pr create -f hit a transient GitHub HTTP 502, causing the entire workflow to fail despite valid generated changes. This update makes PR publication resilient to short-lived API failures.

  • Workflow reliability: retry PR creation in publish-pr

    • Updated .github/workflows/update-bindings.yml in the Publish PR step.
    • Wrapped gh pr create -f in bounded retry logic (3 attempts) with incremental backoff.
    • Preserves fail-fast behavior after the final attempt to avoid masking persistent errors.
  • Scope

    • No changes to binding generation, artifact merge, or branch update logic.
    • Change is isolated to PR creation error handling.
for attempt in 1 2 3; do
  if gh pr create -f; then
    break
  fi

  if [ "${attempt}" -eq 3 ]; then
    echo "Failed to publish PR after ${attempt} attempts"
    exit 1
  fi

  echo "gh pr create failed, retrying..."
  sleep $((attempt * 5))
done

Copilot AI changed the title [WIP] Fix failing GitHub Actions job update-bindings / publish-pr Harden update-bindings PR publishing against transient GitHub 502s May 29, 2026
Copilot AI requested a review from wravery May 29, 2026 20:33
@wravery wravery marked this pull request as ready for review May 29, 2026 20:34
@wravery
Copy link
Copy Markdown
Contributor

wravery commented May 29, 2026

I'm not sure this will fix it, it seems to have hit a similar error the last 3 times it ran this workflow. This is worth a try, though.

@wravery wravery merged commit f7a83c8 into dev May 29, 2026
8 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.

2 participants