fix(compose): smoke lane이 기반 서비스를 먼저 띄우고 앱을 띄운다
pr / done (pull_request) Canceled after 0s

문제: compose smoke는 lane의 오래 도는 서비스를 `up --wait` 한 번에 함께 띄운다.
앱과 Kafka가 동시에 뜨면 앱의 producer가 아직 연결을 받지 않는 broker에 붙어
재시도 WARN을 남기고, 「기동 로그가 조용하다」 검사가 실패한다. main 수동 run 59
(2026-11-11)의 local-messaging lane이 이것으로 실패했다. 같은 lane이 바로 앞
run과 desktop에서는 통과했다(시간 경쟁).

고른 방법: smoke 스크립트가 app이 아닌 서비스를 먼저 `up --wait`로 healthy까지
띄우고, 그다음 app까지 `up --wait`한다. 모든 lane이 app을 가진다. 개발용
compose.yaml은 바꾸지 않는다.

버린 대안: compose.yaml의 app에 kafka `depends_on`(service_healthy)을 거는 것.
app은 profile이 다른 여러 lane과 개발 환경이 함께 쓰고, 꺼진 profile의 서비스를
기다리게 되면 그 구성이 시작하지 못한다(`required: false`는 Compose 2.20부터).

위험·한계: lane마다 기반 서비스가 healthy가 될 때까지 기다리는 만큼 lane이 조금
길어진다. 그전에도 `up --wait`가 그만큼 기다렸으므로 차이는 작다.

검증: desktop에서 local-messaging lane, runner nightly 수동 실행(이 PR 본문에 적는다).
This commit is contained in:
DongHyeonka
2026-11-12 07:53:10 +09:00
parent aeb6033990
commit 083c6910fa
+10 -1
View File
@@ -425,8 +425,17 @@ run_lane() {
done 4< <(jq -r '.preStartServices[]?' <<<"${lane_json}")
# 3. long-running services only. A one-shot is not a --wait target: it is meant to exit.
local long_running
local long_running backing
long_running="$(jq -r '.longRunningServices[]' <<<"${lane_json}")"
# The backing services first, until healthy, then the application. Started together, the
# application met a Kafka broker that did not accept connections yet, its producer logged the
# retries, and the silent-startup check below failed on a race rather than a defect (local-messaging,
# main run 59, 2026-11-11; the same lane passed in the run before and on the desktop).
backing="$(grep -vx app <<<"${long_running}" || true)"
if [[ -n "${backing}" ]]; then
# shellcheck disable=SC2086
( cd "${REPO_ROOT}" && docker compose -p "${PROJECT}" "${LANE_ARGS[@]}" up --wait --wait-timeout 300 ${backing} )
fi
# shellcheck disable=SC2086
( cd "${REPO_ROOT}" && docker compose -p "${PROJECT}" "${LANE_ARGS[@]}" up --wait --wait-timeout 300 ${long_running} )