Enforce execution_timeout during task deferrals#69679
Open
KushagraB424 wants to merge 1 commit into
Open
Conversation
When a task updates its state to DEFERRED, it only enforced the trigger_timeout. This updates the Execution API to also enforce the execution_timeout constraint when scheduling the deferred task.
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.
When a task instance updates its state to
DEFERREDvia the Execution API, the system only recorded thetrigger_timeout, but failed to enforce the task's overallexecution_timeout.This PR fixes this by:
execution_timeoutto theTIDeferredStatePayloadschema.ti.task.execution_timeoutin theDeferTaskpayload.ti_update_stateroute to compute the absolute execution timeout ceiling limit (ti.start_date + execution_timeout) and store the minimum of thetrigger_timeoutandexecution_timeout.task_runner.pyto also deduct time already spent when local execution resumes, ensuring that time limits apply properly across deferral gaps.closes: #69678
Was generative AI tooling used to co-author this PR?
Generated-by: Google DeepMind Antigravity IDE following the guidelines