`verdi code test` fails with `filepath_executable` not found with if necessary `uenv` is loaded via `prepend_text`
With a code that is set up like this:
❯ verdi code show 2
----------------------- --------------------------------------
PK 2
UUID ad20bb6d-66c2-4ec7-a2c1-cce26bb2e97f
Type core.code.installed
Label pw
Description abc
Default calc job plugin quantumespresso.pw
Use double quotes False
With mpi
Prepend text uenv start quantumespresso/v7.3.1:v1
Append text
Computer eiger (eiger.alps.cscs.ch), pk: 3
Filepath executable /user-environment/env/default/bin/pw.x
----------------------- --------------------------------------
On the new CSCS Alps infrastructure, even though the code actually works for running simulations, verdi code test fails, as the filepath_executable cannot be found. This is because uenv images are actually squashfs file systems that get mounted when running uenv start, meaning the file does not exist on the user's file system before. This is different from the common setup where the required module load commands are in the prepend_text and are executed at runtime to make the necessary libraries available, but the filepath_executable already points to an existing file, e.g., see here:
https://github.com/aiidateam/aiida-code-registry/blob/2532dfd5cf49bb92d9143f084a6b7b0239785450/daint.cscs.ch/codes/pw-7.2-hybrid.yaml#L5-L9
While this is a uenv, and therefore CSCS specific issue, as many of us use the CSCS machines, I thought it's still good to have it documented somewhere.
A simple fix could be to add a --run-prepend-text option to verdi code test, which should then make the test run successfully.
@GeigerJ2 , I want to work on this issue.
Hi @ayushjariyal, thanks for your interest in this issue. This is pretty specific, and probably not the best to work on. What about #6978 instead, as it relates again to the verdi storage info command where you already started working on?
I'd like to work on this issue if it's not already taken.