Skip to content

Commit acdfcd1

Browse files
committed
fix(webhooks): resolve a pull request's live test merge before creating runs
GitHub computes a pull request's test merge asynchronously, so a webhook payload's merge_commit_sha is the previous head's merge (or null) on synchronize; a run created from it tested a tree the pull request no longer had. Pull-request deliveries now resolve GitHub's live merge and only accept a commit whose second parent is the payload's head. A conflicted pull request creates no pull_request runs, matching GitHub.
1 parent 9e9876c commit acdfcd1

3 files changed

Lines changed: 1464 additions & 5 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@ Releases before v0.27.0 predate the changelog.
6262
the runner itself, and the official runner's Docker command shape are
6363
unchanged.
6464

65+
- **A burst of pull-request deliveries no longer parks the webhook worker
66+
pool in merge-state polling**: a delivery whose payload head is no longer
67+
the pull request's current head falls back after a single probe instead of
68+
re-polling a merge that cannot be produced, at most half the worker pool may
69+
be waiting on GitHub's mergeability computation at once (a delivery that
70+
cannot claim a slot falls back to `refs/pull/{n}/head` rather than holding a
71+
worker), and a fork delivery the fork-workflow policy will skip spends no
72+
GitHub calls on a merge nothing will run.
73+
6574
- **Server integration tests no longer fail on a leaked static PAT**:
6675
`cargo test` shares one process environment across a whole test binary, so
6776
a `PRELOOP_GITHUB_TOKEN` set by a neighbouring test — or injected into the

0 commit comments

Comments
 (0)