Skip to content

Migrate Workers Containers commands to Containers API Endpoints #9098

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Jun 23, 2025

Conversation

jseba
Copy link
Contributor

@jseba jseba commented Apr 29, 2025

Workers Containers

The Workers Containers API has new endpoints and auth tokens to enforce its scope. This change moves the Wrangler interaction with the API to those new endpoints and uses the new token for them.

  • Tests
    • TODO (before merge)
    • Tests included: no new tests added, existing workers container E2E tests should continue functioning as-is
    • Tests not necessary because:
  • Wrangler / Vite E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because:
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because: Internal change to API endpoints
  • Wrangler V3 Backport
    • TODO (before merge)
    • Wrangler PR:
    • Not necessary because: new feature

Copy link

changeset-bot bot commented Apr 29, 2025

🦋 Changeset detected

Latest commit: 103aaa4

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

This PR includes changesets to release 2 packages
Name Type
wrangler Patch
@cloudflare/vitest-pool-workers 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

@jseba jseba force-pushed the jseba/containers_scope branch from bcf790a to 0707b4b Compare May 6, 2025 18:50
@jseba jseba marked this pull request as ready for review May 7, 2025 17:47
@jseba jseba requested review from a team as code owners May 7, 2025 17:47
Copy link
Contributor

@irvinebroque irvinebroque left a comment

Choose a reason for hiding this comment

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

Nice one. Are we going to at some point start using the autogenerated TypeScript SDK for these?

@markjmiller @korinne can help guide if you want to

Copy link
Contributor

github-actions bot commented May 7, 2025

A Wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14915871171/npm-package-wrangler-9098
Prereleases for other packages:

cloudflare-workers-bindings-extension:

wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14915871171/npm-package-cloudflare-workers-bindings-extension-9098 -O ./cloudflare-workers-bindings-extension.0.0.0-vd6a6e1aeb.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-vd6a6e1aeb.vsix

create-cloudflare:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14915871171/npm-package-create-cloudflare-9098 --no-auto-update

@cloudflare/kv-asset-handler:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14915871171/npm-package-cloudflare-kv-asset-handler-9098

miniflare:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14915871171/npm-package-miniflare-9098

@cloudflare/pages-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14915871171/npm-package-cloudflare-pages-shared-9098

@cloudflare/unenv-preset:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14915871171/npm-package-cloudflare-unenv-preset-9098

@cloudflare/vite-plugin:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14915871171/npm-package-cloudflare-vite-plugin-9098

@cloudflare/vitest-pool-workers:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14915871171/npm-package-cloudflare-vitest-pool-workers-9098

@cloudflare/workers-editor-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14915871171/npm-package-cloudflare-workers-editor-shared-9098

@cloudflare/workers-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14915871171/npm-package-cloudflare-workers-shared-9098

@cloudflare/workflows-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14915871171/npm-package-cloudflare-workflows-shared-9098

Note that these links will no longer work once the GitHub Actions artifact expires.

@IRCody IRCody added the e2e Run wrangler + vite-plugin e2e tests on a PR label May 8, 2025
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

LGTM - can you change the changeset and then happy to approve.

