Skip to content
This repository was archived by the owner on Nov 30, 2026. It is now read-only.

Send managed queue timeouts only when given - #308

Merged
joetannenbaum merged 2 commits into
mainfrom
send-queue-timeouts-only-when-given
Nov 25, 2026
Merged

joetannenbaum merged 2 commits into
mainfrom
send-queue-timeouts-only-when-given

Conversation

@iramello

@iramello iramello commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What

managed-queue:create sends visibility_timeout and shutdown_timeout only when the user gives them:

  • Non-interactive: only when --visibility-timeout or --shutdown-timeout is passed. It used to fall back to 60 and 90 seconds.
  • Interactive: the prompts start empty instead of 60 and 90, and an empty answer sends nothing.

ship's managed queue no longer hard-codes 60 and 90 either.

Why

Laravel Cloud applies custom queue timeouts only for organizations with the advanced managed queues entitlement. Every other organization's values are ignored and Laravel Cloud keeps its own, so the CLI sent values most users never chose and that had no effect. Sending only what the user asks for also keeps queue creation working if the API starts rejecting custom timeouts for organizations without the entitlement.

What changes for users

  • Without the entitlement: the queue they get is the same as before. The CLI just stops sending values Laravel Cloud ignored.
  • With the entitlement: a queue created without the options, or with empty answers, gets Laravel Cloud's default timeouts instead of 60 and 90 seconds. Passing the options keeps any value.

The option descriptions, the prompt hints and the README say this.

Tests

  • Non-interactive: no timeouts are sent without the options, and both are sent with them.
  • Interactive: empty answers send neither timeout, and typed answers send both.
  • An empty answer stays empty in the form, so when the API rejects another field, such as the name, the retry asks only for that field, not the timeouts again. It becomes "no timeout" only when the request is built.
  • --visibility-timeout=0 sends zero and leaves out the shutdown timeout.
  • ship's managed queue sends neither.
  • The full suite (867 tests), PHPStan and Pint pass.

managed-queue:create sent a 60 second visibility timeout and a 90 second
shutdown timeout on every run, from its prompt defaults or its
non-interactive fallbacks, and ship's managed queue hard-coded the same
values. Laravel Cloud applies custom queue timeouts only for
organizations with the advanced managed queues entitlement, and ignores
them for every other organization.

The command now sends each timeout only when it is passed as an option
or answered at the prompt. An empty answer, like a missing option, lets
Laravel Cloud choose. ship's queue leaves both to Laravel Cloud.
@iramello
iramello requested a balanced review from Copilot November 25, 2026 16:18
An empty answer was stored as null, which the form reads as unanswered,
so when the API rejected another field the CLI asked for both timeouts
again. The answer now stays empty in the form and is turned into no
timeout only when the request is built, so a retry asks only for the
fields with errors.

Copilot AI 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.

🟢 Approval recommended

No active review issues block the managed queue timeout changes.

No open issues 🎉

What changed in this PR

This PR lets Laravel Cloud choose managed queue timeouts unless users explicitly provide them, avoiding unsolicited custom values that require the advanced managed queues entitlement.

Changes:

  • Send timeout values only for explicit options or non-empty interactive answers, preserving zero values.
  • Remove hard-coded queue timeouts from ship and document the default behavior.
  • Add coverage for omitted and explicit timeouts, empty answers, and validation retries.
File Description
tests/​Feature/​ShipQueueTest.php Verify ship omits both queue timeouts.
tests/​Feature/​ManagedQueueCreateTest.php Cover optional timeouts, interactive input, retries, and zero values.
README.md Explain timeout defaults and entitlement requirements.
app/​Concerns/​ProvisionsQueueWorker.php Remove hard-coded timeouts from queue provisioning.
app/​Commands/​ManagedQueueCreate.php Make timeout prompts optional and omit unset values from requests.

Review effort: Balanced

@joetannenbaum
joetannenbaum merged commit 46bc3db into main Nov 25, 2026
5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants