Repository navigation
74 lines (67 loc) · 3.39 KB
/
Copy pathci-queue-health.yml
File metadata and controls
74 lines (67 loc) · 3.39 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Weekly merge-queue health report (CI decomposition blueprint, Part 5a, defect X7, work package DC-21).
#
# Queue rebuilds multiply the demand that causes every runner wait: when the head of the merge queue fails,
# every group behind it is cancelled and rebuilt. Once a week this reads the `merge_group` runs of `ci.yml`
# from the last 7 days and the jobs of every attempt through the jobs API, and reports runs by conclusion and
# by class (a failed run is one with a failed job, since `Fail fast` makes it conclude `cancelled`; origin,
# inherited and victim runs are counted apart, global review 2026-11-24 ruling 9), origin failures by the lane
# that failed first and the suites it names (the table suite owners read; Vitest's `github-actions` reporter
# names the tests), every attempt's runner minutes per class and of the cancelled runs, and each job's
# runner-wait share. A 5xx is retried with a backoff of up to a minute; a run the API keeps refusing is
# reported as not fetched rather than failing the report. The test flake ledger section (FQ-2) reads the per-test
# state `flake-ledger.yml` keeps on the `flake-ledger` branch: the tests with a flake event in the window, their
# executions and variants, and the completed runs the ledger has not counted. The flake quarantine metrics section
# (FQ-11, blueprint D9) shows every D9 row from the same week's live data: the origin failure rate of `ui`-affected
# entries and its split, the share of minutes that merged nothing, first enqueue to merge and runs per landing (the
# merged pull requests' queue events), retried passes, the quarantine debt, time to quarantine, releases and returns
# (the owner issues' markers) and the stress and agent runner minutes. The Markdown goes to the job summary and the
# JSON to an artifact kept 90 days. It reads only (`issues: read` and `pull-requests: read` for the D9 section): no
# issues or comments are posted, nothing is written to the Nx remote cache and no environment is used.
#
# Monday 07:23 UTC: after the weekend's quiet queue, before the operator's week starts. The nightly watchdog
# watches it as a weekly cron.
name: CI queue health
on:
schedule:
- cron: '23 7 * * 1'
workflow_dispatch:
inputs:
days:
description: Days of merge-group runs to report on
type: number
default: 7
permissions:
actions: read
contents: read
issues: read
pull-requests: read
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
report:
name: Report merge-queue health
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Nx Environment
uses: ./.github/actions/setup-nx
with:
save-pnpm-store: 'false'
- name: Report merge-queue health
env:
GITHUB_TOKEN: ${{ github.token }}
DAYS: ${{ inputs.days || 7 }}
run: node scripts/src/ci-queue-health-cli.ts --days "$DAYS" --out out/reports/ci-queue-health/queue-health.json
- name: Upload the report
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: ci-queue-health
path: out/reports/ci-queue-health/queue-health.json
if-no-files-found: warn
retention-days: 90