From 8dadcfeebeb0a9e784fa65033e4bbd2a33654173 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 6 Feb 2026 04:15:56 +1300 Subject: [PATCH] fix: run Databases and FunctionsSchedule tests sequentially 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 --- .github/workflows/tests.yml | 44 +++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1aa431bfc0..351bc71f58 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -220,12 +220,22 @@ jobs: SERVICE_PATH="/usr/src/code/tests/e2e/Services/${{ matrix.service }}" - echo "Running with paratest (parallel) for: ${{ matrix.service }}" - docker compose exec -T \ - -e _APP_DATABASE_SHARED_TABLES \ - -e _APP_DATABASE_SHARED_TABLES_V1 \ - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ - appwrite vendor/bin/paratest --processes $(nproc) "$SERVICE_PATH" --exclude-group abuseEnabled --exclude-group screenshots + # Use single process for Databases and FunctionsSchedule to avoid overwhelming the worker + if [ "${{ matrix.service }}" == "Databases" ] || [ "${{ matrix.service }}" == "FunctionsSchedule" ]; then + echo "Running sequentially for: ${{ matrix.service }}" + docker compose exec -T \ + -e _APP_DATABASE_SHARED_TABLES \ + -e _APP_DATABASE_SHARED_TABLES_V1 \ + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ + appwrite test "$SERVICE_PATH" --exclude-group abuseEnabled --exclude-group screenshots + else + echo "Running with paratest (parallel) for: ${{ matrix.service }}" + docker compose exec -T \ + -e _APP_DATABASE_SHARED_TABLES \ + -e _APP_DATABASE_SHARED_TABLES_V1 \ + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ + appwrite vendor/bin/paratest --processes $(nproc) "$SERVICE_PATH" --exclude-group abuseEnabled --exclude-group screenshots + fi - name: Failure Logs if: failure() @@ -309,12 +319,22 @@ jobs: SERVICE_PATH="/usr/src/code/tests/e2e/Services/${{ matrix.service }}" - echo "Running with paratest (parallel) for: ${{ matrix.service }}" - docker compose exec -T \ - -e _APP_DATABASE_SHARED_TABLES \ - -e _APP_DATABASE_SHARED_TABLES_V1 \ - -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ - appwrite vendor/bin/paratest --processes $(nproc) "$SERVICE_PATH" --exclude-group abuseEnabled --exclude-group screenshots + # Use single process for Databases and FunctionsSchedule to avoid overwhelming the worker + if [ "${{ matrix.service }}" == "Databases" ] || [ "${{ matrix.service }}" == "FunctionsSchedule" ]; then + echo "Running sequentially for: ${{ matrix.service }}" + docker compose exec -T \ + -e _APP_DATABASE_SHARED_TABLES \ + -e _APP_DATABASE_SHARED_TABLES_V1 \ + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ + appwrite test "$SERVICE_PATH" --exclude-group abuseEnabled --exclude-group screenshots + else + echo "Running with paratest (parallel) for: ${{ matrix.service }}" + docker compose exec -T \ + -e _APP_DATABASE_SHARED_TABLES \ + -e _APP_DATABASE_SHARED_TABLES_V1 \ + -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ + appwrite vendor/bin/paratest --processes $(nproc) "$SERVICE_PATH" --exclude-group abuseEnabled --exclude-group screenshots + fi - name: Failure Logs if: failure()