Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
7db52cf
feat: add AWS SDK S3 client and new storage provider constant
almog8k Apr 29, 2026
c539c90
feat: integrate S3 storage provider with configuration updates
almog8k Apr 29, 2026
96412d0
feat: update tilesDeletion strategy configuration for S3 integration
almog8k May 3, 2026
2a55831
feat: tiles deletion strategy with S3 integration and validation schemas
almog8k May 4, 2026
0c236f3
feat: register task context and update tiles deletion strategy for pr…
almog8k May 5, 2026
de75c99
feat: enhance file deletion process by adding cleanup of empty direct…
almog8k May 5, 2026
72d3889
feat: improve logging level during S3 deletion and clean up unused ty…
almog8k May 5, 2026
e0a8630
feat: integrate @map-colonies/raster-shared and update tiles deletion…
almog8k May 5, 2026
18623b6
feat: remove unused tiles deletion validation exports
almog8k May 6, 2026
6c4eac0
feat: update storage provider keys to use SourceType constants
almog8k May 6, 2026
8785aa4
fix: correct file extension formatting in generateRangePaths method
almog8k May 6, 2026
633bc77
fix: replace console.debug with logger.debug in validateSchema function
almog8k May 7, 2026
fa25125
chore: update dependencies for mc-priority-queue and raster-shared
almog8k May 7, 2026
b22f4f8
fix: pr issues
almog8k May 10, 2026
e262f90
feat: update js-logger to version 5.0.0 and switch schemas to commonW…
almog8k May 10, 2026
ee226de
feat: add opentelemetry options to logger configuration in JSON files
almog8k May 10, 2026
ad74141
feat: implement targetExists method for filesystem and S3 storage pro…
almog8k May 11, 2026
0f76f65
helm: deployment adjustments
almog8k May 11, 2026
6714172
feat: update simulate-deletion script and Dockerfile for tile deletio…
almog8k May 11, 2026
56d18f2
feat: update @map-colonies/schemas dependency to version 1.20.0
almog8k May 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ helm/local.yaml

# Local documentation (can be regenerated)
ai-docs/implementation-plan.md
.claude-flow
.claude


# parcel-bundler cache (https://parceljs.org/)
.cache
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN npm ci --only=production

COPY --chown=node:node --from=build /tmp/buildApp/dist .
COPY --chown=node:node ./config ./config

COPY --chown=node:node ./scripts ./scripts

USER node
EXPOSE 8080
Expand Down
43 changes: 43 additions & 0 deletions config/custom-environment-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@
"prettyPrint": {
"__name": "LOG_PRETTY_PRINT_ENABLED",
"__format": "boolean"
},
"opentelemetryOptions": {
"enabled": {
"__name": "TELEMETRY_LOGGER_OTEL_ENABLED",
"__format": "boolean"
},
"url": "TELEMETRY_LOGGER_OTEL_URL",
"resourceAttributes": {
"__name": "TELEMETRY_LOGGER_OTEL_RESOURCE_ATTRIBUTES",
"__format": "json"
}
}
}
},
Expand Down Expand Up @@ -57,5 +68,37 @@
"__name": "HTTP_RETRY_SHOULD_RESET_TIMEOUT",
"__format": "boolean"
}
},
"s3": {
"endpoint": "S3_ENDPOINT",
"accessKeyId": "S3_ACCESS_KEY_ID",
"secretAccessKey": "S3_SECRET_ACCESS_KEY",
"sslEnabled": {
"__name": "S3_SSL_ENABLED",
"__format": "boolean"
},
"forcePathStyle": {
"__name": "S3_FORCE_PATH_STYLE",
"__format": "boolean"
},
"region": "S3_REGION"
},
"strategies": {
"tilesDeletion": {
"s3Bucket": "TILES_DELETION_S3_BUCKET",
"fsBasePath": "TILES_DELETION_FS_BASE_PATH",
"batchSize": {
"__name": "TILES_DELETION_BATCH_SIZE",
"__format": "number"
},
"concurrency": {
"__name": "TILES_DELETION_CONCURRENCY",
"__format": "number"
},
"failureSampleSize": {
"__name": "TILES_DELETION_FAILURE_SAMPLE_SIZE",
"__format": "number"
}
}
}
}
24 changes: 23 additions & 1 deletion config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
"shared": {},
"logger": {
"level": "info",
"prettyPrint": false
"prettyPrint": false,
"opentelemetryOptions": {
"enabled": false,
"url": "",
"resourceAttributes": {}
}
}
},
"server": {
Expand Down Expand Up @@ -53,5 +58,22 @@
"attempts": 3,
"delay": "exponential",
"shouldResetTimeout": true
},
"s3": {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

check if Storage Class is needed

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We don't need to specify the Storage Class when deleting an object because S3 only needs the object's exact "address" to find and destroy it.

"endpoint": "http://localhost:9000",
"accessKeyId": "minioadmin",
"secretAccessKey": "minioadmin",
"sslEnabled": false,
"forcePathStyle": true,
"region": "us-east-1"
},
"strategies": {
"tilesDeletion": {
"s3Bucket": "",
"fsBasePath": "/tiles",
"batchSize": 1000,
"concurrency": 10,
"failureSampleSize": 3
}
}
}
2 changes: 1 addition & 1 deletion helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@ Returns the tracing url from global if exists or from the chart's values
{{- if .Values.global.metrics.url }}
{{- .Values.global.metrics.url -}}
{{- else -}}
{{- .Values.env.metrics.url -}}
{{- ((.Values.env).metrics).url | default "" -}}
{{- end -}}
{{- end -}}
10 changes: 10 additions & 0 deletions helm/templates/_tplValues.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,13 @@ Custom definitions
{{- define "common.jobDefinitions.merged" -}}
{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.jobDefinitions .Values.global.jobDefinitions ) "context" . ) }}
{{- end -}}

