-
Notifications
You must be signed in to change notification settings - Fork 51
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
support specification of file permissions in --add-file
submission option
#6505
Conversation
Problem: If perms is passed as None in Jobspec.add_file(), then the default of 0600 is overridden. It would be better to use the default in this case. Set the default value of perms to None in the function arguments, and if perms is None use the default of 0o600.
Problem: A file added via the cli submission --add-file=NAME=DATA option always gets the default permissions of 0600. Allow the file name to contain a colon followed by permissions, e.g. --add-file=test:700="sleep 0\n"
Problem: The --add-file description in common/job-other-options.rst doesn't include the ability to force file permissions. Update the documentation.
Problem: No tests in the testsuite ensure that file permissions may be specified in the submission cli `--add-file` option. Add a couple test to t2710-python-cli-submit.t.
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.
LGTM!
Definitely not worth holding this up, but I wonder if there is a loose python module out there that supports chmod(1)'s "symbolic mode" (chmod +x
, etc)?
I did look for something, but only found solutions for parsing the ls output style e.g. |
Thanks I've set MWP. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6505 +/- ##
==========================================
- Coverage 83.64% 83.63% -0.02%
==========================================
Files 525 525
Lines 87684 87693 +9
==========================================
- Hits 73345 73341 -4
- Misses 14339 14352 +13
|
This PR adds support for specifying file permissions in the
--add-file
option in Flux submission command. (Presently, all files added with content directly provided on the command like get the default permissions of 0600)Example: