Skip to content

[wrangler] Add deprecation warning for queue delivery_delay#12279

Open
penalosa wants to merge 6 commits intomainfrom
fix/10286-queue-delivery-delay-warning
Open

[wrangler] Add deprecation warning for queue delivery_delay#12279
penalosa wants to merge 6 commits intomainfrom
fix/10286-queue-delivery-delay-warning

Conversation

@penalosa
Copy link
Copy Markdown
Contributor

@penalosa penalosa commented Jan 29, 2026

Part of #10286.

The delivery_delay setting in [[queues.producers]] was silently having no effect since PR #10288 removed the functionality that used it. This PR adds a deprecation warning when the setting is used, informing users that queue-level settings should be configured using wrangler queues update instead.

Changes

  • Added deprecation warning in validateQueueBinding function when delivery_delay is set
  • Added test case for the new deprecation warning
  • Added changeset for the patch release

  • 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 is a deprecation warning that guides users to use wrangler queues update instead, which is already documented.

Open with Devin

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 29, 2026

🦋 Changeset detected

Latest commit: a27b9f4

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

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

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Jan 29, 2026

Claude finished @penalosa's task —— View job


Changeset Review

  • Read changeset guidelines
  • Review changeset file
  • Check attached image
  • Validate against criteria

All changesets look good

The changeset for .changeset/deprecate-queue-delivery-delay.md passes all validation criteria:

  1. Version Type: patch is correct for a deprecation warning
  2. Changelog Quality: Clear description explaining what was deprecated, why, and what users should do instead
  3. Markdown Headers: No h1/h2/h3 headers used
  4. Analytics: Not applicable (no analytics changes)
  5. Dependabot: Not applicable
  6. Experimental features: Not applicable

The changeset properly documents that delivery_delay in queue producer bindings has been deprecated, explains it had no effect since 2024, and directs users to use wrangler queues update instead.


@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jan 29, 2026

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: a27b9f4

@penalosa penalosa marked this pull request as ready for review January 29, 2026 17:42
@penalosa penalosa requested a review from a team as a code owner January 29, 2026 17:42
Copy link
Copy Markdown
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: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional flags.

Open in Devin Review

Comment thread .changeset/deprecate-queue-delivery-delay.md Outdated
Comment thread packages/workers-utils/src/config/validation.ts
Comment thread packages/workers-utils/src/config/validation.ts
Comment thread packages/workers-utils/src/config/validation.ts
devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

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

LOTM, added some comments

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Jan 29, 2026
@penalosa
Copy link
Copy Markdown
Contributor Author

@claude can you make checks and tests pass

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Jan 30, 2026

Claude finished @penalosa's task —— View job


Todo List:

  • Read the failing test and validation code files
  • Fix the message mismatch between test expectation and actual code
  • Address review comments and suggestions
  • Commit and push changes

Changes Made:

  1. Fixed test failure: Updated warning message in packages/workers-utils/src/config/validation.ts:3535-3537 to match test expectation:

    • "Queue settings" → "Queue-level settings"
    • "in the next major version" → "in a future version"
  2. Addressed review feedback: Updated .changeset/deprecate-queue-delivery-delay.md per vicb's comment:

The changes have been committed and pushed to fix the failing checks and tests. The warning message now aligns with the test expectation, and the changeset description has been improved per review feedback.


@petebacondarwin petebacondarwin force-pushed the fix/10286-queue-delivery-delay-warning branch from 120fcbd to bfb187a Compare February 3, 2026 19:59
@petebacondarwin
Copy link
Copy Markdown
Contributor

@claude the formatting needs fixing - perhaps by running pnpm fix.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Feb 3, 2026

Claude finished @petebacondarwin's task —— View job


Fixing Formatting Issues

Todo List:

  • Run pnpm fix to fix formatting issues
  • Check what files were changed
  • Commit and push any formatting fixes

The git working tree is clean, which means there are currently no uncommitted formatting issues. However, since you mentioned formatting needs fixing, there might be formatting violations that would be caught by CI checks.

I don't have permission to run pnpm fix directly. You'll need to run this command locally:

pnpm fix

This will auto-fix any linting and formatting issues, then you can commit and push the changes. Alternatively, you could add the --allowedTools=Bash(pnpm*) permission to let me run pnpm commands directly.


@petebacondarwin petebacondarwin marked this pull request as draft February 4, 2026 13:50
@petebacondarwin petebacondarwin force-pushed the fix/10286-queue-delivery-delay-warning branch from bfb187a to a4530f1 Compare February 4, 2026 15:13
penalosa and others added 5 commits April 17, 2026 13:52
The delivery_delay setting in [[queues.producers]] was silently having no effect
since PR #10288 removed the functionality. This adds a deprecation warning to inform
users that queue-level settings should be configured using 'wrangler queues update'
instead.

Fixes #10286
Co-authored-by: Victor Berchet <victor@suumit.com>
Co-authored-by: Victor Berchet <victor@suumit.com>
…alidate-config.test.ts

Co-authored-by: Victor Berchet <victor@suumit.com>
- Align warning message with test expectation
- Update changeset description per review feedback

Co-authored-by: Somhairle MacLeòid <penalosa@users.noreply.github.com>
@penalosa penalosa force-pushed the fix/10286-queue-delivery-delay-warning branch from a4530f1 to a27b9f4 Compare April 17, 2026 12:52
@penalosa penalosa marked this pull request as ready for review April 17, 2026 12:53
@workers-devprod
Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

Copy link
Copy Markdown
Contributor

@workers-devprod workers-devprod left a comment

Choose a reason for hiding this comment

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

Codeowners reviews satisfied

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Issues found

.changeset/deprecate-queue-delivery-delay.md

  1. Version Type: This changeset adds a deprecation warning, which according to the guidelines should be a minor version bump, not patch. The README states: "minor: New features, new CLI commands, new configuration options, deprecations, and changes to experimental/beta/pre-1.0 features".

    Current:

    "wrangler": patch
    "@cloudflare/workers-utils": patch

    Should be:

    "wrangler": minor
    "@cloudflare/workers-utils": minor

The changeset description itself is well-written - it explains the issue (setting was silently having no effect), the change (adds deprecation warning), and guidance for users (use wrangler queues update instead). No markdown header issues were found.

Copy link
Copy Markdown
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 6 additional findings in Devin Review.

Open in Devin Review

`);
});

it("should warn if delivery_delay is set on a queue producer", () => {
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.

🔴 Test uses bare expect without destructuring from test context, causing ReferenceError at runtime

The new test at line 3701 uses () => { as its callback, but expect is never imported from vitest (line 3 imports only describe, it, test, vi) and the vitest config does not set globals: true. Every other test in this file correctly destructures expect from the test context (e.g. ({ expect }) => {). This means the test will throw ReferenceError: expect is not defined at runtime, so the deprecation warning behavior is never actually verified. This also violates the explicit AGENTS.md rule: "expect must come from test context — never import { expect } from 'vitest'".

Suggested change
it("should warn if delivery_delay is set on a queue producer", () => {
it("should warn if delivery_delay is set on a queue producer", ({ expect }) => {
Open in Devin Review

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

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

Labels

None yet

Projects

Status: Approved

Development

Successfully merging this pull request may close these issues.

4 participants