Bug Description
Currently, tasks configured with async_execution=True do not receive the correct context from prior tasks.
In _execute_tasks (and _aexecute_tasks), the context for async tasks is generated using [last_sync_output] if last_sync_output else []. However, last_sync_output is only populated when resuming from a skipped/conditional task (in prepare_task_execution) and is otherwise None during a normal execution run.
As a result, async tasks receive a completely empty context and are unable to access the outputs of previous tasks in the pipeline.
Steps to Reproduce
See the reproduction script and execution logs in PR #6415.
Expected Behavior
Async tasks should receive the full task_outputs list passed to _get_context(), perfectly mirroring the behavior of synchronous tasks.
(Note: Authored with the assistance of an AI coding agent. Please apply the llm-generated label.)
Bug Description
Currently, tasks configured with
async_execution=Truedo not receive the correct context from prior tasks.In
_execute_tasks(and_aexecute_tasks), the context for async tasks is generated using[last_sync_output] if last_sync_output else []. However,last_sync_outputis only populated when resuming from a skipped/conditional task (inprepare_task_execution) and is otherwiseNoneduring a normal execution run.As a result, async tasks receive a completely empty context and are unable to access the outputs of previous tasks in the pipeline.
Steps to Reproduce
See the reproduction script and execution logs in PR #6415.
Expected Behavior
Async tasks should receive the full
task_outputslist passed to_get_context(), perfectly mirroring the behavior of synchronous tasks.(Note: Authored with the assistance of an AI coding agent. Please apply the
llm-generatedlabel.)