You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3ce8be4
Browse filesBrowse the repository at this point in the historyBrowse files
* Add design and ADR for running CI in contributor forks (AIP-120)
AIP-120 moves CI for external contributions into contributor forks so
project runners serve committers, collaborators and exempted
organisations, and so maintainers only review pull requests that
already passed in the author's fork. The mechanics span the main test
workflow, a scheduled reconciler for gated pull requests, a commit
status that surfaces the fork CI state with a link to the fork run, a
local pre-flight command and the contribution docs, so the design is
recorded before implementation and the decisions that shape it are
captured as ADR 0018.
Generated-by: Claude Opus 5
* Close gated pull requests that tamper with the fork CI gate
The gate job in ci-amd.yml runs from the pull request's merge commit,
so a gated external pull request can drop the gate or add a workflow
with a pull_request trigger and get project CI anyway. The design
accepted that as a one-run cost but left it unbounded per pull
request, because every further push would get another run.
The reconciler now detects this after the fact from what GitHub
recorded rather than from the pull request tree: project CI ran for
the head SHA and the pull request changes files under
.github/workflows/. Both signals are required so that legitimate
project CI runs (backlog reset, a removed "use project ci") and
legitimate workflow edits that keep the gate intact are never closed.
Closing stops further pull_request runs, so one attempt buys one run,
and the closure is reported to Slack as an attention item rather than
as a reconciler failure. ADR 0018 records the trade-off, including the
external pull requests with wanted workflow changes that must keep
"use project ci".
Generated-by: Claude Opus 5
* Let volunteer contributors opt in to a fork CI pilot
The dev list agreed to start with an opt-in pilot by a few volunteer
contributors rather than enabling fork CI for everyone at once. The
committer-only "use fork ci" label cannot serve that: it arrives after
gpgsig -----BEGIN PGP SIGNATURE-----
wsFcBAABCAAQBQJq0YVxCRC1aQ7uu5UhlAAAcYgQACYDDrIdXBZxVhqczF3TNrO7
qdkPgQy3NgLfVgmY0iy7ypzDRYY+glMD415Qc5OJy7n5M7XBqJ3ALQf04U/IGm0O
bMXgq1+Z9B/sRz27VNQYJm9X30hL+pE4iYHwGAQHXsr/TIgl2WN+V4awsRYEVQXM
x3Q/jwR12/YbiW2R3c61J+c7mrLdw4bZ6UtnDQqWUYkimgRGDLFvlZ/yMAj8kBuU
UyXGeOtTaIJHlghczgxlTeBDNMjuE9o5S6xsW5n+eWJXy7E/883L6uMWR3OjLR01
l2gpSqrpi52xYMVd8Zik+gpuWjkQ45C9k+XgGQfLfhoelZJ8uZfToMqARne4xVlZ
4hFIHfZSGdcLCi+sbU6PKxrMdX7HF4vDAxP9Tv4IpIzANRxG9IH5uXpHwAAx24LF
ogZQDyykjqTsadl7SqjKDw/Hybv4hklnnr8BFfvYd54iFkkP3fqSizlV4ecr1tyJ
OBvI7DbNNNdySebmnMYQGBziLQF5uUseD8srhCiXG5XNaSqbOnNXc+FHZmn0oU3O
EJ15O0QPi4rkRXQ5gYCjjb4tO99H3Mw6bMgiIWTjVa/1QPmOb9mtEbpRP/ESHuOe
1VgYd8tUczg6FB6Po5f/DXV2rZB36ij9Bo4nBmR7V1HApOx4E88lDIznGpqP/cWf
MetUk2Nom7/sr+UaBu3i
=wncY
-----END PGP SIGNATURE-----
the first pull_request run has already used project CI, and a
maintainer would have to label every pull request the volunteer opens.
A per-login join instant gates all their new pull requests from the
first run while leaving older ones on project CI, so those can never be
mistaken for gate tampering.
The reconciler also has to run while the gate is disabled, which the
earlier "exits early" wording contradicted for the label pilot as well.
Generated-by: Claude Opus 5
* Close gaps in the fork CI design found in review
Enabling ci-amd.yml in a fork also enables its cron, which would run the
full canary matrix in every contributor fork twice a day. A join instant
or enabled_since earlier than the merge that sets it gates pull requests
that already ran project CI. Forks not named "airflow" would never show
a fork run, and a pull request reopened after an inactivity close would
be closed again at once. ADR 0018 was already taken.
Generated-by: Claude Opus 5
* Trust fork CI only for pull requests that cannot change it
A fork run executes the workflows, breeze and CI scripts of the pushed commit, so a pull request changing them decides its own fork CI result. Gate tampering was only checked on the head commit, so pushing a tampered commit and then a clean one hid the bypass, and the check could be dodged by renaming a job to the gate's name or by truncated check-suite listings. The gate also fell back to project CI when its label read failed, which an exhausted token quota could trigger for every pull request.
Generated-by: Claude Opus 5
* Add fork CI eligibility function and configuration
The gate job and the reconciler must agree on which pull requests use project CI and which are left to fork CI, so the decision lives in one standard-library-only function that the gate can run without installing breeze, driven by one reviewed configuration file. It ships disabled.
Generated-by: Claude Opus 5
* Gate project CI for external pull requests in ci-amd.yml
Contributors must get CI from a plain push to their fork, and project
CI must not run for pull requests left to fork CI, without reacting to
pull request events with write permissions. A gate job ahead of
build-info decides from the base branch's configuration, and the push
trigger widens to every branch while the gate keeps the old branch list
in effect for apache/airflow.
Skipping build-info also skips everything that depends on it, which the
always() conditions of finalize-tests and notify-slack would otherwise
treat as success. Pilot join instants are compared with pull request
creation but only take effect on merge, so the config hook keeps new
ones in the future.
Generated-by: Claude Opus 5
* Address review of the fork CI gate
Drop the collaborator-permission lookup: it needs push access, which neither the gate's nor the monitor's token has, so it never matched. A committer with private apache membership makes it public or is allowlisted.
Take the gate from the default branch for pushes, so a push to a branch without the gate files keeps skipping project CI instead of looking like base_without_gate. Check the PR title in the gate job for gated pull requests, which skip ci-image-checks. Check every pilot entry when the base config does not parse, and restrict the E2E flaky-tests report to scheduled runs now that every push to main creates a gate-only run.
Generated-by: Claude Opus 5
* Anchor the canonical push branches on the pull request filter
Since #75420 ci-arm.yml has no push trigger: release branches get their full runs from release-branch-ci.yml. The canonical push branch filters are now checked against the pull_request filter of ci-amd.yml without main and the -stable branches, which is the set release-branch-ci.yml uses too.
Generated-by: Claude Opus 5
* Set PYTHONPYCACHEPREFIX for the fork CI gate config hook
main now requires every prek hook to write bytecode outside the source tree (check-prek-hooks-pycache-prefix).
Generated-by: Claude Opus 5
* Add the fork CI gate to the needs of CI passed
Generated-by: Claude Opus 5
#75142 added the CI passed job that auto-merge waits for, and check-ci-gate-needs requires every CI job in its needs. The gate exists only in ci-amd.yml, so check-ci-workflows-in-sync allows that one line as an AMD-only divergence.
* Describe the fork CI gate in the CI passed docs as in place
The gate now exists, so the CI passed comments and the auto-merge docs no longer say what happens until it lands.
Generated-by: Claude Opus 5
* Skip the scheduled ARM canary in forks
A fork that enables Actions for fork CI also gets the ci-arm.yml cron, and
nothing stopped its canary from running there. The check-run-needed step
shared by both workflows now reports run-needed=false outside apache/airflow.
Also correct the canonical push branch filter source in the design doc and
reuse AIRFLOW_ROOT_PATH in the gate config hook.
Generated-by: Claude Opus 5
0 commit comments