Skip to content

Commit

Permalink
Added skip_retry_dbt_errors to on_retry_callback for dbt tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
edualvess committed Jul 9, 2024
1 parent 0b69a38 commit 27f0cb6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dags/stellar_etl_airflow/build_dbt_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 27f0cb6

Please sign in to comment.