Skip to content

[containers-shared] Share cf config Container image preparation with the Vite plugin - #16877

Merged
edmundhung merged 3 commits into
mainfrom
edmundhung/share-cf-config-container-images
Nov 17, 2026
Merged

edmundhung merged 3 commits into
mainfrom
edmundhung/share-cf-config-container-images

Conversation

@edmundhung

@edmundhung edmundhung commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Part of RM-31812. #16798 builds on this.

Moves the Vite plugin's Container image preparation for cf config into @cloudflare/containers-shared as prepareContainerImagesForCfConfig, so @cloudflare/test-harness (#16798) can call it instead of keeping a copy. It adds an optional operation, so the harness's Docker error can say "running tests". The only change for Vite users is that the managed-registry credentials error no longer names the Vite plugin.


  • 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: internal refactor; the only user-facing change is an error message's wording.

@changeset-bot

changeset-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: bbc01bd

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

This PR includes changesets to release 4 packages
Name Type
@cloudflare/containers-shared Minor
@cloudflare/vite-plugin Patch
@cloudflare/deploy-helpers Patch
@cloudflare/remote-bindings 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

@ask-bonk

ask-bonk Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

LGTM

github run

@pkg-pr-new

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

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@16877

@cloudflare/build-output-utils

npm i https://pkg.pr.new/@cloudflare/build-output-utils@16877

@cloudflare/codemods

npm i https://pkg.pr.new/@cloudflare/codemods@16877

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@16877

@cloudflare/containers-shared

npm i https://pkg.pr.new/@cloudflare/containers-shared@16877

create-cloudflare

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

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@16877

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-functions

npm i https://pkg.pr.new/@cloudflare/pages-functions@16877

@cloudflare/pages-shared

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

@cloudflare/runtime-types

npm i https://pkg.pr.new/@cloudflare/runtime-types@16877

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-plugin

npm i https://pkg.pr.new/@cloudflare/vitest-plugin@16877

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@16877

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

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

wrangler

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

commit: bbc01bd

@edmundhung
edmundhung force-pushed the edmundhung/share-cf-config-container-images branch from ad875fc to 9df5d63 Compare November 12, 2026 17:40
@edmundhung
edmundhung marked this pull request as ready for review November 12, 2026 18:05
@workers-devprod
workers-devprod requested review from a team and petebacondarwin and removed request for a team November 12, 2026 18:06
@workers-devprod

workers-devprod commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/cloudchamber
  • ✅ @cloudflare/wrangler
Show detailed file reviewers
  • packages/containers-shared/index.ts: [@cloudflare/cloudchamber]
  • packages/containers-shared/src/cf-config-images.ts: [@cloudflare/cloudchamber]
  • packages/containers-shared/tests/cf-config-images.test.ts: [@cloudflare/cloudchamber]

