Repository navigation
feat(containers): durable_object scheduling policy and ctx.container in local runs - #5
Merged
Merged
Conversation
…run locally through ctx.container A container entry may set schedulingPolicy: 'durable_object' with named images. It compiles to the fields Wrangler takes for that policy (class_name, scheduling_policy, name, images), and the schema refuses the application-wide fields Wrangler rejects there. devflare dev and createTestContext() build each named image with Docker or Podman, pull Miniflare's egress interceptor, and attach the container to its Durable Object in Miniflare with SQLite storage, the shape wrangler dev uses. The test gateway exports a container-backed module's WorkerEntrypoint classes so outbound intercepts can target ctx.exports. Windows is refused (workerd cannot reach a named pipe), workspace dev refuses such an app, and DEVFLARE_ENABLE_CONTAINERS=0 turns local containers off. A new workspace-ci job runs the engine-backed test on the runner's Docker and fails if it would skip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 1f352be 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 |
github-actions
Bot
had a problem deploying
to
testing branch preview / feat/container-durable-object-scheduling
November 30, 2026 03:15
Failure
…sertions, and the Wrangler parity test in a serial lane Importing Wrangler in the unit lane left two other files holding a method-less Miniflare on Linux CI, so the parity test moves to the serial test-context lane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions
Bot
had a problem deploying
to
testing branch preview / feat/container-durable-object-scheduling
November 30, 2026 03:23
Failure
…side their own tests mock.module is process-global and the unit lane runs every file in one process in directory order. Adding test files on Linux put simple-context-runtime.test.ts before simple-context-multi-worker and local-secrets, which then built its FakeMiniflare (no dispose, fake getBindings). The mocks now fake only while that file's tests run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions
Bot
had a problem deploying
to
testing branch preview / feat/container-durable-object-scheduling
November 30, 2026 03:34
Failure
…-tested, builds load into the engine's store - red: the devflare dev path had never run a real container and no test reached its wiring. A dev-server integration test now drives the same Durable Object through createDevServer, and the CI container job runs it. - docker builds pass Wrangler's --load and --provenance=false, so a buildx docker-container builder cannot keep the image out of the store. - Podman on macOS reads the machine's host-side socket. - a container class that failed to bundle names the bundle error; the workspace refusal runs before anything starts; the refusal for an unserved class no longer sends readers to another worker, and the docs say referenced workers' containers do not run locally. - the deprecation and 2026-12-31 claims name their sources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions
Bot
had a problem deploying
to
testing branch preview / feat/container-durable-object-scheduling
November 30, 2026 04:51
Failure
… locally A config that reaches a container only through a worker it references (a ref() service binding, or a cross-worker Durable Object binding to its class) now gets that worker's containers in createTestContext() and devflare dev: devflare builds the images from the referenced config, attaches them where it hosts that worker's Durable Objects, and exports the WorkerEntrypoint classes their modules declare so an intercept can target ctx.exports. workspace dev refuses such an app, and the Vite plugin leaves them out, as documented. Graded end to end by three new container-lane integration tests (service binding, cross-worker DO ref, devflare dev) and by unit tests of the refuse, ignore and turned-off modes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions
Bot
had a problem deploying
to
testing branch preview / feat/container-durable-object-scheduling
November 30, 2026 09:01
Failure
- resolve-service-bindings.ts was 1,147 lines against the 1,000-line ceiling, which reddened validate. The referenced-container decision moves to referenced-containers.ts, and Bun detection, the bundle cache and the Durable Object host bundler to durable-object-bundle.ts (906 lines left; clearBundleCache and ReferencedContainerMode are still exported from it). - A referenced worker's container engine reaching Miniflare was graded by nothing, because Miniflare's default socket hid a dropped option. The test-context merge moves into applyMultiWorkerConfig, and unit cases on a non-default socket grade it there and in buildMiniflareDevConfig. - The workspace-dev refusal was graded only through the function it calls. A test now runs prepareWorkspaceApp against an app that references a container-backed builder. - Docs no longer say a cross-worker Durable Object ref's containers run under devflare dev, which resolves no such refs. They say the devflare dev path is tested for a worker-only project. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions
Bot
had a problem deploying
to
testing branch preview / feat/container-durable-object-scheduling
November 30, 2026 16:54
Failure
…p dirs The Durable Object host bundler moved out of resolve-service-bindings.ts and still writes its temporary entry beside the classes it bundles, so the census of hardcoded .devflare paths names the new file with the same reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions
Bot
had a problem deploying
to
testing branch preview / feat/container-durable-object-scheduling
November 30, 2026 16:57
Failure
resolve-service-bindings now imports the container modules, which brings src/test/containers.ts into apps/documentation's svelte-check. Under @cloudflare/workers-types, Request.clone() is typed with the class's own generic parameters, which fetch does not accept, so that check failed on fetchWithStartupRetries. The clone is asserted back to Request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions
Bot
had a problem deploying
to
testing branch preview / feat/container-durable-object-scheduling
November 30, 2026 17:05
Failure
Refzlund
marked this pull request as ready for review
November 30, 2026 18:08
This branch had an error being deployed
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.
Draft, to run Workspace CI. Do not merge: merging into
nextpublishes the changeset to npm, and the release is the owner's call.What
containers[]acceptsschedulingPolicy: 'durable_object'with namedimages(Dockerfile or digest-pinned registry image). It compiles to Wrangler'sclass_name,scheduling_policy,name,images; the schema refusesimage,instanceType,maxInstancesand rollouts there, as Wrangler does.devflare devandcreateTestContext()build each named image with Docker/Podman (linux/amd64), pull Miniflare's egress interceptor, and attach the container to its Durable Object in Miniflare with SQLite storage — the same option shapewrangler devproduces (checked againstunstable_getMiniflareWorkerOptionsin a unit test).WorkerEntrypointclasses of a container-backed DO module, so intercepts can targetctx.exports.<Name>.DEVFLARE_ENABLE_CONTAINERS=0opts out.durable-object-containersjob in Workspace CI runs the engine-backed integration test on the runner's Docker and fails if it would skip.Changeset: minor.
🤖 Generated with Claude Code