From 27f0cb603e4d74119c12cda13e281e062098530d Mon Sep 17 00:00:00 2001 From: Eduardo Alves Date: Tue, 9 Jul 2024 17:17:44 -0300 Subject: [PATCH] Added skip_retry_dbt_errors to on_retry_callback for dbt tasks --- dags/stellar_etl_airflow/build_dbt_task.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dags/stellar_etl_airflow/build_dbt_task.py b/dags/stellar_etl_airflow/build_dbt_task.py index df34f292..bb8667a9 100644 --- a/dags/stellar_etl_airflow/build_dbt_task.py +++ b/dags/stellar_etl_airflow/build_dbt_task.py @@ -8,6 +8,7 @@ ) from kubernetes.client import models as k8s from stellar_etl_airflow.default import alert_after_max_retries +from stellar_etl_airflow.utils import skip_retry_dbt_errors def create_dbt_profile(project="prod"): @@ -142,6 +143,7 @@ def dbt_task( config_file=config_file_location, container_resources=container_resources, on_failure_callback=alert_after_max_retries, + on_retry_callback=skip_retry_dbt_errors, image_pull_policy="IfNotPresent", image_pull_secrets=[k8s.V1LocalObjectReference("private-docker-auth")], sla=timedelta( @@ -223,6 +225,7 @@ def build_dbt_task( config_file=config_file_location, container_resources=resources_requests, on_failure_callback=alert_after_max_retries, + on_retry_callback=skip_retry_dbt_errors, image_pull_policy="IfNotPresent", image_pull_secrets=[k8s.V1LocalObjectReference("private-docker-auth")], sla=timedelta(