This is an automated email from the ASF dual-hosted git repository. ephraimanierobi pushed a commit to branch v2-2-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 310e97903b0ec17c013d73b46cd2449b1e589fb6 Author: Tzu-ping Chung <t...@astronomer.io> AuthorDate: Mon Feb 21 05:05:01 2022 +0800 Log exception in local executor (#21667) (cherry picked from commit a0fb0bbad312df06dd0a85453bd4f93ee2e01cbb) --- airflow/executors/local_executor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airflow/executors/local_executor.py b/airflow/executors/local_executor.py index 775b6ca..fc662fc 100644 --- a/airflow/executors/local_executor.py +++ b/airflow/executors/local_executor.py @@ -125,12 +125,12 @@ class LocalWorkerBase(Process, LoggingMixin): ret = 0 return State.SUCCESS except Exception as e: - self.log.error("Failed to execute task %s.", str(e)) + self.log.exception("Failed to execute task %s.", e) + return State.FAILED finally: Sentry.flush() logging.shutdown() os._exit(ret) - raise RuntimeError('unreachable -- keep mypy happy') @abstractmethod def do_work(self):