diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl index 1e7d77fd0..e9226d954 100644 --- a/bazel/ray_deps_setup.bzl +++ b/bazel/ray_deps_setup.bzl @@ -236,11 +236,13 @@ def ray_deps_setup(): auto_http_archive( name = "com_github_grpc_grpc", # NOTE: If you update this, also update @boringssl's hash. - url = "https://github.com/grpc/grpc/archive/refs/tags/v1.45.2.tar.gz", - sha256 = "e18b16f7976aab9a36c14c38180f042bb0fd196b75c9fd6a20a2b5f934876ad6", + url = "https://github.com/grpc/grpc/archive/refs/tags/v1.43.2.tar.gz", + sha256 = "b74ce7d26fe187970d1d8e2c06a5d3391122f7bc1fdce569aff5e435fb8fe780", patches = [ "@com_github_ray_project_ray//thirdparty/patches:grpc-cython-copts.patch", "@com_github_ray_project_ray//thirdparty/patches:grpc-python.patch", + # Delete after upgrading from 1.44.0 + "@com_github_ray_project_ray//thirdparty/patches:grpc-remove-distutils.patch", ], ) diff --git a/python/ray/tests/BUILD b/python/ray/tests/BUILD index 5736792e2..03b3487eb 100644 --- a/python/ray/tests/BUILD +++ b/python/ray/tests/BUILD @@ -130,6 +130,7 @@ py_test_module_list( "test_stress_sharded.py", "test_tempfile.py", "test_tensorflow.py", + "test_threaded_actor.py", "test_tls_auth.py", "test_ray_debugger.py", "test_worker_capping.py", @@ -218,7 +219,6 @@ py_test_module_list( "test_cli.py", "test_failure.py", "test_actor_advanced.py", - "test_threaded_actor.py", "test_stress_failure.py", "test_reconstruction.py", "test_failure_2.py", diff --git a/thirdparty/patches/grpc-python.patch b/thirdparty/patches/grpc-python.patch index a366bb993..4591fb129 100644 --- a/thirdparty/patches/grpc-python.patch +++ b/thirdparty/patches/grpc-python.patch @@ -1,8 +1,63 @@ -178c178 -< bash_bin_path = repository_ctx.which("bash") ---- -> bash_bin_path = repository_ctx.which("bash" if not _is_windows(repository_ctx) else "sh.exe") -348c348 -< "python3", ---- -> "python3" if not _is_windows(repository_ctx) else "python.exe", \ No newline at end of file +diff --git third_party/py/python_configure.bzl third_party/py/python_configure.bzl +--- third_party/py/python_configure.bzl ++++ third_party/py/python_configure.bzl +@@ -177,7 +177,7 @@ def _get_bash_bin(repository_ctx): + if bash_bin != None: + return bash_bin + else: +- bash_bin_path = repository_ctx.which("bash") ++ bash_bin_path = repository_ctx.which("bash" if not _is_windows(repository_ctx) else "sh.exe") + if bash_bin_path != None: + return str(bash_bin_path) + else: +@@ -208,7 +208,7 @@ def _get_python_lib(repository_ctx, python_bin, lib_path_key): + " paths.append(path)\n" + "if len(paths) >=1:\n" + + " print(paths[0])\n" + "END" + ) +- cmd = "%s - %s" % (python_bin, print_lib) ++ cmd = '"%s" - %s' % (python_bin, print_lib) + result = repository_ctx.execute([_get_bash_bin(repository_ctx), "-c", cmd]) + return result.stdout.strip("\n") + +@@ -293,11 +293,13 @@ def _create_single_version_package( + + python_bin = _get_python_bin(repository_ctx, bin_path_key, default_bin_path, allow_absent) + if (python_bin == None or +- _check_python_bin(repository_ctx, +- python_bin, +- bin_path_key, +- allow_absent) == None) and allow_absent: +- python_include_rule = empty_include_rule ++ _check_python_bin( ++ repository_ctx, ++ python_bin, ++ bin_path_key, ++ allow_absent, ++ ) == None) and allow_absent: ++ python_include_rule = empty_include_rule + else: + python_lib = _get_python_lib(repository_ctx, python_bin, lib_path_key) + _check_python_lib(repository_ctx, python_lib) +@@ -348,17 +350,17 @@ def _python_autoconf_impl(repository_ctx): + repository_ctx, + "_python2", + _PYTHON2_BIN_PATH, +- "python2", ++ "python" if not _is_windows(repository_ctx) else "python.exe", + _PYTHON2_LIB_PATH, +- True ++ True, + ) + _create_single_version_package( + repository_ctx, + "_python3", + _PYTHON3_BIN_PATH, +- "python3", ++ "python3" if not _is_windows(repository_ctx) else "python.exe", + _PYTHON3_LIB_PATH, +- False ++ False, + ) + _tpl(repository_ctx, "BUILD") + +-- diff --git a/thirdparty/patches/grpc-remove-distutils.patch b/thirdparty/patches/grpc-remove-distutils.patch new file mode 100644 index 000000000..72deace5d --- /dev/null +++ b/thirdparty/patches/grpc-remove-distutils.patch @@ -0,0 +1,32 @@ +diff --git third_party/py/python_configure.bzl third_party/py/python_configure.bzl +--- third_party/py/python_configure.bzl ++++ third_party/py/python_configure.bzl +@@ -199,8 +199,8 @@ def _get_python_lib(repository_ctx, python_bin, lib_path_key): + " python_paths = os.getenv('PYTHONPATH').split(':')\n" + "try:\n" + + " library_paths = site.getsitepackages()\n" + + "except AttributeError:\n" + +- " from distutils.sysconfig import get_python_lib\n" + +- " library_paths = [get_python_lib()]\n" + ++ " import sysconfig\n" + ++ " library_paths = [sysconfig.get_path('purelib')]\n" + + "all_paths = set(python_paths + library_paths)\n" + "paths = []\n" + + "for path in all_paths:\n" + " if os.path.isdir(path):\n" + + " paths.append(path)\n" + "if len(paths) >=1:\n" + +@@ -237,14 +237,13 @@ def _get_python_include(repository_ctx, python_bin): + python_bin, + "-c", + "from __future__ import print_function;" + +- "from distutils import sysconfig;" + +- "print(sysconfig.get_python_inc())", ++ "import sysconfig;" + ++ "print(sysconfig.get_path('include'))", + ], + error_msg = "Problem getting python include path for {}.".format(python_bin), + error_details = ( + "Is the Python binary path set up right? " + "(See ./configure or " + +- python_bin + ".) " + "Is distutils installed? " + +- _HEADERS_HELP ++ python_bin + ".) " + _HEADERS_HELP + ), + ) + include_path = result.stdout.splitlines()[0]