Repository navigation
ci: Run the lint lane's self-tests in parallel (#949) - #991
Merged
Merged
Conversation
zackees
enabled auto-merge
October 16, 2026 04:30
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Oct 16, 2026
…meout Review findings: os.cpu_count() ignores cgroup/affinity limits, so a CPU-limited container would start every file at once; use process_cpu_count() capped at 8. Print each file as it finishes so a hang is visible, time each file out after 600 s, and repeat failures with their output at the end. 64 s locally (8 workers), was 164 s. Refs #949
zackees
force-pushed
the
perf/949-parallel-self-test
branch
from
October 16, 2026 07:25
307ccc4 to
bac5944
Compare
Member
Author
|
Rebased onto master (bac5944). #1000 landed in between, and both PRs reworked
|
zackees
enabled auto-merge
October 16, 2026 07:25
test_self_test_runs_by_default mocked local_gate.run, but after the parallel change the default path runs each ci/test_*.py through subprocess.run, so the mock caught nothing and the test reran the whole suite, itself included, until the 600 s per-file timeout. Mock subprocess.run and check every ci/test_*.py runs once.
zackees
force-pushed
the
perf/949-parallel-self-test
branch
from
October 16, 2026 07:36
bac5944 to
b85909a
Compare
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 16, 2026
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.
Refs #949 (part of #939). This covers the main part of #949. Two other parts are left for after the CI refactor (#930/#985), to avoid colliding with it: giving the build-and-run tests their own lane, and clang-format checking only changed files locally.
Problem
./lintspent about 164 s inself_test, a single serialunittest discoverover all 64ci/test_*.pyfiles.Change
self_test()now runs oneunittest discover -s ci -p <file>process per file, in a thread pool:process_cpu_count(), which respects cgroup and affinity limits, capped at 8.ok/FAILline and time print as it finishes. Failures are repeated at the end with their full output and the environment hints.Evidence
tempfiledirectory, and the tests only read the real repo (git ls-files,ls-tree), with no index locks, fixed ports orchdir.SelfTestTestnow asserts one process per file, that a failing file fails the step and prints its output, and the capped worker count. Against the oldself_test,self_test_workersdoesn't exist.Local Gate (lint)runs the new code itself.