Retry auto-merge enablement in the approval workflow.#35
Open
Retry auto-merge enablement in the approval workflow.#35
Conversation
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.

Description
The approve workflow's auto-merge enable step (
gh pr merge --auto --squash) occasionally fails with the GraphQL errorBase branch was modified. Review and try the merge again.when the base branch is updated concurrently with our request — typically when another sync PR in the queue merges at the same moment. The previous code silently swallowed all failures viacheck=False, leaving the PR approved but without auto-merge enabled, which can stall the queue until some later event re-triggers the workflow.This change wraps the auto-merge enablement in a retry loop: on stderr containing
Base branch was modified, sleep 10s and retry, up to 3 attempts total. Non-retryable failures still fall through after a single attempt with a warning log, matching the prior behavior.Example failure: https://github.com/warpdotdev/warp-internal/actions/runs/25027455954/job/73301658617
Testing
New unit tests in
tests/workflows/test_approve_logic.pycover:max_attemptswithout raising (so the escalation workflow can recover later)Existing test suite still passes.
Co-Authored-By: Oz oz-agent@warp.dev