Skip to content
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

DM-41112: Always make created directories writeable by owner #70

Merged
merged 5 commits into from Oct 12, 2023

Conversation

dhirving
Copy link
Contributor

@dhirving dhirving commented Oct 11, 2023

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (8c7666f) 86.03% compared to head (29b3146) 86.12%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #70      +/-   ##
==========================================
+ Coverage   86.03%   86.12%   +0.09%     
==========================================
  Files          27       27              
  Lines        3959     4029      +70     
  Branches      812      825      +13     
==========================================
+ Hits         3406     3470      +64     
- Misses        434      438       +4     
- Partials      119      121       +2     
Files Coverage Δ
.../resources/_resourceHandles/_fileResourceHandle.py 78.43% <100.00%> (ø)
.../resources/_resourceHandles/_httpResourceHandle.py 73.04% <100.00%> (ø)
python/lsst/resources/_resourcePath.py 96.02% <100.00%> (+0.02%) ⬆️
python/lsst/resources/utils.py 68.42% <100.00%> (+3.71%) ⬆️
tests/test_file.py 99.24% <100.00%> (+0.31%) ⬆️
python/lsst/resources/gs.py 24.17% <0.00%> (ø)
python/lsst/resources/file.py 88.26% <76.92%> (-1.97%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

When creating directories, we now modify the filesystem permissions to
add the write and execute bits for the current user if they aren't
already set.  This fixes exceptions caused by filesystem permissions
when attempting to create files in read-only directories. This issue was
occurring because users had set the global process umask to 0222 in an
attempt to force files to be read-only.
Similar to the previous commit, fixed an issue where we could fail to
write to a temporary file we had just created if the process is running
with a restrictive umask value.
@dhirving
Copy link
Contributor Author

The mypy failures are pre-existing and not related to this PR

A new version of mypy made it an error to use a TypeVar as a return
type without something to constrain it in the parameters
@dhirving dhirving merged commit 5715b99 into main Oct 12, 2023
16 checks passed
@dhirving dhirving deleted the tickets/DM-41112 branch October 12, 2023 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants