Repository navigation
feat(ci): run only the e2e lanes a change can affect - #14301
Conversation
Every server change ran all 31 service lanes and 5 grouped lanes, even a fix confined to one module or a unit-test-only change. A declared map in .github/ci/e2e.json now lists each lane with the module, controller, worker and package paths it covers. changes.mjs selects the lanes whose paths a PR touches and runs every lane for any file the map does not claim. Docs, unit tests and CI files outside the pipeline itself run only the checks. Pushes, release branches and manual runs still test everything, since the nightly ships the newest green commit on main. Replayed against the last 150 merged PRs, the map cuts e2e service lanes by 36%. The script replaces changes.sh and the Tests / Matrix job, and reads the database version from composer.lock with git instead of the contents API.
|
Review complete. 🟡 1 medium 💬 Inline comments (1)
🧹 Nitpicks (1) — 🟢 1 low
The change moves CI lane selection from
One residual documentation reference to the deleted Reviewed commit: bd94926 |
🟢 Tier S · Ready to merge
Adds a shared JSON coverage map and change selector to choose server, Console, and e2e checks from changed paths, while keeping full coverage for shared or unmapped changes and designated full-run events. CI workflows and contributor guidance now use the map, replacing the former shell selector. The latest update makes every push run all server lanes so main does not skip them. Latest changes: The latest commit sets the server checks output for every push, which—alongside the existing push-wide lane selection—runs all server lanes on each push.
📂 Walkthrough · 6
Reviewed the commits since |
Security rulesNo new WARNING or ERROR findings from security rules. 32 existing findings tracked in
|
There was a problem hiding this comment.
This PR replaces the shell-based CI change-detection script (changes.sh) with a Node script (changes.mjs) that computes which e2e lanes, console checks, and database-migration jobs a run needs, wiring the outputs into ci.yml and console.yml and updating the lane map in ci/e2e.json.
Key findings
- 🟡 Database-version check now compares merge-base, not base tip — changes.mjs:113
The merge-base diff counted commits that landed on the base branch after the PR forked, which widened lane selection and could flag a database version bump the PR did not make. The checkout's merge commit has the base tip as its first parent, so diff against that.
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
The nightly builds from release branches, which always test everything, so main pushes run every lane to check merged PRs together, not for the nightly.
A docs-only or console-only push after a failed server push reported a green tip on main while skipping e2e. Push runs are post-merge, so nobody waits on them, and such pushes are rare.
Problem
Every PR that touches server code runs all 31 e2e service lanes and the 5 grouped lanes (Abuse, Screenshots, Antivirus, S3, Queue Retry). That includes a fix inside one module, a change to the e2e tests of one service, or a unit-test-only PR.
What this PR does
CI now picks the lanes to run from the files a PR changes:
tests/e2e/Services/<Name>/runs that lane.app/init, shared libraries) still runs every lane. A gap in the map costs time, not coverage.Release branches, which the nightly builds from, and manual runs still run everything. Every push to
mainruns every server lane, so PRs that each ran only some lanes are tested together after merge.The map lives in
.github/ci/e2e.json. It also replaces the service list that used to be inline inci.yml. AGENTS.md now says to add new suites and paths there.Effect
Replayed against the last 150 merged PRs:
That's 36% fewer e2e service lanes overall. The PRs that still run every lane touch shared code.
This PR touches the CI pipeline itself, so its own run uses every lane.
Related: #14299