potiuk opened a new issue, #77097:
URL: https://github.com/apache/airflow/issues/77097

   Adding `use project ci` to a gated fork CI pull request moves it to project 
CI, but project CI does not start. It runs only on the author's next push, or 
after a maintainer closes and reopens the pull request, and then waits for 
approval when the repository's approval setting covers the author. The 
lifecycle diagram and the "Override labels" section of 
`dev/breeze/doc/ci/08_fork_ci_for_external_contributors.md` now document this 
(#76839). It is still one step more than a maintainer expects after adding the 
label.
   
   **Why the monitor cannot do it today**
   
   - The fork CI monitor uses `GITHUB_TOKEN`, and events caused by 
`GITHUB_TOKEN` do not start new workflow runs, so a close and reopen by the 
monitor would not start project CI.
   - Re-running the gated run is not possible: the reconciler deletes gated 
project CI runs.
   
   **Options**
   
   1. **Listen for the label in `ci-amd.yml`.** Add `labeled` to its 
`pull_request` event types. A maintainer adding the label is not 
`GITHUB_TOKEN`, so the event starts a run, and the gate job already reads the 
current labels. Every other label added to a pull request would also start a 
run, so the workflow has to stop at once unless the added label is `use project 
ci`. It also needs a look at how such a run interacts with concurrency groups 
and with deleting gated runs.
   2. **Give the monitor a token whose events start workflows** (a GitHub App 
installation token) and have it close and reopen the pull request when it 
releases it. This needs a new credential for apache/airflow and ASF Infra's 
agreement.
   
   Option 1 looks smaller and keeps the monitor on `GITHUB_TOKEN`.
   
   **Done when**
   
   - A maintainer adding `use project ci` to a gated pull request starts 
project CI for its head commit, with no push or close/reopen.
   - Adding any other label starts no CI work.
   - The lifecycle diagram (`diagram_fork_ci_lifecycle.py`), the "Override 
labels" section and the `use project ci` bullet in the design document describe 
the new behaviour.
   
   Raised in the review of #76839.
   
   ---
   Drafted-by: Claude Code (Opus 5.5); reviewed by `potiuk` before posting
   


-- 
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