Repository navigation
Sandboxes: custom images and fail_reason (0.4.0) - #25
Merged
Merged
Conversation
This was referenced Dec 2, 2026
ovuruska
approved these changes
Dec 2, 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.
The sandbox API accepts
imageagain (backend #8735, live on all of deepapi since 2026-12-02), so the SDK takes it back. 0.3.0 removed it while the server refused it.Changes
Sandbox.create()/acreate()takeimage: a public image from Docker Hub,ghcr.io,quay.io,gcr.io,public.ecr.aws,mcr.microsoft.comornvcr.iowith/bin/sh. It is sent only when set. The server pins it to its linux/amd64 digest, whichSandbox.imagereports.wait_timeoutdefaults to 600 s instead of 300 s, forcreate()andstart(). The server gives a first pull up to 480 s, so 300 s could time out on a sandbox that then starts and bills.Sandbox.fail_reason, andSandboxFailedError.fail_reason, also in the error's message. Until now the error only said "entered state 'failed'"; for a custom image the reason is the useful part.Validation
ruff check .,mypyandpytest tests(111 passed) on Python 3.9. The two new tests fail onmain.image="python:3.12-slim"sb.image=docker.io/library/python:3.12-slim@sha256:4a68…;run_pythonworksalpine:3.20(no bash)fs, stop/start with/workspacekeptgcr.io/distroless/static-debian12(no shell)SandboxFailedErrorafter 12 s:entered state 'failed': Container failed to start (StartError),.fail_reasonsetRelease: after merge, a GitHub release
v0.4.0runs the PyPI workflow.