Repository navigation
test(e2e): run the SDK E2E suite against the pinned core gateway - #12
Merged
Merged
Conversation
pimlock
marked this pull request as ready for review
November 8, 2026 23:25
pimlock
force-pushed
the
feat/6-e2e/pimlock
branch
2 times, most recently
from
November 9, 2026 00:24
faace1c to
cc8a463
Compare
SDAChess
requested changes
Nov 9, 2026
SDAChess
left a comment
Contributor
There was a problem hiding this comment.
Two teardown issues need fixing. The existing GitHub E2E run passed all 20 tests; review validation also covered shell syntax, E2E lint, imported-file parity, unit-test collection, skip behavior, and stubbed Docker failure paths. Live E2E was unavailable locally because Docker socket access was denied.
pimlock
force-pushed
the
feat/6-e2e/pimlock
branch
from
November 9, 2026 15:33
cc8a463 to
4546adc
Compare
Contributor
Author
SDAChess
previously approved these changes
Nov 9, 2026
Ports the four core e2e/python files whose subject is the SDK, from v0.1.7: sandbox_api, workspace_api, sandbox_exec_python and exec_admission. They keep their calls to client._stub, because users depend on it too. The conftest keeps only the fixtures these tests use and skips every test when OPENSHELL_GATEWAY isn't set. tests/e2e/Dockerfile.workload is a copy of core's sandbox image with the client's Python and cloudpickle, which exec_python needs. mise run e2e:image builds it, and conformance:check now also fails when it drifts from core at the pin. mise run test ignores tests/e2e; mise run e2e runs it against the gateway named in OPENSHELL_GATEWAY. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
e2e.yml and scripts/e2e/{start,stop}-gateway.sh come from sdk-go, so
both SDKs test against the same published gateway setup. The core
version defaults to OPENSHELL_CORE_REF, so a core bump PR tests its own
pin. start-gateway.sh adds --default-image, which points the gateway's
default sandbox image at the E2E image.
ci.yml runs E2E on every PR and push to main. The README and
CONTRIBUTING.md explain how to run it locally.
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
stop-gateway.sh filtered on openshell.sandbox_namespace, which core's Docker driver doesn't set, so sandbox and supervisor containers from failed runs were left behind. Filter on openshell.ai/managed-by and openshell.ai/sandbox-namespace instead. It also ignored Docker failures and always reported success. Run every cleanup step, print what failed, and exit nonzero if any step failed. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
pimlock
dismissed
SDAChess’s stale review
November 9, 2026 15:51
The merge-base changed after approval.
pimlock
force-pushed
the
feat/6-e2e/pimlock
branch
from
November 9, 2026 15:51
bd90c34 to
28a4805
Compare
pimlock
enabled stacked auto-merge (squash)
November 9, 2026 15:52
SDAChess
approved these changes
Nov 9, 2026
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.
Summary
Adds the E2E lane: the SDK's tests from core's
e2e/pythonnow run here against the published gateway of the pinned core version (v0.1.7). The workflow and gateway scripts are ported from sdk-go, so a core bump PR (#5) can run the same check with its proposed version.Stacked on #3; review that first. This PR retargets to
mainwhen #3 merges.Related Issue
Closes #6. Part of NVIDIA/OpenShell#5287.
Changes
Suite (
tests/e2e/):sandbox_api,workspace_api,sandbox_exec_pythonandexec_admissionfrom core atv0.1.7, renamed to this repository's*_test.pypattern. The only change is one ruff reformat.conftest.pykeeps only the fixtures these tests use. It skips every test whenOPENSHELL_GATEWAYisn't set.client._stubwhere the curated API has no wrapper: interactive exec, start and stop,UpdateConfig, and request IDs on create, delete and exec.Sandbox image:
tests/e2e/Dockerfile.workloadis a copy of core's.mise run e2e:imagebuilds it with the Python version from.python-versionand addscloudpickle, whichexec_pythonneeds.conformance:checkalso fails when this copy drifts from core at the pin.Tasks:
mise run e2eruns the suite againstOPENSHELL_GATEWAY.mise run testignorestests/e2e.Gateway scripts (
scripts/e2e/start-gateway.sh,stop-gateway.sh): copied from sdk-go'shack/automation/with these changes:start-gateway.shadds--default-image, which sets the gateway's default sandbox image to the E2E image.stop-gateway.shremoves sandbox containers by core'sopenshell.ai/managed-byandopenshell.ai/sandbox-namespacelabels. sdk-go filters onopenshell.sandbox_namespace, which core doesn't set, so it misses them.stop-gateway.shexits nonzero with diagnostics when a cleanup step fails, instead of always reporting success.ci: shared CI checks across the SDK repositories #11 tracks sharing them and one script layout across the SDK repositories.
Workflows:
e2e.ymlis reusable and can also be started by hand, as in sdk-go. Itscore-versioninput defaults toOPENSHELL_CORE_REF.ci.ymlruns it on every PR and push tomain. Unlike sdk-go, there's no path filter: almost every PR here touches the SDK, its pins or its tests, so we can add one later if E2E turns out slow or flaky. As in sdk-go, it isn't part of the requiredcicheck.README: explains how to run the suite locally.
Not in this PR:
oidc/oidc_auth_test.py): they need Keycloak and get their own follow-up issue.e2e/pythonto the remaining enforcement suites: chore(python): migrate the Python SDK to ai-openshell/sdk-python NVIDIA/OpenShell#5287 tracks that.Testing
mise run e2eagainststart-gateway.sh v0.1.7 --default-image openshell/e2e-python:devon a local Docker host: 20 passed.stop-gateway.shremoved the gateway and the sandboxes it created.stop-gateway.shagainst a stubbeddocker: exits 1 with a message when saving the log, listing or removing containers, orcompose downfails, and 0 when all succeed.OPENSHELL_GATEWAY,pytest tests/e2eskips all 20.mise run test(240 passed, E2E not collected) andmise run checkpass.ci.ymlalso has.e2e.ymlon GitHub: 20 passed againstv0.1.7in this PR's CI run.