Skip to content

testing: one nested server per shard, one sharded network test - #14833

Open
TrapsterDK wants to merge 1 commit into
mainfrom
plan-nested-server
Open

TrapsterDK wants to merge 1 commit into
mainfrom
plan-nested-server

Conversation

@TrapsterDK

@TrapsterDK TrapsterDK commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #14778
Closes #14780

What

  • tools/testing/nested/src/lib.rs: Server::enter() empties one slot workspace (w/ws) for every case instead of one workspace per case name, so all cases of a test binary (one shard) share one server and output base. In record mode a finished case copies its MODULE.bazel and lock aside, since the next case reuses the root. The unit test now runs two differently named cases and checks they get the same root and keep their own records.
  • tools/testing/nested_bazel_probe.rs: the second case is named probe_renamed; the harness case without_a_shared_root_a_test_extracts_fetches_and_stops_its_server fails unless both report one server pid.
  • tools/testing/consumer/BUILD.bazel: cold_start_test, go_prebuilt_guard_test and java_prebuilt_guard_test become one network_test (caches = "private", network = True, shard_count = 5). network_test.rs holds exactly five cases (go/java/rust cold start, go/java guard), so each shard runs one. The pure checks of cold_start_test.rs and prebuilt_guard_test.rs stay in those files as #[cfg(test)] modules of the new consumer_network library, run by consumer_network_lib_test.
  • tools/ci/test_budget_allowlist.txt: the cold_start_test nested-cold-over-60 140 line is gone; tools/testing/nested_smoke.txt lists network_test instead of the three targets.
  • References in cold_start/*.txt, prebuilt_guard_allowlist.txt and docs/design/test-guards.md point at network_test.

Tests

  • tools/dx test //tools/testing/nested:dx_nested_test //tools/ci:test_budget_test //tools/testing/consumer:consumer_network_lib_test //tools/testing/consumer:prebuilt_guard_lib_test: pass.
  • tools/dx test --affected: 96 pass, //tools/testing/consumer:root_module_test fails on root MODULE.bazel overrides and dev repos this PR does not touch.
  • Nested runs: evidence comments below.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hyBydsMejdwk6QdKus

…#14778, closes #14780)

Server::enter empties one slot workspace for every case, so all cases of
a test binary share one server and output base. A case in record mode
keeps a copy of its module files, since the next case reuses the root.
The probe names its second case differently and still sees one pid.

cold_start_test and the go/java prebuilt guards become the five cases of
//tools/testing/consumer:network_test with shard_count = 5; their pure
checks move to the consumer_network library and its unit test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hyBydsMejdwk6QdKus
@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

/evidence platforms=["macos_arm64","windows_x86_64"] task=test scope=//tools/testing/...

@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

/evidence platforms=["linux_x86_64"] task=test scope=//tools/testing/consumer:network_test

@github-actions

Copy link
Copy Markdown
Contributor

Evidence started on plan-nested-server: https://github.com/devhusdk/rules_dx/actions/runs/45396336311

@github-actions

Copy link
Copy Markdown
Contributor

Evidence started on plan-nested-server: https://github.com/devhusdk/rules_dx/actions/runs/45398044980

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

testing: merge cold_start and the go/java prebuilt guards into one sharded network test testing: one nested server per test shard

1 participant