From b2e00e4f26b9734c0fef148de08c4af9c0dc3b67 Mon Sep 17 00:00:00 2001 From: Richard McDaniel <1130888+rmcdaniel@users.noreply.github.com> Date: Sun, 25 Oct 2026 20:40:03 +0000 Subject: [PATCH] CI: give PHPUnit Feature's backup MySQL room for the whole suite On #764's PHPUnit Feature run, the backup MySQL container died twice in a row near the end of the suite (connection refused, then its name no longer resolved) inside WorkflowTaskRepairRaceTest, and the third attempt passed. Locally, CI's exact MySQL image, flags and 512 MiB cap, running only the six test files that use it, grew from 305 MiB to 473 MiB (92% of the cap), peaking in the last two race-test files. Each of those creates and migrates fresh databases, and performance_schema, which the race tests read for lock waits, keeps the instrumentation. The suite grew with WorkerSessionRegistrationRaceTest (#740), which put the run within reach of the cap. The container now gets 1 GiB. A failed suite also records each test service's state (OOM-killed, exit code, finish time) and its last 40 log lines before cleanup, so the next service failure says why. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/phpunit-feature.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/phpunit-feature.yml b/.github/workflows/phpunit-feature.yml index fbafb0523..2898526d6 100644 --- a/.github/workflows/phpunit-feature.yml +++ b/.github/workflows/phpunit-feature.yml @@ -241,7 +241,7 @@ jobs: docker run --detach \ --name "dw-server-backup-mysql-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}" \ --network "dw-server-feature-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}" \ - --memory 512m --memory-swap 512m \ + --memory 1g --memory-swap 1g \ --env MYSQL_ALLOW_EMPTY_PASSWORD=yes --env MYSQL_ROOT_HOST=% \ --health-cmd='mysqladmin --silent --host=127.0.0.1 ping' \ --health-interval=1s --health-start-period=20s --health-retries=30 \ @@ -344,6 +344,17 @@ jobs: docker volume rm -f "${DW_FIRST_RUN_SCOPE}-database" >/dev/null 2>&1 || true docker image rm durable-workflow-server-context-candidate >/dev/null 2>&1 || true + # The service containers stay until the cleanup below, so a failed + # suite records whether one was OOM-killed or exited, and its last log. + - name: Show test service state after a failure + if: failure() + run: | + for service in s3 backup-mysql backup-pgsql; do + name="dw-server-${service}-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}" + docker inspect --format "${name}: status={{.State.Status}} oom_killed={{.State.OOMKilled}} exit={{.State.ExitCode}} finished={{.State.FinishedAt}} error={{.State.Error}}" "$name" || true + docker logs --tail 40 "$name" 2>&1 || true + done + - name: Clean up test services if: always() run: |