Skip to content

Commit b79551b

Browse files
Initialize elementary_tests_allowlist_status in clickhouse__get_test_results
Pre-existing bug surfaced by CodeRabbit: the ClickHouse variant of get_test_results passes elementary_tests_allowlist_status into _process_raw_test_results without ever initializing it. The default__ and fabric__ variants both set it from disable_passed_test_metrics at the top of the macro. Without this, sample selection for non-dbt_test rows (anomaly/schema_change) would silently skip on ClickHouse because the 'status in elementary_tests_allowlist_status' check would fail on an undefined value. Co-Authored-By: mika@elementary-data.com <mika.kerman@gmail.com>
1 parent a174c35 commit b79551b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

elementary/monitor/dbt_project/macros/get_test_results.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@
183183
{%- endmacro -%}
184184

185185
{%- macro clickhouse__get_test_results(days_back = 7, invocations_per_test = 720, disable_passed_test_metrics = false, skip_test_result_rows = false) -%}
186+
{% set elementary_tests_allowlist_status = ['fail', 'warn'] if disable_passed_test_metrics else ['fail', 'warn', 'pass'] %}
186187
{% do elementary.run_query('drop table if exists ordered_test_results') %}
187188
{% set create_table_query %}
188189
CREATE TABLE ordered_test_results (

0 commit comments

Comments
 (0)