Skip to content

Adds option to skip container rollout on deploy#12656

Open
mikenomitch wants to merge 1 commit intomainfrom
nomitch/container-rollout-none
Open

Adds option to skip container rollout on deploy#12656
mikenomitch wants to merge 1 commit intomainfrom
nomitch/container-rollout-none

Conversation

@mikenomitch
Copy link
Contributor

@mikenomitch mikenomitch commented Feb 24, 2026

This allows you to skip deploying a container. This is useful if you know that your container is not going to be updated or you don't have Docker locally, but still want to make changes to your Worker.

image
Open with Devin

@mikenomitch mikenomitch requested review from a team as code owners February 24, 2026 00:21
@changeset-bot
Copy link

changeset-bot bot commented Feb 24, 2026

⚠️ No Changeset found

Latest commit: 8e633b3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

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

devin-ai-integration[bot]

This comment was marked as resolved.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 24, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@12656

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@12656

miniflare

npm i https://pkg.pr.new/miniflare@12656

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@12656

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@12656

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@12656

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@12656

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@12656

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@12656

wrangler

npm i https://pkg.pr.new/wrangler@12656

commit: 8e633b3

@mikenomitch mikenomitch force-pushed the nomitch/container-rollout-none branch from 3465234 to 8e633b3 Compare February 24, 2026 00:38
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 3 additional findings in Devin Review.

Open in Devin Review

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Dry-run path missing containersRollout !== "none" guard still attempts Docker build

When --dry-run --containers-rollout=none is used with a Dockerfile-based container, the Docker verification is correctly skipped at packages/wrangler/src/deploy/deploy.ts:884-895, but the dry-run code path at lines 897-909 still attempts to build containers via Docker without checking props.containersRollout !== "none".

Root Cause

The non-dry-run deploy path at packages/wrangler/src/deploy/deploy.ts:1178 correctly guards with props.containersRollout !== "none", but the dry-run path at line 898 only checks normalisedContainerConfig.length before invoking buildContainer(). Since the Docker verification was skipped (line 884-895 has the guard), Docker may not be installed, and the buildContainer call at line 901 will fail when it tries to invoke Docker commands.

This defeats the purpose of --containers-rollout=none, which per the CLI description should deploy "without building or updating any Containers" (packages/wrangler/src/deploy/index.ts:230).

Impact: Users running --dry-run --containers-rollout=none with a Dockerfile-based container and no Docker installed will get a confusing Docker error instead of a clean dry-run output.

(Refers to lines 898-909)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Contributor

@emily-shen emily-shen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about --containers-rollout=skip

generally lgtm just the test and devin comment

Comment on lines +1081 to +1090
let thrownError: Error | undefined;
try {
await runWrangler("deploy index.js --containers-rollout=none");
} catch (e) {
thrownError = e as Error;
}

expect(thrownError?.message ?? "").not.toContain(
"The Docker CLI could not be launched"
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we get rid of this try catch and just add the appropriate mocks (ref the test above), this feels a bit imprecise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

2 participants