Repository navigation
feat!: replace fromStart with since in streamed logs and reopen closed streams - #1263
Merged
Merged
Conversation
Contributor
|
✅ The link checker did not find any broken links. See more at https://github.com/apify/apify-client-js/actions/runs/46659750412#summary-142685765321 |
since to streamed logs and reopen closed streamsfromStart with since in streamed logs and reopen closed streams
Pijukatel
marked this pull request as ready for review
December 1, 2026 14:56
- `getStreamedLog()` and `StreamedLog` take `since?: Date`. `fromStart` is deprecated and will be removed in v4. - New `StreamedLog.lastRedirectedAt`: pass it plus 1 ms as `since` to continue the redirection after a restart. - A log stream that is cut off on a quiet but still running run fails with a transport error. It is reopened, and lines up to `lastRedirectedAt` are skipped. The reopen re-downloads the whole log, because the API can't start from a given point. A timeout while reading the stream counts as a cut-off stream too, since the HTTP libraries end a response that carries no data for a while with one: `fetch` of Node.js after 5 minutes, axios after `timeoutSecs`. `AxiosHttpClient.isRetryableTransportError()` now recognizes the plain `ECONNRESET` error a streamed response fails with in Node.js. A message whose first chunk has no end of line is no longer redirected cut in two. Port of apify/apify-client-python#1253. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ocuAHmLPYNoNM4jGrzrJ2
`RunClient.getStreamedLog()` and `StreamedLog` no longer take `fromStart`. v3 is a breaking release, so the option is removed instead of deprecated, and `since` is the only way to redirect part of a log. `getStreamedLog()` now validates its options with a strict schema, so a leftover `fromStart` throws an `ArgumentValidationError` instead of silently redirecting the whole log. The v3 upgrading guide describes the change and the reopening of a log stream that is cut off. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ocuAHmLPYNoNM4jGrzrJ2
Pijukatel
force-pushed
the
claude/exciting-einstein-3vuyel
branch
from
December 1, 2026 15:26
61a9ab9 to
1a990fd
Compare
barjin
approved these changes
Dec 1, 2026
barjin
left a comment
Member
There was a problem hiding this comment.
Few docs nits (and one lint / code quality one), but nothing blocking.
Thanks @Pijukatel !
Co-authored-by: Jindřich Bär <jindrichbar@gmail.com>
…ction docs The loop that opens log streams now runs while redirection is not stopped, and the one-shot read of the log follows it instead of sitting at the top of an endless loop. The docs and the JSDoc of `lastRedirectedAt` no longer describe why a log stream is interrupted or how the client replays it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ocuAHmLPYNoNM4jGrzrJ2
Contributor
|
See more at https://github.com/apify/apify-client-js/actions/runs/46689251881#summary-142791764037 |
16 tasks done
This was referenced Dec 3, 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.
getStreamedLog()andStreamedLogtakesince?: Date.fromStartis removed, since v3 is a breaking release; the upgrading guide covers it.getStreamedLog()now validates its options, so a leftoverfromStartthrows anArgumentValidationError.StreamedLog.lastRedirectedAt: pass it plus 1 ms assinceto continue the redirection after a restart.lastRedirectedAtare skipped. The reopen re-downloads the whole log, because the API can't start from a given point.Stacked on #1237, so the base is its branch.
Closes #1262
Python counterpart: apify/apify-client-python#1253