Skip to content

perf(e2e): run conformance in parallel with nextest - #5865

Open
matthewgrossman wants to merge 15 commits into
mainfrom
test/5860-parallel-conformance/matthewgrossman
Open

matthewgrossman wants to merge 15 commits into
mainfrom
test/5860-parallel-conformance/matthewgrossman

Conversation

@matthewgrossman

@matthewgrossman matthewgrossman commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Summary

Run the prebuilt openshell-conformance binary concurrently in E2E using nextest's scheduler.

The binary still works on its own: openshell-conformance run runs the suite serially with no other tools, as before, with each test in its own process and an optional JUnit report. If nextest is installed, it can schedule the same binary instead. That adds parallel workers, retries, filtersets, per-test grouped output and the rest of nextest's options. The binary stays a single static executable. It only writes the build metadata nextest needs, and you run your own cargo-nextest against it, so every nextest option works unchanged.

Related Issue

Closes #5860

Part of #5765 (step 1: let nextest run the prebuilt program). Step 2, turning the features and drivers suites into programs, is separate.

Changes

  • Add openshell-conformance nextest-metadata DIR. It writes cargo-metadata.json and binaries-metadata.json describing the running executable as the only test binary. These are nextest's documented reuse-build inputs, part of its append-only machine-readable API within 0.9.x. Then run:

    openshell-conformance nextest-metadata "$dir"
    cargo-nextest nextest run --cargo-metadata "$dir/cargo-metadata.json" \
      --binaries-metadata "$dir/binaries-metadata.json" [nextest options]

    openshell-conformance run stays the serial runner that needs no nextest. Plain Cargo builds and libtest discovery are unchanged.

  • The E2E wrappers (e2e/support/conformance.sh) and the tmachine runner (--program) use nextest with the existing 15-minute per-test limit, 10-second grace period and JUnit report. Nextest comes from mise.toml on hosts and the tmachine nextest.yaml playbook in guests, both pinned to 0.9.143.

  • Concurrency uses nextest's own NEXTEST_TEST_THREADS, with no OpenShell-specific knob. Local wrapper runs use nextest's default of one test per CPU. CI sets NEXTEST_TEST_THREADS: "4" for the Docker, Podman and Kubernetes host lanes. The tmachine runner keeps --test-threads, with test_threads: 4 on the conformance rows. Runner --program rows use a fixed nextest profile until per-family nextest settings land (test(runner): apply per-family nextest config and a thread count to runner rows #5295).

  • The VM host lanes run conformance with one worker (NEXTEST_TEST_THREADS: "1"). Simultaneous VM launches on a fresh gateway crash with a vCPU Bad address error, tracked in bug: concurrent VM sandbox launches crash with vCPU "Bad address" (ProcessExited) #5902. Parallel tests exposed that driver bug; it is not a conformance test problem.

  • Require conformance tests to work on a shared gateway. No run-alone marker: it would not protect other gateway users or other suite invocations.

  • Tests run from the metadata directory, so paths such as OPENSHELL_BIN must be absolute. The wrappers already resolve it.

An earlier revision embedded nextest in the binary. That was reverted in 693369a in favor of this smaller design.

Shared-gateway audit

Reviewed all 49 registered tests on the main base, across these 18 modules:

Modules Shared state checked
smoke, lifecycle, attach, cli, exec_cli, image, process Testkit allocates unique sandbox names. Manual CLI creates use cx.name. List assertions select the test's own sandbox by name. Exec, attach, restart, environment and cleanup operate on that sandbox only.
create_upload, file_transfer, persistent_workspace, ssh Fixtures use sandbox-local files or host temp directories. SSH uses a private config and known-hosts file; fingerprint lookup filters by sandbox name.
filesystem_policy, policy_advisor, settings Fixed rule names and paths are sandbox-local. Drafts and effective settings are read or changed only for the test's sandbox. settings reads ocsf_json_enabled globally to check the prerequisite but does not set or clear it.
credential_gating Unique provider and profile IDs; only test-owned providers are updated or removed. HTTP and WebSocket fixtures bind ephemeral host ports and request counts refer to the individual fixture.
labels, templates, workspaces Unique label selector values and workspace and template names. The fixed template label is read back by name, not used for a shared list assertion. Exact list matches use unique selectors; unfiltered lists check only the test's own resources.

No inference route changes, gateway-wide writes, or unscoped count assertions. No tests were marked, skipped, renamed, or changed. The legacy gateway-wide settings mutation remains outside conformance pending #5527.

Testing

  • cargo test and cargo clippy --all-targets -- -D warnings in tests/testkit and tests/runner
  • nextest-metadata from a local build of openshell-conformance, listed by nextest 0.9.143 with the wrapper profile and NEXTEST_TEST_THREADS=4
  • NEXTEST_TEST_THREADS overrides a profile's test-threads (4 one-second tests: 4.1 s with test-threads = 1, 1.0 s with the variable set to 4)
  • Local Docker (macOS ARM64), conformance only, at nextest's default of 14 workers: 49/49 passed in 46.8 s
  • Local Docker (macOS ARM64), conformance only: 49/49 passed in each run. Nextest took 284.7 s with one worker and 82.2 s with four workers (3.46× faster), excluding setup. The standalone serial binary took 258.1 s.
  • Branch E2E on this revision

Timings

Conformance step only, 49 tests. Before is serial openshell-conformance run from run 45228231671, a main-based PR from the same day. After is this PR at four workers, run 45235328880. One run each.

Lane Before After Speedup
Docker host (rust-docker) 254 s 70 s 3.6×
Podman host (rust-podman-ci) 342 s 91 s 3.8×
Kubernetes host (Rust smoke, v1beta1) 639 s 239 s 2.7×
tmachine ubuntu-docker-rootful (deb) 304 s 93 s 3.3×
tmachine ubuntu-docker-rootful (external driver) 274 s 85 s 3.2×
tmachine fedora-podman-rootful 323 s 123 s 2.6×
tmachine fedora-podman-rootless 356 s 126 s 2.8×
tmachine ubuntu-k3s 778 s 268 s 2.9×
tmachine ubuntu-k3s-ha 829 s 322 s 2.6×
Total 68 min 24 min 2.9×

VM lanes are unchanged because they stay serial. At four workers, 1–3 of the first simultaneous VM launches crashed with Failure during vcpu run: Bad address in every run, including run 45235328880. That is tracked in #5902.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@matthewgrossman
matthewgrossman requested a review from a team as a code owner November 20, 2026 22:46
@matthewgrossman matthewgrossman added test:e2e Requires end-to-end coverage area:build CI/CD workflows, releases, build targets, packaging, and artifact publication. topic:testing Unit, integration, regression, conformance, E2E tests, coverage, flakes, and test infrastructure. labels Nov 20, 2026
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@matthewgrossman matthewgrossman changed the title perf(testkit): run conformance tests concurrently within each CI row perf(e2e): run prebuilt conformance in parallel with nextest Nov 20, 2026
@github-actions

Copy link
Copy Markdown

Compatibility review (advisory)

New or updated breaking changes; see the full report for all findings.

1. cli — No explicit risk acceptance found

openshell-test-runner run --program &lt;binary&gt; previously invoked &lt;binary&gt; run --junit &lt;path&gt; but now unconditionally requires &lt;binary&gt; nextest-metadata &lt;dir&gt; followed by nextest execution.

  • Impact: Operators reusing previously supported prebuilt testkit executables encounter argument or missing-metadata failures instead of running their suites, although direct openshell-conformance run remains supported.
  • Action: Preserve the serial ready/run --junit fallback for existing prebuilt programs in v0.1.10 and document rebuilding as the migration for opting into nextest execution.
  • PR: perf(e2e): run conformance in parallel with nextest #5865
Review details
  • Execution: complete
  • Candidate: PR #5865 (1748d6e9ec5c9825e2f7772e9ec6627be583d77e)
  • Baseline: de7c2a5f3d6e5eb00f9bb56a5cf8a10becedbd69 (de7c2a5f3d6e5eb00f9bb56a5cf8a10becedbd69)
  • Reviewed: rust-sdk, python-sdk, api-behavior, cli, configuration, policy, helm, state

Advisory review; publication gates are unchanged.

Branch check run

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@github-actions

Copy link
Copy Markdown

Compatibility review (advisory)

New or updated breaking changes; see the full report for all findings.

1. configuration — No explicit risk acceptance found

The E2E wrappers stop honoring OPENSHELL_CONFORMANCE_BIN and OPENSHELL_CONFORMANCE_JUNIT and instead require OPENSHELL_TESTKIT_BIN and OPENSHELL_TESTKIT_JUNIT.

  • Impact: Existing E2E invocations unexpectedly build from source instead of using the selected prebuilt binary, potentially failing without a Rust toolchain, while report collectors lose their configured JUnit destination.
  • Action: Retain OPENSHELL_CONFORMANCE_BIN and OPENSHELL_CONFORMANCE_JUNIT as backward-compatible aliases in v0.1.10 and document their relationship to the new names.
  • PR: perf(e2e): run conformance in parallel with nextest #5865
Review details
  • Execution: complete
  • Candidate: PR #5865 (46fe53fdee3509e3f0ad2ab654222a87682d0e19)
  • Baseline: de7c2a5f3d6e5eb00f9bb56a5cf8a10becedbd69 (de7c2a5f3d6e5eb00f9bb56a5cf8a10becedbd69)
  • Reviewed: rust-sdk, python-sdk, api-behavior, cli, configuration, policy, helm, state

Advisory review; publication gates are unchanged.

Branch check run

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@matthewgrossman matthewgrossman changed the title perf(e2e): run prebuilt conformance in parallel with nextest perf(e2e): run conformance in parallel with bundled nextest Nov 23, 2026
@github-actions

Copy link
Copy Markdown

Compatibility review (advisory)

New or updated breaking changes; see the full report for all findings.

1. rust-sdk — No explicit risk acceptance found

openshell_sdk::raw::proto::ProviderCredentialRefreshStrategy gains GithubAppInstallation, expanding an existing exhaustive public enum.

  • Impact: Downstream SDK consumers matching all seven baseline variants fail to compile with non-exhaustive-pattern errors; ordinary RPC callers remain unaffected.
  • Action: Preserve the existing enum in v0.1.10 and defer its expansion to a permitted minor train with migration guidance for exhaustive matches.
  • PR: perf(e2e): run conformance in parallel with nextest #5865

2. configuration — No explicit risk acceptance found

Omitted supervisor_image and sandbox_runtime_image settings now select quay.io/ai-openshell images instead of ghcr.io/nvidia/openshell images.

  • Impact: Existing Docker and Podman installations allowing or mirroring only the documented GHCR runtime repositories fail image pulls after upgrading without changing gateway.toml.
  • Action: Retain GHCR runtime defaults and publish matching patch images there for v0.1.10, making Quay opt-in until a permitted minor train.
  • PR: perf(e2e): run conformance in parallel with nextest #5865

3. cli — No explicit risk acceptance found

Prebuilt openshell-conformance run now executes tests from a temporary workspace rather than the caller's working directory.

  • Impact: Operators using OPENSHELL_BIN=./openshell ./openshell-conformance run encounter executable-not-found test failures and must instead supply an absolute OPENSHELL_BIN path; plain Cargo builds remain unaffected.
  • Action: Preserve caller-relative OPENSHELL_BIN resolution in v0.1.10 by resolving it before entering the bundled scheduler rather than requiring consumers to rewrite existing invocations.
  • PR: perf(e2e): run conformance in parallel with nextest #5865
Review details
  • Execution: complete
  • Candidate: PR #5865 (a2b065e2bde2820dffd11a3254276c5a74a05a83)
  • Baseline: a1c1e42640fc8c368e4a85e584ab324a33d0f91b (a1c1e42640fc8c368e4a85e584ab324a33d0f91b)
  • Reviewed: rust-sdk, python-sdk, api-behavior, cli, configuration, policy, helm, state

Advisory review; publication gates are unchanged.

Branch check run

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@github-actions

Copy link
Copy Markdown

Compatibility review (advisory)

New or updated breaking changes; see the full report for all findings.

1. cli — No explicit risk acceptance found

openshell-test-runner run --program <binary> now interprets program exit 1 as an execution error instead of a test failure.

  • Impact: Existing prebuilt testkit programs and plain-Cargo conformance binaries make the runner exit 2 instead of its documented test-failure status 1.
  • Action: Preserve exit-1 handling for existing --program binaries in v0.1.10 and make nextest's exit-100 protocol negotiated or opt-in.
  • PR: perf(e2e): run conformance in parallel with nextest #5865
Review details
  • Execution: complete
  • Candidate: PR #5865 (731d0e77eb6e9812475b7f92ed1b8968bb6d2905)
  • Baseline: a1c1e42640fc8c368e4a85e584ab324a33d0f91b (a1c1e42640fc8c368e4a85e584ab324a33d0f91b)
  • Reviewed: rust-sdk, python-sdk, api-behavior, cli, configuration, policy, helm, state

Advisory review; publication gates are unchanged.

Branch check run

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Comment thread .github/workflows/branch-e2e.yml Resolved
Comment thread .github/workflows/e2e-vm-test.yml Resolved
Comment thread tests/runner/src/main.rs Resolved
Comment thread tests/suites/conformance/src/bundled.rs Resolved
Revert the bundled-nextest packaging. openshell-conformance only writes
the metadata nextest needs (nextest-metadata DIR), and callers run
cargo-nextest themselves, so every nextest option works unchanged.

Replace OPENSHELL_TESTKIT_THREADS with nextest's own NEXTEST_TEST_THREADS.
The wrapper's profile defaults to one thread because tests share a gateway.

This reverts commits 7dc9bb5, fc3d032, c56037e and d942fbf.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Comment thread e2e/support/conformance.sh Resolved
@matthewgrossman matthewgrossman changed the title perf(e2e): run conformance in parallel with bundled nextest perf(e2e): run conformance in parallel with nextest Nov 23, 2026
Drop the wrapper profile's test-threads = 1 so local runs use nextest's
default of one test per CPU. CI sets NEXTEST_TEST_THREADS explicitly.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Simultaneous VM launches on a fresh gateway crash with a vCPU
"Bad address" error (#5902), so keep the VM lanes serial until the
driver handles concurrent first launches.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@github-actions

Copy link
Copy Markdown

Compatibility review (advisory)

New or updated breaking changes; see the full report for all findings.

1. helm — No explicit risk acceptance found

Helm publication moves from GHCR’s helm-chart to Quay’s charts/openshell, while default image repositories change from openshell/* to ai-openshell/*.

  • Impact: Existing Helm upgrade references cannot retrieve new releases, and unchanged global.image.registry mirror overrides select image paths absent from existing mirrors.
  • Action: Retain the legacy Helm OCI references and mirror repository defaults for v0.1.10, keeping the Quay layout opt-in until a permitted minor train.
  • PR: perf(e2e): run conformance in parallel with nextest #5865
Review details
  • Execution: complete
  • Candidate: PR #5865 (21697144e738b0c6adf0340f23c42c9ae572aa7a)
  • Baseline: a1c1e42640fc8c368e4a85e584ab324a33d0f91b (a1c1e42640fc8c368e4a85e584ab324a33d0f91b)
  • Reviewed: rust-sdk, python-sdk, api-behavior, cli, configuration, policy, helm, state

Advisory review; publication gates are unchanged.

Branch check run

NEXTEST_TEST_THREADS is set for the whole CI step, so the legacy
Kubernetes nextest run inherited it. Unset it there to keep that suite on
its own profile's concurrency.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
The runner and the host-lane wrapper wrote the same nextest profile and
passed the same output flags. Keep them in one checked-in file that the
runner embeds and the wrapper passes by path.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

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

area:build CI/CD workflows, releases, build targets, packaging, and artifact publication. test:e2e Requires end-to-end coverage topic:testing Unit, integration, regression, conformance, E2E tests, coverage, flakes, and test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

speedup: run conformance tests in parallel within each row

1 participant