Skip to content

Show fork CI progress sooner and gate rebased pilot pull requests - #76148

Merged
potiuk merged 1 commit into
mainfrom
fork-ci-pilot-followups
Oct 31, 2026
Merged

potiuk merged 1 commit into
mainfrom
fork-ci-pilot-followups

Conversation

@potiuk

@potiuk potiuk commented Oct 31, 2026

Copy link
Copy Markdown
Member

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?
  • Yes (please specify the tool below)

Generated-by: Claude Opus 5 following the guidelines

🤖 Generated with Claude Code

Feedback from the first day of the contributor pilot:

Pilot participants expected their open pull requests to move to fork CI
once they rebased them after joining, but only pull requests created
after the join instant were gated.

A push soon after opening a pull request cancels the first project CI
run, and its cancelled checks stayed next to the green fork results,
giving the pull request a confusing red/green status.

Fork CI reports to the pull request only when the scheduled monitor
runs, so for a while a contributor saw nothing telling them their CI
runs in the fork. The gate cannot post a status itself (it runs with a
read-only token on the contributor's event), so a required "CI run
started" check now shows as expected and waiting from the moment of the
push, and the monitor fills it in with a link to the run. Doing that in
the scheduled monitor, rather than in a job of every CI run, keeps it
off the shared runner queue, and its writes come out of the monitor's
existing per-run budget so the repository's shared rate limit is not
spent any faster.

One full-matrix fork run needs more job statuses than that budget
allows in a single monitor run, so the Slack note about deferred job
statuses fired on ordinary pilot runs. It now waits until deferring
persists, which is what it is meant to signal.

Generated-by: Claude Opus 5
@potiuk
potiuk merged commit a3567e9 into main Oct 31, 2026
99 of 134 checks passed
@potiuk
potiuk deleted the fork-ci-pilot-followups branch October 31, 2026 16:14
@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
…requests (#76148) (#76149)

Feedback from the first day of the contributor pilot:

Pilot participants expected their open pull requests to move to fork CI
once they rebased them after joining, but only pull requests created
after the join instant were gated.

A push soon after opening a pull request cancels the first project CI
run, and its cancelled checks stayed next to the green fork results,
giving the pull request a confusing red/green status.

Fork CI reports to the pull request only when the scheduled monitor
runs, so for a while a contributor saw nothing telling them their CI
runs in the fork. The gate cannot post a status itself (it runs with a
read-only token on the contributor's event), so a required "CI run
started" check now shows as expected and waiting from the moment of the
push, and the monitor fills it in with a link to the run. Doing that in
the scheduled monitor, rather than in a job of every CI run, keeps it
off the shared runner queue, and its writes come out of the monitor's
existing per-run budget so the repository's shared rate limit is not
spent any faster.

One full-matrix fork run needs more job statuses than that budget
allows in a single monitor run, so the Slack note about deferred job
statuses fired on ordinary pilot runs. It now waits until deferring
persists, which is what it is meant to signal.
(cherry picked from commit a3567e9)


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
…requests (#76148) (#76149)

Feedback from the first day of the contributor pilot:

Pilot participants expected their open pull requests to move to fork CI
once they rebased them after joining, but only pull requests created
after the join instant were gated.

A push soon after opening a pull request cancels the first project CI
run, and its cancelled checks stayed next to the green fork results,
giving the pull request a confusing red/green status.

Fork CI reports to the pull request only when the scheduled monitor
runs, so for a while a contributor saw nothing telling them their CI
runs in the fork. The gate cannot post a status itself (it runs with a
read-only token on the contributor's event), so a required "CI run
started" check now shows as expected and waiting from the moment of the
push, and the monitor fills it in with a link to the run. Doing that in
the scheduled monitor, rather than in a job of every CI run, keeps it
off the shared runner queue, and its writes come out of the monitor's
existing per-run budget so the repository's shared rate limit is not
spent any faster.

One full-matrix fork run needs more job statuses than that budget
allows in a single monitor run, so the Slack note about deferred job
statuses fired on ordinary pilot runs. It now waits until deferring
persists, which is what it is meant to signal.
(cherry picked from commit a3567e9)


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