From 6720d1135e43ae56cba16fff83df82bda8ab8251 Mon Sep 17 00:00:00 2001 From: Shunping Huang Date: Tue, 19 May 2026 12:23:14 -0400 Subject: [PATCH 1/3] Disable grpc fork support in some test suite. --- .../runners/portability/portable_runner_test.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sdks/python/apache_beam/runners/portability/portable_runner_test.py b/sdks/python/apache_beam/runners/portability/portable_runner_test.py index 0f44afb2f123..1b48c1c70492 100644 --- a/sdks/python/apache_beam/runners/portability/portable_runner_test.py +++ b/sdks/python/apache_beam/runners/portability/portable_runner_test.py @@ -328,6 +328,22 @@ class PortableRunnerTestWithSubprocessesAndMultiWorkers( PortableRunnerTestWithSubprocesses): _use_subprocesses = True + @classmethod + def setUpClass(cls): + import os + cls._old_fork_support = os.environ.get('GRPC_ENABLE_FORK_SUPPORT') + os.environ['GRPC_ENABLE_FORK_SUPPORT'] = 'false' + super().setUpClass() + + @classmethod + def tearDownClass(cls): + import os + if cls._old_fork_support is None: + os.environ.pop('GRPC_ENABLE_FORK_SUPPORT', None) + else: + os.environ['GRPC_ENABLE_FORK_SUPPORT'] = cls._old_fork_support + super().tearDownClass() + def create_options(self): options = super() \ .create_options() From 24446421ac84ba00185e6de81f4b856935f2f49e Mon Sep 17 00:00:00 2001 From: Shunping Huang Date: Wed, 20 May 2026 01:00:34 -0400 Subject: [PATCH 2/3] Disable GRPC fork support. --- .../apache_beam/utils/subprocess_server_test.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sdks/python/apache_beam/utils/subprocess_server_test.py b/sdks/python/apache_beam/utils/subprocess_server_test.py index efd357c4c136..f6cebbd8bd9c 100644 --- a/sdks/python/apache_beam/utils/subprocess_server_test.py +++ b/sdks/python/apache_beam/utils/subprocess_server_test.py @@ -37,6 +37,22 @@ class JavaJarServerTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + import os + cls._old_fork_support = os.environ.get('GRPC_ENABLE_FORK_SUPPORT') + os.environ['GRPC_ENABLE_FORK_SUPPORT'] = 'false' + super().setUpClass() + + @classmethod + def tearDownClass(cls): + import os + if cls._old_fork_support is None: + os.environ.pop('GRPC_ENABLE_FORK_SUPPORT', None) + else: + os.environ['GRPC_ENABLE_FORK_SUPPORT'] = cls._old_fork_support + super().tearDownClass() + def test_gradle_jar_release(self): self.assertEqual( 'https://repo.maven.apache.org/maven2/org/apache/beam/' From c07f019b8fc5d6e9b5ba0663118d2db5c1b8ca11 Mon Sep 17 00:00:00 2001 From: Shunping Huang Date: Wed, 20 May 2026 09:36:38 -0400 Subject: [PATCH 3/3] Add TODOs --- .../apache_beam/runners/portability/portable_runner_test.py | 5 +++-- sdks/python/apache_beam/utils/subprocess_server_test.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sdks/python/apache_beam/runners/portability/portable_runner_test.py b/sdks/python/apache_beam/runners/portability/portable_runner_test.py index 1b48c1c70492..a1ed7448f050 100644 --- a/sdks/python/apache_beam/runners/portability/portable_runner_test.py +++ b/sdks/python/apache_beam/runners/portability/portable_runner_test.py @@ -18,6 +18,7 @@ import inspect import logging +import os import socket import subprocess import sys @@ -328,16 +329,16 @@ class PortableRunnerTestWithSubprocessesAndMultiWorkers( PortableRunnerTestWithSubprocesses): _use_subprocesses = True + # TODO(https://github.com/grpc/grpc/issues/37710): Remove once fixed. @classmethod def setUpClass(cls): - import os cls._old_fork_support = os.environ.get('GRPC_ENABLE_FORK_SUPPORT') os.environ['GRPC_ENABLE_FORK_SUPPORT'] = 'false' super().setUpClass() + # TODO(https://github.com/grpc/grpc/issues/37710): Remove once fixed. @classmethod def tearDownClass(cls): - import os if cls._old_fork_support is None: os.environ.pop('GRPC_ENABLE_FORK_SUPPORT', None) else: diff --git a/sdks/python/apache_beam/utils/subprocess_server_test.py b/sdks/python/apache_beam/utils/subprocess_server_test.py index f6cebbd8bd9c..073b8b3bcbe8 100644 --- a/sdks/python/apache_beam/utils/subprocess_server_test.py +++ b/sdks/python/apache_beam/utils/subprocess_server_test.py @@ -37,16 +37,17 @@ class JavaJarServerTest(unittest.TestCase): + + # TODO(https://github.com/grpc/grpc/issues/37710): Remove once fixed. @classmethod def setUpClass(cls): - import os cls._old_fork_support = os.environ.get('GRPC_ENABLE_FORK_SUPPORT') os.environ['GRPC_ENABLE_FORK_SUPPORT'] = 'false' super().setUpClass() + # TODO(https://github.com/grpc/grpc/issues/37710): Remove once fixed. @classmethod def tearDownClass(cls): - import os if cls._old_fork_support is None: os.environ.pop('GRPC_ENABLE_FORK_SUPPORT', None) else: