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
Bug fix for runner timeout handling #7390
Bug fix for runner timeout handling #7390
Conversation
This commit ensures that output generated by timeouts is accessible to clients. It fixes an error, where consecutive timeouts without any other event in between where not available to clients that used a generator-protocol.
This commit modifies BatchedCommand to emit debug messages, if timeouts are encountered. Note: in order to match the old implementation, BatchedCommand uses a default timeout of 11 seconds. This holds, even when timeout=None was specified on BatchedCommand construction.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## maint #7390 +/- ##
==========================================
+ Coverage 88.18% 90.70% +2.52%
==========================================
Files 327 327
Lines 44686 44693 +7
Branches 0 5924 +5924
==========================================
+ Hits 39405 40541 +1136
+ Misses 5281 4136 -1145
- Partials 0 16 +16
☔ View full report in Codecov by Sentry. |
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.
minor docs etc notes. Logic seems to be LGTM although I am not familiar much with this code
edit: typing issues observed:
datalad/runner/nonasyncrunner.py:561: error: Unsupported operand types for >= ("float" and "None") [operator]
datalad/runner/nonasyncrunner.py:561: note: Right operand is of type "Optional[float]"
Found 1 error in 1 file (checked 32 source files)
This commit adds a check for None. This is required to pass mypy checks. The variable in question is already checked for None, but mypy does not recognize this. TODO: there is probably a better way to inform mypy about valid assertions.
6a8d14f
to
9122da0
Compare
Co-authored-by: Yaroslav Halchenko <debian@onerussian.com>
I fixed the error by adding a check for |
Thank you @christian-monch |
PR released in |
This PR ensures that output generated by timeout-handlers is accessible to clients that iterate over a result-generator. The fixes
an error, where consecutive timeouts without any other event in between them where not delivered by the result-generator.
This bug was detected during work on issue #7315, but is independent.