From 912ee06d145b54c9076fd2077424bf25539006b5 Mon Sep 17 00:00:00 2001 From: konrad Date: Wed, 5 Aug 2026 16:44:15 +0200 Subject: [PATCH] TT-17874: bound docker-compose log collection with a timeout The "Docker logs for all components" step in the reporting action runs `docker compose ... logs`, which can hang if a container is unresponsive and otherwise burns the whole test job's timeout. Wrap it in `timeout 300` (composite action steps can't take timeout-minutes), emit a warning on miss, and keep it best-effort so a slow log dump never fails the job. Shared by API and UI tests. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/actions/tests/reporting/action.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/actions/tests/reporting/action.yaml b/.github/actions/tests/reporting/action.yaml index 0d67a7c..ef3c1f1 100644 --- a/.github/actions/tests/reporting/action.yaml +++ b/.github/actions/tests/reporting/action.yaml @@ -49,7 +49,13 @@ runs: pull_policy: 'if_not_present' ECR: ${{ steps.ecr.outputs.registry }} run: | - docker compose -p auto -f pro-ha.yml -f deps_pro-ha.yml -f ${{ matrix.envfiles.db }}.yml -f ${{ matrix.envfiles.cache }}.yml --env-file versions.env --profile all logs | sort > ${{ github.workspace }}/docker-compose.log + # Cap log collection: `docker compose logs` can hang if a container is + # unresponsive, which otherwise runs the job to its full timeout. `timeout` + # kills it after 5m; a miss just means slightly truncated diagnostic logs. + # (Composite-action steps can't take timeout-minutes, so we bound the cmd.) + timeout 300 docker compose -p auto -f pro-ha.yml -f deps_pro-ha.yml -f ${{ matrix.envfiles.db }}.yml -f ${{ matrix.envfiles.cache }}.yml --env-file versions.env --profile all logs > ${{ github.workspace }}/docker-compose.raw.log 2>&1 \ + || echo "::warning::docker compose logs did not complete within 300s; logs may be truncated" + sort ${{ github.workspace }}/docker-compose.raw.log > ${{ github.workspace }}/docker-compose.log echo "::group::DockerLogs" cat ${{ github.workspace }}/docker-compose.log echo "::endgroup::"