jseba added 5 commits June 13, 2025 17:42
* 'main' of ssh://github.com/cloudflare/workers-sdk: (213 commits)
  fix(vite-plugin-cloudflare): allow unknown entrypoint on startup (cloudflare#9583)
  add warning about env not specified to potentially risky wrangler commands (cloudflare#9344)
  test: correctly delete test d1 databases (cloudflare#9598)
  Add details to v3 maintenance worflow error message (cloudflare#9602)
  drop unused `WRANGLER_UNENV_RESOLVE_PATHS` env var (cloudflare#9593)
  warn instead of erroring if no exposed ports. and remove unused dev_exposed_ports (cloudflare#9573)
  fix(wrangler): point to the right doc location (replaces cloudflare#9353) (cloudflare#9592)
  [vitest-pool-worker] Add `type: module` in package.json (cloudflare#9595)
  Enable HTML handling for HTML files in the public directory (cloudflare#9548)
  switch from go container to js (cloudflare#9588)
  containers: switch to Cloudflare container registry (cloudflare#9564)
  performance improvement: restart a mixed mode session only if the worker's remote bindings have changed (cloudflare#9536)
  ci: delete more orphaned resources from e2e tests (cloudflare#9580)
  test: remove `verifyBuildScript` logic from c3 e2e tests (cloudflare#9504)
  fix(vite-plugin): ensure node compat globals are injected before any imports (cloudflare#9581)
  feat(containers-shared): Move `isDockerfile` utility function to `containers-shared` (cloudflare#9577)
  allow `startWorker` to accept `false` as an `inspector` option (to disable the inspector server) (cloudflare#9550)
  Update capnp generated code from the workerd.capnp (cloudflare#9582)
  Bump `@cloudflare/unenv-preset` to 2.3.3 (cloudflare#9566)
  test: make custom build bundling tests more robust (cloudflare#9494)
  ...
…seba/containers_scope

* 'main' of ssh://github.com/cloudflare/workers-sdk: (31 commits)
  Refactor preview mode and ensure compatibility with Vite 7 (cloudflare#9647)
  Block requests vulnerable to opennext vulnerability (cloudflare#9635)
  Add test for cloudchamber buildAndMaybePush (cloudflare#9638)
  chore: remove redundant binding guide superseded by internal docs (cloudflare#9648)
  add changeset to trigger release of workers/pages projects (cloudflare#9649)
  Add @handler to Python templates. (cloudflare#9305)
  Migrate from unbuild to obuild (cloudflare#9243)
  Version Packages (cloudflare#9650)
  fix changeset (cloudflare#9651)
  containers: Default scheduling policy should be the default (cloudflare#9621)
  Rename Mixed Mode to remote proxy/remote bindings depending on context (cloudflare#9586)
  Version Packages (cloudflare#9632)
  Correctly mock out getDockerImageDigest for testing buildAndMaybePush (cloudflare#9636)
  [C3] Bump create-remix from 2.16.6 to 2.16.8 in /packages/create-cloudflare/src/frameworks (cloudflare#9525)
  Remove "Cloudchamber" from user facing error messages (cloudflare#9628)
  sync local containers with latest workerd (cloudflare#9576)
  Bump the workerd-and-workers-types group with 2 updates (cloudflare#9591)
  [C3] Bump gatsby from 5.14.3 to 5.14.4 in /packages/create-cloudflare/src/frameworks (cloudflare#9524)
  [C3] Bump create-react-router from 7.6.1 to 7.6.2 in /packages/create-cloudflare/src/frameworks (cloudflare#9526)
  [C3] Bump create-docusaurus from 3.8.0 to 3.8.1 in /packages/create-cloudflare/src/frameworks (cloudflare#9527)
  ...
Copy link

pkg-pr-new bot commented Jun 19, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 103aaa4

@IRCody IRCody added the skip-v3-pr Skip validation of presence of a v3 backport PR label Jun 19, 2025
@CarmenPopoviciu CarmenPopoviciu added the every-os Run tests (unit/e2e/c3-e2e) on every OS, rather than just macOS label Jun 20, 2025
Copy link
Contributor

@CarmenPopoviciu CarmenPopoviciu left a comment

Choose a reason for hiding this comment

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

LGTM

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Jun 20, 2025
jseba added 5 commits June 21, 2025 09:09
…seba/containers_scope

* 'main' of ssh://github.com/cloudflare/workers-sdk:
  Add CLAUDE.md for Claude Code guidance (cloudflare#9563)
  Version Packages (cloudflare#9697)
  add remote bindings support to `getPlatformProxy` (cloudflare#9688)
  feat(containers): add support for handling images that link to the CF registry (cloudflare#9596)
  CC-5418: Set instance_type in wrangler (cloudflare#9633)
  remove warnings during config validations on `experimental_remote` fields (cloudflare#9678)
  add debug logs for workerd (cloudflare#9640)
  `wrangler containers apply` uses `observability` configuration (cloudflare#9558)
  Version Packages (cloudflare#9658)
  Temporarily skip Openapi C3 e2e tests (cloudflare#9691)
  Skip authed fixture on forks (cloudflare#9681)
@th0m th0m self-requested a review June 21, 2025 20:42
Copy link
Contributor

@CarmenPopoviciu CarmenPopoviciu left a comment

Choose a reason for hiding this comment

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

re-approving

@CarmenPopoviciu CarmenPopoviciu added this pull request to the merge queue Jun 23, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 23, 2025
@CarmenPopoviciu CarmenPopoviciu added this pull request to the merge queue Jun 23, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 23, 2025
@CarmenPopoviciu CarmenPopoviciu added this pull request to the merge queue Jun 23, 2025
Merged via the queue into cloudflare:main with commit ef20754 Jun 23, 2025
19 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Jun 23, 2025
@workers-devprod workers-devprod added the contribution [Holopin] Recognizes an open-source contribution, big or small label Jun 23, 2025
Copy link

holopin-bot bot commented Jun 23, 2025

Congratulations @jseba, the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cmc9993h7012707job8dv21yy

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution [Holopin] Recognizes an open-source contribution, big or small e2e Run wrangler + vite-plugin e2e tests on a PR every-os Run tests (unit/e2e/c3-e2e) on every OS, rather than just macOS skip-v3-pr Skip validation of presence of a v3 backport PR
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

9 participants