ABiscuitttt commented on PR #70506:
URL: https://github.com/apache/airflow/pull/70506#issuecomment-5099076544
Some context on how we ran into this: we run a global failure-alert listener
plugin that pages our on-call channel (Feishu/Lark) through the
`on_task_instance_failed` hook when a task instance reaches its final `FAILED`
state:
```python
@hookimpl
def on_task_instance_failed(previous_state, task_instance, error):
if task_instance.state != TaskInstanceState.FAILED:
return # still up_for_retry; only alert on final failure
send_alert(task_instance, error) # internal notification
```
(Internal plugin code sanitized for posting.)
When a `TriggerDagRunOperator` points at a non-existent Dag, the task dies
from the API error without this hook ever firing, so no alert goes out — from
the on-call perspective the task fails silently. That is what led to this fix:
routing the API error through the normal failure path makes `finalize()` fire
the listener (and honor the retry policy) as expected.
---
Drafted-by: Kimi Code CLI (no human review before posting)
--
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]