From 596f44aa26bf3711cd5775d111105e09a34916a0 Mon Sep 17 00:00:00 2001 From: zstadler Date: Wed, 29 Sep 2021 16:55:19 +0300 Subject: [PATCH] Integrity check for DIFF mode (#1245) This test applies 2-3 months of weekly updates on the `europe/monaco` extract from [Geofabrik](http://download.geofabrik.de/europe/). It is worth noting that the contents of the updates may vary, and some SQL update flows may not be tested if the relevant changes did not occur during that period. Resolves #1226 --- .github/workflows/integrity.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/integrity.yml b/.github/workflows/integrity.yml index e04bdf2e..5ba95030 100644 --- a/.github/workflows/integrity.yml +++ b/.github/workflows/integrity.yml @@ -36,3 +36,36 @@ jobs: run: | export TEST_MODE=yes make generate-devdoc + + - name: Run quickstart and update in DIFF mode + env: + area: europe/monaco + QUIET: 1 + run: | + echo MIN_ZOOM=0 >> .env + echo MAX_ZOOM=14 >> .env + echo DIFF_MODE=true >> .env + # Cleanup + rm -fr data build cache + # Create data/$area.repl.json + make download-geofabrik area=$area + # Download 2+ month old data + export old_date=$(date --date="$(date +%Y-%m-15) -2 month" +'%y%m01') + echo Downloading $old_date extract of $area + docker-compose run --rm --user=$(id -u):$(id -g) openmaptiles-tools sh -c "wget -O data/$area.osm.pbf http://download.geofabrik.de/$area-$old_date.osm.pbf" + # Initial import and tile generation + ./quickstart.sh $area + sleep 2 + echo Downloading updates + # Loop to recover from potential "ERROR 429: Too Many Requests" + docker-compose run --rm --user=$(id -u):$(id -g) openmaptiles-tools sh -c " + while ! osmupdate --keep-tempfiles --base-url=$(sed -n 's/ *\"replication_url\": //p' data/$area.repl.json) data/$area.osm.pbf data/changes.osc.gz ; do + sleep 2; + echo Sleeping...; + sleep 630; + done" + echo Downloading updates completed + echo Importing updates + make import-diff + echo Generating new tiles + make generate-tiles-pg