Repository navigation
Rework fork CI draft and label rules into one state table - #76681
Conversation
Each branch of the reconciler set the draft state and the review labels on its own, and the branches disagreed with each other and with the state comment. A green pull request opened as a draft was told it was ready for maintainer review while it had no review label and stayed a draft. A review label added before the author drafted a pull request stayed on the draft. Closing for the gate asked for a draft change that GitHub always refuses on a closed pull request, which reported a failure to Slack on every such closure. One function now maps each state, and whether the pull request is the author's own draft, to its draft state and labels, so each state shows the same everywhere and the table can be read in one place. The AIP-120 vote thread also asked for two rule changes, which are now rows of that table and one setting: a failed fork run no longer drafts the pull request, because a flaky test after a rebase drafted approved pull requests and cancelled their auto-merge, and the inactivity close waits 30 days instead of 7, for contributors who work in spare moments. Generated-by: Claude Code (Opus 5.5)
|
Your CI change needs a maintainer. CI for this pull request runs in your fork, and the workflow runs it starts in apache/airflow are approved automatically while they only run the fork CI gate. This pull request changes files that define what CI runs:
Such a change can make project CI run on the project's runners, so its workflow runs in apache/airflow wait for a maintainer to review the change and approve them. CI in your fork is not affected, and its result stays visible on this pull request. Pull requests from contributors run their CI in the contributor's own fork. GitHub Actions is free and has no minute limit on public forks, while the CI capacity of the Apache Software Foundation is shared by every ASF project and is finite. This comment was posted automatically by the fork CI monitor from templates drafted with an AI-assisted tool, so it may contain mistakes. An Apache Airflow maintainer, a real person, will review the pull request once its fork CI is green. Why the first pass is automated. |
|
Closing this pull request because it changes the fork CI gate: it changes The gate decides whether a pull request runs its CI in apache/airflow or in the contributor's fork. It is made of the If the change is wanted, a maintainer can reopen the pull request and add the This comment was posted automatically by the fork CI monitor from templates drafted with an AI-assisted tool, so it may contain mistakes. An Apache Airflow maintainer, a real person, will review the pull request once its fork CI is green. Why the first pass is automated. |
|
Project CI in use. A maintainer added the This comment was posted automatically by the fork CI monitor from templates drafted with an AI-assisted tool, so it may contain mistakes. An Apache Airflow maintainer, a real person, will review the pull request once its fork CI is green. Why the first pass is automated. |
Generated-by: Claude Code (Opus 5.5)
potiuk
left a comment
There was a problem hiding this comment.
Checked against the PR head. compute_projection gives the same draft and label results as the old per-branch code for every state except the rows marked "new", and those match what the AIP-120 vote thread asked for. Not drafting a failed run at all, rather than after a day, is better here: the PR still leaves the review queue because it loses ready for maintainer review, and it can no longer cancel auto-merge on an approved PR. The 30-day close_after_days and the author-draft texts look good.
This review was drafted by an AI-assisted tool and confirmed by an Apache Airflow maintainer. The maintainer approving this PR has read the findings and signed off. If something feels off, please reply on the PR and a maintainer will follow up.
More on how Apache Airflow handles maintainer review: Contributing guide.
Backport failed to create: v3-4-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker 2b59699 v3-4-testThis should apply the commit to the v3-4-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
* [v3-4-test] Sync fork CI changes from main Several fork CI changes merged to main since the last sync never reached v3-4-test, and the fork CI monitor reads the gate configuration of a pull request's base branch, so pull requests to v3-4-test were still closed after 7 days and missed ten pilot participants. The fork CI modules, their tests, the design document and its diagrams, the monitor workflow, the gate configuration checks and the contributor documentation now match main, taking in #75814, #75696, #76272, #76316, #76327, #76510, #76538, #76677, #76681, #76835, #76836, #76837, #76839, #76841, #76866, #76267 and #77100. The pilot participants new to this branch join at 2026-11-16 00:00 UTC rather than at their main dates, as the gate configuration check requires a future instant for an entry that is new on the base branch. Generated-by: Claude Opus 5 * [v3-4-test] Say the fork CI monitor runs every 5 minutes in the CI tasks doc The sentence changed with #76836 on main and was missed by the sync. Generated-by: Claude Opus 5 * [v3-4-test] Bring the fork CI GitHub client tests in line with main The tests for the smaller job listing pages (#76327) were missed by the sync; the client code they cover is already in it. Generated-by: Claude Opus 5
Why
For each pull request gated to fork CI, the reconciler shows the state in four places: the draft state, the
ready for maintainer reviewlabel, theneeds project cilabel and the state comment. Each branch ofclassify()set the draft state and the labels on its own. The branches did not always agree with each other or with the state comment:asset state storeAPI endpoint to an async db session #74540 gotready for maintainer review. Then the author converted it to draft. The label stays on the draft.What
compute_projectionmaps each state to the draft state and the two labels. Its second input is whether the pull request is the author's own draft. Every branch ofclassify()now uses it.test_projection_tablechecks the function, and08_fork_ci_for_external_contributors.mdshows the same diagram and table.The AIP-120 vote thread asked for two more changes:
close_after_daysis 30, not 7. Some contributors only work on their pull requests in spare moments.Six rows change, marked "new" below. The
failedtext changes, and author drafts get new texts. The bot edits those comments once, and leaves the other comments as they are.%%{init: {'theme': 'neutral'}}%% stateDiagram-v2 [*] --> gated: discovery adds fork ci required state gated { [*] --> setup_required: workflow not enabled in the fork [*] --> awaiting_push: workflow enabled, no run for the head commit [*] --> running: fork run in progress setup_required --> awaiting_push: author enables the workflow awaiting_push --> running: author pushes running --> failed: run fails, is cancelled or times out running --> green: run passes, no CI-defining change running --> green_unverified: run passes, CI-defining change failed --> running: author pushes green --> running: author pushes green_unverified --> running: author pushes running --> setup_required: workflow disabled awaiting_push --> setup_required: workflow disabled state green { [*] --> green_ready: not a draft, or the bot's draft [*] --> green_author_draft: the author's draft green_ready --> green_author_draft: author converts to draft green_author_draft --> green_ready: author marks it ready } state green_unverified { [*] --> unverified_ready: not a draft, or the bot's draft [*] --> unverified_author_draft: the author's draft unverified_ready --> unverified_author_draft: author converts to draft unverified_author_draft --> unverified_ready: author marks it ready } } gated --> closed: setup_required or awaiting_push for close_after_days (30 days) gated --> released: maintainer adds use project ci gated --> ungated: base branch without fork CI, e.g. v3-3-test gated --> gate_modified: pull request changes the gate gated --> gate_bypassed: project CI ran without use project ci (gate tampering) closed --> gated: reopenedThe "author's draft" is a draft that the bot did not make. A pull request opened as a draft is one too. The table follows one rule: a draft waits for the author,
ready for maintainer reviewwaits for a maintainer review, andneeds project ciwaits for a maintainer to review the CI change and adduse project ci.ready for maintainer reviewneeds project ciuse project ciuse project ciuse project ciThe bot edits the state comment on each run. An edit does not notify anyone, so the bot posts a new comment only when someone must act:
The workflow run approval posts two more comments when a pull request changes CI files. This PR does not change them.
Replaces #76516. The fork CI gate closed it, because it changes the reconciler. I force-pushed the branch after that, so GitHub cannot reopen it.
related: #74822, #76672
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5.5) following the guidelines