KushagraB424 opened a new pull request, #69679: URL: https://github.com/apache/airflow/pull/69679
When a task instance updates its state to `DEFERRED` via the Execution API, the system only recorded the `trigger_timeout`, but failed to enforce the task's overall `execution_timeout`. This PR fixes this by: 1. Adding `execution_timeout` to the `TIDeferredStatePayload` schema. 2. Updating the Task SDK to compute and pass the `ti.task.execution_timeout` in the `DeferTask` payload. 3. Updating the Execution API `ti_update_state` route to compute the absolute execution timeout ceiling limit (`ti.start_date + execution_timeout`) and store the minimum of the `trigger_timeout` and `execution_timeout`. 4. Updating `task_runner.py` to also deduct time already spent when local execution resumes, ensuring that time limits apply properly across deferral gaps. closes: #69678 <!-- Thank you for contributing! Please provide above a brief description of the changes made in this pull request. Write a good git commit message following this guide: http://chris.beams.io/posts/git-commit/ Please make sure that your code changes are covered with tests. And in case of new features or big changes remember to adjust the documentation. For user-facing UI changes, please attach before/after screenshots (or a short screen recording) so reviewers can assess the visual impact. Feel free to ping (in general) for the review if you do not see reaction for a few days (72 Hours is the minimum reaction time you can expect from volunteers) - we sometimes miss notifications. --> --- ###### Was generative AI tooling used to co-author this PR? - [x] Yes (please specify the tool below) Generated-by: Google DeepMind Antigravity IDE 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]
