improve: bump up maximum allowed value for Queue delivery and retry delay to 24 hours#12597
improve: bump up maximum allowed value for Queue delivery and retry delay to 24 hours#12597dario-piotrowicz merged 1 commit intocloudflare:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 6dfb7f0 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 |
There was a problem hiding this comment.
Devin Review found 2 potential issues.
⚠️ 2 issues in files not directly in the diff
⚠️ Hardcoded old max delay (43200) in CLI help text for queues create command (packages/wrangler/src/queues/cli/commands/create.ts:34)
The --delivery-delay-secs argument description in queues create still says "Must be between 0 and 43200" even though MAX_DELIVERY_DELAY_SECS was bumped to 86400.
Root Cause
The constant MAX_DELIVERY_DELAY_SECS at packages/wrangler/src/queues/constants.ts:5 was updated from 43200 to 86400, and the validation error messages at packages/wrangler/src/queues/cli/commands/create.ts:99 correctly use the constant via string interpolation. However, the describe string for the --delivery-delay-secs argument at line 34 has the old value hardcoded as "Must be between 0 and 43200".
Impact: Users running wrangler queues create --help will see the old maximum of 43200 (12 hours), but the actual validation accepts up to 86400 (24 hours). This creates confusion where the help text tells users the max is 12 hours but the system actually accepts 24 hours.
⚠️ Hardcoded old max delay (43200) in CLI help text for queues update command (packages/wrangler/src/queues/cli/commands/update.ts:29)
The --delivery-delay-secs argument description in queues update still says "Must be between 0 and 43200" even though MAX_DELIVERY_DELAY_SECS was bumped to 86400.
Root Cause
Same issue as in create.ts — the constant MAX_DELIVERY_DELAY_SECS at packages/wrangler/src/queues/constants.ts:5 was updated from 43200 to 86400, and the validation error message at packages/wrangler/src/queues/cli/commands/update.ts:79 correctly uses the constant. However, the describe string for the --delivery-delay-secs argument at line 29 has the old value hardcoded as "Must be between 0 and 43200".
Impact: Users running wrangler queues update --help will see the old maximum of 43200 (12 hours), but the actual validation accepts up to 86400 (24 hours).
View 3 additional findings in Devin Review.
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
dario-piotrowicz
left a comment
There was a problem hiding this comment.
Looks good to me, thanks @sdnts 🙂
Fixes MQ-1097
Queues can now accept delivery delays up to 24 hours
A picture of a cute animal (not mandatory, but encouraged)