Commit 9530633
committed
fix(merge-queue): keep the signing gate off the GraphQL budget + rate-gate
The signing gate (added in 292a532) called fetchUnsignedCommitCount — a
GraphQL call — every tick a signing-repo head reached the clean path, INCLUDING
while a re-sign run was already in flight. On PostHog (a huge, chronically
rate-limited account) that meant a signature GraphQL call every 10s per head,
which helped exhaust the App's GraphQL primary point budget (~25-min backoff) and
stall the queue; the calls also sit behind waitIfBlocked, so on a mid-tick
backoff they'd sleep up to 60s each and stack into a 5-min tick wedge.
Guard the gate the same way the rest of the queue defers:
- isBlocked(account) → defer the head (don't sleep behind waitIfBlocked).
- run already in flight → hold 'fixing' without re-polling signatures every tick
(the main budget drain).
- graphqlBudget.shouldDefer → skip the signature fetch until the window recovers.
- 403 net's signature lookup guarded by isBlocked too.
The account still recovers its budget GitHub-side (~25 min); this stops the queue
from re-exhausting it via per-tick signature polling.1 parent 52ba5dc commit 9530633
2 files changed
Lines changed: 44 additions & 6 deletions
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1016 | 1016 | | |
1017 | 1017 | | |
1018 | 1018 | | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
1019 | 1033 | | |
1020 | 1034 | | |
1021 | 1035 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
777 | 777 | | |
778 | 778 | | |
779 | 779 | | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
780 | 783 | | |
781 | 784 | | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
788 | 793 | | |
789 | 794 | | |
790 | 795 | | |
| |||
972 | 977 | | |
973 | 978 | | |
974 | 979 | | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
975 | 987 | | |
976 | 988 | | |
977 | 989 | | |
978 | 990 | | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
979 | 1003 | | |
980 | 1004 | | |
981 | 1005 | | |
| |||
0 commit comments