Make transport configurable per instance#614
Merged
Conversation
🦋 Changeset detectedLatest commit: 830bb25 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
Contributor
🐳 Docker Images Published
Usage: FROM cloudflare/sandbox:0.0.0-pr-614-830bb25Version: 📦 Standalone BinaryFor arbitrary Dockerfiles: COPY --from=cloudflare/sandbox:0.0.0-pr-614-830bb25 /container-server/sandbox /sandbox
ENTRYPOINT ["/sandbox"]Download via GitHub CLI: gh run download 24846181940 -n sandbox-binaryExtract from Docker: docker run --rm cloudflare/sandbox:0.0.0-pr-614-830bb25 cat /container-server/sandbox > sandbox && chmod +x sandbox |
2146bdf to
09dfd17
Compare
aron-cf
commented
Apr 22, 2026
26df32a to
6e31c7e
Compare
aron-cf
commented
Apr 22, 2026
6eab7f7 to
b3be316
Compare
ghostwriternr
approved these changes
Apr 23, 2026
This adds a new `transport` config option to the `getSandbox()` interface. Which allows custom transport to be specified per instance rather than for all sandbox instances via a worker level environment variable. This enables two things: 1. Different sandboxes to use different transports. 2. The use of multiple transports on the same sandbox. Primarily this will enable us to reduce the number of workers and container images down to a single set in CI. Ideally the entire transport mechanism will go away shortly when we replace with a unified websocket based transport.
This allows us to use one worker with multiple sandboxes rather than one worker per transport.
c167c4f to
830bb25
Compare
Merged
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.
This adds a new
transportconfig option to thegetSandbox()interface. Which allows custom transport to be specified per instance rather than for all sandbox instances via a worker level environment variable.This enables two things:
Primarily this will enable us to reduce the number of workers and container images down to a single set in CI. Ideally the entire transport mechanism will go away shortly when we replace with a unified websocket based transport.
The integration tests have been updated to use this method via a
TEST_TRANSPORTfile written into the test worker directory and loaded into the environment via the vite env. The follow up will remove the dual tests in actions. Then this hack can go away.