Skip to content

feat: tiles deletion creation (MAPCO-5735)#95

Open
razbroc wants to merge 16 commits into
masterfrom
feat/tiles-deletion-skeleton
Open

feat: tiles deletion creation (MAPCO-5735)#95
razbroc wants to merge 16 commits into
masterfrom
feat/tiles-deletion-skeleton

Conversation

@razbroc
Copy link
Copy Markdown
Contributor

@razbroc razbroc commented May 7, 2026

Question Answer
Bug fix
New feature
Breaking change
Deprecations
Documentation
Tests added
Chore

Related issues: #MAPCO-5735

This pull request introduces several enhancements and refactors to support a new report storage provider, improve S3 integration, and add new ingestion task types. The most significant changes include configuration and infrastructure updates for report storage, the addition of a new tile deletion ingestion task, and improvements to error handling and external service integration.

Storage Provider and S3 Integration:

  • Added support for a reportStorageProvider option in configuration files (config/default.json, config/custom-environment-variables.json) and Helm charts (helm/templates/configmap.yaml, helm/values.yaml) to allow the selection of storage backends for reports, similar to existing GPKG and tile storage providers. [1] [2] [3] [4]
  • Updated Helm configuration logic to ensure S3-related environment variables are set if either the GPKG or report storage providers use S3.
  • Refactored the StorageProvider type in src/common/constants.ts to use values from @map-colonies/raster-shared, ensuring consistency across the codebase. [1] [2] [3]

Ingestion Task Enhancements:

  • Introduced a new tilesDeletion ingestion task type, including configuration options (type, tileBatchSize, taskBatchSize) and corresponding TypeScript interfaces. [1] [2] [3]
  • Updated the ingestion job handler to build and push tile deletion tasks using the new TileDeletionTaskManager, ensuring deletion tasks are processed before merge tasks. [1] [2] [3]

Dependency and Infrastructure Updates:

  • Bumped the @map-colonies/raster-shared package to version 8.1.0-alpha.3, enabling new features and types.
  • Added the unzip utility to the Docker image to support expanded data handling requirements.
  • Ensured S3 configuration is injected for both ingestion and export service instances in the dependency container setup.

Error Handling and External Service Integration:

  • Added a new IntersectionError class for improved error reporting when handling intersection operations with the polygon parts manager.
  • Extended the PolygonPartsMangerClient to support intersection requests, including error handling and logging for intersection failures. [1] [2]

razbroc and others added 10 commits April 26, 2026 18:07
…gurations

Co-authored-by: Copilot <copilot@github.com>
…ion in task building

Co-authored-by: Copilot <copilot@github.com>
…e for downloading reports

Co-authored-by: Copilot <copilot@github.com>
… refactor related interfaces and task parameters

Co-authored-by: Copilot <copilot@github.com>
…efining deletion task creation

Co-authored-by: Copilot <copilot@github.com>
razbroc and others added 6 commits May 7, 2026 14:37
Co-authored-by: Copilot <copilot@github.com>
…and deletion task manager

Co-authored-by: Copilot <copilot@github.com>
…URL handling

- Removed S3Service dependency from TileDeletionTaskManager and updated report handling to use a URL instead of a path.
- Modified readConflictFeatures function to download ZIP reports from a URL and extract shapefiles.
- Enhanced logging messages for clarity in TileMergeTaskManager.
- Cleaned up FSService constructor and type annotations for better readability.

Co-authored-by: Copilot <copilot@github.com>
@CL-SHLOMIKONCHA CL-SHLOMIKONCHA changed the title feat: tiles deletion creation MAPCO-5735 feat: tiles deletion creation (MAPCO-5735) May 11, 2026
TELEMETRY_METRICS_BUCKETS: {{ $metrics.buckets | toJson | quote }}
{{ end }}
{{- if eq (upper $storage.gpkgProvider) "S3" }}
{{- if (eq (upper $storage.gpkgProvider) "S3") }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REVERT

Comment thread helm/values.yaml
type: ""
finalize:
type: ""
merge:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add "tilesDeletion" task types values

Comment thread src/common/constants.ts
} as const;
/* eslint-enable @typescript-eslint/naming-convention */

export type StorageProvider = (typeof StorageProvider)[keyof typeof StorageProvider];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export type StorageProvider = Omit<typeof SourceType, 'GPKG'>


public async getIntersection(polygonPartsEntityName: string, payload: IntersectionFeatureCollection): Promise<IntersectedFeatureCollection> {
try {
this.logger.info({ msg: 'getIntersection', polygonPartsEntityName });
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please change to debug log level and print the union geometry (fc)

const { polygonPartsEntityName } = this.validateAndGenerateLayerNameFormats(job);
const layerRelativePath = taskBuildParams.taskMetadata.layerRelativePath;

const deletionTasks = this.tileDeletionTaskManager.buildTasks(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the buildTasks - define a dedicated type like we did on merge task type and reuse it

const span = createChildSpan(`${TileDeletionTaskManager.name}.createTasksForPart.zoom.${zoom}`, parentSpan);

try {
const part = turfFeature(geometry);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feature

const fileStream = createReadStream(filePath);

fileStream.on('data', (data) => {
fileStream.on('data', (data: string | Uint8Array<ArrayBuffer>) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check again

Comment thread package.json
"@map-colonies/mc-priority-queue": "^9.1.0",
"@map-colonies/mc-utils": "^5.1.0",
"@map-colonies/raster-shared": "^7.10.2",
"@map-colonies/raster-shared": "^8.1.0-alpha.3",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be replaced by the alpha version whenever realeased

Comment thread src/containerConfig.ts
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if needed - if not remove

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants