[BF] Prevent double yielding of impossible get result#7093
[BF] Prevent double yielding of impossible get result#7093yarikoptic merged 6 commits intodatalad:maintfrom
Conversation
Codecov ReportBase: 76.01% // Head: 90.96% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## maint #7093 +/- ##
===========================================
+ Coverage 76.01% 90.96% +14.94%
===========================================
Files 355 355
Lines 59101 46458 -12643
Branches 6318 6326 +8
===========================================
- Hits 44925 42259 -2666
+ Misses 14162 4184 -9978
- Partials 14 15 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
yarikoptic
left a comment
There was a problem hiding this comment.
left some suggestions but I think it would warrant a test (wasn't some test triggering it already? just add pdb at return True and see if some test hits it, then add a test there for this fix. If not a single test was hitting it -- I think it is worthwhile adding such a use case if we "value" this fix. Otherwise it would be tricky to see why it was added in retrospective.
| @@ -871,7 +891,7 @@ def __call__( | |||
| # as is | |||
| dataset=dataset, | |||
| # always come from the top to get sensible generator behavior | |||
There was a problem hiding this comment.
so this change changes this behavior:
- I wonder why top-down was considered to be more "sensible" (may be smth in commit which added)
- comment should be adjusted according to the change if this change is needed (seems to be orthogonal to the actual fix described)
There was a problem hiding this comment.
Thanks for picking this up, I missed the comment and will update
|
Thanks for the review @yarikoptic. Responding individually to comments.
Indeed, no tests hit that spot, so a good idea to add a test. |
Co-authored-by: Yaroslav Halchenko <debian@onerussian.com>
- helper function and invocation name change - update bottomup comment Co-authored-by: Yaroslav Halchenko <debian@onerussian.com>
to make sure `get` does not yield redundant `impossible` results if a not existing path is given.
Setting this to bottom-up seemed sensible to prevent futile trials of getting a file several times in the context of dataladgh-7093, but it turned out to prevent getting deep levels altogether. Since the double reporting dataladgh-7093 is about, is catched either way - revert that change.
|
@jsheunis, @yarikoptic: I added a test (fails on |
|
hm, travis stalled with in the first matrix run. For some reason travis refuses to log me in atm to restart, can't waste time on that . Hard to say where it stalled since we run with |
|
I don't see how this fix could relate to stalling, I found many of other stalled runs in the historical logs, didn't investigate, let's proceed! |
|
PR released in |
Setting this to bottom-up seemed sensible to prevent futile trials of getting a file several times in the context of dataladgh-7093, but it turned out to prevent getting deep levels altogether. Since the double reporting dataladgh-7093 is about, is catched either way - revert that change.
Fixes #5537.
This PR prevents double yielding of an impossible get result on a path that does not exist by keeping track of impossible get results and skipping additional yields inside
_install_targetpath().The issue reported this problem occurring twice:
bottomupflag toTruein theSubdatasets.__call__()._install_targetpath()has already been called, using the new helper function_check_error_reported()and the tracking dicterror_reportedThese changes were rerun locally using the example provided in the issue, and succeeded to give single impossible results in both cases. Tests all succeeded locally with
python -m pytest -s -v --pyargs datalad/core/distributed datalad/distribution datalad/distributedChangelog
🐛 Bug Fixes
impossiblegetresult for a path that does not exist. Fixes Duplicategeterror result (reporting) #5537