Commit a18f909
ci(polars): parallelize the polars lane so the coverage cell stops racing its timeout
`test-polars (3.12)` is the only cell that runs the coverage-instrumented pass plus the
per-file coverage audit, and it had already been cancelled twice at its 10-minute budget
(615s, 611s) with zero test failures — pure budget exhaustion, the same commit passing or
failing depending on the runner it drew. Measured on the master run that produced this
base commit, the script step alone is 484s of the cell's 501s.
The lever that needs no workflow edit: pytest-xdist is already in the [test] extra, and
test-gfql-core already runs `-n auto` under `--cov`, so coverage+xdist is established here.
The main pytest phase now runs `-n auto --maxprocesses 4 --dist load`.
Measured (py3.12, polars 1.43.1, pandas 3.0.5, POLARS_COV=1), pinned to 4 CPUs to stand in
for a GitHub-hosted ubuntu-latest runner: 325.65s serial -> 109.34s parallel, 2.98x.
Verified, not assumed:
- pass/skip NODE-ID SETS (not counts) identical serial vs parallel: 2417 node ids,
2404 passed / 13 skipped, across 4-worker, 2-worker, --dist loadfile and 4-CPU-pinned runs
- merged coverage is a strict superset of serial (28,480 vs 28,478 covered lines; zero lines
lost, zero files dropped; the 2 extra are versioneer fallback lines in _version.py)
- the second `--cov-append` invocation still appends into the xdist-produced data file
(+1,791 lines, nothing lost) and the result is line-identical to the whole-script run
- `bin/coverage_audit.py --profile gfql-polars` emits a byte-identical report (modulo its
timestamp) from the parallel data, so `changed-line-coverage` sees no change
`--dist load` rather than `loadfile` because one module (test_engine_polars_chain.py) is 69%
of the lane's test time, which caps file-level distribution at ~1.4x; no test in this lane
depends on execution order or cross-test module state. POLARS_XDIST=0 restores the serial
path and POLARS_XDIST_DIST selects another distribution mode if that ever changes.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015YsqAZQLbqjSDrYSFz2GoB1 parent 233b64c commit a18f909
2 files changed
Lines changed: 32 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
40 | 64 | | |
41 | 65 | | |
42 | 66 | | |
43 | 67 | | |
44 | 68 | | |
45 | | - | |
| 69 | + | |
46 | 70 | | |
47 | 71 | | |
48 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
49 | 76 | | |
50 | 77 | | |
51 | 78 | | |
| |||
0 commit comments