potiuk opened a new pull request, #77125:
URL: https://github.com/apache/airflow/pull/77125

   The fork CI monitor alerted Slack on 2026-11-15 that job statuses "have not 
fit in the budget of 13 writes per run for 9 runs in a row". Nothing was wrong: 
four full-matrix fork runs (about 130 jobs each) finished around the same time. 
Each monitor run made progress, and the token's quotas were barely touched 
(core 14915/15000, no rate-limited calls). Three things made the backlog slow 
and the alert misleading:
   
   - **Most writes were passed jobs.** Every passed job got its own `Fork CI 
job / …` commit status, about 130 writes per full-matrix run, for what `Fork CI 
/ Tests (AMD)` already says. Now passed jobs are counted in that status, e.g. 
"Fork CI passed - see Details (127 jobs passed)", for `running`, `failed`, 
`green` and `green_unverified`. Failed jobs keep their own status. A success is 
posted only over a job's earlier red or pending status, so a re-run that fixes 
a job clears it. The reconciler reads its state back from the description 
without the count, and accepts a count only on those four states. A completed 
run's count is also kept in the state comment's marker (`jobs: 
"<run>:<attempt>:<conclusion>:<passed>"`), so later runs show it without 
reading the jobs again.
   - **The budget ran at about half its intended rate.** 13 writes per run 
assumed 12 runs an hour, but GitHub started the 5-minute cron only every 9 to 
10 minutes, giving about 82 writes an hour. A run now gets 240 writes an hour, 
prorated over the time between the previous monitor run's start and its own. 
Both starts are read from the monitor's runs in the Actions API, so failed runs 
and failed Slack posts still count, and a re-run counts from when its run was 
created. At most 10 minutes are counted (40 writes, half of GitHub's 
80-a-minute limit), and 20 writes when the previous run cannot be read.
   - **The "deferred for 9 runs" Slack note is removed.** Deferring is expected 
when several big runs overlap. A pull request whose fork run finished more than 
an hour ago with statuses still missing is still listed on its own.
   
   The design doc (`08_fork_ci_for_external_contributors.md`) and 
`dev/AGENTS.md` are updated to match.
   
   Tested: `dev/breeze/tests/test_fork_ci_reconcile.py`, `test_fork_ci_gate.py` 
and `test_fork_ci_messages.py` pass (634 tests). Static checks pass (`prek 
--stage pre-commit`). I have not run it against live GitHub: the first monitor 
runs after merge should show the new budget in the "left for the next run, 
after a budget of N writes" log line, and the count in `Fork CI / Tests (AMD)`.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Claude Opus 5)
   
   Generated-by: Claude Code (Claude Opus 5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01NyQq9U7i5HhjDgrQ9qd3gq
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to