feat: full layer deletion flow (MAPCO-7285) - #107
Merged
Conversation
…ngTaskTypes (MAPCO-7285)
…nd package-lock.json
…-7285) The tiles-deletion cleaner task now carries the layer's storage path from the mapproxy cache directory instead of the catalogId: - MapproxyApiClient.getS3CacheBucketName -> getLayerCache, returning the full cache (directory + bucket) for the configured cache type, undefined on 404. - DeleteLayerHandler resolves the tiles location from the cache and persists it into the task params before any deletion step, so a redelivered task survives the deleteFromMapproxy step that destroys the cache. S3 drops the leading slash (object keys are lstripped); FS drops the first segment (the mapproxy PVC mount) so the Cleaner can rejoin its own base path. - Refactor the handler for readability: data-driven deletion-step loop, single telemetry object, and extracted toRelativeTilesPath / resolveTilesBucket.
CL-SHLOMIKONCHA
requested changes
Jul 13, 2026
…and update references
…ror conditionally
CL-SHLOMIKONCHA
approved these changes
Jul 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issues: MAPCO-7285
Overview
Implements the full-layer deletion flow in the overseer. A
Delete_Layerjob with adeletetask drives ordered removal of a layer's metadata across every system that references it, then hands tile (and, later, artifact) cleanup off to the Cleaner via a downstreamtiles-deletiontask.What this adds
Per-client deletion methods
CatalogClient.deleteRecord— remove the catalog record.GeoserverClient:unpublishLayer→ performs the geoserver unpublish.PolygonPartsMangerClient.deleteEntities— drop the polygon-parts entities.MapproxyApiClient.removeLayer— remove the layer from mapproxy (treats a 404 as already-removed / idempotent).Storage / cache plumbing
artifactsBucketandtilesBucket(helm + config), guarded bytilesStorageProvider.MapproxyApiClient.getLayerCachereturns the layer's cache object (directory + bucket) for the configured cache type, orundefinedon 404.DeleteLayerHandler(Delete_Layer/delete)deleteFromMapproxystep destroys the cache, so a redelivered task reads the location from its own params instead of re-querying a layer that no longer exists.directory(not the catalogId): S3 drops the leading slash (object keys are lstripped by mapproxy), FS drops the first segment (the mapproxy PVC mount) so the Cleaner rejoins its own base path. S3 also carries the bucket (cachebucket_name, falling back to configuredtilesBucket).tiles-deletioncleaner task once all metadata steps complete, with an idempotency guard against duplicate creation on redelivery.Wiring
Delete_Layerjob anddeletetask in the polling config and DI container.configUtil: extracted per-domain polling-task-type selection intogetPollingTaskTypes.Notes / follow-ups
TODOin the handler): mapproxy'sGET /layerdoes not expose artifacts, so the existence source-of-truth and params shape are unresolved.Tests
getLayerCache, and the fullDeleteLayerHandlerflow (step ordering + per-step persistence, redelivery skip, FS/S3 path + bucket resolution, cleaner-task idempotency, and unresolvable-cache rejection).tsc --noEmit, eslint, and prettier clean.