Skip to content

Commit 5ebc32d

Browse files
authored
[Core] Update grpc to 1.44.0 (#22384)
Updates grpc to 1.44.0 to remove local patch needed for grpc to build. EDIT: there have been changes to how python is found (mostly removing python2 support) and as such the local python-patch we have for grpc needs to be modified. This time contributing it to upstream (grpc/grpc#28895) so that it'll get added in a newer version! For anyone that comes across this: Here is the error itself for why we need the grpc-python.patch file: https://buildkite.com/ray-project/ray-builders-pr/builds/24659#d293616f-225d-41f9-8de2-03780f12b13f/2386-2416
1 parent 549466a commit 5ebc32d

File tree

3 files changed

+13
-88
lines changed

3 files changed

+13
-88
lines changed

bazel/ray_deps_setup.bzl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,11 @@ def ray_deps_setup():
236236
auto_http_archive(
237237
name = "com_github_grpc_grpc",
238238
# NOTE: If you update this, also update @boringssl's hash.
239-
url = "https://github.com/grpc/grpc/archive/refs/tags/v1.43.2.tar.gz",
240-
sha256 = "b74ce7d26fe187970d1d8e2c06a5d3391122f7bc1fdce569aff5e435fb8fe780",
239+
url = "https://github.com/grpc/grpc/archive/refs/tags/v1.44.0.tar.gz",
240+
sha256 = "8c05641b9f91cbc92f51cc4a5b3a226788d7a63f20af4ca7aaca50d92cc94a0d",
241241
patches = [
242242
"@com_github_ray_project_ray//thirdparty/patches:grpc-cython-copts.patch",
243243
"@com_github_ray_project_ray//thirdparty/patches:grpc-python.patch",
244-
# Delete after upgrading from 1.44.0
245-
"@com_github_ray_project_ray//thirdparty/patches:grpc-remove-distutils.patch",
246244
],
247245
)
248246

Lines changed: 11 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1+
From 30bd860bd8a8bb223f3aab86afc2ed28c5bd5a7d Mon Sep 17 00:00:00 2001
2+
From: acxz <17132214+acxz@users.noreply.github.com>
3+
Date: Thu, 17 Feb 2022 11:07:42 -0500
4+
Subject: [PATCH] fix python command on windows
5+
6+
---
7+
third_party/py/python_configure.bzl | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
110
diff --git third_party/py/python_configure.bzl third_party/py/python_configure.bzl
11+
index 4e5218118ee5..7ec4459d6109 100644
212
--- third_party/py/python_configure.bzl
313
+++ third_party/py/python_configure.bzl
4-
@@ -177,7 +177,7 @@ def _get_bash_bin(repository_ctx):
5-
if bash_bin != None:
6-
return bash_bin
7-
else:
8-
- bash_bin_path = repository_ctx.which("bash")
9-
+ bash_bin_path = repository_ctx.which("bash" if not _is_windows(repository_ctx) else "sh.exe")
10-
if bash_bin_path != None:
11-
return str(bash_bin_path)
12-
else:
13-
@@ -208,7 +208,7 @@ def _get_python_lib(repository_ctx, python_bin, lib_path_key):
14+
@@ -206,7 +206,7 @@ def _get_python_lib(repository_ctx, python_bin, lib_path_key):
1415
" paths.append(path)\n" + "if len(paths) >=1:\n" +
1516
" print(paths[0])\n" + "END"
1617
)
@@ -19,45 +20,3 @@ diff --git third_party/py/python_configure.bzl third_party/py/python_configure.b
1920
result = repository_ctx.execute([_get_bash_bin(repository_ctx), "-c", cmd])
2021
return result.stdout.strip("\n")
2122

22-
@@ -293,11 +293,13 @@ def _create_single_version_package(
23-
24-
python_bin = _get_python_bin(repository_ctx, bin_path_key, default_bin_path, allow_absent)
25-
if (python_bin == None or
26-
- _check_python_bin(repository_ctx,
27-
- python_bin,
28-
- bin_path_key,
29-
- allow_absent) == None) and allow_absent:
30-
- python_include_rule = empty_include_rule
31-
+ _check_python_bin(
32-
+ repository_ctx,
33-
+ python_bin,
34-
+ bin_path_key,
35-
+ allow_absent,
36-
+ ) == None) and allow_absent:
37-
+ python_include_rule = empty_include_rule
38-
else:
39-
python_lib = _get_python_lib(repository_ctx, python_bin, lib_path_key)
40-
_check_python_lib(repository_ctx, python_lib)
41-
@@ -348,17 +350,17 @@ def _python_autoconf_impl(repository_ctx):
42-
repository_ctx,
43-
"_python2",
44-
_PYTHON2_BIN_PATH,
45-
- "python2",
46-
+ "python" if not _is_windows(repository_ctx) else "python.exe",
47-
_PYTHON2_LIB_PATH,
48-
- True
49-
+ True,
50-
)
51-
_create_single_version_package(
52-
repository_ctx,
53-
"_python3",
54-
_PYTHON3_BIN_PATH,
55-
- "python3",
56-
+ "python3" if not _is_windows(repository_ctx) else "python.exe",
57-
_PYTHON3_LIB_PATH,
58-
- False
59-
+ False,
60-
)
61-
_tpl(repository_ctx, "BUILD")
62-
63-
--

thirdparty/patches/grpc-remove-distutils.patch

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)