- Bump utopia-php/database from 5.3.17 to 5.3.19
- Remove invalid (int) cast on tenant sequence in shared tables mode
- Fix DSN construction for documentsdb/vectorsdb: filter empty strings
from explode(), skip pool filtering when shared tables env vars unset,
fail fast when no pool found
- Use dedicated mode for separate database pools in getDatabasesDB
since shared tables can't work across engines (PostgreSQL integer
_tenant vs MongoDB UUID tenant). Auto-init schema on first use.
- Add documentsdb/vectorsdb shared tables env vars to CI workflow
- Fix testChannelTablesDBRowUpdate race condition with deterministic
event drain loop
The timeout parameters were accidentally removed in daaf1d7f77, causing
the assertEventually to use the default timeout which is too short for
deployment builds in CI.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The root cause (PostgreSQL duplicate index race condition) has been
fixed in the database library, so the timeout workarounds are no
longer needed.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The assertEventually call inside Coroutine\run() causes a fatal PHP
error (exit 255) when it times out, killing the entire test process.
Moving DB/collection/attribute setup and polling outside the coroutine
ensures PHPUnit can properly handle assertion failures.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PostgreSQL adapter throws non-Duplicate exceptions when a table/index
already exists during concurrent createCollection. Catch Throwable and
attempt metadata-only creation as fallback. Also increase Realtime
coroutine attribute polling timeout from 30s to 60s.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Realtime E2E tests were taking 24+ minutes due to intentional timeout waits. Many tests verify event filtering by expecting a TimeoutException, and each was waiting 45 seconds.
Changes:
- Reduce default WebSocket timeout from 45s to 2s in RealtimeBase
- Add optional timeout parameter to getWebsocket() methods
- Use longer timeouts (5-10s) for tests that legitimately wait for slow operations (function executions, test channel events)
- Use named parameters for improved readability
Performance impact:
- Before: 24:07 minutes (1,447 seconds)
- After: 1:09 minutes (69 seconds)
- Speedup: ~21x faster
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Realtime: Use getLastEmailByAddress with userId probe instead of getLastEmail
to prevent email race conditions in parallel execution; add status assertions
on verification/recovery PUT responses for clearer failure diagnostics
- Avatars: Wrap external URL image fetches in assertEventually to retry
transient network failures from appwrite.io
- Migrations: Increase performMigrationSync timeout from 10s to 60s
- GraphQL: Increase attribute polling timeouts from 60s to 120s with 500ms
intervals to accommodate PostgreSQL under CI load
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add helper methods createCollectionWithAttribute(), createTableWithAttribute(),
createCollectionWithIndex(), createTableWithIndex() to RealtimeConsoleClientTest
- Add createTeam() helper to RealtimeCustomClientTest
- Replace all @depends annotations with direct helper method calls
- Enable tests to run in parallel with --functional flag
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Updated Realtime adapter to handle queries during subscription.
- Added query filtering capabilities in RuntimeQuery class.
- Modified RealtimeBase and RealtimeCustomClientTest to support query parameters in WebSocket connections.
- Improved test coverage for account and database channels with queries.
- Updated the Create.php file to streamline the embedding creation process by removing unnecessary authentication checks and simplifying the parameter structure.
- Changed the parameter from 'documents' to 'texts' for clarity and adjusted the embedding model handling.
- Modified the response model to include error handling for embedding generation.
- Updated the Embedding response model to reflect changes in dimension naming and added error message handling.
- Refactored VectorDBCollection model to replace 'dimensions' with 'dimension' for consistency across the codebase.
- Adjusted all relevant tests to accommodate the new parameter names and response structures, ensuring comprehensive coverage for the updated functionality.