Repository navigation
test(e2e): port OTLP relay and SPIFFE token-exchange tests with environment-owned fixtures - #5978
Draft
matthewgrossman wants to merge 8 commits into
Draft
matthewgrossman wants to merge 8 commits into
matthewgrossman wants to merge 8 commits into
Conversation
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
4 of 5 tasks
matthewgrossman
force-pushed
the
test/5976-otlp-spiffe-env-fixtures/matthewgrossman
branch
from
November 25, 2026 19:29
150287b to
93ebcf3
Compare
…ronment services Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…change tests Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
matthewgrossman
force-pushed
the
test/5976-otlp-spiffe-env-fixtures/matthewgrossman
branch
from
November 25, 2026 20:13
93ebcf3 to
574df06
Compare
…a collector Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…it suites Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
matthewgrossman
force-pushed
the
test/5976-otlp-spiffe-env-fixtures/matthewgrossman
branch
from
November 25, 2026 20:41
574df06 to
dd67b24
Compare
…r connections to close HttpRecorder now numbers each request's connection, counts every byte it reads, reads multi-valued headers, takes a read timeout, and waits for every connection to close at a request boundary. A test can then check that nothing beyond whole requests reached a server. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…ecorder The provider token exchange tests replace their own TCP servers and HTTP parsing with host-server-support recorders. The targets check forwarded bytes, connections and closes through the recorder, so every assertion stays. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
This branch has not been deployed
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.
What changed in the port, and why it's bigger
The legacy tests started their collector and SPIFFE Workload API inside the test process, so they bound fixed sockets the gateway was configured with and could run only one at a time. The port moves those services into the environment, so tests share one gateway and run concurrently:
cx.nameand reads only those from the file, instead of owning the collector.Excluding lockfiles, the diff is +2151/−2004 (+147):
host-server-support'sHttpRecorderreplaces the token exchange test's own TCP servers and HTTP parsing. Without the Workload API, the tests go from ~1570 to 1002.HttpRecorderspiffe-support89openshell-otel-test-supportin-processotlp-support190e2e/rustconfig.nix,e2e-suites.ymland Cargo manifestsThe lockfiles add +702/−395 more:
tests/suites/featuresandtests/supportnow pull injsonwebtoken,openshell-oteland their dependencies, whiche2e/rustdrops.Summary
Port the OTLP agent trace relay and SPIFFE token exchange tests from
e2e/rustto testkit suites, with the collector and the Workload API stub owned by the environment instead of the tests. Tests check only their own spans and traffic, so they share one gateway and run with more than one worker. Split from #5792.Related Issue
Closes #5976
Part of #5297
Changes
features/otlp-relay:agent_span_reaches_collector_with_attributionandspan_emitted_before_exit_is_delivered. The<podman base>-otlpenvironments run a stock OpenTelemetry Collector for the environment's lifetime, point the gateway's OTLP export and agent relay at it, and publish its JSONL capture asOPENSHELL_TEST_OTLP_LOG(replacingOPENSHELL_TEST_OTLP_PORT). Each test names its spans withcx.name, waits for them, and checks attribution and duplicate resource keys only on those spans.features/provider-token-exchange:independent_grants_across_sandboxesandroutes_recover_and_select_a_b_a_on_one_connection. The<podman base>-spiffeenvironments run the gateway's and supervisors' Workload APIs as a system service (playbooks/files/spiffe-workload-api.py). It creates its signing key on first start, so no key is committed, and publishes the JWKS asOPENSHELL_TEST_SPIFFE_JWKS. Tests don't touch the socket;tests/support/spiffeonly verifies SVIDs against the JWKS. The token servers stay on ephemeral ports.features/otlp-relay-inactive:relay_is_inert_without_collectorruns onubuntu-docker-rootful, whose gateway has no OTLP export or agent relay, and fails ifOPENSHELL_TEST_OTLP_ENDPOINTis set. test(e2e): port OTLP relay and SPIFFE token-exchange tests with environment-owned fixtures #5976 put it in conformance, but there it fails any gateway with the relay configured, and its log read is unreliable on k3s-ha (test(conformance): run the two sandbox-log tests on k3s-ha again #5752). The workload script uses only the Python standard library.e2e-suites.ymlhas no per-rowfilter.tests/support/README.md: the environment contract table listsOPENSHELL_TEST_OTLP_LOG,OPENSHELL_TEST_OTLP_ENDPOINTandOPENSHELL_TEST_SPIFFE_JWKS.e2e-suites.yml: rows forotlp-relayandprovider-token-exchangeon Podman rootless, andotlp-relay-inactiveon Docker rootful.harness = falsewithtestkit::main(). The token-exchange profile stays YAML becausetestkit::Profilehas notoken_grantsetter yet.e2e/rust: removesotlp_relay.rsandprovider_token_exchange.rs, their[[test]]entries and dependencies, theirPODMAN_CI_TESTSentries, and the OTLP and SPIFFE wiring in the Docker and Podman wrappers.This doesn't depend on #5792, so it's based on main. Whichever PR lands second gets a small conflict in
e2e/rust/Cargo.tomlandCargo.lock.Driver coverage
Testing
Run locally through
openshell-test-runneron tmachine:fedora-podman-rootless-otlp/rpmfedora-podman-rootless-spiffe/rpmubuntu-docker-rootful/debAlso run:
cargo fmt --checkandcargo clippy --all-targets --locked -D warningsfortests/supportandtests/suites/features;cargo checkofe2e/rustwith the Docker and Podman features;check-cargo-lockfiles.shandcheck_cargo_lockfile_alignment.py;ruff checkandruff format --checkon the Workload API stub.Checklist