diff --git a/dbt_project.yml b/dbt_project.yml index a4dcb97..2bc01d4 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -29,6 +29,7 @@ vars: exclude_packages: ["elementary"] airflow_start_timestamp: "{{ env_var('AIRFLOW_START_TIMESTAMP', '2000-01-01') }}" + is_singular_airflow_task: "{{ env_var('IS_SINGULAR_AIRFLOW_TASK', 'false') }}" # Configuring models # Full documentation: https://docs.getdbt.com/docs/configuring-models diff --git a/tests/anomaly_detection_trade_count.sql b/tests/anomaly_detection_trade_count.sql index 78594f4..1bfe017 100644 --- a/tests/anomaly_detection_trade_count.sql +++ b/tests/anomaly_detection_trade_count.sql @@ -1,6 +1,9 @@ +-- Strictly use enabled condition to restrict singular tests from running in dbt build tasks. +-- https://github.com/stellar/stellar-dbt-public/pull/95 {{ config( severity="warn" , tags=["singular_test"] + , enabled=(target.name == "prod" and var("is_singular_airflow_task") == "true") ) }} diff --git a/tests/anomaly_detection_trade_volume.sql b/tests/anomaly_detection_trade_volume.sql index 0814dde..811e7f0 100644 --- a/tests/anomaly_detection_trade_volume.sql +++ b/tests/anomaly_detection_trade_volume.sql @@ -1,6 +1,9 @@ +-- Strictly use enabled condition to restrict singular tests from running in dbt build tasks. +-- https://github.com/stellar/stellar-dbt-public/pull/95 {{ config( severity="warn" , tags=["singular_test"] + , enabled=(target.name == "prod" and var("is_singular_airflow_task") == "true") ) }} diff --git a/tests/bucketlist_db_size_check.sql b/tests/bucketlist_db_size_check.sql index cd2fcf5..1f5537a 100644 --- a/tests/bucketlist_db_size_check.sql +++ b/tests/bucketlist_db_size_check.sql @@ -1,6 +1,9 @@ +-- Strictly use enabled condition to restrict singular tests from running in dbt build tasks. +-- https://github.com/stellar/stellar-dbt-public/pull/95 {{ config( severity="error" , tags=["singular_test"] + , enabled=(target.name == "prod" and var("is_singular_airflow_task") == "true") ) }} diff --git a/tests/eho_by_ops.sql b/tests/eho_by_ops.sql index 31746a3..88ed7c3 100644 --- a/tests/eho_by_ops.sql +++ b/tests/eho_by_ops.sql @@ -1,7 +1,10 @@ +-- Strictly use enabled condition to restrict singular tests from running in dbt build tasks. +-- https://github.com/stellar/stellar-dbt-public/pull/95 {{ config( severity="error" , tags=["singular_test"] , meta={"alert_suppression_interval": 24} + , enabled=(target.name == "prod" and var("is_singular_airflow_task") == "true") ) }} diff --git a/tests/ledger_sequence_increment.sql b/tests/ledger_sequence_increment.sql index 8ca36e1..6159325 100644 --- a/tests/ledger_sequence_increment.sql +++ b/tests/ledger_sequence_increment.sql @@ -1,6 +1,9 @@ +-- Strictly use enabled condition to restrict singular tests from running in dbt build tasks. +-- https://github.com/stellar/stellar-dbt-public/pull/95 {{ config( severity="warn" , tags=["singular_test"] + , enabled=var("is_singular_airflow_task") == "true" ) }} diff --git a/tests/num_txns_and_ops.sql b/tests/num_txns_and_ops.sql index 1f8c823..1b7b3a4 100644 --- a/tests/num_txns_and_ops.sql +++ b/tests/num_txns_and_ops.sql @@ -1,6 +1,9 @@ +-- Strictly use enabled condition to restrict singular tests from running in dbt build tasks. +-- https://github.com/stellar/stellar-dbt-public/pull/95 {{ config( severity="error" , tags=["singular_test"] + , enabled=(target.name == "prod" and var("is_singular_airflow_task") == "true") ) }} diff --git a/tests/sorobon_surge_pricing_check.sql b/tests/sorobon_surge_pricing_check.sql index 395b50a..54f196e 100644 --- a/tests/sorobon_surge_pricing_check.sql +++ b/tests/sorobon_surge_pricing_check.sql @@ -1,7 +1,10 @@ +-- Strictly use enabled condition to restrict singular tests from running in dbt build tasks. +-- https://github.com/stellar/stellar-dbt-public/pull/95 {{ config( severity="warn" , tags=["singular_test"] , meta={"alert_suppression_interval": 24} + , enabled=(target.name == "prod" and var("is_singular_airflow_task") == "true") ) }}