Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1084 +/- ##
==========================================
+ Coverage 95.30% 95.38% +0.07%
==========================================
Files 60 60
Lines 5755 5788 +33
==========================================
+ Hits 5485 5521 +36
+ Misses 270 267 -3
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:
|
vdusek
marked this pull request as ready for review
October 2, 2026 10:01
This branch has not been deployed
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.
Python twin of apify/apify-client-js#1105.
call(logger=...)andget_streamed_log()could redirect no log lines at all. When a run hasn't written its first line yet, the API answersGET /logs/:id?stream=1with an empty 200 and closes it right away.StreamedLogandStreamedLogAsyncopened the stream once, so they took that empty response as the whole log.Both now reopen a stream that ended without any bytes, after a 0.5 s pause. If
stop()comes before anything has arrived, the log is read once withget_as_bytes():StreamedLogthe streaming thread does that read.stop()cuts the pause short, and a stream that opens whilestop()is running is dropped in favor of the read, since it would end after its first chunk.StreamedLogAsync,stop()does the read after cancelling the task, so the task still ends cancelled.A run that finishes quickly gets its whole log redirected.
Tests cover the same five cases as #1105, for both
StreamedLogandStreamedLogAsyncand on both HTTP clients:stop(), which reads the whole logstop()lands while the reopened stream is connectingstop()still returnsThe first three fail without the fix.
✍️ Drafted by Claude Code