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 a4a3ede4a5 Added fixes for Airflow to be usable on Windows 
Dask-Workers (#30249)
a4a3ede4a5 is described below

commit a4a3ede4a5536c97b08b69a70dfec75fe89de596
Author: dominik-werner-casra 
<[email protected]>
AuthorDate: Wed Mar 29 14:11:42 2023 +0200

    Added fixes for Airflow to be usable on Windows Dask-Workers (#30249)
    
    Co-authored-by: Dominik Werner <[email protected]>
---
 airflow/jobs/local_task_job.py | 2 +-
 airflow/utils/process_utils.py | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/airflow/jobs/local_task_job.py b/airflow/jobs/local_task_job.py
index ed5ec5ffea..ccc52e0b47 100644
--- a/airflow/jobs/local_task_job.py
+++ b/airflow/jobs/local_task_job.py
@@ -263,7 +263,7 @@ class LocalTaskJob(BaseJob):
                 recorded_pid = psutil.Process(ti.pid).ppid()
                 same_process = recorded_pid == current_pid
 
-            if recorded_pid is not None and not same_process:
+            if recorded_pid is not None and not same_process and not 
IS_WINDOWS:
                 self.log.warning(
                     "Recorded pid %s does not match the current pid %s", 
recorded_pid, current_pid
                 )
diff --git a/airflow/utils/process_utils.py b/airflow/utils/process_utils.py
index 6cbd18416e..df6620f6ac 100644
--- a/airflow/utils/process_utils.py
+++ b/airflow/utils/process_utils.py
@@ -80,6 +80,8 @@ def reap_process_group(
         returncodes[p.pid] = p.returncode
 
     def signal_procs(sig):
+        if IS_WINDOWS:
+            return
         try:
             logger.info("Sending the signal %s to group %s", sig, 
process_group_id)
             os.killpg(process_group_id, sig)
@@ -108,7 +110,7 @@ def reap_process_group(
             else:
                 raise
 
-    if process_group_id == os.getpgid(0):
+    if not IS_WINDOWS and process_group_id == os.getpgid(0):
         raise RuntimeError("I refuse to kill myself")
 
     try:

Reply via email to