potiuk opened a new pull request, #75683:
URL: https://github.com/apache/airflow/pull/75683

   Moves the cancelling of merged pull requests' runs from the fork CI 
monitor's 15-minute schedule to a workflow triggered by the merge itself, as 
recommended in apache/infrastructure-website#323. Until now a merged pull 
request's runs kept holding runners for up to 15 minutes, and stuck ones for 30 
more before being force-cancelled.
   
   `cancel-merged-pr-runs.yml` runs on `push` to the branches pull requests 
merge into. It looks up the merged pull request of the pushed commit and 
cancels its unfinished `pull_request` runs created before the merge, matched by 
head repository and commit so fork pull requests are covered too. It skips 
heads still used by an open pull request, and force-cancels runs still going 
five minutes later. The lookup retries for up to a minute, since GitHub 
associates the merge commit with its pull request a few seconds after the push. 
It runs on `ubuntu-slim` with `gh` only, without installing Breeze, so it 
cancels within about a minute of the merge.
   
   The scheduled implementation from #75619 is reverted (module, tests, 
`cancel_merged_runs` config flag and the reconciler hook), and the design moves 
from the fork CI document to `05_workflows.md`.
   
   A push runs the workflow file of the pushed branch, so release branches need 
the workflow backported to get the same behaviour.
   
   Checks run locally: fork-CI breeze tests (419 passed), shellcheck of the 
workflow script, `prek` hooks on the changed files (all passed except lychee, 
which needs Docker). The script was dry-run (cancel calls replaced by `echo`) 
against recent merges of fork and in-repo pull requests and matched their runs; 
a failed lookup fails the job.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Opus 5
   
   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]

Reply via email to