Repository navigation
Closed
Description
What a pull request runs, and how CI keeps the suite trustworthy: run less on pull requests where history says it loses nothing, keep the full matrix before anything reaches main, and keep flaky tests out of the gate without losing what they check.
Plan: CI test management plan (the wiki), with the measurements. This issue started as step 5 alone; its 2026-11-05 measurement of test selection is on that page, unchanged.
Today (last 20 runs, 2026-11-05 to 11-08)
- 31 jobs, about 250 runner-minutes a run, on every pull request, a one-line docs change included. About half is the suite on three Python versions.
- Wall time 12–21 minutes when nothing queues; with several pull requests open, jobs queued 27–33 minutes for a runner.
- Only
lintanddocsare required checks: a red test job does not block a merge.
Steps
- 1. Path filter and one required check. Done in CI: run the jobs a pull request needs, timing tests alone, one required check #390 (merged 2026-11-09);
CIis the required check. Land CI runs the jobs a pull request's files need #368 (docs, examples and tools alone skip the test jobs; 87% of today's test time over 278 merged PRs), and add an aggregateCIjob, required in place oflintanddocs, that fails if any job failed and passes skipped ones. - 2. One Python version in full, the other two quick. Done in CI: a pull request runs the suite on 3.13, the quick tier on 3.11 and 3.12 #391. PRs run the full suite on 3.13 (with VTK and MFEM, as today) and
-m quickon 3.11 and 3.12 (without them); pushes tomainkeep the full matrix. About 70 runner-minutes a run less. Of the 18 failing PR runs of 2026-10-14 to 11-05, the five that missed 3.13 differ by VTK more than by version, and their files are in the quick tier (withtest_cpu_pool.pyadded) but for some oftest_viskores_datasets.py's tests. - 3. Timing tests in a job of their own. Done in CI: run the jobs a pull request needs, timing tests alone, one required check #390. The shares run
-m "not timing"; the timing tests run alone, a failure re-run once and reported as a flake if it then passes (CPU threading: a contended kernel stays serial unless a recheck wins by the clock #385's test failed a docs-only PR). - 4. Flaky tests tracked. Done in tools/ci_failures.py: the tests that failed in CI lately, flaky ones flagged #392; its first flake fixed in Compiler preflight: a probe that times out is tried once more, for longer #394.
tools/ci_failures.py: failures onmain, failures that passed on a re-run of the same commit, failures a PR's files cannot reach; a weekly report. - 5. Test selection, by file first. Done in CI records which repository files each test file runs: the test map #395 (recording the map) and CI: a pull request runs the test files its changes reach #397 (selecting from it). A map recorded on
mainof the repository files each test file uses, refreshed on every push tomain; PRs run the test files their changes reach (68% of today's test time by file, 63% by test; none of 13 historic failures missed), the shares re-dealt over the selection. Prototype: branchci/test-selection-prototypeof berkgeveci/tack-fork. - 6. A merge queue. Done in CI: the merge queue runs every test before main moves #398; the
mainruleset has the merge-queue rule (merge commits, one PR a group,CIrequired). PRs run the reduced set; the queue runs the full matrix before the merge reachesmain, replacing today's full run after it.
Open questions (on the wiki page): Metal on every code change or by selection; whether l2-cells can drop to the quick tier on PRs.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity
berkgeveci commentedon Nov 5, 2026
The prototype is on branch
ci/test-selection-prototypeof berkgeveci/tack-fork (https://github.com/berkgeveci/tack-fork/tree/ci/test-selection-prototype/tools/test_selection), on top of #368. It holds the recorder, the replays and this period's history; its README says how to record a map and replay it.[-]CI: select tests by what a pull request's changes reach[/-][+]CI test management: what a pull request runs[/+]berkgeveci commentedon Nov 9, 2026
Replay with CI's own map (2026-11-09). The first map CI recorded (#395's run, 3.13's four shares, at
e882cd84): 196 test files, 597 repository files they run. Replayed with #397's rules (tools/testmap.py select) over the same history as the prototype:No test job 31; everything 103; partial 144 (under 20% of the suite: 26; 20–90%: 42; 90%+: 76). The prototype's per-file figure was 68%; this map's rules are a little stricter (a file no test ran, data included, runs everything).
Failures: none missed. Of the 18 failing PR runs, 6 got a partial selection (22–69% of the suite, two at 100%) and every failing test file was in it; the other 12 would have run everything.
What runs everything:
.github/(28 PRs);tack/dataset/__init__.py(27: module-level code alone, which the recorder credits to no test); paths since renamed or removed (interop/vtk.py,lang/field.py: a replay artifact, a live PR diffs against today's main);benchmarks/scripts no test runs; the MPI helpers (_vtk_algorithms_mpi.py), which the 3.13 shares skip;packages/*/README.md. A rule for unmapped__init__.pyfiles and package Markdown would move 23 PRs from everything to 90%+ and the mean from 72% to 71%: not worth it. Narrowing the 90%+ group needs function granularity (the prototype's per-test figure was 63%).Recording cost: 3.13's shares took 8.4, 9.3, 17.6 and 10.2 min against 7.7–16.1 for the same shares in four recent runs without recording; one sample, so pushes to main will tell whether share 3's 17.6 is the recorder.
berkgeveci commentedon Nov 10, 2026
Done: every step is on main (#390, #391, #392, #394, #395, #397, #398). Seen working on real traffic: #401 ran 44 test files from main's map rather than the suite, and #385 merged through the merge queue (full suite on the merge commit; the push to main after it ran lint and docs only). The plan is on the wiki: CI-test-management-plan.