From 4922103b32ea6452f5eb4aaba803b37623bc8f35 Mon Sep 17 00:00:00 2001 From: Hideyuki MORI Date: Thu, 21 May 2026 21:53:39 +0900 Subject: [PATCH] =?UTF-8?q?ci:=20HTTP=20smoke=20=E3=81=AE=20health=20?= =?UTF-8?q?=E5=BE=85=E6=A9=9F=E3=82=92=20120s=20=E3=81=AB=E5=BC=95?= =?UTF-8?q?=E3=81=8D=E4=B8=8A=E3=81=92=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #284 の CI が 60s timeout で fail。app コンテナの init (composer install + ./init.sh + apache 起動) が cold GitHub Actions runner で 60-90s かかる場合があり、現状の 60s budget では収まらないことが あった。 120s に bump して余裕を持たせる。tail-end runner の実測で 90s 超え るケースを想定。コメントに「90s 未満に減らす時は実 runner で確認 すること」と注記。 無関係 PRs にも影響なし (既存 deployment は変わらず、CI のみ修正)。 Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/tests.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 68af98e..b19185b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -53,7 +53,13 @@ jobs: # Require healthStatus=ok (not just HTTP 200), because /health returns # 200 even when the database is degraded — letting smoke tests run too # early and fail with SQLSTATE[HY000] [2002] Connection refused. - for i in $(seq 1 60); do + # + # 120s budget: the app container's init does composer install + + # ./init.sh + apache startup, which can take 60-90s on a cold GitHub + # Actions runner. MySQL is also still finishing its first-boot init at + # the start of this window. Don't reduce below ~90s without checking + # tail-end runs on actually-slow runners. + for i in $(seq 1 120); do status=$(curl -fsS http://localhost:8080/health/index 2>/dev/null | jq -r '.Data.healthStatus // "unknown"') if [ "$status" = "ok" ]; then echo "App became healthy (healthStatus=ok) after ${i}s" @@ -61,7 +67,7 @@ jobs: fi sleep 1 done - echo "App did not reach healthStatus=ok within 60s" >&2 + echo "App did not reach healthStatus=ok within 120s" >&2 docker compose logs app | tail -100 >&2 docker compose logs mysql | tail -50 >&2 exit 1