Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4FC63200D1F for ; Thu, 28 Sep 2017 17:37:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4E34B1609C2; Thu, 28 Sep 2017 15:37:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9C6331609CD for ; Thu, 28 Sep 2017 17:37:07 +0200 (CEST) Received: (qmail 55701 invoked by uid 500); 28 Sep 2017 15:37:06 -0000 Mailing-List: contact commits-help@airflow.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.incubator.apache.org Delivered-To: mailing list commits@airflow.incubator.apache.org Received: (qmail 55598 invoked by uid 99); 28 Sep 2017 15:37:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Sep 2017 15:37:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 419211A264E for ; Thu, 28 Sep 2017 15:37:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.001 X-Spam-Level: X-Spam-Status: No, score=-100.001 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id MYLxkcrbrcao for ; Thu, 28 Sep 2017 15:37:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id A1A1A60D8B for ; Thu, 28 Sep 2017 15:37:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 738C9E2573 for ; Thu, 28 Sep 2017 15:37:03 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id D7B66242FF for ; Thu, 28 Sep 2017 15:37:01 +0000 (UTC) Date: Thu, 28 Sep 2017 15:37:01 +0000 (UTC) From: "Charlie Jones (JIRA)" To: commits@airflow.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (AIRFLOW-988) SLA Miss Callbacks Are Repeated if Email is Not being Used MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 28 Sep 2017 15:37:08 -0000 [ https://issues.apache.org/jira/browse/AIRFLOW-988?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Charlie Jones reassigned AIRFLOW-988: ------------------------------------- Assignee: Charlie Jones > SLA Miss Callbacks Are Repeated if Email is Not being Used > ---------------------------------------------------------- > > Key: AIRFLOW-988 > URL: https://issues.apache.org/jira/browse/AIRFLOW-988 > Project: Apache Airflow > Issue Type: Bug > Affects Versions: Airflow 1.8 > Reporter: Zachary Lawson > Assignee: Charlie Jones > > There is an issue in the current v1-8-stable branch. Looking at the jobs.py 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|https://github.com/apache/incubator-airflow/blob/v1-8-stable/airflow/jobs.py#L606-L613]), but then executes the sla_miss_callback function regardless if notification_sent was true ([see lines 644-648|https://github.com/apache/incubator-airflow/blob/v1-8-stable/airflow/jobs.py#L644-L648]). 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 (v6.4.14#64029)