airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Stern (Jira)" <>
Subject [jira] [Updated] (AIRFLOW-6535) add exception subclass to fail immediately without retrying
Date Thu, 16 Jan 2020 13:59:00 GMT


Jon Stern updated AIRFLOW-6535:
    Component/s: documentation

> add exception subclass to fail immediately without retrying
> -----------------------------------------------------------
>                 Key: AIRFLOW-6535
>                 URL:
>             Project: Apache Airflow
>          Issue Type: New Feature
>          Components: documentation, models
>    Affects Versions: master
>            Reporter: Jon Stern
>            Priority: Minor
> I would like to be able to configure certain tasks to retry, but to also have a way to
bypass retry if I can detect a condition that is unlikely to be change for the better.
> For example, imagine I have a DAG with a large number of tasks that fetch data from an
API ... sometimes the API returns a 200 and everything is fine, sometimes the API returns
a 500 and I know this means that API is failing under load and I want to retry later, and
sometimes the API returns a 400 indicating that I've configured my requests in a way that
will never succeed. If the API returns a 400 for some/all of my tasks, then I have to wait
for all of them to get through all their retries before the run fails.
> My proposal is to add another subclass of AirflowException called AirflowFailException,
and to update the exception handling in TaskInstance.run_raw_task such that when this exception
is seen, the resulting behavior is that same as if we entered handle_failure and is_eligible_for_returned
false (except with adjusted logging so it does not look like we simply hit our retry limit). 

This message was sent by Atlassian Jira

View raw message