You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by as...@apache.org on 2021/09/03 12:39:33 UTC
[airflow] branch main updated: Logs task launch exception in
StandardTaskRunner (#17967)
This is an automated email from the ASF dual-hosted git repository.
ash 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 b6a962c Logs task launch exception in StandardTaskRunner (#17967)
b6a962c is described below
commit b6a962ca875bc29aa82a252f5c179faff601780b
Author: Narendra-Neerukonda <na...@gmail.com>
AuthorDate: Fri Sep 3 18:09:14 2021 +0530
Logs task launch exception in StandardTaskRunner (#17967)
Adds an error log message to task runner when task launch fails with error code 1
Co-authored-by: Yash Dodeja <yd...@gmail.com>
---
airflow/task/task_runner/standard_task_runner.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/airflow/task/task_runner/standard_task_runner.py b/airflow/task/task_runner/standard_task_runner.py
index 83b775d..15830d5 100644
--- a/airflow/task/task_runner/standard_task_runner.py
+++ b/airflow/task/task_runner/standard_task_runner.py
@@ -85,6 +85,11 @@ class StandardTaskRunner(BaseTaskRunner):
args.func(args, dag=self.dag)
return_code = 0
except Exception:
+ self.log.exception(
+ "Failed to execute job %s fo task %s",
+ self._task_instance.job_id,
+ self._task_instance.task_id,
+ )
return_code = 1
finally:
# Explicitly flush any pending exception to Sentry if enabled