Remove container-local preview port registry#710
Draft
ghostwriternr wants to merge 1 commit into
Draft
Conversation
|
| Name | Type |
|---|---|
| @cloudflare/sandbox | Minor |
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
This was referenced May 19, 2026
commit: |
Contributor
🐳 Docker Images Published
Usage: FROM cloudflare/sandbox:0.0.0-pr-710-00f819bVersion: 📦 Standalone BinaryFor arbitrary Dockerfiles: COPY --from=cloudflare/sandbox:0.0.0-pr-710-00f819b /container-server/sandbox /sandbox
ENTRYPOINT ["/sandbox"]Download via GitHub CLI: gh run download 26225403611 -n sandbox-binaryExtract from Docker: docker run --rm cloudflare/sandbox:0.0.0-pr-710-00f819b cat /container-server/sandbox > sandbox && chmod +x sandbox |
2c086b2 to
5497d28
Compare
73f0f73 to
38d505e
Compare
5497d28 to
4de3df0
Compare
38d505e to
0bcb70d
Compare
4de3df0 to
41402d2
Compare
0bcb70d to
45429b7
Compare
41402d2 to
651f1ad
Compare
45429b7 to
00f819b
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.
The container-local exposed-port registry was the container-side RPC/list used to remember which ports had been exposed for preview forwarding. After the earlier PRs in this stack, forwarding decisions use Sandbox Durable Object state instead, so this registry is duplicate state.
Keeping it around makes the lifecycle model harder to reason about and creates another place where preview URL state can drift from the Durable Object-owned forwarding decision.
This change removes the obsolete container-local exposed-port registry and leaves the container side responsible for port readiness/watch behaviour.
Removed registry surface includes the old expose/list/unexpose/proxy container APIs and their shared RPC/request types. The Sandbox SDK no longer exports the internal registry client used by those old container-local registry paths.
Removed registry-only exported/request types include
ExposePortRequest,UnexposePortRequest,PortCloseResult,PortListResult, andPortStatusResult.PortExposeResultnow reflects the Sandbox-level preview URL result shape.Port readiness remains supported through the readiness/watch APIs, which check or wait for a process to listen on a port. The container
PortServiceis now readiness-only, and the related tests focus on readiness behaviour instead of exposed-port registry state.Docs and error suggestions are updated so they no longer describe the old container-local registry as the source of truth for preview URLs.
This does not remove the Sandbox Durable Object
/proxy/:portcompatibility path used by direct DO fetch flows such asswitchPort()andwsConnect(). That path is separate from public preview URL traffic, which enters through the preview-hostname validation and forwarding path added earlier in the stack.Preview URL authorization and activation now live in Sandbox Durable Object state:
portTokensrecords persistent token authorization;activePreviewPortsrecords current-runtime activation;currentRuntimeIdentityties activation to the current container runtime, so activation from a previous restart is ignored.The container-local registry no longer contributes to forwarding correctness. Removing it makes the ownership boundary explicit and reduces duplicate lifecycle state.
This PR completes the preview URL lifecycle stack. The stack should be released as one unit after the upstream
@cloudflare/containersdependency is replaced with a published version containingContainer.fetchIfRunning().This is part 3 of 3 in the preview URL lifecycle stack:
main