`remote_symlink_list` does not produce error for `filename/*`
When using aiida-shell @GeigerJ2 discovered that we do not get any error for this calc info below. initial_conditions is a file so trying to symlink /mnt/home/geiger_j/test/sirocco/data/initial_conditions/* should fail but it silently is accepted. Need to investigate this further and make a minimal example with a CalcJob
{
"codes_info": [
{
"code_uuid": "5f4a3f0d-160e-4f1d-b778-e8d584ce1b0f",
"cmdline_params": ["--restart", "--init", "initial_cond"],
"stdin_name": null,
"stdout_name": "stdout",
"stderr_name": "stderr"
}
],
"append_text": "echo $? > status",
"remote_copy_list": [],
"remote_symlink_list": [
[
"da8379b9-0b77-44ad-9dc2-6b9a03d7ca2b",
"/mnt/home/geiger_j/test/sirocco/data/initial_conditions/*",
"."
]
],
"retrieve_temporary_list": [
"restart",
"icon_output",
"status",
"stderr",
"stdout"
],
"provenance_exclude_list": ["input"],
"file_copy_operation_order": [1, 0, 2],
"uuid": "7683f368-c4e5-4be0-964e-28d58b88dc60"
}
Copied from https://github.com/C2SM/Sirocco/issues/133
Hi @agoscinski , @GeigerJ2 !
Hope you are fine !
I'd like to solve this issue .Could you please assign this issue to me ? I think by adding validation to the remote_symlink_list to check for improper wildcard usage on files, raising an error when necessary. This would ensure users receive clear feedback and prevent invalid symlinks from being silently accepted this just a solution I think that could be done but more curious to know your thoughts .
Thank You !
Hi @Muhammad-Rebaal, feel free to give it a shot and make a PR to solve this issue. To construct a test that reproduces the erroneous behavior, you can construct a RemoteData whose remote_path attribute points to a file. It is worth reading the PR to aiida-shell in which we mentioned this issue. There, I provide a MWE in my last comment that results in the setup to be solved here. For verification, one might be able to use the Transports isfile method, but not entirely sure. This depends on where the entries of the remote_symlink_list are evaluated (could also be plumpy).