Skip to content

fix(cloudflare/container): rebuild Effect-native images when only guest code changes - #2971

Merged
sam-goodwin merged 2 commits into
mainfrom
fix/container-effect-diff
Nov 3, 2026
Merged

sam-goodwin merged 2 commits into
mainfrom
fix/container-effect-diff

Conversation

@sam-goodwin

Copy link
Copy Markdown
Member

A Container with main now rebuilds its image when only its guest code changes. Before this fix, every plan after the first deploy was noop.

export default MyContainer.make(
  { main: import.meta.url, image: "oven/bun:latest" },
  Effect.gen(function* () {
    return { fetch: HttpServerResponse.text("v2") }; // edit → plan: update
  }),
);

.make puts the program in props.exports as an Effect. isResolved never accepts an Effect, so the live diff returned before it compared the image hash. The engine then fell back to comparing props with Effects stripped, found no change, and planned noop. The diff now runs stripEffects first, as the Worker provider already does:

-diff: Effect.fn(function* ({ id, olds = {}, news = {}, output, newBindings, oldBindings }) {
+diff: Effect.fn(function* ({ id, olds = {}, news: desired = {}, output, newBindings, oldBindings }) {
+  const news = stripEffects(desired);
   if (!isResolved(news)) return;

The local provider already ignored exports when it checked the image.

Reported downstream in Effect-TS/janitor#177, which shipped this fix as a pnpm patch.

@alchemy-version-bot

Copy link
Copy Markdown
Contributor

Install the packages built from this commit:

alchemy

pnpm install https://pkg.alchemy.run/alchemy/pr:2971:d717b1e
@alchemy.run (17)
pnpm install https://pkg.alchemy.run/@alchemy.run/better-auth/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@alchemy.run/git/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@alchemy.run/drizzle/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@alchemy.run/acme/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@alchemy.run/planetscale/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@alchemy.run/neon/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@alchemy.run/cloudflare/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@alchemy.run/aws/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@alchemy.run/domain/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@alchemy.run/kubernetes/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@alchemy.run/docker/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@alchemy.run/redis/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@alchemy.run/sql/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@alchemy.run/cloudflare-runtime/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@alchemy.run/frontend-frameworks/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@alchemy.run/node-utils/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@alchemy.run/pkg/pr:2971:d717b1e
Transitive Dependencies (9)
pnpm install https://pkg.alchemy.run/@distilled.cloud/aws/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@distilled.cloud/acme/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@distilled.cloud/core/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@distilled.cloud/planetscale/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@distilled.cloud/neon/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@distilled.cloud/github/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@distilled.cloud/aws4signer/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@distilled.cloud/cloudflare/pr:2971:d717b1e
pnpm install https://pkg.alchemy.run/@distilled.cloud/iceberg/pr:2971:d717b1e

Published Nov 3, 2026, 8:07 PM UTC. Expires Nov 10, 2026, 8:07 PM UTC, extended while this pull request is open.

@sam-goodwin
sam-goodwin merged commit 4a333ba into main Nov 3, 2026
4 checks passed
@sam-goodwin
sam-goodwin deleted the fix/container-effect-diff branch November 3, 2026 20:21
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