nipype / pydra

Pydra Dataflow Engine
https://nipype.github.io/pydra/
Other
120 stars 59 forks source link

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

Closed tclose closed 6 months ago

tclose commented 6 months ago

Types of changes

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

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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](https://app.codecov.io/gh/nipype/pydra/pull/735/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nipype) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/nipype/pydra/pull/735/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nipype) | `84.22% <100.00%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nipype#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.