From 389ae65ba92cc89ff4660e88b981103e9aeff083 Mon Sep 17 00:00:00 2001 From: masukai Date: Tue, 20 Oct 2026 20:43:12 +0900 Subject: [PATCH] fix: don't insert skipped test/model results into alerts_v2 when disable_skipped_*_alerts is on edr monitor inserts every test result that is not pass/reused and every model result that is not success/reused into alerts_v2, so skipped results are inserted. The default status filter of edr monitor then drops them before sending, and dropped alerts are not marked skipped either, so they stay pending forever. Honor the existing disable_skipped_test_alerts / disable_skipped_model_alerts vars (true by default) when populating alerts_v2, the same way #2363 handles reused. --- .../dbt_project/macros/alerts/population/model_alerts.sql | 2 +- .../dbt_project/macros/alerts/population/test_alerts.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elementary/monitor/dbt_project/macros/alerts/population/model_alerts.sql b/elementary/monitor/dbt_project/macros/alerts/population/model_alerts.sql index 0e49088a0..1f39ef8db 100644 --- a/elementary/monitor/dbt_project/macros/alerts/population/model_alerts.sql +++ b/elementary/monitor/dbt_project/macros/alerts/population/model_alerts.sql @@ -120,7 +120,7 @@ all_alerts as ( select * from all_run_results - where lower(all_run_results.status) not in ('success', 'reused') + where lower(all_run_results.status) not in ('success', 'reused'{% if elementary.get_config_var('disable_skipped_model_alerts') %}, 'skipped'{% endif %}) and {{ elementary.edr_cast_as_timestamp('all_run_results.generated_at') }} > {{ elementary.edr_timeadd('day', -1 * days_back, elementary.edr_current_timestamp()) }} ) diff --git a/elementary/monitor/dbt_project/macros/alerts/population/test_alerts.sql b/elementary/monitor/dbt_project/macros/alerts/population/test_alerts.sql index 7ce1b597e..0b8ded02a 100644 --- a/elementary/monitor/dbt_project/macros/alerts/population/test_alerts.sql +++ b/elementary/monitor/dbt_project/macros/alerts/population/test_alerts.sql @@ -121,7 +121,7 @@ status, result_rows from elementary_test_results - where lower(elementary_test_results.status) not in ('pass', 'reused') + where lower(elementary_test_results.status) not in ('pass', 'reused'{% if elementary.get_config_var('disable_skipped_test_alerts') %}, 'skipped'{% endif %}) and {{ elementary.edr_cast_as_timestamp('detected_at') }} > {{ elementary.edr_timeadd('day', -1 * days_back, elementary.edr_current_timestamp()) }} )