Add support for image= to unstable.sandbox#151
Open
scotttrinh wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds an image parameter to the (unstable) sandbox creation flow so callers can create a sandbox from a Vercel Container Registry image, with validation to prevent specifying both runtime and image.
Changes:
- Extend
create_sandbox(...)(async + sync) and internal service/client layers to accept and forwardimage. - Enforce
runtime/imagemutual exclusivity via a Pydantic model validator. - Add tests ensuring
imageis serialized correctly (andruntimeis omitted) and that using both is rejected.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/unstable/test_sandbox_public_flow.py | Adds coverage for image serialization and runtime+image validation behavior. |
| src/vercel/unstable/sandbox/sync.py | Adds image to the sync public wrapper and updates docstring. |
| src/vercel/unstable/sandbox/init.py | Adds image to the async public wrapper and updates docstring. |
| src/vercel/_internal/unstable/sandbox/sync_runtime.py | Threads image through the sync runtime creation path. |
| src/vercel/_internal/unstable/sandbox/service.py | Threads image through the service layer into the API client. |
| src/vercel/_internal/unstable/sandbox/async_runtime.py | Threads image through async operation params and execution. |
| src/vercel/_internal/unstable/sandbox/api_client.py | Adds request field + runtime/image mutual-exclusion validation and forwards image in request creation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fa3d4d6 to
c690787
Compare
c121768 to
87975c7
Compare
image= to sandbox.create(...)image= to unstable.sandbox
87975c7 to
3ba0e12
Compare
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.
Matching
unstable.sandboxPR for #147