-
Notifications
You must be signed in to change notification settings - Fork 188
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
CLI: Check for user execute permissions in verdi code test
#6597
CLI: Check for user execute permissions in verdi code test
#6597
Conversation
@@ -147,6 +151,11 @@ def validate_filepath_executable(self): | |||
f'The provided remote absolute path `{self.filepath_executable}` does not exist on the computer.' | |||
) | |||
|
|||
if not user_has_execute: | |||
raise exceptions.ValidationError( | |||
f'The executable at the remote absolute path `{self.filepath_executable}` is not executable.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On some HPCs, FirecREST for example, user on login shell, and user on compute node have different rights.
User might have executable right only from the compute node. In that case the logic here, may cause confusions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's a valid point. I'm not sure actually how the permissions behave on an actual remote, not just localhost. I'll run some tests here, but I guess it's the same for SSH. Though, difficult to properly test for it in the tests
, because we just connect to localhost
there. I'm happy to relax the error message though, as we discussed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @GeigerJ2 ,
Since I faced this issue before, I put some minor comments
OK, I think this should be ready for another round of reviews. Pinging my dudes from the AiiDA office, @khsrali and @agoscinski. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @GeigerJ2 , just a few minor comments.
Feel free to ignore.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6597 +/- ##
==========================================
+ Coverage 77.51% 77.89% +0.39%
==========================================
Files 560 567 +7
Lines 41444 42126 +682
==========================================
+ Hits 32120 32809 +689
+ Misses 9324 9317 -7 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
In `validate_filepath_executable` called for `verdi code test`
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Co-authored-by: Alexander Goscinski <[email protected]>
for more information, see https://pre-commit.ci
Co-authored-by: Ali Khosravi <[email protected]>
for more information, see https://pre-commit.ci
0bccc1d
to
a372ad6
Compare
Via
validate_filepath_executable
.