From 134cf4ccf160e685d114b26bcfba84f420a35fbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Sun, 17 May 2026 21:57:55 +0200 Subject: [PATCH] Simplify BRouter healthcheck to port liveness; add routing wait in CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The routing probe healthcheck was too strict — BRouter is up but may not have the segment loaded yet, causing all probes to fail. Use a simple liveness check (curl exit 0 when server responds on any code) so --wait unblocks as soon as the server is up. Add an explicit routing readiness wait step in CI that actually confirms a route can be computed before running E2E tests. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/ci.yml | 7 +++++++ docker-compose.dev.yml | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd213d8..665fad8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -209,6 +209,13 @@ jobs: env: BROUTER_URL: http://localhost:17777 + - name: Wait for BRouter routing + run: | + for i in $(seq 1 30); do + curl -sf 'http://localhost:17777/brouter?lonlats=13.4,52.5|13.5,52.5&profile=trekking&format=geojson' > /dev/null 2>&1 && break + sleep 3 + done + - name: Push database schema run: pnpm db:push diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 2a6d7a9..ff29112 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -24,11 +24,11 @@ services: volumes: - brouter_segments:/data/segments healthcheck: - test: ["CMD-SHELL", "curl -sf 'http://localhost:17777/brouter?lonlats=13.4,52.5|13.5,52.5&profile=trekking&format=geojson' > /dev/null"] - interval: 10s - timeout: 10s - retries: 18 - start_period: 30s + test: ["CMD-SHELL", "curl -s http://localhost:17777/ > /dev/null 2>&1"] + interval: 5s + timeout: 5s + retries: 30 + start_period: 10s prometheus: image: prom/prometheus:latest