Skip to content

ci: raise an alarm when the pipeline itself breaks - #363

Merged
tnazarew merged 2 commits into
mainfrom
ci/pipeline-alarm
Nov 24, 2026
Merged

tnazarew merged 2 commits into
mainfrom
ci/pipeline-alarm

Conversation

@tnazarew

Copy link
Copy Markdown
Collaborator

Stacked on #352 (uses its scripts/tests setup and script-tests job); retarget to main once #352 merges.

Why

A failed job in the release check or the spec-change check skips every later job (report update, compatibility tables, site, issues) and nobody is told:

  • The compatibility site wasn't updated from 2026-06-12 to 2026-11-22, because OL_SITE_PUSH_TOKEN had expired and update-site failed in 8 of 14 runs.
  • On 2026-11-23 (run 45167537161) collect crashed with FileNotFoundError: ./reports/report.json, and nothing after it ran.

What changes

  • Pipeline alarm (pipeline_alarm.yml, scripts/ci_alarm.py run-status): the last job of both checks (if: always()). While any job of the run failed or was cancelled, it keeps one ci-broken issue open per workflow, listing the failed jobs.
    • It comments only when the set of failing jobs changes, and reopens the issue if the failure comes back.
    • It closes only once the failed jobs have run again and passed. A green run that skipped them doesn't close it.
    • Runs outside main only print the plan to the job summary.
  • Weekly CI health (ci_health.yml, ci_alarm.py health, Mondays 06:00 UTC plus manual dispatch):
    • one issue per push token that has expired or expires within 30 days, with the steps to rotate it;
    • the site more than 3 days behind the report;
    • the release check not running for 3 days.
  • publish_site.yml: publishes main's report.json to the site without running any tests, e.g. after rotating the site token.
  • Collect separates run failures from validation failures.
    • It no longer fails on new compatibility failures; it outputs new_failures instead.
    • The spec-change check notifies maintainers based on that output.
    • The PR check fails in its own new-compatibility-failures job.
    • So a red job always means the pipeline broke.
    • Side effect: in the spec-change check, a new failure no longer skips update-repo-files, so the report is updated, as in the release check.
  • Fix for the crash: collect reads main's report.json from git, instead of uploading it as an artifact and downloading it a second later.

The scripts only touch issues that carry their hidden marker.

Testing

  • scripts/tests/test_ci_alarm.py: 26 tests covering create, update without a comment, comment on change, reopen, close, a skipped failed job keeping the issue open, unmarked issues left alone, the token, site and release-check checks, and the CLI dry run.
  • actionlint: no new findings.
  • Dry runs against this repository (read-only): run 45167537161 plans one issue for the collect job, and an invalid token plans CI token expired/invalid: OL_SITE_PUSH_TOKEN.

🤖 Generated with Claude Code

tnazarew and others added 2 commits November 24, 2026 13:18
A failed job in the release or spec-change check used to skip every later
job (report update, tables, site, issues) without anyone noticing: the site
stayed stale for five months on an expired token, and on 2026-11-23 collect
crashed and nothing after it ran.

- pipeline_alarm.yml + scripts/ci_alarm.py run-status: the last job of both
  checks keeps one `ci-broken` issue per workflow open while a job failed or
  was cancelled. It comments only when the set of failing jobs changes and
  closes once the failed jobs run again and pass. Outside main it only
  prints the plan.
- ci_health.yml + ci_alarm.py health (weekly): an issue per push token that
  is expired or expires within 30 days (with the rotation steps), the site
  behind the report, the release check not running.
- publish_site.yml: publish main's report to the site without a test run.
- Collect no longer fails on new compatibility failures; it outputs
  `new_failures`. The spec-change check notifies on it, the PR check fails
  in its own "new-compatibility-failures" job. A red job now always means a
  broken pipeline.
- Collect reads main's report.json from git instead of uploading and
  downloading it as an artifact, which raced in run 45167537161.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: tnazarew <tomasz.nazarewicz@getindata.com>
… pipeline alarm

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: tnazarew <tomasz.nazarewicz@getindata.com>
@tnazarew
tnazarew changed the base branch from ci/pr-coverage to main November 24, 2026 12:19
@tnazarew
tnazarew merged commit bec61a2 into main Nov 24, 2026
1 check passed
@tnazarew
tnazarew deleted the ci/pipeline-alarm branch November 24, 2026 14:28
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