[Feature] raise AirflowFailException in order to avoid retrying dbt test tasks on failure #1537
Open
1 task done
Labels
dbt:test
Primarily related to dbt test command or functionality
enhancement
New feature or request
triage-needed
Items need to be reviewed / assigned to milestone
Description
Currently, all dbt tasks generated by Cosmos may inherit the same
retries
setting through thedefault_args
parameter. However, unlikedbt run
tasks, it seems unreasonable fordbt test
tasks to be retried upon failure.If a data test fails, rerunning it will likely result in the same failure, making retries unnecessary and incurring additional time and resource costs.
To optimize execution, how about introducing a parameter like
no_retries_on_test_failure: bool = True
? When enabled, this would ensure thatdbt test
tasks raise anAirflowFailException
instead of anAirflowException
, preventing them from being retried while keeping the existing retry behavior for other dbt tasks.Use case/motivation
To optimize execution, dbt test tasks should raise an
AirflowFailException
instead of anAirflowException
when they fail. This will prevent them from being retried while keeping other dbt tasks, such asdbt run
, unaffected.Related issues
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: