Fix BRouter segment cache key: include version to avoid format mismatch

The segment format changed between BRouter 1.7.8 and 1.7.9. The old
cache key 'brouter-segment-E10_N50' served the v1.7.8 segment to the
v1.7.9 binary, causing 'lookup version mismatch (old rd5?)' errors on
every routing request.

Include the BRouter version in the cache key so a fresh segment is
downloaded whenever the binary version changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-05-17 23:06:30 +02:00
parent 66ce852e96
commit d2a0b6e398
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9

View file

@ -196,7 +196,7 @@ jobs:
uses: actions/cache@v5
with:
path: /tmp/brouter-segments
key: brouter-segment-E10_N50
key: brouter-segment-E10_N50-v1.7.9
- name: Download Berlin segment
if: steps.segment-cache.outputs.cache-hit != 'true'
@ -220,9 +220,7 @@ jobs:
- name: Wait for BRouter routing
run: |
for i in $(seq 1 60); do
RESP=$(curl -s 'http://localhost:17777/brouter?lonlats=13.4,52.5|13.5,52.5&profile=trekking&format=geojson' 2>/dev/null)
echo "attempt $i: $(echo "$RESP" | head -c 80)"
echo "$RESP" | grep -q "FeatureCollection" && echo "BRouter ready" && break
curl -s 'http://localhost:17777/brouter?lonlats=13.4,52.5|13.5,52.5&profile=trekking&format=geojson' 2>/dev/null | grep -q "FeatureCollection" && echo "BRouter ready" && break
[ "$i" = "60" ] && echo "BRouter not ready after 120s" && exit 1
sleep 2
done