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

use exist_ok instead of explicit check for path exists when creating hash cache so it is multiprocess safe #735

Merged
merged 3 commits into from
Mar 18, 2024

Conversation

tclose
Copy link
Contributor

@tclose tclose commented Mar 17, 2024

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Summary

Avoid race-condition problem where two processes try to create the user hash cache directory at the same time, by switching to exists_ok=True kwarg of mkdir instead of explicit check that path exists beforehand

Checklist

  • I have added tests to cover my changes (if necessary)
  • I have updated documentation (if necessary)

Copy link

codecov bot commented Mar 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.22%. Comparing base (811dc45) to head (db42246).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #735      +/-   ##
==========================================
- Coverage   84.22%   84.22%   -0.01%     
==========================================
  Files          25       25              
  Lines        5123     5121       -2     
  Branches     1449     1446       -3     
==========================================
- Hits         4315     4313       -2     
  Misses        802      802              
  Partials        6        6              
Flag Coverage Δ
unittests 84.22% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@djarecka djarecka merged commit ee5a238 into nipype:master Mar 18, 2024
43 checks passed
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.

2 participants