Repository navigation
ci: let main's CI go before pull request runs - #766
Conversation
GitHub runs only a few macOS jobs at once for the account and has no priorities. Main's Build release waited 88 minutes behind pull request jobs on 2026-11-16, and the next push to main waited behind that run. A run on main now cancels the pull request runs waiting or running when it starts, and restarts their cancelled jobs once its own macOS jobs are done, unless the pull request was closed or got a newer commit in the meantime.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 34 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Before and after
204 unchanged screens
Visual review: 204 screens, none changed. |
Pause pull requests cancelled every pull request run when main's CI started, and Resume pull requests restarted their cancelled jobs once main's macOS jobs were done. main stopped waiting for a Mac, but over the 26 hours to 2026-11-17 20:00 the cut-off jobs threw away about 1,590 macOS minutes. Paused pull requests showed failed checks until the restart, and the restart reran the same merge commit, so its results were against the main from before the merge that paused it. Before #766, only one run on main had waited long for a Mac: 88 minutes on 2026-11-16. Both jobs are gone, and main's runs wait for a free Mac like pull requests' do. CONTRIBUTING, the screens bot's comment and the DECISIONS entry say so, and the entry records why.
|
🎉 This PR is included in version 0.18.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Problem
GitHub runs only a few macOS jobs at once for the account and has no way to give a workflow run priority. Pull request runs hold those slots for up to an hour (Draw screens alone can take 45 minutes), so main's CI queues behind them and betas come late. On 2026-11-16, main's
Build releasefor the #731 merge waited 88 minutes for a runner, and the #742 merge's run waited 1 h 40 behind it in main's concurrency group.Changes
ci.yml, Linux,actions: write): when a run on main builds (a push, or a beta or stable run by hand), it cancels the CI runs of pull requests that are requested, pending, queued or in progress, and keeps their IDs.actions: writeandpull-requests: read): needs every macOS job of main's run and runs withalways(), so it runs whether they passed, failed or were cancelled. For each paused run it calls Re-run failed jobs, which reruns only the cancelled jobs and keeps the ones that had passed. It skips a run whose pull request was closed or has a newer commit, a run that has a newer run for the same commit, and a run someone already restarted.CONTRIBUTING.mdsays so where CI is described and under When CI fails;DECISIONS.mdrecords that main's CI goes first.Neither job reads anything from a pull request except run IDs and commit SHAs, and both run only on main.
Known trade-offs:
Docs images,Beta) can still queue behind it.Testing
actionlint: nothing new (its existing warnings onDraw the base's screensand the release app token are on main too).cancelandrerunreplaced byecho: with no pull request runs active, the pause finds nothing. The resume would restart the 4 pull request runs I cancelled by hand today.GITHUB_TOKENand then rangh run rerun --failedon it withGITHUB_TOKEN:workflow_runlistener fired after the cancel and again after the re-run finished, withgithub-actions[bot]as the triggering actor. Soscreens.ymlreconciles the restarted run.Testuploadstest-resultsagain on a re-run without clashing with the first attempt's artifact.Merging
One commit: any merge method works.
ci:makes no release.Claude Opus 5.5 via Claude Code