Skip to content

fix: mount shared dir symlinks when opening the solver GUI - #23

Merged
florian-simvia merged 2 commits into
mainfrom
fix/gui-shared-dir-mounts
Sep 11, 2026
Merged

florian-simvia merged 2 commits into
mainfrom
fix/gui-shared-dir-mounts

Conversation

@florian-simvia

Copy link
Copy Markdown
Collaborator

What

build_gui_command (docker) and the singularity branch of
build_runtime_gui_command mounted only the runs dir. Their run counterparts
also bind the targets of shared-dir symlinks. Both GUI paths now do the same,
MESH read-only and POST writable, in the same order.

Six lines of production code, mirroring the run path exactly.

Why

Since 0.4.1, mesh_mode = "symlink" is the default, so RUNS/MESH is normally a
symlink pointing outside RUNS. Container runtimes only bind-mount the runs dir,
which is why the run path additionally binds each symlink target at its own
absolute path.

The GUI path never did. Opening the solver GUI on such a case therefore gave a
dangling MESH symlink inside the container: the GUI starts, but the mesh
declared in setup.xml cannot be resolved.

Before / after, for the same case:

run  docker      RUNS:/home/code_saturne, study/MESH:...:ro, study/POST:...
gui  docker      RUNS:/home/code_saturne                                     <- before
gui  docker      RUNS:/home/code_saturne, study/MESH:...:ro, study/POST:...  <- after
gui  singularity RUNS:/home/code_saturne, study/MESH:...:ro, study/POST:...  <- after

How to test

pytest -q   # 357 passed, 3 skipped

Three new tests, written before the fix and observed failing: docker and
singularity both bind the symlink target with the expected :ro on MESH, plus
a negative test asserting no extra mount appears when the shared dirs are real
directories.

End to end, with a campaign whose MESH is a symlink (the default after
csauto prepare):

csauto serve RUNS

Click Open GUI on a case. The launched command now contains the MESH and
POST binds; previously it contained only the runs dir and the X11 socket.

Checklist

  • Tests pass locally (pytest -q)
  • No linting errors (ruff check . && ruff format --check .)
  • Frontend builds — not applicable, no frontend file touched
  • frontend/dist/ is up-to-date — not applicable, unchanged

build_gui_command (docker) and the singularity branch of
build_runtime_gui_command mounted only the runs dir, unlike their run
counterparts. With mesh_mode = symlink (the default since 0.4.1), MESH and
POST symlinks pointing outside RUNS were left dangling inside the container.
@florian-simvia
florian-simvia merged commit 3be0b9c into main Sep 11, 2026
6 checks passed
@florian-simvia
florian-simvia deleted the fix/gui-shared-dir-mounts branch September 11, 2026 13:51
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.

1 participant