This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 92c72dbd9b7 AIP-72: Remove redundant handling of `AirflowException`
(#45505)
92c72dbd9b7 is described below
commit 92c72dbd9b760bfa915a472bdf7e9dd003f8cc33
Author: Kaxil Naik <[email protected]>
AuthorDate: Thu Jan 9 16:00:16 2025 +0530
AIP-72: Remove redundant handling of `AirflowException` (#45505)
This is already handled in the code below:
https://github.com/apache/airflow/blob/9de80ab8f76798e0d3daedf6565832bc36650961/task_sdk/src/airflow/sdk/execution_time/task_runner.py#L485-L492
So it will never reach
https://github.com/apache/airflow/blob/9de80ab8f76798e0d3daedf6565832bc36650961/task_sdk/src/airflow/sdk/execution_time/task_runner.py#L493-L499
---
task_sdk/src/airflow/sdk/execution_time/task_runner.py | 7 -------
1 file changed, 7 deletions(-)
diff --git a/task_sdk/src/airflow/sdk/execution_time/task_runner.py
b/task_sdk/src/airflow/sdk/execution_time/task_runner.py
index 1c7c96c3d5f..4b7b50c5ed6 100644
--- a/task_sdk/src/airflow/sdk/execution_time/task_runner.py
+++ b/task_sdk/src/airflow/sdk/execution_time/task_runner.py
@@ -490,13 +490,6 @@ def run(ti: RuntimeTaskInstance, log: Logger):
end_date=datetime.now(tz=timezone.utc),
)
# TODO: Run task failure callbacks here
- except AirflowException:
- # TODO: handle the case of up_for_retry here
- log.exception("Task failed with exception")
- msg = TaskState(
- state=TerminalTIState.FAILED,
- end_date=datetime.now(tz=timezone.utc),
- )
except AirflowTaskTerminated:
# External state updates are already handled with `ti_heartbeat` and
will be
# updated already be another UI API. So, these exceptions should
ideally never be thrown.