Repository navigation
Go SDK: send execution_timeout and use the worker's default - #76359
Open
ChickenBenny wants to merge 3 commits into
Open
ChickenBenny wants to merge 3 commits into
ChickenBenny wants to merge 3 commits into
Conversation
ChickenBenny
requested review from
amoghrajesh,
ashb and
jason810496
as code owners
November 3, 2026 09:03
1 task done
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.
Follow-up 2 of #75387.
After #75387 the supervisor starts the
execution_timeoutclock for a language SDK task as soon as the runtime has the task, usingTIRunContext.execution_timeout. A Python task has no clock until it sendsSetExecutionTimeoutright before it runs. The Go runtime never sent it, which causes two problems:execution_timeoutdoesn't get the worker's[core] default_task_execution_timeout. Right now it gets the Dag processor's default through the serialized Dag, but a follow-up will stop storing that default there, and without this change the task would then have no timeout at all.Changes
When
ti_context.execution_timeoutis unset, the coordinator fills it in with the worker's[core] default_task_execution_timeout, the same value a Python task gets when the worker parses its Dag. It starts the supervisor's clock with that value and sends it to the runtime inStartupDetails. A0means no timeout, so it doesn't fall back. Each runtime gets the default without reading any config itself: the TypeScript runtime, and a runtime that never sendsSetExecutionTimeout, get it too.Right before the task runs (after XComs are cleared), the Go runtime reads the timeout from
ti_contextand does what the Python task runner does:0: sends nothing (no timeout).SetExecutionTimeout, which restarts the supervisor's clock from that point.A failed task retries if
should_retryis set.The Go runtime still doesn't stop a timed-out task by itself. The supervisor sends SIGTERM after the timeout plus
killed_task_cleanup_time, same as before. Stopping the task at the timeout is the Go part of Language SDK runtimes do not handle execution_timeout in the task process #74717 and will be a separate PR.Separate commit: the
iface*helpers move frommessages.gotoiface.go, andifaceIntand the newifaceFloatshare a genericifaceNumber. No behavior change.What's next
A follow-up in core and the standard provider, opened as a draft and merged after this PR and #76103, will change what the serialized Dag stores for a stub task's
execution_timeout:default_argscounts as set)None0timedeltaIt will also drop
execution_timeoutfromclient_defaults. Until then, a stub task withNoneis treated the same as one that sets nothing. That follow-up has to go in last because it removes the default that language SDK tasks get today.