Attempt to fix all CI failures:

* Fixes the Windows Cython obsolate issue
* Fixes the post fork threading issue
pull/21232/head
Lidi Zheng 5 years ago
parent 32d05488f6
commit c5d194062c
  1. 1
      src/python/grpcio/grpc/_cython/_cygrpc/aio/grpc_aio.pxd.pxi
  2. 1
      src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pyx.pxi
  3. 1
      src/python/grpcio_tests/tests/_runner.py
  4. 1
      src/python/grpcio_tests/tests_aio/unit/channel_test.py
  5. 1
      tools/run_tests/artifacts/build_artifact_python.bat
  6. 8
      tools/run_tests/run_tests.py

@ -13,6 +13,7 @@
# limitations under the License.
# distutils: language=c++
cdef extern from "src/core/lib/iomgr/timer_manager.h":
void grpc_timer_manager_set_threading(bint enabled);

@ -32,6 +32,7 @@ _TRUE_VALUES = ['yes', 'Yes', 'YES', 'true', 'True', 'TRUE', '1']
# must not block and should execute quickly.
#
# This flag is not supported on Windows.
# This flag is also not supported for non-native IO manager.
_GRPC_ENABLE_FORK_SUPPORT = (
os.environ.get('GRPC_ENABLE_FORK_SUPPORT', '0')
.lower() in _TRUE_VALUES)

@ -15,7 +15,6 @@
from __future__ import absolute_import
import collections
import multiprocessing
import os
import select
import signal

@ -14,6 +14,7 @@
"""Tests behavior of the grpc.aio.Channel class."""
import logging
import threading
import unittest
import grpc

@ -18,6 +18,7 @@ set PATH=C:\%1;C:\%1\scripts;C:\msys64\mingw%2\bin;C:\tools\msys64\mingw%2\bin;%
python -m pip install --upgrade six
@rem some artifacts are broken for setuptools 38.5.0. See https://github.com/grpc/grpc/issues/14317
python -m pip install --upgrade setuptools==38.2.4
python -m pip install --upgrade cython
python -m pip install -rrequirements.txt
set GRPC_PYTHON_BUILD_WITH_CYTHON=1

@ -727,13 +727,17 @@ class PythonLanguage(object):
self.args.iomgr_platform]) as tests_json_file:
tests_json = json.load(tests_json_file)
environment = dict(_FORCE_ENVIRON_FOR_WRAPPERS)
# NOTE(lidiz) Fork handlers is not designed for non-native IO manager.
# It has a side-effect that overrides threading settings in C-Core.
if args.iomgr_platform != 'native':
environment['GRPC_ENABLE_FORK_SUPPORT'] = '0'
return [
self.config.job_spec(
config.run,
timeout_seconds=5 * 60,
environ=dict(
list(environment.items()) + [(
'GRPC_PYTHON_TESTRUNNER_FILTER', str(suite_name))]),
GRPC_PYTHON_TESTRUNNER_FILTER=str(suite_name),
**environment),
shortname='%s.%s.%s' %
(config.name, self._TEST_FOLDER[self.args.iomgr_platform],
suite_name),

Loading…
Cancel
Save