-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
verdi code setup does not check the remote absolute path #868
Comments
I guess it should still be possible to set up codes if you don't have an internet connection, i.e. some logic is needed as well. |
@sphuber I think you mentioned in #3319 that you had second thoughts about this feature request - perhaps it should be limited to setting up local codes? Also, it would create a bit of a discrepancy in the sense that you can have local codes in your database (imported from somewhere) that don't correspond to an actual binary, while you can't set such a code up. I guess the right way forward would be to do the check by default (even for codes on remote computers) but offer a way to disable it (e.g. via an interactive prompt that defaults to "proceed"). |
I definitely have second thoughts about doing this for remote codes, because adding the complexity with the transport is not worth what we will gain I think. If that transport is So maybe we should just check for local codes and remote code on localhosts? |
Yes, I think that is a good next step (and, as mentioned above, this check should happen during creation of the Code only - it's ok to have (imported) codes in the DB that point to non-existing paths). P.S. Here, "on localhosts" should mean: on computers with "local" transports. aiida-core/aiida/cmdline/commands/cmd_code.py Lines 69 to 71 in d44dcbd
if we're setting up a code on a computer with local transport. Alternatively, this validation could be left to the Code constructor - or both! @sphuber What would you prefer? |
I'm randomly getting the chance to read this....and it's been a while that I think that would be great to have a command |
@bosonie There is an old issue with a similar suggestion here #420 As for parsing the version number automatically: I'm not sure it's worth investing time into this, since hopefully we can soon support containers which will encapsulate not only the version but the environment as well. |
I am coming back to this issue after a discussion with @louisponet who ran into the same issue of having made a typo in the code setup and having the subsequent calculation fail. Maybe instead of checking on code setup, we could check when the code is actually being used in a calcjob. As a naive implementation we could add a validator to the To prevent the additional complexity of validation on the fly, maybe as a in-the-middle-of-the-road solution, we could implement |
+1 to have a |
yes doing this in |
Would it be possible to automatically try to run the test and print a
warning when offline and the test can't be done?
…On Fri, Jun 11, 2021 at 12:57 PM Sebastiaan Huber ***@***.***> wrote:
yes doing this in verdi code setup was already rejected for this very
reason in the early parts of the discussion
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#868 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFCD32PRKQPQXHISI6DB7EDTSHTYBANCNFSM4EBED2WA>
.
|
When you setup a code through
verdi code setup
and (accidentally) provide an incorrect path to the remote binary, the command will not complain and successfully create the code. If you then try to use the code for a calculation the calculation will fail. You can now also no longer delete the code or correct it, as it now has an associated calculation and so you are forced to create a new code node, choosing a different label, because the original is now already occupied.Since when specifying the remote absolute path, the computer is already selected, we should be able to verify whether the given path even exists and put out a warning otherwise. I don't see any impossibilities or blocking things to this approach but maybe I am missing something
The text was updated successfully, but these errors were encountered: