You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2023/12/22 11:08:10 UTC
(airflow) branch main updated: Fix PythonVirtualenvOperator tests (#36367)
This is an automated email from the ASF dual-hosted git repository.
potiuk 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 af4b51cdfc Fix PythonVirtualenvOperator tests (#36367)
af4b51cdfc is described below
commit af4b51cdfc8f98bec9922facd165ea8a6440c12b
Author: Maxim Martynov <ma...@mail.ru>
AuthorDate: Fri Dec 22 14:08:03 2023 +0300
Fix PythonVirtualenvOperator tests (#36367)
---
airflow/operators/python.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/airflow/operators/python.py b/airflow/operators/python.py
index e134108253..1c5c9d3f69 100644
--- a/airflow/operators/python.py
+++ b/airflow/operators/python.py
@@ -472,6 +472,9 @@ class _BasePythonVirtualenvOperator(PythonOperator, metaclass=ABCMeta):
else:
raise
+ if 0 in self.skip_on_exit_code:
+ raise AirflowSkipException("Process exited with code 0. Skipping.")
+
return self._read_result(output_path)
def determine_kwargs(self, context: Mapping[str, Any]) -> Mapping[str, Any]: