From 0d5d622276434bd7c2d17d5e32dfd4a688328719 Mon Sep 17 00:00:00 2001 From: Yorick de Wid Date: Thu, 6 Aug 2026 14:56:57 +0000 Subject: [PATCH] chore(tiles): retire the last tippecanoe builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flips generate_tileset off for facade_scan and the four incident tilesets, now served dynamically by Martin. Applied to prod 2026-08-06; this records it in git. Removes ~40 of the ~50 minutes process_mapset spends nightly (the whole flow should go ~101 -> ~60 min) and stops regenerating 231,641 Spaces objects for 8,774 features. enabled and upload_dataset deliberately stay true on all six bundles: enabled=false would hit the both-flags-off early return from #53 and skip the bundle entirely, killing the nightly GPKG export to s3://fundermaps-data/mapset/ that is the permanent static-model history. The migration asserts neither flag was lost. No bundle generates tiles after this — process_mapset is now a pure GPKG exporter and tippecanoe is unused by the nightly flow. Co-Authored-By: Claude Opus 5 (1M context) --- sql/migrate/retire_tippecanoe_tilesets.sql | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 sql/migrate/retire_tippecanoe_tilesets.sql diff --git a/sql/migrate/retire_tippecanoe_tilesets.sql b/sql/migrate/retire_tippecanoe_tilesets.sql new file mode 100644 index 0000000..dcb3f37 --- /dev/null +++ b/sql/migrate/retire_tippecanoe_tilesets.sql @@ -0,0 +1,51 @@ +-- Retire the last tippecanoe tile builds (2026-08-06). +-- +-- facade_scan and the four incident tilesets are now served dynamically by +-- the Martin tileserver from maplayer function sources — see +-- sql/model/create_facade_scan_tiles.sql and create_incident_tiles.sql. +-- WebFront #290 and FunderMapsReport #65 point at tiles.fundermaps.com. +-- +-- Measured cost of the builds this removes (flow job 019fcdee, 2026-08-05): +-- incident_district 26.5 min 155,335 Spaces objects 1,016 features +-- incident_neighborhood 11.5 min 67,346 objects 1,530 features +-- incident 2.0 min 7,373 objects 2,728 features +-- facade_scan 1.0 min 1,090 objects 3,202 features +-- incident_municipality 0.5 min 497 objects 298 features +-- ~40 of the ~50 min process_mapset spent nightly; the whole flow should drop +-- from ~101 min to ~60 min. +-- +-- ONLY generate_tileset flips. enabled and upload_dataset MUST stay true: +-- - enabled=false makes processOne skip the bundle entirely (the both-flags- +-- off early return added in #53), which would also kill the GPKG export. +-- - upload_dataset drives the nightly export to s3://fundermaps-data/mapset/, +-- the permanent history of the static model. Do not turn it off. +-- After this, no bundle generates tiles; process_mapset is a pure GPKG +-- exporter and tippecanoe is unused by the nightly flow. +-- +-- Rollback: set generate_tileset = true for these five and revert the two +-- frontend PRs. The static tiles are still in fundermaps-tileset (stale from +-- whenever the purge happens) until they are deleted. + +UPDATE maplayer.bundle + SET generate_tileset = false + WHERE tileset IN ( + 'facade_scan', + 'incident', + 'incident_district', + 'incident_municipality', + 'incident_neighborhood' + ); + +-- Guard: this migration must not have disabled a bundle or stopped an export. +DO $$ +DECLARE + broken integer; +BEGIN + SELECT count(*) INTO broken + FROM maplayer.bundle + WHERE NOT enabled OR NOT upload_dataset; + IF broken > 0 THEN + RAISE EXCEPTION + 'refusing: % bundle row(s) lost enabled or upload_dataset', broken; + END IF; +END $$;