You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Huihua Zhang (JIRA)" <ji...@apache.org> on 2019/05/08 15:21:00 UTC
[jira] [Created] (AIRFLOW-4480) dagrun_timeout won't trigger
callbacks
Huihua Zhang created AIRFLOW-4480:
-------------------------------------
Summary: dagrun_timeout won't trigger callbacks
Key: AIRFLOW-4480
URL: https://issues.apache.org/jira/browse/AIRFLOW-4480
Project: Apache Airflow
Issue Type: Bug
Components: DAG
Reporter: Huihua Zhang
[AIRFLOW-511|https://issues.apache.org/jira/browse/AIRFLOW-511] introduced on_success_callback and on_failure_callback callbacks and passed test_dagrun_success_callback and test_dagrun_failure_callback tests. This is great. But for dagrun_timeout, airflow hasn't covered the case. Although there is one line to handle_callback when dag exceeded dagrun_timeout, actually it won't ever trigger any callbacks. The reason is [the dag here|[https://github.com/apache/airflow/blob/master/airflow/jobs.py#L790]] has no on_success_callback and on_failure_callback which are both None. These DAGs are from [DagFileProcessor|[https://github.com/apache/airflow/blob/master/airflow/jobs.py#L300]] which parsed python files to get DAG ids and then get DAGs with None callbacks.
I've checked airflow database, seems it doesn't store callbacks in the database. Are there any approaches that we can get DAGs with callbacks along with other DAG settings in [SchedulerJob|[https://github.com/apache/airflow/blob/master/airflow/jobs.py#L393]]? Or in brief how to trigger callbacks when dagrun_timeout? Thanks.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)