Repository navigation
CI on main skips the e2e jobs only for a tree that already passed on its pull request - #666
Open
MerciHanrim wants to merge 1 commit into
Open
MerciHanrim wants to merge 1 commit into
MerciHanrim wants to merge 1 commit into
Conversation
…its pull request A push to main now runs checks always and runs the e2e jobs unless a new e2e decision job shows that the merge commit holds the exact tree of a pull request head whose required checks (checks, e2e) passed, and that the previous main is in that head. Anything that cannot be determined, or the decision job failing, runs them in full. A daily run at 03:00 KST and a manual run (before a release) run everything on main. Pull requests run everything, as before.
Deploying cozy-loop-studio with
|
| Latest commit: |
b7b0110
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cc005101.cozy-loop-studio.pages.dev |
| Branch Preview URL: | https://ci-main-e2e-same-tree.cozy-loop-studio.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Every fix ran the full CI twice: about 18 minutes on its pull request and about 18 minutes again on
main. With one pull request merged at a time, the run onmainre-tested the same files: on #663, #664 and #665 the merge commit held exactly the tree of the approved head. The CI onmaindoes not gate the deploy (Cloudflare Pages deploysmainfrom its own connection). Lumi's decision (2026-11-25): keep the full CI on pull requests, runcheckson every push tomain, skip the e2e jobs onmainonly for a tree that already passed, conservatively, and keep a daily and a pre-release full run.The change
e2e decisionjob (scripts/ci-main-e2e-decision.mjs). A push tomainanswersrun_e2e=falseonly when all of these hold: one commit on top of the previousmain; exactly one pull request merged intomainwith this commit as its merge commit; its head's required checkschecksande2efrom GitHub Actions, latest run of each, completed with success; the head fetched fromrefs/pull/<n>/headis that commit; the previousmainis an ancestor of the head (so the pull request's CI tested the head's own tree); and the merge tree equals the head tree. Anything else, any lookup error, and every other event answertrue. The decision and its reason go to the job summary.e2e-shard×8,e2e-dist,e2e-pwa) need the decision job and run unless its answer is exactlyfalse, so the decision job failing or giving no answer runs them in full.e2egate passes on a push tomainwhen the decision job succeeded withfalse(e2e skipped); otherwise it requires every e2e job to succeed, as before.schedule: 0 18 * * *) and by hand (workflow_dispatch, before a release): everything onmain. The change-declaration step runs only for a pull request or a push (the other two declare nothing). Their concurrency group includes the event name, so they never queue behind the push run of the same commit.docs/ci-main-e2e.mdexplains the rules;docs/ci-e2e-shards.mdnotes where the timing samples now come from.Cost on a pull request: the e2e jobs start after the decision job (checkout + Node, about 15 to 20 seconds; it answers
trueat once).Verification
scripts/ci-main-e2e-decision.test.mjs: 12 tests over every rule with made-up API answers and git, each asserting the reason it ends on (never a harness gap).node scripts/ci-main-e2e-decision.mjs --sha <sha>):false.bc9df4c6) and Undo after Export ▸ Project revision keeps the exported revision #568 (d2d04159) answertrue.mainhad moved after their CI, the previousmainis not in the head, and the trees differ (0b648abd/e712e31c,35f59a30/528b5d49).68fb0e54(pushed without a pull request), the root commit (no parent) and the merge commit of docs: add a ~16s demo GIF under the README hero #144 (two parents) answertrue.true, everything runs). Themainpush path can only run after the merge: its run should show the decisionfalsefor this pull request's head and the e2e jobs skipped, which will be reported. A live different-tree or undetermined push is not staged on purpose; those paths are covered by the tests and the dry runs above.Every
check:*script,tsc -b, lint (88 warnings, the baseline) andvitest run(5770 passed) pass locally.