Skip to content

fix(docker): report a published port Swarm assigns - #3640

Merged
sam-goodwin merged 1 commit into
mainfrom
t3/docker-service-assigned-port
Nov 22, 2026
Merged

sam-goodwin merged 1 commit into
mainfrom
t3/docker-service-assigned-port

Conversation

@sam-goodwin

Copy link
Copy Markdown
Member

A Docker.Service port published without external now reports the host port Swarm assigned in its ports attribute.

const service = yield* Docker.Service("Api", {
  image: "nginx:alpine",
  ports: [{ internal: 80 }],
});
service.ports;
// before: []
// after:  [{ external: 30001, internal: 80, protocol: "tcp", mode: "ingress" }]

The attributes were read from Spec.EndpointSpec.Ports, which never holds an assigned port. They now come from Endpoint.Ports, which Swarm fills in once the service is created.

This is what lets the Rivet and Effect Cluster test fixtures stop publishing fixed host ports, which fail with port '18610' is already in use by service … when two worktrees run the same suite.

@alchemy-version-bot

Copy link
Copy Markdown
Contributor

Install the packages built from this commit:

alchemy

pnpm install https://pkg.alchemy.run/alchemy/pr:3640:f7c7bc7
@alchemy.run (28)
pnpm install https://pkg.alchemy.run/@alchemy.run/better-auth/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/git/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/drizzle/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/acme/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/archil/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/convex/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/e2b/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/daytona/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/modal/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/planetscale/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/neon/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/hetzner/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/digitalocean/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/railway/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/fly/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/stripe/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/cloudflare/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/gcp/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/aws/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/domain/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/kubernetes/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/docker/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/redis/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/sql/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/cloudflare-runtime/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/frontend-frameworks/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/node-utils/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/pkg/pr:3640:f7c7bc7
Transitive Dependencies (24)
pnpm install https://pkg.alchemy.run/@distilled.cloud/aws/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/acme/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/archil/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/core/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/convex/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/e2b/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/daytona/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/modal/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/planetscale/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/neon/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/s3/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/hetzner/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/digitalocean/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/railway/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/fly-io/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/github/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/stripe/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/aws4signer/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/cloudflare/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/iceberg/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/gcp/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/effect-cluster/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@alchemy.run/rivet/pr:3640:f7c7bc7
pnpm install https://pkg.alchemy.run/@distilled.cloud/rivet/pr:3640:f7c7bc7

Published Nov 22, 2026, 8:03 AM UTC. Expires Nov 29, 2026, 8:03 AM UTC, extended while this pull request is open.

@sam-goodwin
sam-goodwin merged commit cf89def into main Nov 22, 2026
4 checks passed
@sam-goodwin
sam-goodwin deleted the t3/docker-service-assigned-port branch November 22, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant