Repository navigation
test(e2e): port Docker and Podman driver feature tests from e2e/rust - #5695
matthewgrossman merged 23 commits into
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
251835b to
3214f39
Compare
4c8dfc9 to
4579361
Compare
|
/ok to test 4579361 |
4579361 to
cd9c8f2
Compare
|
/ok to test cd9c8f2 |
3214f39 to
f99bacb
Compare
|
/ok to test 0a29574 |
cd9c8f2 to
0a29574
Compare
f99bacb to
afcf2f4
Compare
|
/ok to test f188601 |
0a29574 to
f188601
Compare
054ed4f to
31e7182
Compare
f188601 to
f054e20
Compare
|
/ok to test f054e20 |
bfcbcc7 to
86a2569
Compare
|
/ok to test 0211cf1 |
f054e20 to
0211cf1
Compare
|
/ok to test 1d05357 |
1facc5e to
c3d15d9
Compare
…wgrossman Take main's features workspace manifest, which finds members itself (#6089). Refresh the e2e/rust, features and drivers/docker lockfiles. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
TaylorMutch
left a comment
There was a problem hiding this comment.
gator-agent
PR Review Status
Completed the initial code-only review of the Docker and Podman test migration, including suite wiring, shared helpers, and the legacy coverage being replaced. No blocking findings remain. Required checks, including the selected E2E suite, are green; maintainer approval is the remaining action.
Blocking findings: None.
Carried findings: None.
Non-blocking suggestions: None.
Gator metadata
- Validation: Focused testkit migration linked to #5676 and #5281; author has repository write access.
- Docs: Published Fern updates are unnecessary for this test-only migration; CI.md, TESTING.md and testkit documentation are updated.
- Checks: DCO, Branch Checks, Helm Lint and E2E are successful on the current head.
- E2E: Existing test:e2e selected suite completed successfully. No tests or workflows were started by this review.
- Head SHA:
49b0c8d0a0fe0459afbb4f1506b4e75414b078f8 - Base SHA:
967c594c311007bc74969666502efa348a0ff41d - Merge base SHA:
967c594c311007bc74969666502efa348a0ff41d - Patch ID:
82c1b8bafb07565d40a05614f6e864359edf8ee0 - Gator payload:
16 - Review mode:
initial - Previous reviewed SHA: none
- Review budget exhausted: no
- Maintainer decision required: no
- Next state:
gator:approval-needed
…wgrossman Keep both sides' suite rows, tmachine feature environments and container-engine helpers. Refresh the drivers/docker lockfile for testkit's new dependencies. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…wgrossman Refresh the drivers/docker lockfile for openshell-extension-core's new dependencies (#5735). Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…wgrossman Keep both sides' suite rows and tmachine feature environments. Refresh the e2e/rust and features lockfiles. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Decision D in #5297 approved dropping the checks these files still held, and their other tests now live in testkit suites: - ocsf_jsonl_conformance: the /var/log file-sink check (rest in features/ocsf) - host_gateway_alias: host gateway reachability (rest in conformance and features/host-gateway) - podman_host_gateway: reachability and the 127.0.0.53 nameserver check (stop/start in features/host-gateway) - transparent_tcp: the rootless Podman musl DNS test and the private DNS pins test, which never ran in CI (#5916 tracks a crate-level test) Remove them from the Podman and VM wrapper lanes and the tmachine archive exclusions, and drop e2e/rust's openshell-ocsf-validate dependency. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
There was a problem hiding this comment.
gator-agent
PR Review Status
The follow-up found no blocking issues in the merge resolutions or legacy test cleanup. @matthewgrossman, I checked the cleanup against the test drops you documented in #5297.
Gator metadata
- Validation: Follow-up to review 6123274836.
- Docs: The delta changes test infrastructure and its contributor documentation.
- Checks: All required checks other than Maintainer Approval are green.
- E2E: The selected suite passed.
- Head SHA:
6861767afd1ef89a5b53f137310fb5250dc97fff - Base SHA:
594e6df3cde060608b57779d67160a4ee3414471 - Merge base SHA:
594e6df3cde060608b57779d67160a4ee3414471 - Patch ID:
2132aed2668f2861fb7052ea37cf6d4ffa27c7d1 - Gator payload:
19 - Review mode:
follow_up - Previous reviewed SHA:
49b0c8d0a0fe0459afbb4f1506b4e75414b078f8 - Review budget exhausted: no
- Maintainer decision required: no
- Next state:
gator:approval-needed
…-podman-features/matthewgrossman Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
There was a problem hiding this comment.
gator-agent
PR Review Status
The only author-side change since the previous Gator review aligns the Docker test suite lockfile with the event-listener update on main. I checked the lockfile entry against main and found no blocking issues.
Gator metadata
- Previous reviewed SHA:
6861767afd1ef89a5b53f137310fb5250dc97fff - Head SHA:
4893972549d941aa0372d88297c5669514aac8f9 - Base SHA:
c8053c7cce54a9dc1b4996b70ddb525f22197957 - Merge base SHA:
c8053c7cce54a9dc1b4996b70ddb525f22197957 - Patch ID:
a0bb2736bdebc749f18089b92df21d44de16219f - Gator payload:
19 - Review mode:
follow_up - Checks: Required CI passed, including the selected E2E suite.
Monitoring CompleteMonitoring is complete because this PR was merged. Final status: Gator submitted its App approval on the final head before the merge. The active Gator label can now be removed. |
Summary
Ports the
e2e/rusttests that need a container engine to testkit suites, so they run on the Docker and Podman rows instead of being gated to one engine.Related Issue
Closes #5676
Part of #5281
Based on main. #5665 and #5691 have merged.
Helpers from #5691 (now on main) used:
sandbox_clients_support::{connect, http, http_raw}withRequest,ReadEnd::ClosedandHttp::status();host_server_support::{TEST_HOST, HttpRecorder, TcpServer};testkit::python_image()with.command(["sleep", "infinity"]);policy::allowandpolicy::base_withwithpolicy::binaries_yaml(PYTHON_BINARIES). Left inline: the driver-config main commands, which must run as the main process (the OCI test checks workspace preparation beforeexec sleep infinity), and the bind test's filesystem-only policy YAML, which has nobinaries:list.Changes
tests/suites/drivers/{docker,podman}: stop is terminal and ephemeral cleanup leaves no containers, one test per driver. Podman also checks the supervisor JWTexp.drivers/dockeris a new suite with its CI rows.features/resource-limits: checks that gateway info reports CPU and memorylimit_supported, then readscpu.maxandmemory.max.features/ocsf: supervisor stderr OCSF JSON records. Covers opt-in, clean stdout, gateway logs keeping only the shorthand, Network/HTTP/SSH Activity classes (denied connect, L7-denied POST to an in-process host server, exec sessions), container and image attribution, version, and OCSF schema validation.features/driver-config: existing volume, OCI workspace with a nested volume, and bind mount, on a new<base>-driver-configtmachine environment.features/host-gateway:response_eof.rsruns the three closing responses in one sandbox and checks the read ends withReadEnd::Closed.host_server_reachable_after_stop_startchecks the host server again after stop and start.features/transparent-tcp: native TCP resolves through policy DNS to a synthetic address and reaches an echo fixture, also by the numeric synthetic address after its mapping expires, as an IPv4-mapped IPv6 address, and on the endpoint's second port. A wrong port, the fixture's real address, and an unlisted host are denied, nothing denied reaches the fixture, and exec still works afterwards. Rows: Docker rootful, Podman rootful and rootless. On both engines the fixture runs on the host behindhost.openshell.internal. A fixture container on the Podman network can't be used: since RFC 0012 (feat(isolation): implement the RFC 0012 sandbox architecture #2942) the Podman supervisor shares the host's network namespace, so policy DNS asks the host's resolver, which doesn't know the network's aliases. The legacy Podman variant (fixture container, TCP port 53, transparent listener port 15001) never ran in CI, becausetransparent_tcpwas excluded from the tmachine archive.Context::gateway_infoandSandboxBuilder::log_level.Engine::copy_fromreadscp <id>:<path> -as a tar stream, because under rootful Podman (sudo -n podman cp) a copy to a host path is owned by root and the test can't read it.docker-lifecycleandpodman-lifecycle, and the OCSF record parser lives in a small library so its unit tests still run.features/ocsfsets the sandbox log level toinfo. The shorthand layer logs atinfo; the Podman driver leaves the supervisor at itswarndefault, while the Docker driver passes the gateway's level, so without it Podman's supervisor stderr has noOCSF NET:OPENline.sandbox_clients_support::resolvereturns whatgetaddrinfoanswered (Resolve::{Addresses, Failed}).sandbox_clients_support::Pythonrunsconnect,http,http_rawandresolveunder a chosen interpreter with extra environment, such as a copiedpython3withPYTHONHOME. The free functions use the image'spython3.driver_config_volume.rs,ocsf_console.rs,podman_resource_limits.rs,ocsf_jsonl_conformance.rs,host_gateway_alias.rs,podman_host_gateway.rsandtransparent_tcp.rs, plus the now-unusedbollardandopenshell-ocsf-validatedependencies, and their entries in the Podman and VM wrapper lanes.local_driver_token_restart.rskeeps only its VM gateway restart test until PR6, and leaves the Podman CI list.Defaults applied
allow_driver_config = trueandenable_bind_mounts = true, and disables resource admission, through adriver-configblock written by thegateway_overridesrole. Only this environment disables it: admission rejects host bind mounts, so the bind-mount test can't run with it on. Test volumes still carry theopenshell.ai/sandbox-attachableand workspace labels.testkit::python_image(), because the default image has nosandboxuser. The bind source is a temp directory under$HOME.features/resource-limitshas no k3s row yet. The VM driver reportslimit_supported=false, so no VM issue was filed.Coverage that is new on a driver
transparent_tcpwas excluded from the tmachine archive.Dropped checks (Decision D in #5297)
These checks are dropped, not ported, as approved in #5297:
ocsf_jsonl_conformance.rs: the/var/logfile-sink check.host_gateway_alias.rs:sandbox_reaches_host_openshell_internal_via_host_gateway_alias.podman_host_gateway.rs: host gateway reachability and thenameserver 127.0.0.53check.transparent_tcp.rs:rootless_podman_musl_getaddrinfo_uses_udp_policy_dns, androotless_podman_private_dns_pins_do_not_cross_binary_rules. The second needs a fixture at a private address reached by a*.openshell.testname, which neither engine's environment can provide, and it never ran in CI. test(network): cover DNS pins not crossing binary rules with a crate test #5916 tracks a crate-level test for it.Testing
cargo fmt --checkon testkit, support, drivers/docker, drivers/podman, features, conformance ande2e/rust.cargo clippy --locked --all-targets -- -D warningson the same workspaces.Unit tests in
tests/support(including the newPythoncommand andresolveparser) and thefeatures/ocsfrecord parser.uv run tasks/scripts/check_cargo_lockfile_alignment.pyandtasks/scripts/check-cargo-lockfiles.sh. Every commit resolves withcargo metadata --locked.Run end to end locally against Docker Desktop with
e2e/with-docker-gateway.sh:features/host-gateway(3 tests),features/ocsf,features/resource-limits,features/transparent-tcpanddrivers/dockerpass.features/driver-configand the Podman rows rely on CI.Podman rows may flake on
ContainerExiteduntil fix(server): keep the reconcile sweep from failing a sandbox mid-start #5265 merges.Checks appropriate to the affected code and behavior pass
Unit tests added/updated (if applicable)
E2E tests added/updated (if applicable)
Checklist