clanky-the-clanker[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@edmundhung
edmundhung marked this pull request as draft November 13, 2026 00:31
@edmundhung
edmundhung force-pushed the edmundhung/share-cf-config-container-images branch from 9df5d63 to 9ad2a1e Compare November 13, 2026 00:34
@edmundhung
edmundhung changed the base branch from main to edmundhung/share-worker-zone-helpers November 13, 2026 00:34
edmundhung added a commit that referenced this pull request Nov 13, 2026
…ompliance helpers

#16877 and #16880 move these into containers-shared and workers-utils, so the
harness calls prepareContainerImagesForCfConfig(), getWorkerZone() and
toApiComplianceRegion() instead of keeping its own copies.
@edmundhung
edmundhung added this pull request to stack #16885 November 13, 2026 00:51
edmundhung added a commit that referenced this pull request Nov 13, 2026
…anceRegion exports

containers-shared depends on workers-utils at runtime and, with #16877, imports
toApiComplianceRegion from it, so a release needs a workers-utils version that
has the new exports.
@edmundhung
edmundhung force-pushed the edmundhung/share-cf-config-container-images branch from 9ad2a1e to daf92f7 Compare November 13, 2026 10:20
edmundhung added a commit that referenced this pull request Nov 13, 2026
…ompliance helpers

#16877 and #16880 move these into containers-shared and workers-utils, so the
harness calls prepareContainerImagesForCfConfig(), getWorkerZone() and
toApiComplianceRegion() instead of keeping its own copies.
edmundhung added a commit that referenced this pull request Nov 13, 2026
…anceRegion exports

containers-shared depends on workers-utils at runtime and, with #16877, imports
toApiComplianceRegion from it, so a release needs a workers-utils version that
has the new exports.
@edmundhung
edmundhung force-pushed the edmundhung/share-cf-config-container-images branch from daf92f7 to 2d32138 Compare November 13, 2026 10:41
edmundhung added a commit that referenced this pull request Nov 13, 2026
…ompliance helpers

#16877 and #16880 move these into containers-shared and workers-utils, so the
harness calls prepareContainerImagesForCfConfig(), getWorkerZone() and
toApiComplianceRegion() instead of keeping its own copies.
@edmundhung
edmundhung marked this pull request as ready for review November 13, 2026 12:14

@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 4da9e6ea.

This review, of 2d321382

✅ Approved — This is a clean refactor that moves the Container image preparation code into a shared package. The earlier suggestion is resolved and there are no new findings.

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

packages/containers-shared/src/cf-config-images.ts now uses the shared toApiComplianceRegion from @cloudflare/workers-utils/compliance, so the inline copy is gone.

Also checked, with no problems found:

  • The ./compliance and ./errors subpath exports of workers-utils.
  • The export of prepareContainerImagesForCfConfig from packages/containers-shared/index.ts.
  • The updated call sites in dev.ts and preview.ts.
  • The moved unit tests.
  • The updated mock in the Vite plugin's containers-server spec.

📝 Documentation: ✅ LGTM

The changeset and the JSDoc for the new operation option are accurate.


Reviewed commit: 2d321382

edmundhung added a commit that referenced this pull request Nov 17, 2026
…anceRegion exports

containers-shared depends on workers-utils at runtime and, with #16877, imports
toApiComplianceRegion from it, so a release needs a workers-utils version that
has the new exports.
Base automatically changed from edmundhung/share-worker-zone-helpers to main November 17, 2026 11:04
@edmundhung
edmundhung force-pushed the edmundhung/share-cf-config-container-images branch from 2d32138 to 4da9e6e Compare November 17, 2026 12:14
clanky-the-clanker[bot]

This comment was marked as resolved.

edmundhung added a commit that referenced this pull request Nov 17, 2026
…ompliance helpers

#16877 and #16880 move these into containers-shared and workers-utils, so the
harness calls prepareContainerImagesForCfConfig(), getWorkerZone() and
toApiComplianceRegion() instead of keeping its own copies.
…the Vite plugin

Move the Vite plugin's Container image preparation for cf config into @cloudflare/containers-shared as prepareContainerImagesForCfConfig, so the test harness can use it instead of a copy.
…ainer image preparation

With #16880 underneath, the shared conversion replaces this file's own copy.
@edmundhung
edmundhung force-pushed the edmundhung/share-cf-config-container-images branch from 4da9e6e to 769e40b Compare November 17, 2026 12:22

@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 bbc01bdb.

This review, of 769e40bd

✅ Approved — Clean refactor that now uses the shared compliance-region helper; no correctness or documentation problems 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 shared prepareContainerImagesForCfConfig, its export, the switch to toApiComplianceRegion() and the updated Vite plugin call sites and tests look correct.


📝 Documentation: ✅ LGTM

The changeset and JSDoc are accurate.


Reviewed commit: 769e40bd

edmundhung added a commit that referenced this pull request Nov 17, 2026
…ompliance helpers

#16877 and #16880 move these into containers-shared and workers-utils, so the
harness calls prepareContainerImagesForCfConfig(), getWorkerZone() and
toApiComplianceRegion() instead of keeping its own copies.

@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 — No findings. A clean refactor that shares the cf config Container image preparation, and the changeset now also releases the Vite plugin.

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

No issues. The shared prepareContainerImagesForCfConfig, its export, the optional operation passthrough (defaults to "running dev") and the updated Vite plugin call sites and tests are correct.


📝 Documentation: ✅ LGTM

The changeset now bumps both @cloudflare/containers-shared (minor) and @cloudflare/vite-plugin (patch), and its description is accurate.


Reviewed commit: bbc01bdb

@edmundhung
edmundhung enabled stacked auto-merge (squash) November 17, 2026 17:03

@petebacondarwin petebacondarwin 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 bypass

@workers-devprod

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/cloudchamber
  • ✅ @cloudflare/wrangler
Show detailed file reviewers
  • packages/containers-shared/index.ts: [@cloudflare/cloudchamber]
  • packages/containers-shared/src/cf-config-images.ts: [@cloudflare/cloudchamber]
  • packages/containers-shared/tests/cf-config-images.test.ts: [@cloudflare/cloudchamber]

@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

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Nov 17, 2026
@edmundhung
edmundhung merged commit dff5212 into main Nov 17, 2026
93 checks passed
@edmundhung
edmundhung deleted the edmundhung/share-cf-config-container-images branch November 17, 2026 19:16
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Nov 17, 2026
edmundhung added a commit that referenced this pull request Nov 18, 2026
…ompliance helpers

#16877 and #16880 move these into containers-shared and workers-utils, so the
harness calls prepareContainerImagesForCfConfig(), getWorkerZone() and
toApiComplianceRegion() instead of keeping its own copies.
edmundhung added a commit that referenced this pull request Nov 18, 2026
…ompliance helpers

#16877 and #16880 move these into containers-shared and workers-utils, so the
harness calls prepareContainerImagesForCfConfig(), getWorkerZone() and
toApiComplianceRegion() instead of keeping its own copies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants