Skip to content

[wrangler] Handle queue bindings in remote dev#14608

Open
akim136 wants to merge 1 commit into
cloudflare:mainfrom
akim136:fix/wrangler-remote-queue-bindings
Open

[wrangler] Handle queue bindings in remote dev#14608
akim136 wants to merge 1 commit into
cloudflare:mainfrom
akim136:fix/wrangler-remote-queue-bindings

Conversation

@akim136

@akim136 akim136 commented Jul 8, 2026

Copy link
Copy Markdown

Fixes #9642.

Legacy wrangler dev --remote already warns that Queues are unsupported, but queue producer bindings were still included in the remote preview upload. That can make every proxied request fail even when the route does not use the queue.

This omits queue producer bindings from remote preview uploads after the existing warning, so unrelated routes can still be tested. Queue-specific code remains unsupported in this mode.


  • 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: this preserves the existing unsupported-Queues warning and fixes remote preview behavior only.

Validation:

  • pnpm --filter wrangler... build
  • pnpm --filter wrangler test run src/__tests__/api/startDevWorker/RemoteRuntimeController.test.ts src/__tests__/api/startDevWorker/ConfigController.test.ts
  • pnpm --filter wrangler check:type
  • pnpm exec oxlint --deny-warnings --type-aware packages/wrangler/src/api/startDevWorker/RemoteRuntimeController.ts packages/wrangler/src/__tests__/api/startDevWorker/RemoteRuntimeController.test.ts packages/wrangler/src/__tests__/api/startDevWorker/ConfigController.test.ts
  • pnpm exec oxfmt --check packages/wrangler/src/api/startDevWorker/RemoteRuntimeController.ts packages/wrangler/src/__tests__/api/startDevWorker/RemoteRuntimeController.test.ts packages/wrangler/src/__tests__/api/startDevWorker/ConfigController.test.ts

@akim136 akim136 requested a review from workers-devprod as a code owner July 8, 2026 17:48
@changeset-bot

changeset-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 51532c5

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

This PR includes changesets to release 3 packages
Name Type
wrangler Patch
@cloudflare/vite-plugin 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

@workers-devprod workers-devprod requested review from a team and emily-shen and removed request for a team July 8, 2026 17:49
@workers-devprod

workers-devprod commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • .changeset/silent-queues-jam.md: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/api/startDevWorker/ConfigController.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/api/startDevWorker/RemoteRuntimeController.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/api/startDevWorker/RemoteRuntimeController.ts: [@cloudflare/wrangler]

@devin-ai-integration devin-ai-integration 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.

Devin Review found 1 potential issue.

Open in Devin Review

Comment on lines +43 to +51
function getRemotePreviewBindings(
bindings: StartDevWorkerOptions["bindings"]
): Record<string, Binding> {
return Object.fromEntries(
Object.entries(bindings ?? {}).filter(
([, binding]) => binding.type !== "queue"
)
);
}

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.

🔍 No warning emitted at the filtering site — relies on ConfigController warning upstream

The getRemotePreviewBindings function at packages/wrangler/src/api/startDevWorker/RemoteRuntimeController.ts:43-51 silently drops queue bindings without logging any warning. The changeset description states bindings are omitted "after warning," but that warning comes from a separate code path in packages/wrangler/src/api/startDevWorker/ConfigController.ts:504 ("Queues are not yet supported in wrangler dev remote mode."). If that ConfigController code path is ever bypassed or removed, queue bindings would be silently dropped with no user notification. The test also doesn't assert that any warning is logged. Worth verifying the ConfigController warning is reliably triggered in the same flow.

Open in Devin Review

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Addressed in 51532c5 by adding ConfigController coverage that verifies the existing Queues are not yet supported in wrangler dev remote mode. warning is emitted for a remote-dev queue producer config, alongside the RemoteRuntimeController test that verifies queue bindings are omitted from the preview upload.

@akim136 akim136 force-pushed the fix/wrangler-remote-queue-bindings branch from dd97675 to 51532c5 Compare July 8, 2026 18:02
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.

Queue producer binding causes 500 errors on all routes when using wrangler dev --remote

2 participants