From bc1b033bafa58966dc9201e37c8873a8ad37180a Mon Sep 17 00:00:00 2001 From: Andrew Halberstadt Date: Thu, 21 May 2026 14:07:53 -0400 Subject: [PATCH 1/2] fix: enable Slack notifications for fxci DAGs --- dags/fxci_metric_export.py | 9 +++++++++ dags/fxci_pulse_export.py | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/dags/fxci_metric_export.py b/dags/fxci_metric_export.py index 061bb0102..0718ae762 100644 --- a/dags/fxci_metric_export.py +++ b/dags/fxci_metric_export.py @@ -8,10 +8,18 @@ from airflow import DAG from airflow.providers.cncf.kubernetes.secret import Secret +from airflow.providers.slack.notifications.slack import send_slack_notification from operators.gcp_container_operator import GKEPodOperator from utils.tags import Tag +SLACK_FAILURE_NOTIFICATION = send_slack_notification( + text="DAG {{ dag.dag_id }} failed: <{{ task_instance.log_url }}|view log>", + username="airflow-bot", + slack_conn_id="slack_airflow_bot", + channel="#fxci-etl", +) + default_args = { "owner": "ahalberstadt@mozilla.com", "depends_on_past": False, @@ -20,6 +28,7 @@ "email_on_retry": False, "retries": 1, "retry_delay": timedelta(minutes=30), + "on_failure_callback": SLACK_FAILURE_NOTIFICATION, } tags = [Tag.ImpactTier.tier_3] diff --git a/dags/fxci_pulse_export.py b/dags/fxci_pulse_export.py index 8b6ed3e9a..7843a93d5 100644 --- a/dags/fxci_pulse_export.py +++ b/dags/fxci_pulse_export.py @@ -11,10 +11,18 @@ from airflow import DAG from airflow.providers.cncf.kubernetes.secret import Secret +from airflow.providers.slack.notifications.slack import send_slack_notification from operators.gcp_container_operator import GKEPodOperator from utils.tags import Tag +SLACK_FAILURE_NOTIFICATION = send_slack_notification( + text="DAG {{ dag.dag_id }} failed: <{{ task_instance.log_url }}|view log>", + username="airflow-bot", + slack_conn_id="slack_airflow_bot", + channel="#fxci-etl", +) + default_args = { "owner": "ahalberstadt@mozilla.com", "depends_on_past": False, @@ -23,6 +31,7 @@ "email_on_retry": False, "retries": 1, "retry_delay": timedelta(minutes=30), + "on_failure_callback": SLACK_FAILURE_NOTIFICATION, } tags = [Tag.ImpactTier.tier_3] From ee8c7ec42be522f4f3200c61d3d20e5ce864a0fe Mon Sep 17 00:00:00 2001 From: Andrew Halberstadt Date: Thu, 21 May 2026 14:16:51 -0400 Subject: [PATCH 2/2] fix: ensure failure e-mails reach all of releng --- dags/fxci_metric_export.py | 2 +- dags/fxci_pulse_export.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dags/fxci_metric_export.py b/dags/fxci_metric_export.py index 0718ae762..63b534bd3 100644 --- a/dags/fxci_metric_export.py +++ b/dags/fxci_metric_export.py @@ -77,7 +77,7 @@ gcp_conn_id="google_cloud_airflow_gke", dag=dag, email=[ - "ahalberstadt@mozilla.com", + "release+fxci-etl@mozilla.com", "telemetry-alerts@mozilla.com", ], ) diff --git a/dags/fxci_pulse_export.py b/dags/fxci_pulse_export.py index 7843a93d5..005f787e5 100644 --- a/dags/fxci_pulse_export.py +++ b/dags/fxci_pulse_export.py @@ -80,7 +80,7 @@ gcp_conn_id="google_cloud_airflow_gke", dag=dag, email=[ - "ahalberstadt@mozilla.com", + "release+fxci-etl@mozilla.com", "telemetry-alerts@mozilla.com", ], )