{{- define "common.serviceUrls.merged" -}}
{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.serviceUrls .Values.global.serviceUrls ) "context" . ) }}
{{- end -}}

{{- define "common.storage.merged" -}}
{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.storage .Values.global.storage ) "context" . ) }}
{{- end -}}


48 changes: 37 additions & 11 deletions helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,43 @@
{{- $tracingUrl := include "cleaner.tracingUrl" . -}}
{{- $metricsUrl := include "cleaner.metricsUrl" . -}}
{{- $serviceUrls := fromYaml (include "common.serviceUrls.merged" .) -}}
{{- $storage := fromYaml (include "common.storage.merged" .) -}}
{{- $s3 := ($storage.s3) | default dict -}}
{{- $internalPvc := (($storage.fs).internalPvc) | default dict -}}
{{- $tilesFSBasePath := clean (printf "/%s/%s" $internalPvc.mountPath ($internalPvc.tilesSubPath | default "tiles")) -}}
{{- if .Values.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-configmap" (include "cleaner.fullname" .) }}
data:
LOG_LEVEL: {{ .Values.env.logLevel | quote }}
LOG_PRETTY_PRINT_ENABLED: {{ .Values.env.logPrettyPrintEnabled | quote }}
{{ if .Values.env.tracing.enabled }}
{{- with .Values.env.logger }}
LOG_LEVEL: {{ .level | quote }}
LOG_PRETTY_PRINT_ENABLED: {{ .prettyPrintEnabled | quote }}
{{- with .openTelemetryOptions }}
TELEMETRY_LOGGER_OTEL_ENABLED: {{ .enabled | default false | quote }}
TELEMETRY_LOGGER_OTEL_URL: {{ .url | default "" | quote }}
TELEMETRY_LOGGER_OTEL_RESOURCE_ATTRIBUTES: {{ .resourceAttributes | default dict | toJson | quote }}
{{- end }}
{{- end }}
{{- if .Values.env.tracing.enabled }}
TELEMETRY_TRACING_ENABLED: 'true'
TELEMETRY_TRACING_URL: {{ $tracingUrl }}
{{ end }}
{{- end }}
npm_config_cache: /tmp/
{{- with .Values.configManagement }}
CONFIG_NAME: {{ .name| quote }}
CONFIG_NAME: {{ .name | quote }}
CONFIG_VERSION: {{ .version | quote }}
CONFIG_OFFLINE_MODE: {{ .offlineMode | quote }}
CONFIG_SERVER_URL: {{ .serverUrl | quote }}
{{- end }}
{{- with .Values.env.worker.capabilities }}
WORKER_CAPABILITY_PAIRS: {{ .pairs | toJson | quote }}
{{- end }}
QUEUE_JOB_MANAGER_BASE_URL: {{ $serviceUrls.jobManager | default "" | quote }}
QUEUE_HEARTBEAT_BASE_URL: {{ $serviceUrls.heartbeatManager | default "" | quote }}
{{- with .Values.env.queue }}
QUEUE_JOB_MANAGER_BASE_URL: {{ .jobManagerBaseUrl | quote }}
QUEUE_HEARTBEAT_BASE_URL: {{ .heartbeatBaseUrl | quote }}
QUEUE_HEARTBEAT_INTERVAL_MS: {{ .heartbeatIntervalMs | quote }}
QUEUE_DEQUEUE_INTERVAL_MS: {{ .dequeueIntervalMs | quote }}
QUEUE_HEARTBEAT_INTERVAL_MS: {{ .heartbeatIntervalMs | default 1000 | quote }}
QUEUE_DEQUEUE_INTERVAL_MS: {{ .dequeueIntervalMs | default 3000 | quote }}
{{- end }}
{{- $jobDefinitions := fromYaml (include "common.jobDefinitions.merged" .) }}
{{- if $jobDefinitions }}
Expand All @@ -36,5 +47,20 @@ data:
HTTP_RETRY_ATTEMPTS: {{ .attempts | quote }}
HTTP_RETRY_DELAY: {{ .delay | quote }}
HTTP_RETRY_SHOULD_RESET_TIMEOUT: {{ .shouldResetTimeout | quote }}
{{- end -}}
{{- end }}
JOBNIK_SDK_BASE_URL: {{ $serviceUrls.jobManager | default "" | quote }}
{{- with ((.Values.env.jobnik).worker) }}
JOBNIK_WORKER_CONCURRENCY: {{ .concurrency | default 1 | quote }}
{{- end }}
S3_ENDPOINT: {{ if $s3.endpointUrl }}{{ printf "%s://%s" ($s3.sslEnabled | ternary "https" "http") $s3.endpointUrl | quote }}{{ else }}{{ "" | quote }}{{ end }}
S3_FORCE_PATH_STYLE: {{ $s3.forcePathStyle | default false | quote }}
S3_SSL_ENABLED: {{ $s3.sslEnabled | default false | quote }}
S3_REGION: {{ $s3.region | default "us-east-1" | quote }}
TILES_DELETION_S3_BUCKET: {{ $s3.tilesBucket | default "" | quote }}
TILES_DELETION_FS_BASE_PATH: {{ $tilesFSBasePath | quote }}
{{- with ((.Values.env.strategies).tilesDeletion) }}
TILES_DELETION_BATCH_SIZE: {{ .batchSize | default 1000 | quote }}
TILES_DELETION_CONCURRENCY: {{ .concurrency | default 10 | quote }}
TILES_DELETION_FAILURE_SAMPLE_SIZE: {{ .failureSampleSize | default 3 | quote }}
{{- end }}
{{- end }}
28 changes: 26 additions & 2 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
{{- $cloudProviderDockerRegistryUrl := include "cleaner.cloudProviderDockerRegistryUrl" . -}}
{{- $cloudProviderImagePullSecretName := include "cleaner.cloudProviderImagePullSecretName" . -}}
{{- $imageTag := include "cleaner.tag" . -}}
{{- $storage := fromYaml (include "common.storage.merged" .) -}}
{{- $s3 := ($storage.s3) | default dict -}}
{{- $internalPvc := (($storage.fs).internalPvc) | default dict -}}
{{- if .Values.enabled -}}
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -66,6 +69,10 @@ spec:
{{- if .Values.extraVolumeMounts -}}
{{ toYaml .Values.extraVolumeMounts | nindent 12 }}
{{- end }}
{{- if $internalPvc.enabled }}
- name: internal-pvc
mountPath: {{ $internalPvc.mountPath | quote }}
{{- end }}
env:
- name: SERVER_PORT
value: {{ .Values.env.targetPort | quote }}
Expand All @@ -75,9 +82,21 @@ spec:
- name: NODE_EXTRA_CA_CERTS
value: {{ printf "[%s/%s]" .Values.caPath .Values.caKey | quote }}
{{- end }}
{{- if $s3.secretName }}
- name: S3_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: {{ $s3.secretName }}
key: accessKeyId
- name: S3_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ $s3.secretName }}
key: secretAccessKey
{{- end }}
{{- if .Values.extraEnvVars }}
{{- toYaml .Values.extraEnvVars | nindent 12 }}
{{- end }}
{{- end }}
envFrom:
- configMapRef:
name: {{ printf "%s-configmap" (include "cleaner.fullname" .) }}
Expand Down Expand Up @@ -114,5 +133,10 @@ spec:
{{- end }}
{{- if .Values.extraVolumes -}}
{{ tpl (toYaml .Values.extraVolumes) . | nindent 8 }}
{{- end }}
{{- end }}
{{- if $internalPvc.enabled }}
- name: internal-pvc
persistentVolumeClaim:
claimName: {{ $internalPvc.name }}
{{- end }}
{{- end -}}
40 changes: 35 additions & 5 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@ global:
tracing: {}
metrics: {}
jobDefinitions: {}
storage: {}
serviceUrls: {}
ca: {}

