Skip to content

chore: upgrade queue to 2.0 - #13483

Merged
loks0n merged 1 commit into
mainfrom
codex/queue-2.0.0
Sep 4, 2026
Merged

loks0n merged 1 commit into
mainfrom
codex/queue-2.0.0

Conversation

@loks0n

@loks0n loks0n commented Sep 4, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Upgrades utopia-php/queue to the 2.x line and utopia-php/platform to 1.0.0-rc20. Migrates direct broker usage from the removed Publisher class / enqueue() method to the Queue 2 Publisher\Synchronous contract and publish() method.

The lockfile resolves Queue 2.0.1, which retains compatibility with Appwrite’s existing Validators 0.6 dependency.

Test Plan

  • vendor/bin/pint --test --dirty --config pint.json
  • composer check
  • composer refactor:check
  • vendor/bin/phpunit tests/unit/Event tests/unit/Platform/Workers/MigrationsTest.php (18 tests, 302 assertions)
  • PHP syntax checks for all modified PHP files

Related PRs

@greptile-apps

greptile-apps Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR upgrades Utopia Queue to 2.0.1 and Platform to rc20, then migrates Appwrite’s direct queue publisher integration from the removed publisher/enqueue API to the synchronous publisher/publish contract.

  • Updates shared, request-scoped, worker-scoped, event, and task publisher type declarations.
  • Migrates direct broker publication calls and corresponding test doubles.
  • Refreshes compatible transitive Utopia dependencies in the Composer lockfile.

Confidence Score: 5/5

The PR appears safe to merge, with the direct Queue 2 migration applied consistently across runtime wiring, publishers, operational tasks, and tests.

No concrete behavioral failure, security issue, or repository-rule violation remains; direct broker calls use publish(), wrapper enqueue APIs still delegate correctly, and the lockfile resolves compatible package constraints.

Important Files Changed

Filename Overview
composer.json Raises the Queue dependency to the 2.x line and Platform to rc20.
composer.lock Resolves Queue 2.0.1 and the compatible Platform and transitive Utopia package versions.
app/init/resources.php Updates shared publisher resource factories to accept the Queue 2 synchronous publisher contract.
app/init/resources/request.php Migrates request-scoped queue resources to the synchronous publisher type.
app/init/worker/message.php Migrates per-job event and service publisher resources to the new contract.
src/Appwrite/Event/Event.php Replaces the removed direct enqueue operation with Queue 2’s publish operation.
src/Appwrite/Event/Publisher/Base.php Updates the common typed-message handoff to call the synchronous publisher’s publish method.
src/Appwrite/Platform/Tasks/QueueRetry.php Updates the queue-retry task’s injected publisher type while preserving failed-job recovery behavior.
tests/unit/Event/MockPublisher.php Adapts the event test publisher to the Queue 2 synchronous publication method.
tests/e2e/General/WorkerConcurrencyTest.php Migrates direct test broker publication calls from enqueue to publish.

Reviews (1): Last reviewed commit: "chore: upgrade queue to 2.0" | Re-trigger Greptile

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → codex/queue-2.0.0 (after).

Metric Before After Change
🚀 Requests/sec 213.2 210.03 ⚪ -1.5%
⏱️ Latency P50 85.26 ms 84.55 ms ⚪ -0.8%
⏱️ Latency P95 178.81 ms 185.59 ms ⚪ +3.8%
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 84.55 185.59 13,167 210.03 +6.78
Account 156.29 301.23 693 11.5 +20.91
TablesDB 86.23 156.82 7,161 116.61 +2.49
Storage 68.74 157.98 3,465 58.61 +3.43
Functions 108.94 211.66 1,848 32 +7.95

Top API waits (after)

API request Max wait (ms)
account.get 577.72
functions.variables.create 449.57
storage.files.update 431.38
functions.create 423.04
storage.buckets.create 412.32

@loks0n
loks0n merged commit 962c43a into main Sep 4, 2026
45 checks passed
@ChiragAgg5k ChiragAgg5k mentioned this pull request Sep 10, 2026
2 of 4 tasks
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.

1 participant