Repository navigation
Conversation
|
🌿 Preview your docs: https://nvidia-preview-pr-3611.docs.buildwithfern.com/openshell |
letv1nnn
left a comment
There was a problem hiding this comment.
Reviewed the diff and checked the surrounding invariants. The direction looks right — this brings Docker, VM, and MXC in line with the Kubernetes driver, which was already ID-only, rather than inventing a new convention. A few things before merge.
Reserve the removed field numbers
proto/compute_driver.proto removes string name = 2; from GetSandboxRequest, StopSandboxRequest, StartSandboxRequest, and DeleteSandboxRequest without adding reserved 2; / reserved "name";.
The summary leaves this open for review, but proto/README.md already answers it:
When removing or renaming a field, reserve its old number and source name.
This is worth following here rather than treating as a judgment call. Nothing in the test suite can catch the failure mode: if a later change assigns field number 2 in one of these messages, any driver still built against the current schema will decode the new field's bytes as name. Reserving the number and the source name closes that off permanently at no cost.
Drop the unused sandbox_name parameters instead of underscore-prefixing them
In crates/openshell-server/src/compute/mod.rs, delete_backend_after_failed_create (1289), complete_sandbox_stop (1400), complete_sandbox_start (1689), and get_driver_sandbox (4663) keep the parameter as _sandbox_name, and the call sites (1224, 1249, 1968, 2507, 3723, 4514, 4576) still compute and pass a name that is now discarded.
AGENTS.md asks for the opposite:
Avoid backwards-compatibility hacks like renaming unused
_vars[...] If you are certain that something is unused, you can delete it completely.
Since the goal of the PR is to remove name plumbing from the lifecycle path, finishing the removal at the server layer keeps the change coherent. The underscore prefix silences the compiler, so this reads as clean in CI either way.
Migration note for external drivers
docs/reference/sandbox-compute-drivers.mdx documents operator-provided remote drivers connected over a gateway-managed endpoint. Any out-of-tree driver that resolves lifecycle requests by name will now receive nothing, and the new paragraph states the contract without describing an upgrade path. Given there is no visible versioning story for openshell.compute.v1, it would help to say explicitly what external driver authors need to change and from which release.
Smaller items
crates/openshell-driver-vm/src/driver.rs(1726, 1806, 1924):registry.get_key_value(sandbox_id).map(|(id, _)| id.clone())now reduces to acontains_keycheck plus a redundant key clone, sincerecord_idalways equalssandbox_id.crates/openshell-driver-mxc/src/driver.rs:1325:wait_for(backend, name, ...)now takes an ID. The tests only pass because the MXC helpers forcename == id; renaming the parameter would avoid a confusing read later.crates/openshell-driver-docker/src/lib.rs:3270:!event_sandbox_id.is_empty()is unreachable afterrequire_sandbox_id.
Verified while reviewing
- CLI, SDK, and TUI construct the gateway
openshell.v1messages (workspace_scope+name), not the compute-driver ones, so the public surface is untouched and there is no compile fallout outside the changed crates. LABEL_SANDBOX_IDis written at every Docker container and volume creation site (3963, 4819, 4977, 5597), so the ID-only label filter cannot orphan managed containers.- VM
delete_sandboxremains idempotent for an unknown but well-formed ID (deleted: false); only an empty ID now errors, which matches the stated contract. - The
ObjectNameimport removal inprovisioning_deadline.rsleaves no remaining uses.
One note on verification: the report mentions the server test targets could not link locally and the MXC runtime tests could not run on macOS. Those cover most of the changed call sites, so it is worth confirming CI is green on both before merge.
|
This pull request has had no activity for 14 days and is now marked stale. It may be closed in 7 days if there is no further activity. |
|
This pull request has had no activity for 14 days and is now marked stale. |
|
Heads-up: this PR changes both files in paths that are frozen in this repository while the Docker, Podman and VM drivers move to ai-openshell/desktop, and files that stay in core. The move is tracked in #5200, and this PR in #6167. Frozen files in this PR: The |
579ecfe to
bdd5233
Compare
Move every OpenShell git dependency to bdd5233a98, the head of ai-openshell/openshell#3611, so the drivers build against the proto that deprecates the request `name` field. Re-pin to the merge commit once that PR lands. Signed-off-by: Evan Lezar <elezar@nvidia.com>
There was a problem hiding this comment.
gator-agent
PR Review Status
Thanks @elezar for explaining the driver split. I checked the current diff and the passing Frozen Paths check. The Docker, Podman, and VM files you listed are out of this PR. The remaining review finding is about upgrading the gateway while an older compute driver stays deployed.
Action required: Preserve lifecycle compatibility for drivers that still expect a sandbox name.
Blocking finding
GATOR-bdd5233a-01· The gateway still accepts compute protocol 1.0 drivers that require a sandbox name, then sends them an empty name. Those drivers can reject lifecycle calls on existing sandboxes.
Non-blocking suggestion
- Extend the mocked MXC lifecycle test with two workspaces that use the same sandbox name and distinct IDs. Verify that Get, Stop, and Delete select only the requested ID and reject an empty ID.
Gator metadata
- Validation: Implements the ID-only driver contract proposed in validated issue #3556.
- Docs: Updated the existing Fern external compute-driver guide and the proto conventions.
- Checks: DCO, Frozen Paths, Helm Lint, and Trivy Changes pass. Branch Checks are in progress. Issue acceptance also passed.
- E2E: Lifecycle E2E and both Windows MSVC jobs are needed after review feedback is addressed.
- Head SHA:
bdd5233a982674bb6cea615df70b85411dbcdcc5 - Base SHA:
22c8e3584481770b802b8adba258e6308d9c83c0 - Merge base SHA:
22c8e3584481770b802b8adba258e6308d9c83c0 - Patch ID:
ac4e31d2557ce68e57c674bd3bf1863d10e01bb0 - Gator payload:
26 - Review mode:
initial - Previous reviewed SHA: none
- Review budget exhausted: no
- Maintainer decision required: no
- Next state:
gator:in-review - Specialist consults: review-compatibility
| .stop_sandbox(Request::new(StopSandboxRequest { | ||
| sandbox_id: request_id, | ||
| name, | ||
| name: String::new(), |
There was a problem hiding this comment.
gator-agent
Warning · GATOR-bdd5233a-01 · Preserve lifecycle compatibility during gateway upgrades
Summary An operator can upgrade the gateway while keeping a protocol 1.0 compute driver that requires the stored sandbox name. The driver still connects, then receives an empty name on Get, Stop, Start, and Delete. It can reject operations on existing sandboxes, and a rejected Get can abort a reconciliation sweep.
Fix Have updated drivers look up sandboxes by ID. Keep sending the stored name to legacy drivers. Gate omission on advertised ID-only support if it ships now, and document the rollout.
Verify Keep a protocol 1.0 Unix-socket fixture with valid admission acknowledgment across both gateway revisions. Give its sandbox a distinct ID and name. Have the fixture resolve by ID and validate the name. A public stop by workspace and name succeeds on base and fails on this head. Cover the same request contract for Get, Start, and Delete.
Agent context
- Location:
crates/openshell-server/src/compute/mod.rs:2789 - The PR clears the name in all four lifecycle RPCs while retaining the same protocol and capability handshake.
Drivers must locate a sandbox by sandbox_id only. The proto documents name on GetSandbox, StopSandbox, StartSandbox and DeleteSandbox as deprecated: the gateway still sends the stored name so drivers that predate this contract keep working across a version skew, and it will stop sending it, with the field then reserved, once no supported driver reads it. ListSandboxes is documented as an unscoped inventory with unique, non-empty IDs. The MXC driver resolves lifecycle calls by ID only and rejects an empty ID. The Docker, Podman and VM drivers move to ai-openshell/desktop and are not touched here. Closes #3556 Signed-off-by: Evan Lezar <elezar@nvidia.com>
bdd5233 to
bbb1083
Compare
Move every OpenShell git dependency to bbb10834c8, the new head of ai-openshell/openshell#3611 after it was force-pushed. Signed-off-by: Evan Lezar <elezar@nvidia.com>
Summary
Define the gateway-assigned sandbox ID as the sole resource reference in compute-driver
GetSandbox,StopSandbox,StartSandboxandDeleteSandboxrequests. Drivers must locate a sandbox by ID and ignorename.The Docker, Podman and VM drivers now live in ai-openshell/desktop, so drivers and gateway can be built from different revisions. The proto field
name = 2therefore stays, documented as deprecated, and the gateway keeps sending the stored name so older drivers keep working. The gateway will stop sending it, and the field will be removed and reserved (reserved 2; reserved "name";) once no supported driver reads it. The Docker, Podman and VM changes are in ai-openshell/desktop#34, which is blocked on this PR.Related Issue
Closes #3556
Changes
nameas deprecated on those requests (still sent by the gateway, never to be used for lookup), require a non-emptysandbox_id, and defineListSandboxesas an unscoped inventory with unique, non-empty IDs.proto/README.mdanddocs/extensibility/drivers.mdxstate the ID-only contract.No frozen driver paths are touched.
Testing
mise run pre-commitpassesThe gateway code is unchanged. The MXC driver is Windows-only, so its changes and tests were not compiled locally; the Windows CI jobs cover them.
Checklist