Add streaming task log support to KubernetesExecutor#69300
Merged
jason810496 merged 5 commits intoJul 22, 2026
Merged
Conversation
This was referenced Jul 3, 2026
jason810496
force-pushed
the
refactor/logging/kubernetes-executor-streaming-logs
branch
4 times, most recently
from
July 7, 2026 04:59
33b7c4d to
0d8a6bf
Compare
jason810496
force-pushed
the
refactor/logging/kubernetes-executor-streaming-logs
branch
from
July 8, 2026 02:24
0d8a6bf to
06b2ad1
Compare
jason810496
marked this pull request as ready for review
July 8, 2026 02:24
jason810496
requested review from
dheerajturaga,
hussein-awala,
jedcunningham and
jscheffl
as code owners
July 8, 2026 02:24
jason810496
force-pushed
the
refactor/logging/kubernetes-executor-streaming-logs
branch
2 times, most recently
from
July 9, 2026 10:14
c34f6c8 to
b902870
Compare
Miretpl
approved these changes
Jul 17, 2026
Miretpl
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me. I'd like a second review since I'm not familiar with how tests are done for the executors code.
jason810496
force-pushed
the
refactor/logging/kubernetes-executor-streaming-logs
branch
from
July 22, 2026 08:48
b548338 to
8c19704
Compare
Lee-W
reviewed
Jul 22, 2026
Fetching a running task's pod log materialized every line in the API server before serving it. Streaming the lines lazily through the new BaseExecutor.get_streaming_task_log interface lets the bounded log accumulator cap resident memory while serving large logs.
BaseExecutor now detects streaming support by calling get_streaming_task_log directly and catching NotImplementedError, so this flag is no longer read anywhere.
Empty ti.hostname produced "pod through" (double space) in the log message; only add the surrounding space when a hostname is present.
Requested in review: an underscored static method is clearer than an inner function since the generator does not capture any local state.
jason810496
force-pushed
the
refactor/logging/kubernetes-executor-streaming-logs
branch
from
July 22, 2026 09:46
8c19704 to
9612834
Compare
Member
Author
|
IIRC, the only CI failure should be resolved by other PR, so the static check failure it not related. I will merge this. |
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.
part of the streaming task log series
Why
KubernetesExecutor.get_task_logmaterializes the whole pod log in the API server. Implementing the newBaseExecutor.get_streaming_task_logyields lines lazily into the boundedLogStreamAccumulator: ~11.6x lower peak heap growth (+2093.9 MiB vs +179.9 MiB) serving a ~415 MB running-task log (full benchmark in #69299).What
get_streaming_task_logonKubernetesExecutor;get_task_logstays and delegates to it, so older cores keep working.supports_streaming_logsonKubernetesExecutor,CeleryKubernetesExecutor, andLocalKubernetesExecutor(the wrappers route kubernetes-queue tasks).Was generative AI tooling used to co-author this PR?