ChickenBenny opened a new pull request, #74869:
URL: https://github.com/apache/airflow/pull/74869

    <!-- SPDX-License-Identifier: Apache-2.0
         https://www.apache.org/licenses/LICENSE-2.0 -->
   
   
   * closes: #74716
   * related: #74717
   
   ---
   ## Why
   
   Tasks run by a language SDK (Go, TypeScript, Java) ignore 
`execution_timeout`. A Python task reads the timeout from its parsed Dag and 
sends `SetExecutionTimeout` to the supervisor, but a language-SDK runtime 
cannot parse the Python Dag, so the supervisor never arms its deadline. A Go 
task with a 10s timeout that sleeps 90s ends in `success`.
   
   ## What
   
   - For tasks with `is_stub=True` (`@task.stub` and native language-SDK Dags), 
the API server now sends the timeout in `TIRunContext.execution_timeout` 
(seconds). A zero timeout means no timeout, as in the Python task runner.
   - The supervisor arms its existing deadline from it when the runtime starts: 
SIGTERM at `execution_timeout` + `killed_task_cleanup_time`, then SIGKILL. This 
also works for runtimes on an older supervisor schema, since the supervisor 
reads the field before downgrading the message.
   - Python tasks are unchanged: they don't get the field and still send 
`SetExecutionTimeout` right before `execute()`.
   
   For a language-SDK task the clock starts when the runtime starts, not right 
before the task runs. A runtime that later sends `SetExecutionTimeout` re-arms 
it. Cancelling the task inside the runtime (e.g. Go's context) is left to 
#74717.
   
   The field is added at `2026-10-30` in both the Execution API and the 
supervisor schema, so this needs `backport-to-v3-4-test` before 3.4.0. Happy to 
move it to `2027-02-28` instead if preferred (see #74755).
   
   Commits are split for review. The first is a refactor with no behavior 
change. Most of the `models.gen.go` diff is the generator reordering types; the 
only new field is `ExecutionTimeout`.
   
   ##### Was generative AI tooling used to co-author this PR?
   
   <!--
   If generative AI tooling has been used in the process of authoring this PR, 
please
   change below checkbox to `[X]` followed by the name of the tool, uncomment 
the "Generated-by".
   -->
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude Code (Opus 5.5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to