Skip to content

Cap queue delays on Laravel Cloud's SQS-backed driver - #1074

Merged
rmcdaniel merged 1 commit into
mainfrom
fix/general-cloud-queue-delay-cap
Nov 11, 2026
Merged

rmcdaniel merged 1 commit into
mainfrom
fix/general-cloud-queue-delay-cap

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

Laravel Cloud's managed queues register a cloud queue driver that wraps SQS. Workflow only applied the 900-second SQS delay cap when the driver was literally sqs, so on Laravel Cloud any timer, awaitWithTimeout() or delayed v2 task over 15 minutes failed with DelaySeconds must be >= 0 and <= 900.

This carries #1072 (1.x, by @Joel-Jensen) forward to main:

  • BackendCapabilities::isSqsBackedDriver() names the SQS-backed drivers (sqs, cloud) in one place.
  • It is used for the v2 max_delay_seconds capability, the v2 release cap in TimerTransportChunker, and the v1 Timers::timer() cap.
  • Tests: cloud-driver dispatch (900s) and release (43200s) caps, plus Cap timer delays on Laravel Cloud's managed queues #1072's v1 timer test.

ECS and PHPStan pass on the changed files locally; unit/feature suites run in CI.

🤖 Generated with Claude Code

Laravel Cloud's managed queues register a `cloud` driver that wraps SQS,
so timers and v2 task dispatches longer than 900 seconds failed with
SQS InvalidParameterValue. Treat `cloud` like `sqs` everywhere the 900s
dispatch cap and SQS release cap apply.

Reported and first fixed for 1.x by Joel-Jensen in #1072.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel rmcdaniel left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Reviewed. BackendCapabilities::isSqsBackedDriver() now covers all three 'sqs' checks on main: the v1 Timers cap, the v2 max_delay_seconds capability and the TimerTransportChunker release cap. No other SQS driver checks remain in src. New tests cover the cloud dispatch (900s) and release (43200s) caps. All checks pass on c28e17d. Merging.

@rmcdaniel
rmcdaniel merged commit be9116b into main Nov 11, 2026
24 checks passed
@rmcdaniel
rmcdaniel deleted the fix/general-cloud-queue-delay-cap branch November 11, 2026 14:43
rsguimaraes-pe pushed a commit to rsguimaraes-pe/workflow that referenced this pull request Nov 13, 2026
coverage-unit runs the unit suite only after merge, so a unit test that
fails there could merge green. durable-workflow#1074's Laravel Cloud timer test did exactly
that. A new pr-unit job runs the same suite without coverage, with the same
SQLite and Redis setup, and the build gate requires it on pull requests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant