josh-fell commented on issue #26760:
URL: https://github.com/apache/airflow/issues/26760#issuecomment-1264153224

   > Actually both options are mentioned: 
https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/callbacks.html
   
   Callbacks are set at both the DAG and task level in the code snippets, but 
the copy in the doc only mentions _tasks_. Even the callback callable of 
`on_failure_callback=task_failure_alert` set at the DAG is named in a 
misleading way. The callback will be triggered when the _DagRun_ fails. Which 
is similar to a task failing but the context provided to the callable wouldn't 
necessarily be related to the task that failed. IIRC the context passed to the 
DAG-level callback is either the first task's context or just whatever is 
returned from the metadatabase first. IMO the doc can use a glow-up to help 
with these distinctions.
   
   > Perhaps we should rename the DAG-level argument to on_dag_failure_callback 
instead?
   
   +1


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