fix: prevent Actor log-streaming thread from crashing on stream timeout#944
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #944 +/- ##
==========================================
- Coverage 94.56% 94.54% -0.03%
==========================================
Files 48 48
Lines 5119 5129 +10
==========================================
+ Hits 4841 4849 +8
- Misses 278 280 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Pijukatel
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After a successful
ActorClient.call(), the background log-streaming thread could crash with an uncaughtimpit.TimeoutException, printing a traceback even though the run finished fine.Issue
Closes: #945
Root cause
The log stream was requested with a bounded 30s timeout. impit applies
timeoutto the whole request, including the streamed body, so any run streaming logs longer than that trippedimpit.TimeoutExceptionmid-stream — unhandled in the sync thread, and a spuriousERROR+ traceback in the async twin. Raising the value wouldn't help: every tier is capped atDEFAULT_TIMEOUT_MAX(360s).Fix
no_timeout(impit's ~24h ceiling), so it runs until the server closes it with EOF at run finish. Matches the JS client.impit.TimeoutExceptionin both paths and log aWARNINGinstead of crashing / error-logging; other failures still error-log.Known limitation
A parked sync
iter_bytes()read can't be interrupted from another thread, so withno_timeouta manualStreamedLog.stop()on a momentarily silent stream waits for the next chunk or EOF rather than the old 30s bound. TheActorClient.call()path is unaffected (run finish sends EOF). Matches the JS client.