Skip to content

Refactor queue publishers#12288

Open
ChiragAgg5k wants to merge 7 commits into
1.9.xfrom
chore/queue-publisher-migration
Open

Refactor queue publishers#12288
ChiragAgg5k wants to merge 7 commits into
1.9.xfrom
chore/queue-publisher-migration

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

Summary

  • Add immutable message DTOs and publisher wrappers for database, delete, and function queues.
  • Migrate server producers, workers, and queue health checks from mutable queueFor* services to publisherFor* services.
  • Preserve existing queue payloads and queue routing behavior while adding focused unit coverage.

Tests

  • vendor/bin/phpunit tests/unit/Event/QueuePublisherTest.php
  • git diff --name-only origin/1.9.x...HEAD -- '*.php' | xargs -n 1 php -l
  • git diff --check origin/1.9.x...HEAD

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

✨ Benchmark results

Comparing 1.9.x (before) to chore/queue-publisher-migration (after).

Before

Scenario P50 (ms) P95 (ms) Requests RPS
API total 13.54 136.82 185 34.94
Account 24.35 164.49 35 7.29
TablesDB 13.11 19.34 35 8.95
Storage 11.16 54.17 75 18.85
Functions 20.58 31.81 40 10.12

After

Scenario P50 (ms) P95 (ms) Requests RPS
API total 14.53 134.27 185 33.65
Account 25.27 182.93 35 6.99
TablesDB 12.83 25.88 35 8.42
Storage 12.3 54 75 17.62
Functions 21.33 34.3 40 9.5

Delta

Scenario P95 delta (ms)
API total -2.55
Account +18.44
TablesDB +6.55
Storage -0.17
Functions +2.49
Top API waits
API request Max wait (ms)
account.sessions.email.create 687.3
account.password.update 182.8
account.create 153.61

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

🔄 PHP-Retry Summary

Flaky tests detected across commits:

Commit ca68d26 - 5 flaky tests
Test Retries Total Time Details
UsageTest::testFunctionsStats 1 10.23s Logs
UsageTest::testPrepareSitesStats 1 7ms Logs
UsageTest::testEmbeddingsTextUsageDoesNotBreakProjectUsage 1 5ms Logs
MigrationsConsoleClientTest::testAppwriteMigrationOverwriteAttributeRecreateDropsAndRecreates 1 12.96s Logs
MigrationsConsoleClientTest::testAppwriteMigrationOverwriteSameSpecRecreateTolerates 1 60.37s Logs
Commit 848ef59 - 28 flaky tests
Test Retries Total Time Details
UsageTest::testFunctionsStats 1 10.16s Logs
UsageTest::testPrepareSitesStats 1 6ms Logs
UsageTest::testEmbeddingsTextUsageDoesNotBreakProjectUsage 1 5ms Logs
WebhooksCustomServerTest::testDeleteDeployment 1 36ms Logs
WebhooksCustomServerTest::testDeleteFunction 1 11ms Logs
WebhooksCustomServerTest::testCreateCollection 1 9ms Logs
WebhooksCustomServerTest::testCreateAttributes 1 11ms Logs
WebhooksCustomServerTest::testCreateDocument 1 73ms Logs
WebhooksCustomServerTest::testUpdateDocument 1 9ms Logs
WebhooksCustomServerTest::testDeleteDocument 1 11ms Logs
WebhooksCustomServerTest::testCreateTable 1 11ms Logs
WebhooksCustomServerTest::testCreateColumns 1 13ms Logs
WebhooksCustomServerTest::testCreateRow 1 9ms Logs
WebhooksCustomServerTest::testUpdateRow 1 12ms Logs
WebhooksCustomServerTest::testDeleteRow 1 11ms Logs
WebhooksCustomServerTest::testCreateStorageBucket 1 7ms Logs
WebhooksCustomServerTest::testUpdateStorageBucket 1 12ms Logs
WebhooksCustomServerTest::testCreateBucketFile 1 12ms Logs
WebhooksCustomServerTest::testUpdateBucketFile 1 6ms Logs
WebhooksCustomServerTest::testDeleteBucketFile 1 6ms Logs
WebhooksCustomServerTest::testDeleteStorageBucket 1 25ms Logs
WebhooksCustomServerTest::testCreateTeam 1 10ms Logs
WebhooksCustomServerTest::testUpdateTeam 1 20ms Logs
WebhooksCustomServerTest::testUpdateTeamPrefs 1 12ms Logs
WebhooksCustomServerTest::testDeleteTeam 1 5ms Logs
WebhooksCustomServerTest::testCreateTeamMembership 1 13ms Logs
WebhooksCustomServerTest::testDeleteTeamMembership 1 9ms Logs
WebhooksCustomServerTest::testWebhookAutoDisable 1 29ms Logs
Commit 7401442 - 4 flaky tests
Test Retries Total Time Details
UsageTest::testFunctionsStats 1 10.18s Logs
UsageTest::testPrepareSitesStats 1 7ms Logs
UsageTest::testEmbeddingsTextUsageDoesNotBreakProjectUsage 1 5ms Logs
LegacyCustomServerTest::testUpdateWithExistingRelationships 1 241.43s Logs
Commit bdc7cf3 - 5 flaky tests
Test Retries Total Time Details
UsageTest::testFunctionsStats 1 10.24s Logs
UsageTest::testPrepareSitesStats 1 7ms Logs
UsageTest::testEmbeddingsTextUsageDoesNotBreakProjectUsage 1 5ms Logs
TablesDBConsoleClientTest::testListDocumentsCachePurgedByUpdate 1 3.11s Logs
TablesDBConsoleClientTest::testEnforceCollectionPermissions 1 240.36s Logs
Commit a8f08da - 6 flaky tests
Test Retries Total Time Details
UsageTest::testFunctionsStats 1 10.20s Logs
UsageTest::testPrepareSitesStats 1 7ms Logs
UsageTest::testEmbeddingsTextUsageDoesNotBreakProjectUsage 1 5ms Logs
LegacyConsoleClientTest::testUpsertDocument 1 240.58s Logs
LegacyCustomClientTest::testOneToManyRelationship 1 240.19s Logs
LegacyCustomServerTest::testOneToManyRelationship 1 240.19s Logs

Note: Flaky test results are tracked for the last 5 commits

…r-migration

# Conflicts:
#	app/init/resources/request.php
# Conflicts:
#	src/Appwrite/Platform/Tasks/ScheduleFunctions.php
#	src/Appwrite/Platform/Workers/Functions.php
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