Skip to content

feat: mount local DLS-filesystem mirror into dev backend for image serving#223

Merged
vredchenko merged 1 commit into
mainfrom
feat/local-dev-dls-filesystem-mount
Jun 8, 2026
Merged

feat: mount local DLS-filesystem mirror into dev backend for image serving#223
vredchenko merged 1 commit into
mainfrom
feat/local-dev-dls-filesystem-mount

Conversation

@vredchenko

Copy link
Copy Markdown
Collaborator

Summary

The backend image endpoints (get_grid_atlas_image, get_gridsquare_image) read atlas/grid-square files off disk using the absolute /dls/... paths stored in the DB. Against a DB dump those files aren't present, so images fall back to placeholders. This mounts a local mirror of Diamond's /dls filesystem into the dev API pod so the endpoints resolve, giving us real imagery in local dev.

Changes

  • smartem-workspace: scaffold testdata/dls-filesystem/ as the convention dir — a local mirror of Diamond's /dls DFS root, populated by hand with microscopy imagery. Version bump 0.6.1 -> 0.7.0.
  • dev-k8s.sh: new ensure_image_mount step patches smartem-http-api with a hostPath <workspace>/testdata/dls-filesystem -> /dls (readOnly), overridable via SMARTEM_DLS_FILESYSTEM_DIR, skipped silently when the dir is absent.

Why a script patch and not the static manifest

hostPath must be absolute, and the dev stack applies manifests with kubectl apply -k (kustomize, no templating), so a portable per-developer path can't live in the committed YAML. This mirrors the existing post-apply patch pattern (ensure_app_configmap, ensure_ghcr_secret, ensure_local_image) and keeps any machine-specific path out of the repo.

Scope

  • API service only — verified the worker never reads image files from disk (the only mrcfile/tifffile/PIL reads in the backend are the two API image endpoints; the worker is a pure MQ->DB consumer).
  • Local dev only. The staging/prod /dls NFS mount is a separate PR.

Notes

  • Merging to main triggers an RC release of smartem-workspace (paths-filtered workflow); a stable 0.7.0 would need the tag/workflow_dispatch.

…rving

The backend image endpoints read atlas/grid-square files off disk using the
absolute /dls/... paths stored in the DB, but a DB dump has no files. Mount a
local mirror of Diamond's /dls filesystem into the dev API pod so those
endpoints resolve.

- smartem-workspace scaffolds testdata/dls-filesystem/ as the convention dir
  (a local mirror of /dls; populated by hand with imagery). Bump 0.6.1 -> 0.7.0.
- dev-k8s.sh ensure_image_mount patches smartem-http-api with a hostPath
  <workspace>/testdata/dls-filesystem -> /dls (readOnly), overridable via
  SMARTEM_DLS_FILESYSTEM_DIR, skipped when absent. hostPath must be absolute and
  kustomize can't template, so this mirrors the existing ensure_* post-apply
  patch pattern. API service only: the worker never reads image files from disk.
@github-actions github-actions Bot added devops CI/CD, deployment, infrastructure, or tooling work component:smartem-workspace smartem-workspace CLI tool for multi-repo management labels Jun 8, 2026
@vredchenko vredchenko merged commit 5504841 into main Jun 8, 2026
14 checks passed
@vredchenko vredchenko deleted the feat/local-dev-dls-filesystem-mount branch June 8, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:smartem-workspace smartem-workspace CLI tool for multi-repo management devops CI/CD, deployment, infrastructure, or tooling work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant