Skip to content

infra(gate): run tier2-linux beside the host lanes and lift nextest's bound (#2769) - #2771

Merged
zackees merged 2 commits into
masterfrom
infra/2769-gate-lane-group
Oct 28, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/2769-gate-lane-group

Conversation

@zackees

@zackees zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member

ci-lint local-gate run ran its four lanes one after the other: all four are heavy lanes in the same (empty) chain, so tier2-linux started only after lint, rust-test and cross were done, and most cores were idle for most of the run. rust_tests() also hard-coded min(4, os.cpu_count()) for nextest, which a large host cannot raise.

RED — 079d7ccb69

ci/test_local_gate.py::LaneGroupTest::test_tier2_linux_runs_beside_the_host_lanes
  AssertionError: '' is not true : tier2-linux needs its own heavy group to overlap the host lanes
ci/test_rust_execution.py::RustExecutionTest::test_nextest_threads_follow_the_host_override
  AssertionError: '4' != '16'

GREEN — 94d4dfc0bc

  • local-gate.toml: group = "docker" on [gate.lanes.tier2-linux]. A heavy-lane group is a separate concurrent chain (GATE-007, ci.yml#399) and this lane shares no build directory with the host lanes — it builds in its own Docker container with its own build and zccache volumes — so the gate's wall time is the longer chain instead of the sum.
  • ci/local_gate.py: test_threads() reads OBS_GATE_TEST_THREADS (positive integer, SystemExit otherwise) for --test-threads, with min(4, os.cpu_count()) unchanged as the default. CI sets nothing, so CI still runs four.
  • ci/test_rust_execution.py: the helper now clears OBS_GATE_TEST_THREADS around each case, so a developer's own setting cannot decide what the pins see.
  • docs/ci-tooling.md: both settings in the local-gate section.

ci-lint local-gate lanes parses the new key (tier2-linux ... inputs=8087 tools: docker=...), and ci-lint local-gate lint reports the same GATE-002 job-needs findings as origin/master — none on local-gate.toml.

Checks

cd ci && uv run python -m unittest test_rust_execution test_local_gate   # 29 tests OK
cd ci && uv run python -m unittest test_tier2_proof_inputs test_ci_toml \
    test_lane_proof test_native_lanes test_hybrid_packaging               # 105 tests OK
uvx [email protected] check ci/local_gate.py ci/test_local_gate.py ci/test_rust_execution.py  # clean

I did not re-run a full local-gate run on this 16-core host: it shares its Docker daemon with other work in progress, and the issue already carries the A/B measurement on a 24-core host (1031 s serial → 574 s with the group, lane times unchanged, the five RUN_SERIAL deinterlace tests green under the concurrent load).

Open question from the issue

No core-count limit on the group: a host-dependent threshold would make the gate silently fall back to serial on a machine whose core count we cannot test offline, and OBS_CTEST_JOBS / OBS_GATE_TEST_THREADS are the documented controls for a small host. Say so if you would rather have the gate choose.

Fixes #2769

…#2769)

RED: test_tier2_linux_runs_beside_the_host_lanes fails because local-gate.toml
gives no group to tier2-linux, so it waits for the lint/rust-test/cross chain,
and test_nextest_threads_follow_the_host_override fails with '4' != '16'
because ci/local_gate.py hard-codes min(4, os.cpu_count()) and ignores
OBS_GATE_TEST_THREADS.
… bound (#2769)

local-gate.toml gives [gate.lanes.tier2-linux] group = "docker", its own
heavy chain (GATE-007/#399): the lane builds in its own container with its own
build and zccache volumes, so it overlaps lint/rust-test/cross instead of
queueing behind them.

ci/local_gate.py reads OBS_GATE_TEST_THREADS (a positive integer) for nextest's
--test-threads, with min(4, os.cpu_count()) unchanged as the default, so CI
still runs four. docs/ci-tooling.md documents both settings.

GREEN: uv run python -m unittest test_rust_execution test_local_gate (from ci/)
also test_tier2_proof_inputs, test_ci_toml, test_lane_proof, test_native_lanes,
test_hybrid_packaging: 105 tests OK.
@zackees

zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator. Fast Gate ⚡ is green on 94d4dfc0bc; the other lanes are skipped for this path. No local stamp: ./lint passed locally (125.8 s, the whole lane including the ci/ self-tests) but I did not run the Tier 2 lane here — it shares this host's Docker daemon with other work in flight, and local-gate.toml is a proof surface, so a stamp would not have covered this PR anyway. Queued behind the merge queue.

@zackees zackees left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed. Both halves are the right call and the tests pin the behaviour rather than the lines.

What I checked:

  • The group move is justified by what the lane actually shares. tier2-linux builds in its own Docker container with its own build and zccache volumes, so it shares no build directory with lint/rust-test/cross — the condition GATE-007 sets for a separate heavy chain. The A/B in #2769 (1031 s serial → 574 s with the group, lane times unchanged, the five RUN_SERIAL deinterlace tests green under concurrent load) is the measurement that makes this safe rather than plausible.
  • The thread bound stays four in CI and is opt-in elsewhere. test_threads() leaves min(4, os.cpu_count()) as the default and only raises it through OBS_GATE_TEST_THREADS, refusing a non-positive or non-integer value with SystemExit instead of silently falling back. CI sets nothing, so the runner-sized cap is unchanged — that is the property that matters, since a bigger default would have oversubscribed the 4-core runners.
  • The test hygiene is the detail most PRs miss. test_rust_execution.py clears OBS_GATE_TEST_THREADS around each case, so a developer's own exported setting cannot decide what the pins see. Without that the new case would pass or fail depending on whose shell ran it.
  • The new tests assert the invariant, not the literal: host lanes still in one chain, tier2-linux in a group of its own that is not one of theirs, and still weight = "heavy". A later lane added to the group gets caught.
  • 34 checks pass on 94d4dfc0, including the ci suite and Fast Gate. The PR is explicit that a full local-gate run was not repeated on this host because the Docker daemon is shared — honest, and the issue's A/B covers it.

On the open question in the body: leaving the group with no core-count limit is correct. A host-dependent threshold would silently revert the overlap on a machine we cannot test offline, and OBS_CTEST_JOBS/OBS_GATE_TEST_THREADS are the documented controls. No change requested.

Queueing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

local gate: run tier2-linux beside the Rust lanes, and make the nextest thread count configurable

1 participant