Skip to content

fix: avoid self-deadlock in auto-merge-release-pr - #84

Merged
sebastiancorrea81 merged 1 commit into
mainfrom
fix/auto-merge-self-check-deadlock
Jul 28, 2026
Merged

fix: avoid self-deadlock in auto-merge-release-pr#84
sebastiancorrea81 merged 1 commit into
mainfrom
fix/auto-merge-self-check-deadlock

Conversation

@sebastiancorrea81

Copy link
Copy Markdown
Collaborator

Summary

Found while testing nullplatform/services-postgresql-rds#7: the `automerge` job used `gh pr checks --watch --fail-fast` to wait for the release PR's checks before merging. That command waits for all checks on the PR — including the `automerge` job's own check run, which can't turn green until the step finishes. Result: the job waited on itself indefinitely.

Fix

Replaced the watch with a manual poll (15s interval, ~22min cap) that fetches gh pr checks --json name,state,link and excludes any check whose link points at the current run (/runs/<run_id>/), then fails fast on any real failure and times out loudly instead of hanging or silently merging.

Test plan

gh pr checks --watch includes this job's own check run, which never
turns green until the step finishes, so the job waited on itself
forever. Poll manually and exclude any check whose link points at
the current run instead.
@sebastiancorrea81
sebastiancorrea81 merged commit 2d3deeb into main Jul 28, 2026
2 checks passed
@sebastiancorrea81
sebastiancorrea81 deleted the fix/auto-merge-self-check-deadlock branch July 28, 2026 21:12
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