With 120+ jobs starting simultaneously, transient failures are common
due to resource contention. Adding retry_wait_seconds: 300 to all
php-retry action usages gives the CI environment time to settle
before retrying failed tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Site Screenshots CI jobs were missing the "Wait for Open Runtimes"
step that other E2E test jobs have, causing deployments to fail with
"Failed to connect to exc1 port 80" when the executor wasn't ready yet.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Services that depend on shared static state between test methods
(Databases, Functions, Realtime) now run without --functional flag,
so test methods execute sequentially within each class while classes
still run in parallel. All other services keep --functional mode.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
With --functional mode, each test method runs in its own process so
static caches are empty. This causes every method to recreate projects,
databases, collections, attributes, and indexes - flooding the serial
database worker queue and causing attribute polling timeouts.
File-based caching with file locks ensures resources are created once
per test class, then shared across all method processes. This restores
--functional mode and dramatically reduces worker queue load.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
With --functional mode, every test method gets its own process with no
static cache sharing. This causes each method to independently create
databases, collections, and attributes, flooding the serial database
worker queue. Without --functional, each test class shares static caches
between methods, dramatically reducing schema operation count.
Also reverts _APP_WORKERS_NUM change since worker must remain serial.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Database tests (PostgreSQL, Shared V1, Shared V2) consistently take
31-32 minutes, just exceeding the 30-minute timeout. Increase to 40
minutes for all E2E service tests to prevent false timeout failures.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add --exclude-group ciIgnore to paratest commands in tests.yml
(the @group ciIgnore annotation was defined but never excluded)
- Increase attribute/index polling timeouts in RealtimeConsoleClientTest
from 15s to 120s for Shared V2 stability
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The retry action couldn't extract the container name from docker compose
exec commands to copy the JUnit XML. Using a relative path works because
CWD inside the container is /usr/src/code and the volume mount
./tests:/usr/src/code/tests makes the file accessible at the same
relative path on both container and host.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- testCreateIndexes: conditionally check index length based on adapter's maxIndexLength (MongoDB 1024 vs SQL 768)
- testConcurrentTransactionConflicts: accept both 409 and 500 since MongoDB adapter doesn't map write conflicts to ConflictException
- testEnforceCollectionPermissions: add error body to assertion for debugging
- Enable --log-junit for paratest in both project and shared mode CI jobs so itznotabug/php-retry@v3 can identify and selectively retry failing tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The e2e_service_test job's command block had corrupted shell syntax from
a bad merge - orphaned elif/else without matching if, and duplicate
if-elif blocks for DB adapter env vars. The set-db-env step already sets
these via GITHUB_ENV, making the inline exports redundant.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add COMPOSE_FILE=docker-compose.yml to tests, benchmark, and sdk-preview to prevent loading overrides in CI
- Add target: development to tests/benchmark builds, target: production to pr-scan/nightly builds
- Bump actions/checkout v4→v6, docker/build-push-action v4/v5→v6, actions/upload-artifact v4→v6, actions/github-script v7→v8
- Pin composer images to 2.8 in linter and static-analysis workflows
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add profiles to database services (mariadb, mongodb, postgresql) so only
the needed database starts per CI job, freeing resources for the executor
- Increase Sites deployment activation timeouts from 50-100s to 200s for
MongoDB compatibility
- Increase SSR logs polling timeout from 30s to 120s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The appwrite container's `dns: 172.16.238.100` (CoreDNS) bypassed Docker's
embedded DNS, preventing resolution of service names like `postgresql`.
CoreDNS only handles custom test domains and forwards unknown queries to
Cloudflare, which can't resolve Docker service names.
Fix: Add 127.0.0.11 (Docker embedded DNS) as primary resolver and configure
CoreDNS to forward unknown queries to Docker DNS with Cloudflare as fallback.
Bind CoreDNS to its static IP to avoid port conflict with Docker's DNS proxy.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PDO ATTR_TIMEOUT does not control connection timeout for the pgsql driver.
Without connect_timeout in the DSN, the PDO constructor blocks indefinitely
if PostgreSQL isn't ready, which blocks the Swoole master process event loop
(since coroutine hooks are not enabled in http.php) and prevents all HTTP
request dispatching.
Also add appwrite server logs to CI failure output for debugging.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The .env defaults were changed to mongodb, but tests that don't
explicitly set a DB adapter (general, shared mode, abuse, screenshots)
were implicitly using the default. These tests need MariaDB since
shared tables mode is not supported with MongoDB yet.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Parallel test execution with paratest overwhelms the single databases
worker when many tests create attributes simultaneously. Run these
specific services sequentially with PHPUnit to ensure the worker
can keep up with attribute processing jobs.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The --functional flag cannot be used because tests rely on static
properties to share state between test methods (e.g., $databaseId
set in testCreateDatabase is used by testCreateTable). With --functional,
each test method runs in a separate process so these properties are not
initialized.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The root cause of flaky attribute processing tests is that a single
appwrite-worker-databases container cannot keep up with attribute
creation jobs when tests run in parallel via paratest.
This fix:
- Scales the databases worker to 4 instances during E2E service tests
- Reverts timeout increases that masked the underlying issue
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
PHPUnit 11+ warns when using comma-separated values with --exclude-group.
This warning causes the tests to return exit code 1 despite all tests passing.
Fix by using separate --exclude-group flags for each group.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>