-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (46 loc) · 1.91 KB
/
Copy pathci-queue-watch.yml
File metadata and controls
51 lines (46 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: CI queue watch
# Scheduled sentinel for #2499's "multi-hour head-of-line blocks page
# instead of silently parking green PRs" option. 2026-08-27 the whole
# quality pipeline queued for hours with nothing running (54 runs parked
# while ~5 jobs were in flight); the people waiting found out by polling.
# This sweep turns that observable into a labeled tracking issue, and
# closes it with recovery evidence when the queue drains again.
#
# Cron beats long-lived watchers here: a stuck queue cannot starve the
# alarm into existence the way it starves everything else, because a
# scheduled dispatch only needs one scheduling slot every 15 minutes —
# and during the exact degradation it watches, even a late sweep still
# fires (runs stay queued), which is the point.
#
# Deliberately NOT part of quality.yml: an in-pipeline alarm would wait
# behind the very router dependency that stalls. Runs the repo's own
# scripts/ci-queue-watch.py so the detection logic is inspectable and
# dry-runnable outside Actions (--dry-run validated against live queue
# state for #2499: 18 runs parked beyond 60m detected mid-stall).
on:
schedule:
- cron: "*/15 * * * *"
workflow_dispatch:
# #3313: job-scoped, workflow level defaults to none -- see the same note in
# backup-staleness-watch.yml.
permissions: {}
concurrency:
group: ci-queue-watch
cancel-in-progress: false
jobs:
sweep:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
# Reading the run queue to find stalled runs ...
actions: read
# ... and writing the labeled tracking issue the finding becomes.
issues: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Sweep for runs parked in the queue beyond the stall threshold
env:
GH_TOKEN: ${{ github.token }}
run: python3 scripts/ci-queue-watch.py