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 4bce72d8f6d Call sys.exit instead of builtin exit in task runner parse
method in case of missing DAG or task. (#55786)
4bce72d8f6d is described below
commit 4bce72d8f6da0435c4b9cc83e107cc4ec8d02931
Author: Kosteev Eugene <[email protected]>
AuthorDate: Thu Sep 18 01:21:44 2025 +0200
Call sys.exit instead of builtin exit in task runner parse method in case
of missing DAG or task. (#55786)
Builtin exit method apart from raising SystemExit exception also closes
stdin (supervisor socket in case of task runner), which breaks
supervisor-runner communication.
---
task-sdk/src/airflow/sdk/execution_time/task_runner.py | 4 ++--
1 file changed, 2 insertions(+), 2 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 bb92ff00154..409982d1a6b 100644
--- a/task-sdk/src/airflow/sdk/execution_time/task_runner.py
+++ b/task-sdk/src/airflow/sdk/execution_time/task_runner.py
@@ -633,7 +633,7 @@ def parse(what: StartupDetails, log: Logger) ->
RuntimeTaskInstance:
log.error(
"Dag not found during start up", dag_id=what.ti.dag_id,
bundle=bundle_info, path=what.dag_rel_path
)
- exit(1)
+ sys.exit(1)
# install_loader()
@@ -647,7 +647,7 @@ def parse(what: StartupDetails, log: Logger) ->
RuntimeTaskInstance:
bundle=bundle_info,
path=what.dag_rel_path,
)
- exit(1)
+ sys.exit(1)
if not isinstance(task, (BaseOperator, MappedOperator)):
raise TypeError(