Skip to content

Spend fewer GitHub writes on fork CI job statuses and watch the limits - #76154

Merged
potiuk merged 2 commits into
apache:mainfrom
potiuk:fork-ci-status-budget
Oct 31, 2026
Merged

potiuk merged 2 commits into
apache:mainfrom
potiuk:fork-ci-status-budget

Conversation

@potiuk

@potiuk potiuk commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #76148. The fork CI monitor's per-job commit statuses are its largest use of the GITHUB_TOKEN limits that every workflow of apache/airflow shares (500 content-creating requests an hour, 80 a minute). During the pilot they already fill the monitor's per-run budget whenever a couple of full-matrix fork runs are active. This makes room before fork CI is enabled for every contributor.

  • Only finished jobs get a status. Queued and running jobs no longer get a pending status, so each job costs one write instead of two (about 127 fewer writes for a full-matrix run). Fork CI / Tests (AMD) already shows the run as running and links it, and with the monitor's 15-minute cadence a per-job "running" status lagged behind the fork's own run page anyway.
  • Smaller per-run budget: 60 → 40 writes per run, of which CI run started takes at most 20. Job statuses are capped at 160 writes an hour (32% of the content-creating limit), and each run stays well under the 80-a-minute limit.
  • The limits are now observable. Each run logs the token's remaining REST and GraphQL quota (GET /rate_limit, which does not count against it) and how many calls GitHub rate-limited. Rate limiting in two runs in a row adds a note to the monitor's Slack message, tracked in the same record as the deferred-job-status count. dev/AGENTS.md lists the new signals.
  • Pull requests whose job statuses lag far behind are reported. When a fork run finished more than an hour ago (the updatedAt of its completed check suite) and its job statuses are still waiting for budget, the pull request is listed on its own in the monitor's Slack message, naming the run, so it is posted once per run.

Tests: the fork CI tests (641 passed), uv run --locked pytest in dev/breeze (2292 passed before the last commit), prek run mypy-dev, and the pre-commit and manual prek stages pass.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude Opus 5 following the guidelines

🤖 Generated with Claude Code

The fork CI monitor's per-job commit statuses are its largest use of
the GITHUB_TOKEN limits that every workflow of the repository shares
(500 content-creating requests an hour, 80 a minute). During the pilot
they already fill the monitor's per-run budget whenever a couple of
full-matrix fork runs are active, which would leave little headroom for
other workflows once fork CI is enabled for every contributor.

A "running" status for each job doubled the writes while saying little:
the monitor only runs every 15 minutes, so it lagged behind the fork's
own run page, and the aggregate Fork CI status already shows the run as
running and links it.

Until now the only sign of hitting the limits was failures, so each run
now logs the quota left and how many calls GitHub rate-limited, and
Slack hears about rate limiting that persists.

Generated-by: Claude Opus 5
@potiuk
potiuk merged commit 468ab0a into apache:main Oct 31, 2026
26 of 28 checks passed
@potiuk
potiuk deleted the fork-ci-status-budget branch October 31, 2026 17:11
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-4-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
✅ v3-4-test PR Link

potiuk added a commit that referenced this pull request Oct 31, 2026
…ch the limits (#76154) (#76158)

* Spend fewer GitHub writes on fork CI job statuses and watch the limits

The fork CI monitor's per-job commit statuses are its largest use of
the GITHUB_TOKEN limits that every workflow of the repository shares
(500 content-creating requests an hour, 80 a minute). During the pilot
they already fill the monitor's per-run budget whenever a couple of
full-matrix fork runs are active, which would leave little headroom for
other workflows once fork CI is enabled for every contributor.

A "running" status for each job doubled the writes while saying little:
the monitor only runs every 15 minutes, so it lagged behind the fork's
own run page, and the aggregate Fork CI status already shows the run as
running and links it.

Until now the only sign of hitting the limits was failures, so each run
now logs the quota left and how many calls GitHub rate-limited, and
Slack hears about rate limiting that persists.

Generated-by: Claude Opus 5

* Report pull requests whose fork job statuses lag far behind
(cherry picked from commit 468ab0a)


Generated-by: Claude Opus 5

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
vatsrahul1001 pushed a commit that referenced this pull request Nov 4, 2026
…ch the limits (#76154) (#76158)

* Spend fewer GitHub writes on fork CI job statuses and watch the limits

The fork CI monitor's per-job commit statuses are its largest use of
the GITHUB_TOKEN limits that every workflow of the repository shares
(500 content-creating requests an hour, 80 a minute). During the pilot
they already fill the monitor's per-run budget whenever a couple of
full-matrix fork runs are active, which would leave little headroom for
other workflows once fork CI is enabled for every contributor.

A "running" status for each job doubled the writes while saying little:
the monitor only runs every 15 minutes, so it lagged behind the fork's
own run page, and the aggregate Fork CI status already shows the run as
running and links it.

Until now the only sign of hitting the limits was failures, so each run
now logs the quota left and how many calls GitHub rate-limited, and
Slack hears about rate limiting that persists.

Generated-by: Claude Opus 5

* Report pull requests whose fork job statuses lag far behind
(cherry picked from commit 468ab0a)


Generated-by: Claude Opus 5

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants