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

   ## What
   
   Catches `TaskNotFound` in the triggerer supervisor's `_create_workload` 
method so that one stale task-associated trigger cannot abort the entire batch 
of healthy trigger workloads.
   
   Closes: #69841
   
   ## Why
   
   The triggerer supervisor loads the pinned serialized Dag for every 
task-associated trigger to check whether the task uses `start_from_trigger`. If 
the serialized Dag exists but no longer contains the deferred task, 
`get_task()` raises `TaskNotFound`. The exception escapes the per-batch loop in 
`build_trigger_workloads`, so one stale task instance prevents unrelated 
healthy triggers in the same batch from starting and can repeatedly restart the 
triggerer supervisor.
   
   ## How
   
   - Wrapped `get_task()` in `_create_workload` with a `try/except 
TaskNotFound` block
   - When caught, logs a warning and sets `task = None`, falling through to the 
context-free `RunTrigger` return (matching behavior when `serialized_dag_model` 
is `None`)
   - Changed `task.start_from_trigger` check to `task is not None and 
task.start_from_trigger`
   - Added unit test verifying the fix
   


-- 
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