Skip to content

fix: downloads path broken link in export(MAPCO-10645)#96

Merged
almog8k merged 1 commit into
masterfrom
fix/export-files-paths
May 20, 2026
Merged

fix: downloads path broken link in export(MAPCO-10645)#96
almog8k merged 1 commit into
masterfrom
fix/export-files-paths

Conversation

@almog8k
Copy link
Copy Markdown
Collaborator

@almog8k almog8k commented May 20, 2026

Question Answer
Bug fix
Tests added

This pull request refactors how file paths and URLs for export artifacts (GPKG and JSON files) are constructed and managed throughout the application. It introduces a new ArtifactPathBuilder utility class to centralize and standardize path building logic, removes hardcoded directory settings, updates configuration and Helm charts, and adapts the codebase and tests to use the new approach.

Key changes include:

Path and URL Management Refactor:

  • Introduced the ArtifactPathBuilder class to encapsulate logic for building local file paths, S3 keys, and public download URLs for export artifacts, replacing direct path manipulation and hardcoded directory references. (src/utils/storage/artifactPathBuilder.ts)

  • Updated ExportJobHandler to use ArtifactPathBuilder for all artifact path and URL construction, removing the use of the gpkgsRootDir config and direct path manipulation. (src/job/models/export/exportJobHandler.ts)
    Configuration and Helm Updates:

  • Changed configuration files (config/default.json, config/custom-environment-variables.json, helm/values.yaml) to remove the obsolete gpkgsRootDir setting and introduce a structured storage.internalPvc config for mount paths and subpaths.

Testing Improvements:

  • Added comprehensive unit tests for ArtifactPathBuilder to verify correct path and URL construction. (tests/unit/utils/artifactPathBuilder.spec.ts)
  • Updated existing tests and mocks to align with the new path-building logic and configuration structure. (tests/unit/job/exportJobHandler/exportJobHandler.spec.ts, tests/unit/job/exportJobHandler/exportJobHandlerSetup.ts, tests/unit/mocks/configMock.ts)

@almog8k almog8k merged commit 083f172 into master May 20, 2026
5 checks passed
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