Skip to content

chore(deps): take utopia-php/queue 6.0.0 - #13841

Merged
levivannoort merged 4 commits into
mainfrom
chore/queue-6
Sep 24, 2026
Merged

levivannoort merged 4 commits into
mainfrom
chore/queue-6

Conversation

@levivannoort

@levivannoort levivannoort commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Takes utopia-php/queue 6.0.0. Also pins utopia-php/platform to 1.0.0-rc25, the first platform tag that allows queue 6 — rc24 required utopia-php/queue: ^5.0.0 and held the whole chain back. utopia-php/monorepo#324 moved that constraint to ^6.0.0.

What changes here

getFailedCount() joins Publisher\Synchronous. It reports everything a queue could not get through: on Redis the failed, dead and poison lists together. getQueueSize() keeps its name and signature and delegates to it, so no caller moves. MockPublisher is the only class in this repo that implements the interface; it gains the method, answering 0 — that double records what was published, and nothing it holds has failed. FakeConsumer implements Consumer, which is unchanged.

A TypeError or ValueError escaping a handler is terminal. The payload and the signature disagree, and they will disagree identically on every delivery, so the attempts after the first only spend the redelivery budget to reach the conclusion the first one reached. On Redis — which is where this ships — the message still lands on the failed list, so a retry sweep reaches it exactly as before. The change bites on JetStream, where every further attempt would hold a maxAckPending slot for the length of its backoff.

Deliberately narrow: every other \Error keeps its budget. OutOfMemoryError and the stack overflow say the host was short at that moment, not that the work is impossible.

A terminal message on Redis stays on failed rather than moving to dead. Nothing pops dead — retry() reads failed only — so the old routing quietly meant unrecoverable on this transport. Redis has no ack ceiling to protect, so the verdict bought nothing there and cost the only recovery path there is.

Worth a look before release

/v1/health/queue/failed/{name} reports getFailedCount() and asserts a threshold against it. That number now sums three lists instead of one, so a deployment with messages parked on dead or poison sees it rise on upgrade without a single new failure — and dead fills on its own, since Adapter\Swoole runs reap() on a timer and it parks there past maxAttempts.

For scale: one Appwrite Cloud region holds 115 such messages on a single queue, accumulated over eight days. Self-hosted deployments watching that endpoint with a tight threshold will want the release notes to say this.

- getFailedCount() joins Publisher\Synchronous. getQueueSize() keeps its name
  and signature and delegates to it, so no caller moves; MockPublisher, the one
  class here that implements the interface, gains the method. It answers 0:
  that double records what was published and nothing it holds has failed.
- A TypeError or ValueError escaping a handler is now terminal. On a Redis
  queue the message still lands on the failed list, so a retry sweep reaches it
  exactly as before.
- A terminal message on Redis stays on the failed list rather than moving to
  dead, where nothing would have read it.

Worth a look before release: /v1/health/queue/failed/{name} reports
getFailedCount(), which now sums the failed, dead and poison lists rather than
the failed list alone. A deployment with messages parked on the other two sees
that number rise on upgrade without a new failure, and the endpoint asserts a
threshold against it.
rc25 is the first platform tag that allows queue 6.
@levivannoort
levivannoort marked this pull request as ready for review September 23, 2026 14:13
@greptile-apps

greptile-apps Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with no outstanding correctness, security, or repository-rule issues identified.

Summary

Updates Appwrite to Utopia Queue 6.0.0 and the compatible Utopia Platform 1.0.0-rc25 release.

  • Adds the new synchronous publisher getFailedCount() method to the event publisher test double.
  • Preserves the mock’s observable semantics by reporting no failed messages.
  • Refreshes the Composer lockfile for the dependency changes.

Reviews (4) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..."

# Conflicts:
#	composer.json
#	composer.lock
@github-actions

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → chore/queue-6 (after).

Metric Before After Change
🚀 Requests/sec 173.78 174.21 ⚪ +0.2%
⏱️ Latency P50 99.71 ms 98.92 ms ⚪ -0.8%
⏱️ Latency P95 233.69 ms 233.09 ms ⚪ -0.3%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 98.92 233.09 11,400 174.21 -0.6
Account 195.19 364.67 600 9.97 +6.41
TablesDB 95.38 187.55 6,200 98.45 -4.02
Storage 89.79 195.11 3,000 48.68 -0.01
Functions 143.29 284.14 1,600 26.46 -0.89

Top API waits (after)

API request Max wait (ms)
tablesdb.rows.update 586.21
account.name.update 566.49
tablesdb.rows.increment 541.71
functions.create 443.86
tablesdb.rows.decrement 442.16

@levivannoort
levivannoort merged commit b9daf94 into main Sep 24, 2026
63 of 64 checks passed
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.

2 participants