From 1ad9ac14b3685009ecd35f0fe4e4c1d85bbe84fa Mon Sep 17 00:00:00 2001 From: Satish Pasumarthi Date: Fri, 23 Oct 2020 23:42:33 -0700 Subject: [PATCH 01/11] update grpc to v1.32.0 which inclues upb fix https://github.com/protocolbuffers/upb/issues/300 --- tensorflow/workspace.bzl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl index 80580ac493080e..875414f16e7398 100755 --- a/tensorflow/workspace.bzl +++ b/tensorflow/workspace.bzl @@ -653,8 +653,8 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""): # WARNING: make sure ncteisen@ and vpai@ are cc-ed on any CL to change the below rule tf_http_archive( name = "com_github_grpc_grpc", - sha256 = "b956598d8cbe168b5ee717b5dafa56563eb5201a947856a6688bbeac9cac4e1f", - strip_prefix = "grpc-b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd", + sha256 = "0935b6f0ab88cbb00bd387513f677244109fdd1a7057e003d1eb94bcd4d299dd", + strip_prefix = "grpc-414bb8322de2411eee1f4e841ff29d887bec7884", system_build_file = clean_dep("//third_party/systemlibs:grpc.BUILD"), patch_file = clean_dep("//third_party/grpc:generate_cc_env_fix.patch"), system_link_files = { @@ -663,8 +663,8 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""): "//third_party/systemlibs:grpc.bazel.grpc_deps.bzl": "bazel/grpc_deps.bzl", }, urls = [ - "https://storage.googleapis.com/mirror.tensorflow.org/github.com/grpc/grpc/archive/b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd.tar.gz", - "https://github.com/grpc/grpc/archive/b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd.tar.gz", + "https://storage.googleapis.com/mirror.tensorflow.org/github.com/grpc/grpc/archive/414bb8322de2411eee1f4e841ff29d887bec7884.tar.gz", + "https://github.com/grpc/grpc/archive/414bb8322de2411eee1f4e841ff29d887bec7884.tar.gz", ], ) From f1729303e7b7433570ce11cc0ccb095b2d240479 Mon Sep 17 00:00:00 2001 From: Satish Pasumarthi Date: Mon, 2 Nov 2020 21:48:21 -0800 Subject: [PATCH 02/11] change grpc version to 1.33.2 as 1.32.0 as compilation issues --- tensorflow/workspace.bzl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl index 875414f16e7398..eec807c7c62bde 100755 --- a/tensorflow/workspace.bzl +++ b/tensorflow/workspace.bzl @@ -653,8 +653,8 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""): # WARNING: make sure ncteisen@ and vpai@ are cc-ed on any CL to change the below rule tf_http_archive( name = "com_github_grpc_grpc", - sha256 = "0935b6f0ab88cbb00bd387513f677244109fdd1a7057e003d1eb94bcd4d299dd", - strip_prefix = "grpc-414bb8322de2411eee1f4e841ff29d887bec7884", + sha256 = "a21c3a70eb356e0be2d989fdface89633421f2eddb95a1ede1f10a4804d7860b", + strip_prefix = "grpc-ee5b762f33a42170144834f5ab7efda9d76c480b" system_build_file = clean_dep("//third_party/systemlibs:grpc.BUILD"), patch_file = clean_dep("//third_party/grpc:generate_cc_env_fix.patch"), system_link_files = { @@ -663,8 +663,8 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""): "//third_party/systemlibs:grpc.bazel.grpc_deps.bzl": "bazel/grpc_deps.bzl", }, urls = [ - "https://storage.googleapis.com/mirror.tensorflow.org/github.com/grpc/grpc/archive/414bb8322de2411eee1f4e841ff29d887bec7884.tar.gz", - "https://github.com/grpc/grpc/archive/414bb8322de2411eee1f4e841ff29d887bec7884.tar.gz", + "https://storage.googleapis.com/mirror.tensorflow.org/github.com/grpc/grpc/archive/ee5b762f33a42170144834f5ab7efda9d76c480b.tar.gz", + "https://github.com/grpc/grpc/archive/ee5b762f33a42170144834f5ab7efda9d76c480b.tar.gz", ], ) From 549aa69c9b2f964419225c1e8bf6d2a289fed898 Mon Sep 17 00:00:00 2001 From: Satish Pasumarthi Date: Tue, 3 Nov 2020 11:21:14 -0800 Subject: [PATCH 03/11] fix typo --- tensorflow/workspace.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl index eec807c7c62bde..9d9fdf1660f48a 100755 --- a/tensorflow/workspace.bzl +++ b/tensorflow/workspace.bzl @@ -654,7 +654,7 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""): tf_http_archive( name = "com_github_grpc_grpc", sha256 = "a21c3a70eb356e0be2d989fdface89633421f2eddb95a1ede1f10a4804d7860b", - strip_prefix = "grpc-ee5b762f33a42170144834f5ab7efda9d76c480b" + strip_prefix = "grpc-ee5b762f33a42170144834f5ab7efda9d76c480b", system_build_file = clean_dep("//third_party/systemlibs:grpc.BUILD"), patch_file = clean_dep("//third_party/grpc:generate_cc_env_fix.patch"), system_link_files = { From 35f186719f84e18ddb75e58c6b07a1aef61ca375 Mon Sep 17 00:00:00 2001 From: Satish Pasumarthi Date: Wed, 18 Nov 2020 10:51:11 -0800 Subject: [PATCH 04/11] update protobuf to v3.13.0 --- tensorflow/workspace.bzl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl index 9d9fdf1660f48a..46140325f470f6 100755 --- a/tensorflow/workspace.bzl +++ b/tensorflow/workspace.bzl @@ -583,15 +583,15 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""): tf_http_archive( name = "com_google_protobuf", patch_file = clean_dep("//third_party/protobuf:protobuf.patch"), - sha256 = "cfcba2df10feec52a84208693937c17a4b5df7775e1635c1e3baffc487b24c9b", - strip_prefix = "protobuf-3.9.2", + sha256 = "1c744a6a1f2c901e68c5521bc275e22bdc66256eeb605c2781923365b7087e5f", + strip_prefix = "protobuf-3.13.0", system_build_file = clean_dep("//third_party/systemlibs:protobuf.BUILD"), system_link_files = { "//third_party/systemlibs:protobuf.bzl": "protobuf.bzl", }, urls = [ - "https://storage.googleapis.com/mirror.tensorflow.org/github.com/protocolbuffers/protobuf/archive/v3.9.2.zip", - "https://github.com/protocolbuffers/protobuf/archive/v3.9.2.zip", + "https://storage.googleapis.com/mirror.tensorflow.org/github.com/protocolbuffers/protobuf/archive/v3.13.0.zip", + "https://github.com/protocolbuffers/protobuf/archive/v3.13.0.zip", ], ) From da3718d777ec372a0ea477cceeaf0a3c6c85b8c3 Mon Sep 17 00:00:00 2001 From: Satish Pasumarthi Date: Mon, 30 Nov 2020 10:44:00 -0800 Subject: [PATCH 05/11] downgrade grpc to v3.12.0 --- tensorflow/workspace.bzl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl index 46140325f470f6..c3c009c2173371 100755 --- a/tensorflow/workspace.bzl +++ b/tensorflow/workspace.bzl @@ -583,15 +583,15 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""): tf_http_archive( name = "com_google_protobuf", patch_file = clean_dep("//third_party/protobuf:protobuf.patch"), - sha256 = "1c744a6a1f2c901e68c5521bc275e22bdc66256eeb605c2781923365b7087e5f", - strip_prefix = "protobuf-3.13.0", + sha256 = "b37e96e81842af659605908a421960a5dc809acbc888f6b947bc320f8628e5b1", + strip_prefix = "protobuf-3.12.0", system_build_file = clean_dep("//third_party/systemlibs:protobuf.BUILD"), system_link_files = { "//third_party/systemlibs:protobuf.bzl": "protobuf.bzl", }, urls = [ - "https://storage.googleapis.com/mirror.tensorflow.org/github.com/protocolbuffers/protobuf/archive/v3.13.0.zip", - "https://github.com/protocolbuffers/protobuf/archive/v3.13.0.zip", + "https://storage.googleapis.com/mirror.tensorflow.org/github.com/protocolbuffers/protobuf/archive/v3.12.0.zip", + "https://github.com/protocolbuffers/protobuf/archive/v3.12.0.zip", ], ) From 0c8b8b61dff6dd4cc0c37ae5c690317601634431 Mon Sep 17 00:00:00 2001 From: Satish Pasumarthi Date: Wed, 17 Mar 2021 12:34:42 -0700 Subject: [PATCH 06/11] upgrade protobuf to v3.15.1 and grpc to 1.33.2 --- tensorflow/workspace2.bzl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tensorflow/workspace2.bzl b/tensorflow/workspace2.bzl index d158b9ab7bff47..32a285794eff37 100644 --- a/tensorflow/workspace2.bzl +++ b/tensorflow/workspace2.bzl @@ -529,15 +529,15 @@ def _tf_repositories(): tf_http_archive( name = "com_google_protobuf", patch_file = "//third_party/protobuf:protobuf.patch", - sha256 = "cfcba2df10feec52a84208693937c17a4b5df7775e1635c1e3baffc487b24c9b", - strip_prefix = "protobuf-3.9.2", + sha256 = "5027403b91fea2376e26772bfd9ab323db1fe553c0f5bee502b8928ad1dd3bd2", + strip_prefix = "protobuf-3.15.1", system_build_file = "//third_party/systemlibs:protobuf.BUILD", system_link_files = { "//third_party/systemlibs:protobuf.bzl": "protobuf.bzl", }, urls = [ - "https://storage.googleapis.com/mirror.tensorflow.org/github.com/protocolbuffers/protobuf/archive/v3.9.2.zip", - "https://github.com/protocolbuffers/protobuf/archive/v3.9.2.zip", + "https://storage.googleapis.com/mirror.tensorflow.org/github.com/protocolbuffers/protobuf/archive/v3.15.1.zip", + "https://github.com/protocolbuffers/protobuf/archive/v3.15.1.zip", ], ) @@ -599,8 +599,8 @@ def _tf_repositories(): # WARNING: make sure ncteisen@ and vpai@ are cc-ed on any CL to change the below rule tf_http_archive( name = "com_github_grpc_grpc", - sha256 = "b956598d8cbe168b5ee717b5dafa56563eb5201a947856a6688bbeac9cac4e1f", - strip_prefix = "grpc-b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd", + sha256 = "a21c3a70eb356e0be2d989fdface89633421f2eddb95a1ede1f10a4804d7860b", + strip_prefix = "grpc-ee5b762f33a42170144834f5ab7efda9d76c480b", system_build_file = "//third_party/systemlibs:grpc.BUILD", patch_file = "//third_party/grpc:generate_cc_env_fix.patch", system_link_files = { @@ -613,8 +613,8 @@ def _tf_repositories(): "//third_party/systemlibs:grpc.bazel.protobuf.bzl": "bazel/protobuf.bzl", }, urls = [ - "https://storage.googleapis.com/mirror.tensorflow.org/github.com/grpc/grpc/archive/b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd.tar.gz", - "https://github.com/grpc/grpc/archive/b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd.tar.gz", + "https://storage.googleapis.com/mirror.tensorflow.org/github.com/grpc/grpc/archive/ee5b762f33a42170144834f5ab7efda9d76c480b.tar.gz", + "https://github.com/grpc/grpc/archive/ee5b762f33a42170144834f5ab7efda9d76c480b.tar.gz", ], ) From 08c46e11d23806ee28dcd6c4a8671f614d2a8677 Mon Sep 17 00:00:00 2001 From: Satish Pasumarthi Date: Thu, 18 Mar 2021 16:54:38 -0700 Subject: [PATCH 07/11] Added grpc version in the comment --- tensorflow/workspace2.bzl | 1 + 1 file changed, 1 insertion(+) diff --git a/tensorflow/workspace2.bzl b/tensorflow/workspace2.bzl index 32a285794eff37..15aa0280ce4a01 100644 --- a/tensorflow/workspace2.bzl +++ b/tensorflow/workspace2.bzl @@ -597,6 +597,7 @@ def _tf_repositories(): ) # WARNING: make sure ncteisen@ and vpai@ are cc-ed on any CL to change the below rule + # fix for https://github.com/protocolbuffers/upb/issues/300 - using grpc v1.33.2 tf_http_archive( name = "com_github_grpc_grpc", sha256 = "a21c3a70eb356e0be2d989fdface89633421f2eddb95a1ede1f10a4804d7860b", From 7c620d077f7c4af27df47c6acf218ea84fe238d0 Mon Sep 17 00:00:00 2001 From: Satish Pasumarthi Date: Thu, 18 Mar 2021 18:22:23 -0700 Subject: [PATCH 08/11] check if protobuf version change is still required --- tensorflow/workspace2.bzl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tensorflow/workspace2.bzl b/tensorflow/workspace2.bzl index 15aa0280ce4a01..b6611b70189021 100644 --- a/tensorflow/workspace2.bzl +++ b/tensorflow/workspace2.bzl @@ -529,15 +529,15 @@ def _tf_repositories(): tf_http_archive( name = "com_google_protobuf", patch_file = "//third_party/protobuf:protobuf.patch", - sha256 = "5027403b91fea2376e26772bfd9ab323db1fe553c0f5bee502b8928ad1dd3bd2", - strip_prefix = "protobuf-3.15.1", + sha256 = "cfcba2df10feec52a84208693937c17a4b5df7775e1635c1e3baffc487b24c9b", + strip_prefix = "protobuf-3.9.2", system_build_file = "//third_party/systemlibs:protobuf.BUILD", system_link_files = { "//third_party/systemlibs:protobuf.bzl": "protobuf.bzl", }, urls = [ - "https://storage.googleapis.com/mirror.tensorflow.org/github.com/protocolbuffers/protobuf/archive/v3.15.1.zip", - "https://github.com/protocolbuffers/protobuf/archive/v3.15.1.zip", + "https://storage.googleapis.com/mirror.tensorflow.org/github.com/protocolbuffers/protobuf/archive/v3.9.2.zip", + "https://github.com/protocolbuffers/protobuf/archive/v3.9.2.zip", ], ) From cc479345a92be11927b6f05460661dab4f66d922 Mon Sep 17 00:00:00 2001 From: Satish Pasumarthi Date: Tue, 23 Mar 2021 12:05:05 -0700 Subject: [PATCH 09/11] bump to grpcv1.36.4 and fix patch file --- tensorflow/workspace2.bzl | 10 ++++---- third_party/grpc/generate_cc_env_fix.patch | 30 ++++++++++++++++------ 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/tensorflow/workspace2.bzl b/tensorflow/workspace2.bzl index b6611b70189021..c0d12842290ef3 100644 --- a/tensorflow/workspace2.bzl +++ b/tensorflow/workspace2.bzl @@ -597,11 +597,11 @@ def _tf_repositories(): ) # WARNING: make sure ncteisen@ and vpai@ are cc-ed on any CL to change the below rule - # fix for https://github.com/protocolbuffers/upb/issues/300 - using grpc v1.33.2 + # fix for https://github.com/protocolbuffers/upb/issues/300 - using grpc v1.36.4 tf_http_archive( name = "com_github_grpc_grpc", - sha256 = "a21c3a70eb356e0be2d989fdface89633421f2eddb95a1ede1f10a4804d7860b", - strip_prefix = "grpc-ee5b762f33a42170144834f5ab7efda9d76c480b", + sha256 = "8eb9d86649c4d4a7df790226df28f081b97a62bf12c5c5fe9b5d31a29cd6541a", + strip_prefix = "grpc-3e53dbe8213137d2c731ecd4d88ebd2948941d75", system_build_file = "//third_party/systemlibs:grpc.BUILD", patch_file = "//third_party/grpc:generate_cc_env_fix.patch", system_link_files = { @@ -614,8 +614,8 @@ def _tf_repositories(): "//third_party/systemlibs:grpc.bazel.protobuf.bzl": "bazel/protobuf.bzl", }, urls = [ - "https://storage.googleapis.com/mirror.tensorflow.org/github.com/grpc/grpc/archive/ee5b762f33a42170144834f5ab7efda9d76c480b.tar.gz", - "https://github.com/grpc/grpc/archive/ee5b762f33a42170144834f5ab7efda9d76c480b.tar.gz", + "https://storage.googleapis.com/mirror.tensorflow.org/github.com/grpc/grpc/archive/3e53dbe8213137d2c731ecd4d88ebd2948941d75.tar.gz", + "https://github.com/grpc/grpc/archive/3e53dbe8213137d2c731ecd4d88ebd2948941d75.tar.gz", ], ) diff --git a/third_party/grpc/generate_cc_env_fix.patch b/third_party/grpc/generate_cc_env_fix.patch index 51832fe9628bb3..1528348bdff1e5 100644 --- a/third_party/grpc/generate_cc_env_fix.patch +++ b/third_party/grpc/generate_cc_env_fix.patch @@ -1,10 +1,24 @@ +diff --git a/bazel/generate_cc.bzl b/bazel/generate_cc.bzl +index a180863021..1534e526fd 100644 --- a/bazel/generate_cc.bzl +++ b/bazel/generate_cc.bzl -@@ -141,6 +141,7 @@ def generate_cc_impl(ctx): - outputs = out_files, - executable = ctx.executable._protoc, - arguments = arguments, -+ use_default_shell_env = True, - ) - - return struct(files = depset(out_files)) +@@ -4,9 +4,8 @@ This is an internal rule used by cc_grpc_library, and shouldn't be used + directly. + """ + +-load("@rules_proto//proto:defs.bzl", "ProtoInfo") + load( +- "//bazel:protobuf.bzl", ++ "@com_github_grpc_grpc//bazel:protobuf.bzl", + "get_include_directory", + "get_plugin_args", + "get_proto_root", +@@ -167,7 +166,7 @@ _generate_cc = rule( + mandatory = False, + ), + "_protoc": attr.label( +- default = Label("//external:protocol_compiler"), ++ default = Label("@com_google_protobuf//:protoc"), + executable = True, + cfg = "host", + ), From 384ef451bd45d96dd7fa8ce54735fd927ccb3d24 Mon Sep 17 00:00:00 2001 From: Satish Pasumarthi Date: Tue, 23 Mar 2021 13:59:30 -0700 Subject: [PATCH 10/11] revert patch file changes --- third_party/grpc/generate_cc_env_fix.patch | 30 ++++++---------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/third_party/grpc/generate_cc_env_fix.patch b/third_party/grpc/generate_cc_env_fix.patch index 1528348bdff1e5..51832fe9628bb3 100644 --- a/third_party/grpc/generate_cc_env_fix.patch +++ b/third_party/grpc/generate_cc_env_fix.patch @@ -1,24 +1,10 @@ -diff --git a/bazel/generate_cc.bzl b/bazel/generate_cc.bzl -index a180863021..1534e526fd 100644 --- a/bazel/generate_cc.bzl +++ b/bazel/generate_cc.bzl -@@ -4,9 +4,8 @@ This is an internal rule used by cc_grpc_library, and shouldn't be used - directly. - """ - --load("@rules_proto//proto:defs.bzl", "ProtoInfo") - load( -- "//bazel:protobuf.bzl", -+ "@com_github_grpc_grpc//bazel:protobuf.bzl", - "get_include_directory", - "get_plugin_args", - "get_proto_root", -@@ -167,7 +166,7 @@ _generate_cc = rule( - mandatory = False, - ), - "_protoc": attr.label( -- default = Label("//external:protocol_compiler"), -+ default = Label("@com_google_protobuf//:protoc"), - executable = True, - cfg = "host", - ), +@@ -141,6 +141,7 @@ def generate_cc_impl(ctx): + outputs = out_files, + executable = ctx.executable._protoc, + arguments = arguments, ++ use_default_shell_env = True, + ) + + return struct(files = depset(out_files)) From 5bed9c49c530d8f76056b5569a508adc2ead68fe Mon Sep 17 00:00:00 2001 From: Satish Pasumarthi Date: Thu, 25 Mar 2021 13:18:57 -0700 Subject: [PATCH 11/11] point to grpc v1.36.4 --- tensorflow/workspace2.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tensorflow/workspace2.bzl b/tensorflow/workspace2.bzl index c0d12842290ef3..1a105174638a03 100644 --- a/tensorflow/workspace2.bzl +++ b/tensorflow/workspace2.bzl @@ -601,7 +601,7 @@ def _tf_repositories(): tf_http_archive( name = "com_github_grpc_grpc", sha256 = "8eb9d86649c4d4a7df790226df28f081b97a62bf12c5c5fe9b5d31a29cd6541a", - strip_prefix = "grpc-3e53dbe8213137d2c731ecd4d88ebd2948941d75", + strip_prefix = "grpc-1.36.4", system_build_file = "//third_party/systemlibs:grpc.BUILD", patch_file = "//third_party/grpc:generate_cc_env_fix.patch", system_link_files = { @@ -614,8 +614,8 @@ def _tf_repositories(): "//third_party/systemlibs:grpc.bazel.protobuf.bzl": "bazel/protobuf.bzl", }, urls = [ - "https://storage.googleapis.com/mirror.tensorflow.org/github.com/grpc/grpc/archive/3e53dbe8213137d2c731ecd4d88ebd2948941d75.tar.gz", - "https://github.com/grpc/grpc/archive/3e53dbe8213137d2c731ecd4d88ebd2948941d75.tar.gz", + "https://storage.googleapis.com/mirror.tensorflow.org/github.com/grpc/grpc/archive/v1.36.4.tar.gz", + "https://github.com/grpc/grpc/archive/v1.36.4.tar.gz", ], )