airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (AIRFLOW-988) SLA Miss Callbacks Are Repeated if Email is Not being Used
Date Mon, 02 Oct 2017 20:53:01 GMT


ASF subversion and git services commented on AIRFLOW-988:

Commit ebc02fb53e0faa59cb2dcbc1db13adc58a88646c in incubator-airflow's branch refs/heads/master
from [~cjonesy]
[;h=ebc02fb ]

[AIRFLOW-988] Fix repeating SLA miss callbacks

When a callback is passed to `sla_miss_callback` but an email address
is not specified, the callback will be continuously called. This is due
to the logic used when pulling the slas in `SchedulerJob.manage_slas`.

By filtering on `notification_sent` only we will still handle the cases
where email is used, but it will prevent the continuous callbacks.

Closes #2415 from cjonesy/master

> SLA Miss Callbacks Are Repeated if Email is Not being Used
> ----------------------------------------------------------
>                 Key: AIRFLOW-988
>                 URL:
>             Project: Apache Airflow
>          Issue Type: Bug
>    Affects Versions: Airflow 1.8
>            Reporter: Zachary Lawson
>            Assignee: Charlie Jones
>             Fix For: 1.9.0
> There is an issue in the current v1-8-stable branch. Looking at the module, if
the system does not have email set up but does have a sla_miss_callback defined in the DAG,
that sla_miss_callback is repeated for that job infinitely as long as the airflow scheduler
is running. The offending code seems to be in the query to the airflow meta database which
filters to sla_miss records that have *either* email_sent or notification_sent as false ([see
lines 606-613|]),
but then executes the sla_miss_callback function regardless if notification_sent was true
([see lines 644-648|]).
A conditional statement should be put prior to executing the sla_miss_callback to check whether
a notification has been sent to prevent this.

This message was sent by Atlassian JIRA

View raw message