From 755c10b99752b1868eb410a00563eff537300e91 Mon Sep 17 00:00:00 2001 From: Kaxil Naik Date: Tue, 29 Oct 2024 15:06:36 +0000 Subject: [PATCH] Fix docstring for `TI.fetch_handle_failure_context` (#43481) While debugging test failures on https://github.com/apache/airflow/pull/43076, found that this docstring was wrong, most likely a copy/paste error of `ti._handle_failure` --- airflow/models/taskinstance.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/airflow/models/taskinstance.py b/airflow/models/taskinstance.py index 9fc4c3b032b2..f67f61529e15 100644 --- a/airflow/models/taskinstance.py +++ b/airflow/models/taskinstance.py @@ -3187,9 +3187,15 @@ def fetch_handle_failure_context( fail_stop: bool = False, ): """ - Handle Failure for the TaskInstance. + Fetch the context needed to handle a failure. - :param fail_stop: if true, stop remaining tasks in dag + :param ti: TaskInstance + :param error: if specified, log the specific exception if thrown + :param test_mode: doesn't record success or failure in the DB if True + :param context: Jinja2 context + :param force_fail: if True, task does not retry + :param session: SQLAlchemy ORM Session + :param fail_stop: if True, fail all downstream tasks """ if error: if isinstance(error, BaseException):