Skip to content

[vite-plugin] Fix v1 Container Docker error guidance - #16818

Merged
edmundhung merged 4 commits into
vite-plugin-v1from
codex/vite-v1-backport-16682
Nov 17, 2026
Merged

edmundhung merged 4 commits into
vite-plugin-v1from
codex/vite-v1-backport-16682

Conversation

@petebacondarwin

@petebacondarwin petebacondarwin commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Backport the v1-relevant diagnostic fix from #16682. When Docker cannot be reached, v1 currently suggests --enable-containers=false, which the Vite plugin does not accept. Supply a caller-specific hint through the already-pinned containers-shared 0.25.0 API, retaining the valid dev.enable_containers setting and configuration filename.

The plugin unit tests keep prepareContainerImagesForDev mocked and assert the complete hint for a Wrangler config, a Vite config fallback, and inline configuration. They cover the supported setting and omission of the unsupported CLI flag on every platform without invoking Docker or entering the shared helper's native Windows guard.

The diff is one plugin option, its unit-test assertions, and a plugin patch changeset. No dependency upgrade is needed: #16801 already supplies the optional hint API from #15695. Native cloudflare.config.ts Container export conversion and Vitest pool support remain outside this v1 backport.

This is the first remaining open PR in native GitHub stack #16900, followed by #16859 and its dependents. Merge the stack in order.

Validation on macOS with Node 22.22.1 and pnpm 10.33.0: pnpm build, pnpm test:ci (including all 10 Container tests and 266 plugin tests), and pnpm check (58 tasks) pass. No credentialed E2E or full OS matrix was run locally.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: fixes existing error guidance without adding an API.

Note

This is a contribution from an AI agent: Codex.

@changeset-bot

changeset-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c3a7ee0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cloudflare/vite-plugin Patch

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

@petebacondarwin

Copy link
Copy Markdown
Contributor Author

@ghostwriternr (verified author of #16682) and @jamesopstad (latest qualifying pre-merge human ant-core approver, November 5 11:28:09Z): please check this v1 adaptation and approve it if it looks good.

V1 still supports dev.enable_containers in Wrangler configuration, but it does not accept the suggested --enable-containers flag. This PR supplies the caller-specific diagnostic through the existing containers-shared 0.25.0 API instead of taking the unreleased 0.26.0 API break or native cloudflare.config.ts export conversion. #16801 already supplies the required dependency; #16817 supplies the separate build fix underneath. One plugin API regression exercises the actual missing-Docker error; all 11 Container tests, build and all 58 workspace checks pass. No public dependency sources or upstream dependency tests are copied. Added to native GitHub stack #16738; merge the stack in order.

@petebacondarwin
petebacondarwin marked this pull request as ready for review November 10, 2026 14:05
@workers-devprod
workers-devprod requested review from a team and cjol and removed request for a team November 10, 2026 14:06
@workers-devprod

workers-devprod commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler

@pkg-pr-new

pkg-pr-new Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
npm i https://pkg.pr.new/@cloudflare/vite-plugin@16818

commit: c3a7ee0

devin-ai-integration[bot]

This comment was marked as resolved.

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Superseded by the review of a7f5f5fe.

This review, of 87661e0c

✅ Approved — This small, focused fix corrects the Docker error hint for v1. It comes with a regression test and a changeset, and no issues were found.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

📋 Code Quality: ✅ LGTM

The caller-specific hint goes through the containers-shared API this branch already pins. The test exercises the real Docker failure path.


📝 Documentation: ✅ LGTM

The changeset describes the user-facing fix. No public documentation update is needed.


Reviewed commit: 87661e0c

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Codeowners reviews satisfied

Base automatically changed from codex/vite-v1-backport-16761 to vite-plugin-v1 November 11, 2026 14:54
@edmundhung
edmundhung force-pushed the codex/vite-v1-backport-16682 branch from 87661e0 to a7f5f5f Compare November 11, 2026 14:54

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Superseded by the review of 411f726b.

This review, of a7f5f5fe

✅ Approved — This small, focused fix corrects the Docker error hint for v1. It comes with a regression test and a changeset, and no issues were found.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

📋 Code Quality: ✅ LGTM

The caller-specific hint goes through the containers-shared API this branch already pins. The test exercises the real Docker failure path.


📝 Documentation: ✅ LGTM

The changeset describes the user-facing fix. No public documentation update is needed.


Reviewed commit: a7f5f5fe — same changes as 87661e0c, so this is that commit's review (no new review was run; line numbers are as of 87661e0c)

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Superseded by the review of 700574a3.

This review, of 411f726b

✅ Approved — This small, focused fix corrects the Docker error hint for v1. It comes with a regression test and a changeset, and no issues were found.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

📋 Code Quality: ✅ LGTM

The caller-specific hint goes through the containers-shared API this branch already pins. The test exercises the real Docker failure path.


📝 Documentation: ✅ LGTM

The changeset describes the user-facing fix. No public documentation update is needed.


Reviewed commit: 411f726b — same changes as 87661e0c, so this is that commit's review (no new review was run; line numbers are as of 87661e0c)

…o Wrangler file

Inline-only Worker configs have no Wrangler file, so the hint now reuses the same file name as the rest of the Container guidance.

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Superseded by the review of c3a7ee0d.

This review, of 700574a3

✅ Approved — This small backport corrects the Docker error hint for v1, including inline-only configs. It comes with a regression test and a changeset, and I found no issues.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

📋 Code Quality: ✅ LGTM

The configFileName value is now shared between the existing guidance and the new disableContainersHint, so inline-only configs name the Vite config file. The regression test runs the real prepareContainerImagesForDev with Docker missing and checks the wording of the hint.


📝 Documentation: ✅ LGTM

The plugin changeset describes the corrected error guidance. No public documentation change is needed.


Reviewed commit: 700574a3

@workers-devprod

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler

@clanky-the-clanker clanky-the-clanker Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Approved — Small backport that fixes the v1 Docker hint. The only change since the last review is a test assertion that checks the full hint for all three config cases, and it raises no issues.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

📋 Code Quality: ✅ LGTM

The only change since the last review is one assertion in containers.spec.ts. It checks the full disableContainersHint text for each of three setups: a Wrangler config file, a Vite config fallback, and inline configuration. That matches what containers.ts passes to prepareContainerImagesForDev, so the test would fail if the hint changed or the unsupported --enable-containers flag came back. configFileName is computed once and used for both the existing guidance and the new hint, so the two can't drift apart.


📝 Documentation: ✅ LGTM

The plugin changeset describes the corrected error guidance. No public documentation change is needed.


Reviewed commit: c3a7ee0d

@edmundhung
edmundhung removed this pull request from stack #16900 November 17, 2026 11:25
@edmundhung
edmundhung added this pull request to stack #16979 November 17, 2026 11:26
@edmundhung
edmundhung merged commit befc1ad into vite-plugin-v1 Nov 17, 2026
22 checks passed
@edmundhung
edmundhung deleted the codex/vite-v1-backport-16682 branch November 17, 2026 12:17
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.

4 participants