ci: retry direct merge while GitHub recomputes mergeability#369
Merged
Conversation
The doc-sync push on the regen branch invalidates GitHub's cached mergeability; a merge attempt in that window fails with "Pull Request is not mergeable" even though the PR settles to CLEAN moments later (run 29115606490 / PR #368). Treat that error as retryable: match it in the auto-merge noop pattern and retry the direct squash for up to ~2 minutes instead of failing the run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Follow-up to #367. With the
Verify examplesblocker fixed, the first clean regen run (29115606490, PR #368) exposed a race in the auto-merge step: the doc-sync push invalidates GitHub's cached mergeability, so the immediate merge attempt fails withGraphQL: Pull Request is not mergeable (mergePullRequest)— even though the PR settles toMERGEABLE/CLEANseconds later (I merged #368 manually right after with no changes).Fix
not mergeableto the auto-merge noop pattern so the transient error takes the wait-then-direct-merge path instead of hard-failing.merge_with_retry: retrynot mergeableerrors every 15s for up to 8 attempts (~2 min); any other error still fails immediately.Testing
The failure is only reproducible inside a live Generate run (needs the doc-sync push + immediate merge). The next regen PR (nightly, or the next spec change) exercises this path; logic is a straight retry loop around the existing
gh pr mergecall.