potiuk opened a new pull request, #76148: URL: https://github.com/apache/airflow/pull/76148
Follow-ups from the first day of the fork CI contributor pilot (AIP-120), discussed in the pilot thread on the Airflow Slack. **Older pilot pull requests move to fork CI when they are pushed again.** A pilot participant's pull request opened before their join instant is gated from its first `ci-amd.yml` run created at or after it (a push, a rebase, a reopen, or marking it ready for review). The gate reads the creation time of its own run (hence `actions: read` on the gate job), so re-running an older run does not switch it. Discovery reads the same time back to label the pull request; afterwards the reconciler takes the `fork ci required` label as the evidence, because it deletes the gated run. The tamper check applies from then on and skips the pull request's pre-join runs only if project CI was allowed for them. The workflow-run approver treats the pull request as gated from the join instant. Only `[pilot]` entries are affected; `enabled_since` still compares the creation time. **Cancelled runs are deleted like gated ones.** A push soon after opening a pull request cancels its first project CI run, often while the gate is still deciding, and its cancelled checks stayed next to the green fork results. The monitor now deletes such a run under the same conditions as a gated-skip run: the run is completed and on its first attempt, its commit does not change `.github/workflows/`, and no job did project CI work by the tamper check's rules. **New required `CI run started` check.** Fork CI reports only when the scheduled monitor runs, and the gate cannot post a status itself (it runs with a read-only token on the contributor's event). Both CI rulesets in `.asf.yaml` now require `CI run started`, so GitHub lists it as "Expected — Waiting for status to be reported" on every pull request from the moment of the push. The monitor posts it with a link to the run: for a gated pull request once the fork has a run for the head commit, and for any other pull request once project CI has a run that is not waiting for approval. Folding this into the monitor costs no runner per push, at the price of a pull request waiting up to one monitor interval before it can merge. The writes come out of the monitor's existing 60-a-run status budget (first, at most 30), so the total stays capped at 240 an hour, 48% of the shared 500/hour content-creating limit. **The "job statuses did not fit in the budget" Slack note only fires when deferring persists.** One full-matrix fork run needs more job statuses than one monitor run allows (that is what triggered the note for #76136 today). The note now waits for three deferring runs in a row; the count is kept in the record the monitor carries between runs. Known limitations: - A release-branch pull request opened from the same fork branch and commit as an older `main` pull request of a pilot participant would also move the older one to fork CI; `use project ci` releases it. - Right after this merges, open pull requests get `CI run started` within the next monitor runs (30 a run, most recently updated first); until then they cannot merge without a committer bypass. Tests: `uv run --project dev/breeze pytest dev/breeze/tests/test_fork_ci_reconcile.py dev/breeze/tests/test_fork_ci_gate.py dev/breeze/tests/test_fork_ci_messages.py dev/breeze/tests/test_workflow_run_approval.py dev/breeze/tests/test_fork_ci_github.py dev/breeze/tests/test_ci_audit.py` (630 passed), `prek run mypy-dev` and the pre-commit hooks pass; `lychee-docker` could not run locally (sandboxed Docker), so it is left to CI. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (please specify the tool below) Generated-by: 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) -- 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]
