feat: carry tiles storage on the tiles-deletion task params (MAPCO-11294) - #117
Merged
Merged
Conversation
…294)
Adopt the provider-aware tilesDeletionParamsSchema from raster-shared 9.0.0-alpha.0
so the Cleaner locates tiles from the task params instead of its own configuration.
The range-based tiles-deletion params are now a discriminated union on
storageProvider, so the flat shape no longer typechecks:
- FS -> { storageProvider, subPath } from storage.internalPvc.tilesSubPath
- S3 -> { storageProvider, bucket } from S3.tilesBucket
- tilesPath -> tilesRelativePath, sourceProvider -> storageProvider
Storage is resolved once in the constructor and spread into every emitted task,
mirroring DeleteLayerHandler.createCleanerTasks.
Note: the emitted task params contract changed. The Cleaner keeps reading the FS
sub-path from its own config until MAPCO-11295 lands.
vitaligi
requested changes
Aug 9, 2026
vitaligi
left a comment
Contributor
There was a problem hiding this comment.
side note buildTasks() & pushTasks() should be private on TileDeletionTaskManager
vitaligi
requested changes
Aug 9, 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-11294
Epic: MAPCO-11261 — Redis cache deletion, move to cleaner
Further information:
Summary
Makes the FS variant of the range-based
tiles-deletiontask carry its ownsubPath, so the Cleaner locates tiles from the task params instead of from its own configuration — mirroring what the S3 variant does withbucket.Why this is more than one added field
The ticket describes adding
subPath, but raster-shared9.0.0-alpha.0(MAPCO-11262) rebuilttilesDeletionParamsSchemaas a realz.discriminatedUnion('storageProvider', …). The old flat shape no longer typechecks at all, so adopting it means renaming the discriminator and supplying the per-provider locator on both branches — not just the FS one.src/task/models/deletionTaskManager.ts:{ storageProvider: 'FS', subPath }fromstorage.internalPvc.tilesSubPath— the ticket's actual ask.{ storageProvider: 'S3', bucket }fromS3.tilesBucket— required by the union, not optional to skip.tilesPath→tilesRelativePath,sourceProvider→storageProvider.Storage is resolved once in the constructor (
resolveTilesStorage()) and spread into every emitted task, mirroringDeleteLayerHandler.createCleanerTasks. Both config keys were already plumbed through Helm by MAPCO-11213, so there are no config or chart changes here.Contract change — needs MAPCO-11295
The task params overseer emits changed shape. The Cleaner keeps reading the FS sub-path from its own
strategies.tilesDeletion.fsSubPathconfig until MAPCO-11295 lands, so the new field is inert until then. That ticket must ship before this reaches production.