serviceUrls:
jobManager: ""
heartbeatManager: ""

storage:
s3:
endpointUrl: ""
forcePathStyle: true
secretName: ""
sslEnabled: false
region: "us-east-1"
tilesBucket: ""
fs:
internalPvc:
enabled: false
name: ""
mountPath: ""
tilesSubPath: "tiles"


mclabels:
Expand Down Expand Up @@ -75,14 +97,17 @@ image:

env:
port: 8080
logLevel: info
logPrettyPrintEnabled: false
logger:
level: info
prettyPrintEnabled: false
openTelemetryOptions:
enabled: false
url: ""
resourceAttributes: {}
tracing:
enabled: false
url: http://localhost:55681/v1/trace
queue:
jobManagerBaseUrl: "http//localhost:8080"
heartbeatBaseUrl: "http//localhost:8081"
heartbeatIntervalMs: 1000
dequeueIntervalMs: 3000
worker:
Expand All @@ -91,11 +116,16 @@ env:
- job: "Ingestion_Update"
task: "tiles-deletion"
- job: "Ingestion_Swap_Update"
task: "tiles-deletion"
task: "tiles-deletion"
httpRetry:
attempts: 3
delay: "exponential"
shouldResetTimeout: true
strategies:
tilesDeletion:
batchSize: 1000
concurrency: 10
failureSampleSize: 3

resources:
enabled: true
Expand Down
Loading
Loading