sandbox: depot sandbox snapshot verb — OCI→ext4 via the Sandbox API (DEP-4884)#518
Closed
robstolarz wants to merge 1 commit into
Closed
sandbox: depot sandbox snapshot verb — OCI→ext4 via the Sandbox API (DEP-4884)#518robstolarz wants to merge 1 commit into
depot sandbox snapshot verb — OCI→ext4 via the Sandbox API (DEP-4884)#518robstolarz wants to merge 1 commit into
Conversation
Adds `depot sandbox snapshot <image-ref>` — unpacks a registry OCI image into an ext4 snapshot via the Depot Sandbox API: it creates a short-lived sandbox and runs the `snapshot` helper inside it as a command exec. It deliberately does NOT use Depot CI to perform the unpack, and takes plain arguments rather than a sandbox spec file. Draft: the verb flow is implemented against a small Sandbox-API interface (snapshotClient: CreateSandbox / RunCommand / Kill). The depot.sandbox.v1 Go client lands with the fresh sandbox verbs (DEP-4916), so newSnapshotClient currently returns a clear not-wired error rather than dialing the legacy CI client. The snapshot helper release URL + arg shape and the snapshot-registration step are marked TODO for reconciliation against the prior build-ext4 mechanics and the deployed API. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
depot sandbox snapshot— unpack an OCI image into an ext4 snapshot via the Sandbox API (DEP-4884)Adds
depot sandbox snapshot <image-ref>, which unpacks a registry OCI image into an ext4 snapshot that future sandboxes can boot from.Approach (deliberate): the unpack runs through the Depot Sandbox API (
depot.sandbox.v1) — the verb creates a short-lived sandbox and runs thesnapshothelper inside it as a command exec. It does not use Depot CI to perform the snapshot, and it's a plain imperative verb (nosandbox.depot.ymlspec).Flow:
CreateSandbox(builder image with enough disk).snapshothelper into the sandbox (curlfrom a release URL).RunCommand:snapshot pull <image-ref> --output <ext4> [--size <size>]— unpacks the image into an ext4.Args:
depot sandbox snapshot <image-ref> [-o/--output app.ext4] [--size 10GiB] [--snapshot-binary-url …] [--builder-image …](--token/--orginherited fromdepot sandbox).Why this is a draft (what's needed to finish it)
depot.sandbox.v1isn't on climainyet — it lands with the fresh sandbox verbs. The verb flow is implemented against a smallsnapshotClientinterface (CreateSandbox/RunCommand/Kill);newSnapshotClientreturns a clear not-wired error today rather than dialing the legacy CI client (which would violate the SDK-API requirement). Wire it to the real client when it lands.CreateSnapshot-style Sandbox-API call to persist the ext4), are markedTODO(DEP-4884). The prior mechanics branch (rob/dep-4395-…-build-ext4-start) is no longer on origin, so these are best-effort assumptions to reconcile against that work + the deployed helper.Build +
go vet+gofmtclean. Registered under the existingdepot sandboxcommand tree.