1- From 5a734425222fd2c132601981bd6a4689e81a7154 Mon Sep 17 00:00:00 2001
1+ From 30d0a0ff43e5203485cdfeaae0d779f136b15aa1 Mon Sep 17 00:00:00 2001
22From: Austin Morton <austin.morton@aquatic.com>
3- Date: Sun, 19 Jan 2025 22:15:00 +1100
4- Subject: [PATCH 05/11 ] Vendor grpc-1.67.1.patch
3+ Date: Fri, 9 May 2025 13:46:55 +0300
4+ Subject: [PATCH 4/9 ] Vendor- grpc-1.67.1
55
66---
7- bazel/ray_deps_setup.bzl | 31 +++++++- -----------
7+ bazel/ray_deps_setup.bzl | 29 ++++++++ -----------
88 .../task_event_buffer_export_event_test.cc | 2 +-
99 .../gcs_server/test/gcs_actor_manager_test.cc | 14 ++++-----
1010 src/ray/raylet_client/raylet_client.cc | 2 +-
1111 src/ray/rpc/server_call.h | 2 +-
1212 src/ray/util/event.cc | 2 +-
13- 6 files changed, 23 insertions(+), 30 deletions(-)
13+ 6 files changed, 23 insertions(+), 41 deletions(-)
1414
1515diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl
16- index 04acf73beb..55805bc0f6 100644
16+ index 0db8ebee2d..ab1b57d226 100644
1717--- a/bazel/ray_deps_setup.bzl
1818+++ b/bazel/ray_deps_setup.bzl
19- @@ -86,20 +86,13 @@ def auto_http_archive(
20- def ray_deps_setup():
21- # Explicitly bring in protobuf dependency to work around
22- # https://github.com/ray-project/ray/issues/14117
23- - # This is copied from grpc's bazel/grpc_deps.bzl
24- - #
25- - # Pinned grpc version: v23.4
19+ @@ -91,15 +91,11 @@ def ray_deps_setup():
20+ # Pinned grpc version: v23.4
2621 http_archive(
2722 name = "com_google_protobuf",
2823- sha256 = "76a33e2136f23971ce46c72fd697cd94dc9f73d56ab23b753c3e16854c90ddfd",
@@ -31,16 +26,16 @@ index 04acf73beb..55805bc0f6 100644
3126+ strip_prefix = "protobuf-28.2",
3227 urls = [
3328- "https://github.com/protocolbuffers/protobuf/archive/2c5fa078d8e86e5f4bd34e6f4c9ea9e8d7d4d44a.tar.gz",
34- - ],
35- - patches = [
36- - "@com_github_grpc_grpc//third_party:protobuf.patch",
3729+ "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v28.2.tar.gz",
3830 ],
31+ - patches = [
32+ - "@com_github_grpc_grpc//third_party:protobuf.patch",
33+ - ],
3934- patch_args = ["-p1"],
4035 )
4136
4237 # NOTE(lingxuan.zlx): 3rd party dependencies could be accessed, so it suggests
43- @@ -223 ,10 +216 ,10 @@ def ray_deps_setup():
38+ @@ -229 ,10 +225 ,10 @@ def ray_deps_setup():
4439 # TODO(owner): Upgrade abseil to latest version after protobuf updated, which requires to upgrade `rules_cc` first.
4540 auto_http_archive(
4641 name = "com_google_absl",
@@ -54,7 +49,7 @@ index 04acf73beb..55805bc0f6 100644
5449 ],
5550 )
5651
57- @@ -246,8 +239,8 @@ def ray_deps_setup():
52+ @@ -253,7 +249,7 @@ def ray_deps_setup():
5853 auto_http_archive(
5954 name = "com_github_grpc_grpc",
6055 # NOTE: If you update this, also update @boringssl's hash.
@@ -65,7 +60,7 @@ index 04acf73beb..55805bc0f6 100644
6560 patches = [
6661 "@com_github_ray_project_ray//thirdparty/patches:grpc-cython-copts.patch",
6762 ],
68- @@ -289 ,13 +282 ,13 @@ def ray_deps_setup():
63+ @@ -297 ,13 +292 ,13 @@ def ray_deps_setup():
6964 http_archive(
7065 # This rule is used by @com_github_grpc_grpc, and using a GitHub mirror
7166 # provides a deterministic archive hash for caching. Explanation here:
@@ -84,10 +79,10 @@ index 04acf73beb..55805bc0f6 100644
8479 )
8580
8681diff --git a/src/ray/core_worker/test/task_event_buffer_export_event_test.cc b/src/ray/core_worker/test/task_event_buffer_export_event_test.cc
87- index aff5cc624f..8968f98576 100644
82+ index f3869be7ff..36873eda0f 100644
8883--- a/src/ray/core_worker/test/task_event_buffer_export_event_test.cc
8984+++ b/src/ray/core_worker/test/task_event_buffer_export_event_test.cc
90- @@ -135 ,7 +135 ,7 @@ TEST_F(TaskEventTestWriteExport, TestWriteTaskExportEvents) {
85+ @@ -139 ,7 +139 ,7 @@ TEST_F(TaskEventTestWriteExport, TestWriteTaskExportEvents) {
9186 auto task_ids = GenTaskIDs(num_events);
9287 google::protobuf::util::JsonPrintOptions options;
9388 options.preserve_proto_field_names = true;
@@ -97,10 +92,10 @@ index aff5cc624f..8968f98576 100644
9792 std::vector<SourceTypeVariant> source_types = {
9893 rpc::ExportEvent_SourceType::ExportEvent_SourceType_EXPORT_TASK};
9994diff --git a/src/ray/gcs/gcs_server/test/gcs_actor_manager_test.cc b/src/ray/gcs/gcs_server/test/gcs_actor_manager_test.cc
100- index e4b3a663cc..2625555d3e 100644
95+ index 810f6c3c2c..e51317806c 100644
10196--- a/src/ray/gcs/gcs_server/test/gcs_actor_manager_test.cc
10297+++ b/src/ray/gcs/gcs_server/test/gcs_actor_manager_test.cc
103- @@ -1284 ,7 +1284 ,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoFilters) {
98+ @@ -1288 ,7 +1288 ,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoFilters) {
10499 request.mutable_filters()->set_actor_id(actor->GetActorID().Binary());
105100
106101 auto &reply =
@@ -109,7 +104,7 @@ index e4b3a663cc..2625555d3e 100644
109104 gcs_actor_manager_->HandleGetAllActorInfo(request, &reply, callback);
110105 ASSERT_EQ(reply.actor_table_data().size(), 1);
111106 ASSERT_EQ(reply.total(), 1 + num_other_actors);
112- @@ -1297 ,7 +1297 ,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoFilters) {
107+ @@ -1301 ,7 +1301 ,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoFilters) {
113108 request.mutable_filters()->set_job_id(job_id.Binary());
114109
115110 auto &reply =
@@ -118,7 +113,7 @@ index e4b3a663cc..2625555d3e 100644
118113 gcs_actor_manager_->HandleGetAllActorInfo(request, &reply, callback);
119114 ASSERT_EQ(reply.actor_table_data().size(), 1);
120115 ASSERT_EQ(reply.num_filtered(), num_other_actors);
121- @@ -1309 ,7 +1309 ,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoFilters) {
116+ @@ -1313 ,7 +1313 ,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoFilters) {
122117 request.mutable_filters()->set_state(rpc::ActorTableData::ALIVE);
123118
124119 auto &reply =
@@ -127,7 +122,7 @@ index e4b3a663cc..2625555d3e 100644
127122 gcs_actor_manager_->HandleGetAllActorInfo(request, &reply, callback);
128123 ASSERT_EQ(reply.actor_table_data().size(), 1);
129124 ASSERT_EQ(reply.num_filtered(), num_other_actors);
130- @@ -1322 ,7 +1322 ,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoFilters) {
125+ @@ -1326 ,7 +1326 ,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoFilters) {
131126 request.mutable_filters()->set_job_id(job_id.Binary());
132127
133128 auto &reply =
@@ -136,7 +131,7 @@ index e4b3a663cc..2625555d3e 100644
136131 gcs_actor_manager_->HandleGetAllActorInfo(request, &reply, callback);
137132 ASSERT_EQ(reply.actor_table_data().size(), 1);
138133 ASSERT_EQ(reply.num_filtered(), num_other_actors);
139- @@ -1333 ,7 +1333 ,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoFilters) {
134+ @@ -1337 ,7 +1337 ,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoFilters) {
140135 request.mutable_filters()->set_job_id(job_id.Binary());
141136
142137 auto &reply =
@@ -145,7 +140,7 @@ index e4b3a663cc..2625555d3e 100644
145140 gcs_actor_manager_->HandleGetAllActorInfo(request, &reply, callback);
146141 ASSERT_EQ(reply.num_filtered(), num_other_actors + 1);
147142 ASSERT_EQ(reply.actor_table_data().size(), 0);
148- @@ -1358 ,7 +1358 ,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoLimit) {
143+ @@ -1362 ,7 +1362 ,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoLimit) {
149144 {
150145 rpc::GetAllActorInfoRequest request;
151146 auto &reply =
@@ -154,7 +149,7 @@ index e4b3a663cc..2625555d3e 100644
154149 auto callback = [](Status status,
155150 std::function<void()> success,
156151 std::function<void()> failure) {};
157- @@ -1367 ,7 +1367 ,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoLimit) {
152+ @@ -1371 ,7 +1371 ,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoLimit) {
158153
159154 request.set_limit(2);
160155 auto &reply_2 =
@@ -164,10 +159,10 @@ index e4b3a663cc..2625555d3e 100644
164159 ASSERT_EQ(reply_2.actor_table_data().size(), 2);
165160 ASSERT_EQ(reply_2.total(), 3);
166161diff --git a/src/ray/raylet_client/raylet_client.cc b/src/ray/raylet_client/raylet_client.cc
167- index c08c13ebe6..fbb68ca64b 100644
162+ index aeeb53ee77..c191f39e16 100644
168163--- a/src/ray/raylet_client/raylet_client.cc
169164+++ b/src/ray/raylet_client/raylet_client.cc
170- @@ -253 ,7 +253 ,7 @@ void RayletClient::RequestWorkerLease(
165+ @@ -246 ,7 +246 ,7 @@ void RayletClient::RequestWorkerLease(
171166 const bool is_selected_based_on_locality) {
172167 google::protobuf::Arena arena;
173168 auto request =
@@ -177,7 +172,7 @@ index c08c13ebe6..fbb68ca64b 100644
177172 // task_spec is longer than request.
178173 // Request will be sent before the end of this call, and after that, it won't be
179174diff --git a/src/ray/rpc/server_call.h b/src/ray/rpc/server_call.h
180- index 659ee5841d..a806ded3b7 100644
175+ index 4ad1885ca6..fd0cb3fbd9 100644
181176--- a/src/ray/rpc/server_call.h
182177+++ b/src/ray/rpc/server_call.h
183178@@ -193,7 +193,7 @@ class ServerCallImpl : public ServerCall {
@@ -190,10 +185,10 @@ index 659ee5841d..a806ded3b7 100644
190185 RAY_CHECK(!call_name_.empty()) << "Call name is empty";
191186 if (record_metrics_) {
192187diff --git a/src/ray/util/event.cc b/src/ray/util/event.cc
193- index 4de0e14ea4..6520d7449e 100644
188+ index 16c723e27c..e99df202c9 100644
194189--- a/src/ray/util/event.cc
195190+++ b/src/ray/util/event.cc
196- @@ -136 ,7 +136 ,7 @@ std::string LogEventReporter::ExportEventToString(const rpc::ExportEvent &export
191+ @@ -140 ,7 +140 ,7 @@ std::string LogEventReporter::ExportEventToString(const rpc::ExportEvent &export
197192 google::protobuf::util::JsonPrintOptions options;
198193 options.preserve_proto_field_names = true;
199194 // Required so enum with value 0 is not omitted
@@ -202,3 +197,27 @@ index 4de0e14ea4..6520d7449e 100644
202197 if (export_event.has_task_event_data()) {
203198 RAY_CHECK(google::protobuf::util::MessageToJsonString(
204199 export_event.task_event_data(), &event_data_as_string, options)
200+ diff --git a/thirdparty/patches/grpc-zlib-fdopen.patch
201+ b/thirdparty/patches/grpc-zlib-fdopen.patch
202+ index c48a35bc4e..dd434edf19 100644
203+ --- a/thirdparty/patches/grpc-zlib-fdopen.patch
204+ +++ b/thirdparty/patches/grpc-zlib-fdopen.patch
205+ @@ -1,13 +1,13 @@
206+ diff -u bazel/grpc_deps.bzl
207+ --- bazel/grpc_deps.bzl
208+ +++ bazel/grpc_deps.bzl
209+ - @@ -238,6 +238,9 @@
210+ - "https://storage.googleapis.com/grpc-bazel-mirror/github.com/madler/zlib/archive/04f42ceca40f73e2978b50e93806c2a18c1281fc.tar.gz",
211+ - "https://github.com/madler/zlib/archive/04f42ceca40f73e2978b50e93806c2a18c1281fc.tar.gz",
212+ + @@ -53,6 +53,9 @@ def grpc_deps():
213+ + "https://storage.googleapis.com/grpc-bazel-mirror/github.com/madler/zlib/archive/09155eaa2f9270dc4ed1fa13e2b4b2613e6e4851.tar.gz",
214+ + "https://github.com/madler/zlib/archive/09155eaa2f9270dc4ed1fa13e2b4b2613e6e4851.tar.gz",
215+ ],
216+ + patches = [
217+ + "@com_github_ray_project_ray//thirdparty/patches:zlib-fdopen.patch",
218+ - + ]
219+ + + ],
220+ )
221+
222+ if "com_google_protobuf" not in native.existing_rules():
223+
0 commit comments