Upgrade grpc-java to 1.41.0.

Also, add patch for C++ gRPC 1.41.0.

Closes #14154.

Signed-off-by: Philipp Wollermann <philwo@google.com>
diff --git a/third_party/grpc/BUILD b/third_party/grpc/BUILD
index 5b33e42..00d1533 100644
--- a/third_party/grpc/BUILD
+++ b/third_party/grpc/BUILD
@@ -14,11 +14,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-load("//tools/distributions:distribution_rules.bzl", "distrib_java_import", "distrib_jar_filegroup", "distrib_cc_binary")
+load("//tools/distributions:distribution_rules.bzl", "distrib_cc_binary", "distrib_jar_filegroup", "distrib_java_import")
 
 licenses(["notice"])  # Apache v2
 
-exports_files(["grpc_1.33.1.patch"])
+exports_files([
+    "grpc_1.31.1.patch",
+    "grpc_1.41.0.patch",
+])
 
 package(default_visibility = ["//visibility:public"])
 
@@ -32,20 +35,21 @@
 distrib_jar_filegroup(
     name = "bootstrap-grpc-jars",
     srcs = [
-        "grpc-api-1.33.1.jar",
-        "grpc-auth-1.33.1.jar",
-        "grpc-context-1.33.1.jar",
-        "grpc-core-1.33.1.jar",
-        "grpc-netty-1.33.1.jar",
-        "grpc-protobuf-1.33.1.jar",
-        "grpc-protobuf-lite-1.33.1.jar",
-        "grpc-stub-1.33.1.jar",
+        "grpc-api-1.41.0.jar",
+        "grpc-auth-1.41.0.jar",
+        "grpc-context-1.41.0.jar",
+        "grpc-core-1.41.0.jar",
+        "grpc-netty-1.41.0.jar",
+        "grpc-protobuf-1.41.0.jar",
+        "grpc-protobuf-lite-1.41.0.jar",
+        "grpc-stub-1.41.0.jar",
     ],
     enable_distributions = ["debian"],
 )
 
 distrib_java_import(
     name = "grpc-jar",
+    enable_distributions = ["debian"],
     jars = [":bootstrap-grpc-jars"],
     runtime_deps = [
         "//third_party:netty",
@@ -55,18 +59,17 @@
     deps = [
         "//third_party:guava",
     ],
-    enable_distributions = ["debian"],
 )
 
 distrib_cc_binary(
     name = "grpc-java-plugin",
-    enable_distributions = ["debian"],
     srcs = [
         "compiler/src/java_plugin/cpp/java_generator.cpp",
         "compiler/src/java_plugin/cpp/java_generator.h",
         "compiler/src/java_plugin/cpp/java_plugin.cpp",
     ],
     copts = ["-w"],
+    enable_distributions = ["debian"],
     deps = ["//third_party/protobuf:protoc_lib"],
 )
 
diff --git a/third_party/grpc/README.bazel.md b/third_party/grpc/README.bazel.md
index 19f0a8a..4798ec2 100644
--- a/third_party/grpc/README.bazel.md
+++ b/third_party/grpc/README.bazel.md
@@ -1,27 +1,27 @@
 # How to update the C++ sources of gRPC:
 
 1. Update the gRPC definitions in WORKSPACE file, currently we use 
-   https://github.com/grpc/grpc/archive/v1.33.1.tar.gz
+   https://github.com/grpc/grpc/archive/v1.41.0.tar.gz
 2. Update the gRPC patch file if necessary, it mostly helps avoid unnecessary dependencies.
 3. Update third_party/grpc/BUILD to redirect targets to @com_github_grpc_grpc if necessary.
 
 # How to update the BUILD/bzl sources of gRPC:
 
 1. `git clone http://github.com/grpc/grpc.git` in a convenient directory
-2. `git checkout <tag>` (current is `v1.33.1`, commithash `054ff69350`)
+2. `git checkout <tag>` (current is `v1.41.0`, commithash `fc662b7964384b701af5bd3ce6994d2180080eb4`)
 3. `mkdir -p third_party/grpc/bazel`
 4. `cp <gRPC git tree>/bazel/{BUILD,cc_grpc_library.bzl,generate_cc.bzl,protobuf.bzl} third_party/grpc/bazel`
 5. In the `third_party/grpc` directory, apply local patches:
-   `patch -p3 < bazel_1.33.1.patch`
+   `patch -p3 < bazel_1.41.0.patch`
 
 # How to update the Java plugin:
 
-1. Checkout tag `v1.33.1` from https://github.com/grpc/grpc-java
+1. Checkout tag `v1.41.0` from https://github.com/grpc/grpc-java
 2. `cp -R <grpc-java git tree>/compiler/src/java_plugin third_party/grpc/compiler/src`
 
 # How to update the Java code:
 
-Download the necessary jars at version `1.33.1` from maven central.
+Download the necessary jars at version `1.41.0` from maven central.
 
 # Submitting the change needs 3 pull requests
 
diff --git a/third_party/grpc/bazel/cc_grpc_library.bzl b/third_party/grpc/bazel/cc_grpc_library.bzl
index 0470a29..c3a56dc 100644
--- a/third_party/grpc/bazel/cc_grpc_library.bzl
+++ b/third_party/grpc/bazel/cc_grpc_library.bzl
@@ -1,3 +1,16 @@
+# Copyright 2021 The gRPC Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
 """Generates and compiles C++ grpc stubs from proto_library rules."""
 
 load(":generate_cc.bzl", "generate_cc")
diff --git a/third_party/grpc/bazel/generate_cc.bzl b/third_party/grpc/bazel/generate_cc.bzl
index 8e6fcd6..89f25ea 100644
--- a/third_party/grpc/bazel/generate_cc.bzl
+++ b/third_party/grpc/bazel/generate_cc.bzl
@@ -1,3 +1,16 @@
+# Copyright 2021 The gRPC Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
 """Generates C++ grpc stubs from proto_library rules.
 
 This is an internal rule used by cc_grpc_library, and shouldn't be used
diff --git a/third_party/grpc/bazel/protobuf.bzl b/third_party/grpc/bazel/protobuf.bzl
index c0abfb3..38b33ff 100644
--- a/third_party/grpc/bazel/protobuf.bzl
+++ b/third_party/grpc/bazel/protobuf.bzl
@@ -1,3 +1,16 @@
+# Copyright 2021 The gRPC Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
 """Utility functions for generating protobuf code."""
 
 load("@rules_proto//proto:defs.bzl", "ProtoInfo")
diff --git a/third_party/grpc/bazel_1.33.1.patch b/third_party/grpc/bazel_1.33.1.patch
deleted file mode 100644
index 27c8db4..0000000
--- a/third_party/grpc/bazel_1.33.1.patch
+++ /dev/null
@@ -1,313 +0,0 @@
-From 6eb4a396945bbe89831ce1d205106c1348f376e3 Mon Sep 17 00:00:00 2001
-From: Mark Schaller <mschaller@google.com>
-Date: Thu, 9 Jan 2020 19:50:57 -0500
-Subject: [PATCH] Adapt gRPC bazel files for use in Bazel
-
-This simplifies the cc_grpc_library macro and its deps:
-* removes cc_grpc_library's grpc_only parameter (now always true)
-* removes its proto_only, well_known_protos parameters (now always
-    false)
-* removes its use_external parameter (it was previously unused)
-* adds to it an extra_cc_library_kwargs parameter (forwarded to its
-    generated cc_library rule)
-* removes "well_known_proto" functionality from generate_cc.bzl and
-    protobuf.bzl
-* changes generate_cc's _protoc attribute to protoc
-* sets cc_grpc_library's generate_cc call's plugin and protoc arguments
-    to Bazel's targets ("//third_party/grpc:cpp_plugin" and
-    "//third_party/protobuf:protoc", respectively)
-* relativizes load statements throughout
-* adds "srcs" filegroup to the package's BUILD file and includes it in
-    //third_party/grpc:srcs
-    
----
- third_party/grpc/bazel/BUILD               |   5 +
- third_party/grpc/bazel/cc_grpc_library.bzl | 127 +++++++--------------
- third_party/grpc/bazel/generate_cc.bzl     |  39 +------
- third_party/grpc/bazel/protobuf.bzl        |  16 ---
- 4 files changed, 51 insertions(+), 136 deletions(-)
-
-diff --git a/third_party/grpc/bazel/BUILD b/third_party/grpc/bazel/BUILD
-index c3c82c9c0c..6f451a6f24 100644
---- a/third_party/grpc/bazel/BUILD
-+++ b/third_party/grpc/bazel/BUILD
-@@ -17,3 +17,18 @@ licenses(["notice"])  # Apache v2
- package(default_visibility = ["//:__subpackages__"])
- 
- load(":cc_grpc_library.bzl", "cc_grpc_library")
-+
-+filegroup(
-+    name = "srcs",
-+    srcs = glob(["**"]),
-+)
-+
-+filegroup(
-+    name = "embedded_tools_srcs",
-+    srcs = [
-+        "BUILD.tools",
-+        "cc_grpc_library.bzl",
-+        "generate_cc.bzl",
-+        "protobuf.bzl",
-+    ],
-+)
-diff --git a/third_party/grpc/bazel/cc_grpc_library.bzl b/third_party/grpc/bazel/cc_grpc_library.bzl
-index dea493eaf2..0470a294fc 100644
---- a/third_party/grpc/bazel/cc_grpc_library.bzl
-+++ b/third_party/grpc/bazel/cc_grpc_library.bzl
-@@ -1,105 +1,58 @@
- """Generates and compiles C++ grpc stubs from proto_library rules."""
- 
--load("@rules_proto//proto:defs.bzl", "proto_library")
--load("//bazel:generate_cc.bzl", "generate_cc")
--load("//bazel:protobuf.bzl", "well_known_proto_libs")
-+load(":generate_cc.bzl", "generate_cc")
- 
-+# Simplified version of gRPC upstream's cc_grpc_library.
- def cc_grpc_library(
-         name,
-         srcs,
-         deps,
--        proto_only = False,
--        well_known_protos = False,
-         generate_mocks = False,
--        use_external = False,
--        grpc_only = False,
-+        extra_cc_library_kwargs = {},
-         **kwargs):
--    """Generates C++ grpc classes for services defined in a proto file.
-+    """Generates C++ grpc classes for services defined in proto_library rules.
- 
--    If grpc_only is True, this rule is compatible with proto_library and
--    cc_proto_library native rules such that it expects proto_library target
--    as srcs argument and generates only grpc library classes, expecting
--    protobuf messages classes library (cc_proto_library target) to be passed in
--    deps argument. By default grpc_only is False which makes this rule to behave
--    in a backwards-compatible mode (trying to generate both proto and grpc
--    classes).
-+    This rule expects a singleton list containing a proto_library target for its
-+    srcs argument, and expects a list (of arbitrary size) of cc_proto_library
-+    targets for its deps argument.
-+
-+    It generates only grpc library classes.
- 
-     Assumes the generated classes will be used in cc_api_version = 2.
- 
-     Args:
-         name (str): Name of rule.
--        srcs (list): A single .proto file which contains services definitions,
--          or if grpc_only parameter is True, a single proto_library which
--          contains services descriptors.
--        deps (list): A list of C++ proto_library (or cc_proto_library) which
--          provides the compiled code of any message that the services depend on.
--        proto_only (bool): If True, create only C++ proto classes library,
--          avoid creating C++ grpc classes library (expect it in deps).
--          Deprecated, use native cc_proto_library instead. False by default.
--        well_known_protos (bool): Should this library additionally depend on
--          well known protos. Deprecated, the well known protos should be
--          specified as explicit dependencies of the proto_library target
--          (passed in srcs parameter) instead. False by default.
-+        srcs (list): A single proto_library which contains services descriptors.
-+        deps (list): A list of cc_proto_library targets which
-+          provide the compiled code of any message that the services depend on.
-         generate_mocks (bool): when True, Google Mock code for client stub is
-           generated. False by default.
--        use_external (bool): Not used.
--        grpc_only (bool): if True, generate only grpc library, expecting
--          protobuf messages library (cc_proto_library target) to be passed as
--          deps. False by default (will become True by default eventually).
--        **kwargs: rest of arguments, e.g., compatible_with and visibility
-+        extra_cc_library_kwargs (map): extra arguments to pass to the cc_library
-+          rule
-+        **kwargs: extra arguments to pass to all rules instantiated by this
-+          macro. Must be common to all build rules. See
-+          https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes
-     """
--    if len(srcs) > 1:
--        fail("Only one srcs value supported", "srcs")
--    if grpc_only and proto_only:
--        fail("A mutualy exclusive configuration is specified: grpc_only = True and proto_only = True")
--
--    extra_deps = []
--    proto_targets = []
--
--    if not grpc_only:
--        proto_target = "_" + name + "_only"
--        cc_proto_target = name if proto_only else "_" + name + "_cc_proto"
--
--        proto_deps = ["_" + dep + "_only" for dep in deps if dep.find(":") == -1]
--        proto_deps += [dep.split(":")[0] + ":" + "_" + dep.split(":")[1] + "_only" for dep in deps if dep.find(":") != -1]
--        if well_known_protos:
--            proto_deps += well_known_proto_libs()
--        proto_library(
--            name = proto_target,
--            srcs = srcs,
--            deps = proto_deps,
--            **kwargs
--        )
--
--        native.cc_proto_library(
--            name = cc_proto_target,
--            deps = [":" + proto_target],
--            **kwargs
--        )
--        extra_deps.append(":" + cc_proto_target)
--        proto_targets.append(proto_target)
--    else:
--        if not srcs:
--            fail("srcs cannot be empty", "srcs")
--        proto_targets += srcs
--
--    if not proto_only:
--        codegen_grpc_target = "_" + name + "_grpc_codegen"
--        generate_cc(
--            name = codegen_grpc_target,
--            srcs = proto_targets,
--            plugin = "@com_github_grpc_grpc//src/compiler:grpc_cpp_plugin",
--            well_known_protos = well_known_protos,
--            generate_mocks = generate_mocks,
--            **kwargs
--        )
--
--        native.cc_library(
--            name = name,
--            srcs = [":" + codegen_grpc_target],
--            hdrs = [":" + codegen_grpc_target],
--            deps = deps +
--                   extra_deps +
--                   ["@com_github_grpc_grpc//:grpc++_codegen_proto"],
--            **kwargs
--        )
-+    if len(srcs) != 1:
-+        fail("The srcs attribute must be a singleton list but was " + str(srcs),
-+             "srcs")
-+
-+    codegen_grpc_target = "_" + name + "_grpc_codegen"
-+    generate_cc(
-+        name = codegen_grpc_target,
-+        srcs = srcs,
-+        plugin = "//third_party/grpc:cpp_plugin",
-+        generate_mocks = generate_mocks,
-+        protoc = "//third_party/protobuf:protoc",
-+        **kwargs
-+    )
-+
-+    cc_library_kwargs = dict(**extra_cc_library_kwargs)
-+    cc_library_kwargs.update(**kwargs)
-+    native.cc_library(
-+        name = name,
-+        srcs = [":" + codegen_grpc_target],
-+        hdrs = [":" + codegen_grpc_target],
-+        deps = deps + ["//third_party/grpc:grpc++_codegen_proto"],
-+        **cc_library_kwargs
-+    )
-diff --git a/third_party/grpc/bazel/generate_cc.bzl b/third_party/grpc/bazel/generate_cc.bzl
-index 484959ebb7..38a5b460f9 100644
---- a/third_party/grpc/bazel/generate_cc.bzl
-+++ b/third_party/grpc/bazel/generate_cc.bzl
-@@ -5,7 +5,7 @@ directly.
- """
- 
- load(
--    "//bazel:protobuf.bzl",
-+    ":protobuf.bzl",
-     "get_include_directory",
-     "get_plugin_args",
-     "get_proto_root",
-@@ -118,34 +118,18 @@ def generate_cc_impl(ctx):
-     arguments += ["--proto_path={0}{1}".format(dir_out, proto_root)]
-     arguments += [_get_srcs_file_path(proto) for proto in protos]
- 
--    # create a list of well known proto files if the argument is non-None
--    well_known_proto_files = []
--    if ctx.attr.well_known_protos:
--        f = ctx.attr.well_known_protos.files.to_list()[0].dirname
--        if f != "external/com_google_protobuf/src/google/protobuf":
--            print(
--                "Error: Only @com_google_protobuf//:well_known_protos is supported",
--            )
--        else:
--            # f points to "external/com_google_protobuf/src/google/protobuf"
--            # add -I argument to protoc so it knows where to look for the proto files.
--            arguments += ["-I{0}".format(f + "/../..")]
--            well_known_proto_files = [
--                f
--                for f in ctx.attr.well_known_protos.files.to_list()
--            ]
--
-     ctx.actions.run(
--        inputs = protos + includes + well_known_proto_files,
-+        inputs = protos + includes,
-         tools = tools,
-         outputs = out_files,
--        executable = ctx.executable._protoc,
-+        executable = ctx.executable.protoc,
-         arguments = arguments,
-+        use_default_shell_env = True,
-     )
- 
-     return struct(files = depset(out_files))
- 
--_generate_cc = rule(
-+generate_cc = rule(
-     attrs = {
-         "srcs": attr.label_list(
-             mandatory = True,
-@@ -161,13 +145,12 @@ _generate_cc = rule(
-             mandatory = False,
-             allow_empty = True,
-         ),
--        "well_known_protos": attr.label(mandatory = False),
-         "generate_mocks": attr.bool(
-             default = False,
-             mandatory = False,
-         ),
--        "_protoc": attr.label(
--            default = Label("//external:protocol_compiler"),
-+        "protoc": attr.label(
-+            mandatory = True,
-             executable = True,
-             cfg = "host",
-         ),
-@@ -176,12 +159,3 @@ _generate_cc = rule(
-     output_to_genfiles = True,
-     implementation = generate_cc_impl,
- )
--
--def generate_cc(well_known_protos, **kwargs):
--    if well_known_protos:
--        _generate_cc(
--            well_known_protos = "@com_google_protobuf//:well_known_protos",
--            **kwargs
--        )
--    else:
--        _generate_cc(**kwargs)
-diff --git a/third_party/grpc/bazel/protobuf.bzl b/third_party/grpc/bazel/protobuf.bzl
-index 7af27a8b30..0d6a4135f0 100644
---- a/third_party/grpc/bazel/protobuf.bzl
-+++ b/third_party/grpc/bazel/protobuf.bzl
-@@ -3,22 +3,6 @@
- _PROTO_EXTENSION = ".proto"
- _VIRTUAL_IMPORTS = "/_virtual_imports/"
- 
--def well_known_proto_libs():
--    return [
--        "@com_google_protobuf//:any_proto",
--        "@com_google_protobuf//:api_proto",
--        "@com_google_protobuf//:compiler_plugin_proto",
--        "@com_google_protobuf//:descriptor_proto",
--        "@com_google_protobuf//:duration_proto",
--        "@com_google_protobuf//:empty_proto",
--        "@com_google_protobuf//:field_mask_proto",
--        "@com_google_protobuf//:source_context_proto",
--        "@com_google_protobuf//:struct_proto",
--        "@com_google_protobuf//:timestamp_proto",
--        "@com_google_protobuf//:type_proto",
--        "@com_google_protobuf//:wrappers_proto",
--    ]
--
- def get_proto_root(workspace_root):
-     """Gets the root protobuf directory.
- 
--- 
-2.25.0.rc1.283.g88dfdc4193-goog
-
diff --git a/third_party/grpc/bazel_1.41.0.patch b/third_party/grpc/bazel_1.41.0.patch
new file mode 100644
index 0000000..0dbffc6
--- /dev/null
+++ b/third_party/grpc/bazel_1.41.0.patch
@@ -0,0 +1,598 @@
+diff --git a/third_party/grpc/bazel/BUILD b/third_party/grpc/bazel/BUILD
+index c3c82c9c0c..70c61a2025 100644
+--- a/third_party/grpc/bazel/BUILD
++++ b/third_party/grpc/bazel/BUILD
+@@ -17,3 +17,18 @@ licenses(["notice"])  # Apache v2
+ package(default_visibility = ["//:__subpackages__"])
+ 
+ load(":cc_grpc_library.bzl", "cc_grpc_library")
++
++filegroup(
++    name = "srcs",
++    srcs = glob(["**"]),
++)
++
++filegroup(
++    name = "embedded_tools_srcs",
++    srcs = [
++        "BUILD.tools",
++        "cc_grpc_library.bzl",
++        "generate_cc.bzl",
++        "protobuf.bzl",
++    ],
++)
+diff --git a/third_party/grpc/bazel/cc_grpc_library.bzl b/third_party/grpc/bazel/cc_grpc_library.bzl
+index 9c31f0c1e2..c3a56dcacc 100644
+--- a/third_party/grpc/bazel/cc_grpc_library.bzl
++++ b/third_party/grpc/bazel/cc_grpc_library.bzl
+@@ -13,106 +13,59 @@
+ # limitations under the License.
+ """Generates and compiles C++ grpc stubs from proto_library rules."""
+ 
+-load("@rules_proto//proto:defs.bzl", "proto_library")
+-load("//bazel:generate_cc.bzl", "generate_cc")
+-load("//bazel:protobuf.bzl", "well_known_proto_libs")
++load(":generate_cc.bzl", "generate_cc")
+ 
++# Simplified version of gRPC upstream's cc_grpc_library.
+ def cc_grpc_library(
+         name,
+         srcs,
+         deps,
+-        proto_only = False,
+-        well_known_protos = False,
+         generate_mocks = False,
+-        use_external = False,
+-        grpc_only = False,
++        extra_cc_library_kwargs = {},
+         **kwargs):
+-    """Generates C++ grpc classes for services defined in a proto file.
++    """Generates C++ grpc classes for services defined in proto_library rules.
+ 
+-    If grpc_only is True, this rule is compatible with proto_library and
+-    cc_proto_library native rules such that it expects proto_library target
+-    as srcs argument and generates only grpc library classes, expecting
+-    protobuf messages classes library (cc_proto_library target) to be passed in
+-    deps argument. By default grpc_only is False which makes this rule to behave
+-    in a backwards-compatible mode (trying to generate both proto and grpc
+-    classes).
++    This rule expects a singleton list containing a proto_library target for its
++    srcs argument, and expects a list (of arbitrary size) of cc_proto_library
++    targets for its deps argument.
++
++    It generates only grpc library classes.
+ 
+     Assumes the generated classes will be used in cc_api_version = 2.
+ 
+     Args:
+         name (str): Name of rule.
+-        srcs (list): A single .proto file which contains services definitions,
+-          or if grpc_only parameter is True, a single proto_library which
+-          contains services descriptors.
+-        deps (list): A list of C++ proto_library (or cc_proto_library) which
+-          provides the compiled code of any message that the services depend on.
+-        proto_only (bool): If True, create only C++ proto classes library,
+-          avoid creating C++ grpc classes library (expect it in deps).
+-          Deprecated, use native cc_proto_library instead. False by default.
+-        well_known_protos (bool): Should this library additionally depend on
+-          well known protos. Deprecated, the well known protos should be
+-          specified as explicit dependencies of the proto_library target
+-          (passed in srcs parameter) instead. False by default.
++        srcs (list): A single proto_library which contains services descriptors.
++        deps (list): A list of cc_proto_library targets which
++          provide the compiled code of any message that the services depend on.
+         generate_mocks (bool): when True, Google Mock code for client stub is
+           generated. False by default.
+-        use_external (bool): Not used.
+-        grpc_only (bool): if True, generate only grpc library, expecting
+-          protobuf messages library (cc_proto_library target) to be passed as
+-          deps. False by default (will become True by default eventually).
+-        **kwargs: rest of arguments, e.g., compatible_with and visibility
++        extra_cc_library_kwargs (map): extra arguments to pass to the cc_library
++          rule
++        **kwargs: extra arguments to pass to all rules instantiated by this
++          macro. Must be common to all build rules. See
++          https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes
+     """
+-    if len(srcs) > 1:
+-        fail("Only one srcs value supported", "srcs")
+-    if grpc_only and proto_only:
+-        fail("A mutualy exclusive configuration is specified: grpc_only = True and proto_only = True")
+-
+-    extra_deps = []
+-    proto_targets = []
+-
+-    if not grpc_only:
+-        proto_target = "_" + name + "_only"
+-        cc_proto_target = name if proto_only else "_" + name + "_cc_proto"
+-
+-        proto_deps = ["_" + dep + "_only" for dep in deps if dep.find(":") == -1]
+-        proto_deps += [dep.split(":")[0] + ":" + "_" + dep.split(":")[1] + "_only" for dep in deps if dep.find(":") != -1]
+-        if well_known_protos:
+-            proto_deps += well_known_proto_libs()
+-        proto_library(
+-            name = proto_target,
+-            srcs = srcs,
+-            deps = proto_deps,
+-            **kwargs
+-        )
+-
+-        native.cc_proto_library(
+-            name = cc_proto_target,
+-            deps = [":" + proto_target],
+-            **kwargs
+-        )
+-        extra_deps.append(":" + cc_proto_target)
+-        proto_targets.append(proto_target)
+-    else:
+-        if not srcs:
+-            fail("srcs cannot be empty", "srcs")
+-        proto_targets += srcs
++    if len(srcs) != 1:
++        fail("The srcs attribute must be a singleton list but was " + str(srcs),
++             "srcs")
+ 
+-    if not proto_only:
+-        codegen_grpc_target = "_" + name + "_grpc_codegen"
+-        generate_cc(
+-            name = codegen_grpc_target,
+-            srcs = proto_targets,
+-            plugin = "@com_github_grpc_grpc//src/compiler:grpc_cpp_plugin",
+-            well_known_protos = well_known_protos,
+-            generate_mocks = generate_mocks,
+-            **kwargs
+-        )
++    codegen_grpc_target = "_" + name + "_grpc_codegen"
++    generate_cc(
++        name = codegen_grpc_target,
++        srcs = srcs,
++        plugin = "//third_party/grpc:cpp_plugin",
++        generate_mocks = generate_mocks,
++        protoc = "//third_party/protobuf:protoc",
++        **kwargs
++    )
+ 
+-        native.cc_library(
+-            name = name,
+-            srcs = [":" + codegen_grpc_target],
+-            hdrs = [":" + codegen_grpc_target],
+-            deps = deps +
+-                   extra_deps +
+-                   ["@com_github_grpc_grpc//:grpc++_codegen_proto"],
+-            **kwargs
+-        )
++    cc_library_kwargs = dict(**extra_cc_library_kwargs)
++    cc_library_kwargs.update(**kwargs)
++    native.cc_library(
++        name = name,
++        srcs = [":" + codegen_grpc_target],
++        hdrs = [":" + codegen_grpc_target],
++        deps = deps + ["//third_party/grpc:grpc++_codegen_proto"],
++        **cc_library_kwargs
++    )
+diff --git a/third_party/grpc/bazel/generate_cc.bzl b/third_party/grpc/bazel/generate_cc.bzl
+index b419e13a4e..89f25ea753 100644
+--- a/third_party/grpc/bazel/generate_cc.bzl
++++ b/third_party/grpc/bazel/generate_cc.bzl
+@@ -19,7 +19,7 @@ directly.
+ 
+ load("@rules_proto//proto:defs.bzl", "ProtoInfo")
+ load(
+-    "//bazel:protobuf.bzl",
++    ":protobuf.bzl",
+     "get_include_directory",
+     "get_plugin_args",
+     "get_proto_root",
+@@ -131,35 +131,18 @@ def generate_cc_impl(ctx):
+     arguments += ["--proto_path={0}{1}".format(dir_out, proto_root)]
+     arguments += [_get_srcs_file_path(proto) for proto in protos]
+ 
+-    # create a list of well known proto files if the argument is non-None
+-    well_known_proto_files = []
+-    if ctx.attr.well_known_protos:
+-        f = ctx.attr.well_known_protos.files.to_list()[0].dirname
+-        if f != "external/com_google_protobuf/src/google/protobuf":
+-            print(
+-                "Error: Only @com_google_protobuf//:well_known_protos is supported",
+-            )
+-        else:
+-            # f points to "external/com_google_protobuf/src/google/protobuf"
+-            # add -I argument to protoc so it knows where to look for the proto files.
+-            arguments += ["-I{0}".format(f + "/../..")]
+-            well_known_proto_files = [
+-                f
+-                for f in ctx.attr.well_known_protos.files.to_list()
+-            ]
+-
+     ctx.actions.run(
+-        inputs = protos + includes + well_known_proto_files,
++        inputs = protos + includes,
+         tools = tools,
+         outputs = out_files,
+-        executable = ctx.executable._protoc,
++        executable = ctx.executable.protoc,
+         arguments = arguments,
+         use_default_shell_env = True,
+     )
+ 
+     return struct(files = depset(out_files))
+ 
+-_generate_cc = rule(
++generate_cc = rule(
+     attrs = {
+         "srcs": attr.label_list(
+             mandatory = True,
+@@ -175,13 +158,12 @@ _generate_cc = rule(
+             mandatory = False,
+             allow_empty = True,
+         ),
+-        "well_known_protos": attr.label(mandatory = False),
+         "generate_mocks": attr.bool(
+             default = False,
+             mandatory = False,
+         ),
+-        "_protoc": attr.label(
+-            default = Label("//external:protocol_compiler"),
++        "protoc": attr.label(
++            mandatory = True,
+             executable = True,
+             cfg = "host",
+         ),
+@@ -190,12 +172,3 @@ _generate_cc = rule(
+     output_to_genfiles = True,
+     implementation = generate_cc_impl,
+ )
+-
+-def generate_cc(well_known_protos, **kwargs):
+-    if well_known_protos:
+-        _generate_cc(
+-            well_known_protos = "@com_google_protobuf//:well_known_protos",
+-            **kwargs
+-        )
+-    else:
+-        _generate_cc(**kwargs)
+diff --git a/third_party/grpc/bazel/protobuf.bzl b/third_party/grpc/bazel/protobuf.bzl
+index ad304f4fed..38b33ff0ff 100644
+--- a/third_party/grpc/bazel/protobuf.bzl
++++ b/third_party/grpc/bazel/protobuf.bzl
+@@ -18,22 +18,6 @@ load("@rules_proto//proto:defs.bzl", "ProtoInfo")
+ _PROTO_EXTENSION = ".proto"
+ _VIRTUAL_IMPORTS = "/_virtual_imports/"
+ 
+-def well_known_proto_libs():
+-    return [
+-        "@com_google_protobuf//:any_proto",
+-        "@com_google_protobuf//:api_proto",
+-        "@com_google_protobuf//:compiler_plugin_proto",
+-        "@com_google_protobuf//:descriptor_proto",
+-        "@com_google_protobuf//:duration_proto",
+-        "@com_google_protobuf//:empty_proto",
+-        "@com_google_protobuf//:field_mask_proto",
+-        "@com_google_protobuf//:source_context_proto",
+-        "@com_google_protobuf//:struct_proto",
+-        "@com_google_protobuf//:timestamp_proto",
+-        "@com_google_protobuf//:type_proto",
+-        "@com_google_protobuf//:wrappers_proto",
+-    ]
+-
+ def get_proto_root(workspace_root):
+     """Gets the root protobuf directory.
+ 
+diff --git a/third_party/grpc/bazel_1.41.0.patch b/third_party/grpc/bazel_1.41.0.patch
+index 27c8db4752..110921ef9f 100644
+--- a/third_party/grpc/bazel_1.41.0.patch
++++ b/third_party/grpc/bazel_1.41.0.patch
+@@ -1,313 +0,0 @@
+-From 6eb4a396945bbe89831ce1d205106c1348f376e3 Mon Sep 17 00:00:00 2001
+-From: Mark Schaller <mschaller@google.com>
+-Date: Thu, 9 Jan 2020 19:50:57 -0500
+-Subject: [PATCH] Adapt gRPC bazel files for use in Bazel
+-
+-This simplifies the cc_grpc_library macro and its deps:
+-* removes cc_grpc_library's grpc_only parameter (now always true)
+-* removes its proto_only, well_known_protos parameters (now always
+-    false)
+-* removes its use_external parameter (it was previously unused)
+-* adds to it an extra_cc_library_kwargs parameter (forwarded to its
+-    generated cc_library rule)
+-* removes "well_known_proto" functionality from generate_cc.bzl and
+-    protobuf.bzl
+-* changes generate_cc's _protoc attribute to protoc
+-* sets cc_grpc_library's generate_cc call's plugin and protoc arguments
+-    to Bazel's targets ("//third_party/grpc:cpp_plugin" and
+-    "//third_party/protobuf:protoc", respectively)
+-* relativizes load statements throughout
+-* adds "srcs" filegroup to the package's BUILD file and includes it in
+-    //third_party/grpc:srcs
+-    
+----
+- third_party/grpc/bazel/BUILD               |   5 +
+- third_party/grpc/bazel/cc_grpc_library.bzl | 127 +++++++--------------
+- third_party/grpc/bazel/generate_cc.bzl     |  39 +------
+- third_party/grpc/bazel/protobuf.bzl        |  16 ---
+- 4 files changed, 51 insertions(+), 136 deletions(-)
+-
+-diff --git a/third_party/grpc/bazel/BUILD b/third_party/grpc/bazel/BUILD
+-index c3c82c9c0c..6f451a6f24 100644
+---- a/third_party/grpc/bazel/BUILD
+-+++ b/third_party/grpc/bazel/BUILD
+-@@ -17,3 +17,18 @@ licenses(["notice"])  # Apache v2
+- package(default_visibility = ["//:__subpackages__"])
+- 
+- load(":cc_grpc_library.bzl", "cc_grpc_library")
+-+
+-+filegroup(
+-+    name = "srcs",
+-+    srcs = glob(["**"]),
+-+)
+-+
+-+filegroup(
+-+    name = "embedded_tools_srcs",
+-+    srcs = [
+-+        "BUILD.tools",
+-+        "cc_grpc_library.bzl",
+-+        "generate_cc.bzl",
+-+        "protobuf.bzl",
+-+    ],
+-+)
+-diff --git a/third_party/grpc/bazel/cc_grpc_library.bzl b/third_party/grpc/bazel/cc_grpc_library.bzl
+-index dea493eaf2..0470a294fc 100644
+---- a/third_party/grpc/bazel/cc_grpc_library.bzl
+-+++ b/third_party/grpc/bazel/cc_grpc_library.bzl
+-@@ -1,105 +1,58 @@
+- """Generates and compiles C++ grpc stubs from proto_library rules."""
+- 
+--load("@rules_proto//proto:defs.bzl", "proto_library")
+--load("//bazel:generate_cc.bzl", "generate_cc")
+--load("//bazel:protobuf.bzl", "well_known_proto_libs")
+-+load(":generate_cc.bzl", "generate_cc")
+- 
+-+# Simplified version of gRPC upstream's cc_grpc_library.
+- def cc_grpc_library(
+-         name,
+-         srcs,
+-         deps,
+--        proto_only = False,
+--        well_known_protos = False,
+-         generate_mocks = False,
+--        use_external = False,
+--        grpc_only = False,
+-+        extra_cc_library_kwargs = {},
+-         **kwargs):
+--    """Generates C++ grpc classes for services defined in a proto file.
+-+    """Generates C++ grpc classes for services defined in proto_library rules.
+- 
+--    If grpc_only is True, this rule is compatible with proto_library and
+--    cc_proto_library native rules such that it expects proto_library target
+--    as srcs argument and generates only grpc library classes, expecting
+--    protobuf messages classes library (cc_proto_library target) to be passed in
+--    deps argument. By default grpc_only is False which makes this rule to behave
+--    in a backwards-compatible mode (trying to generate both proto and grpc
+--    classes).
+-+    This rule expects a singleton list containing a proto_library target for its
+-+    srcs argument, and expects a list (of arbitrary size) of cc_proto_library
+-+    targets for its deps argument.
+-+
+-+    It generates only grpc library classes.
+- 
+-     Assumes the generated classes will be used in cc_api_version = 2.
+- 
+-     Args:
+-         name (str): Name of rule.
+--        srcs (list): A single .proto file which contains services definitions,
+--          or if grpc_only parameter is True, a single proto_library which
+--          contains services descriptors.
+--        deps (list): A list of C++ proto_library (or cc_proto_library) which
+--          provides the compiled code of any message that the services depend on.
+--        proto_only (bool): If True, create only C++ proto classes library,
+--          avoid creating C++ grpc classes library (expect it in deps).
+--          Deprecated, use native cc_proto_library instead. False by default.
+--        well_known_protos (bool): Should this library additionally depend on
+--          well known protos. Deprecated, the well known protos should be
+--          specified as explicit dependencies of the proto_library target
+--          (passed in srcs parameter) instead. False by default.
+-+        srcs (list): A single proto_library which contains services descriptors.
+-+        deps (list): A list of cc_proto_library targets which
+-+          provide the compiled code of any message that the services depend on.
+-         generate_mocks (bool): when True, Google Mock code for client stub is
+-           generated. False by default.
+--        use_external (bool): Not used.
+--        grpc_only (bool): if True, generate only grpc library, expecting
+--          protobuf messages library (cc_proto_library target) to be passed as
+--          deps. False by default (will become True by default eventually).
+--        **kwargs: rest of arguments, e.g., compatible_with and visibility
+-+        extra_cc_library_kwargs (map): extra arguments to pass to the cc_library
+-+          rule
+-+        **kwargs: extra arguments to pass to all rules instantiated by this
+-+          macro. Must be common to all build rules. See
+-+          https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes
+-     """
+--    if len(srcs) > 1:
+--        fail("Only one srcs value supported", "srcs")
+--    if grpc_only and proto_only:
+--        fail("A mutualy exclusive configuration is specified: grpc_only = True and proto_only = True")
+--
+--    extra_deps = []
+--    proto_targets = []
+--
+--    if not grpc_only:
+--        proto_target = "_" + name + "_only"
+--        cc_proto_target = name if proto_only else "_" + name + "_cc_proto"
+--
+--        proto_deps = ["_" + dep + "_only" for dep in deps if dep.find(":") == -1]
+--        proto_deps += [dep.split(":")[0] + ":" + "_" + dep.split(":")[1] + "_only" for dep in deps if dep.find(":") != -1]
+--        if well_known_protos:
+--            proto_deps += well_known_proto_libs()
+--        proto_library(
+--            name = proto_target,
+--            srcs = srcs,
+--            deps = proto_deps,
+--            **kwargs
+--        )
+--
+--        native.cc_proto_library(
+--            name = cc_proto_target,
+--            deps = [":" + proto_target],
+--            **kwargs
+--        )
+--        extra_deps.append(":" + cc_proto_target)
+--        proto_targets.append(proto_target)
+--    else:
+--        if not srcs:
+--            fail("srcs cannot be empty", "srcs")
+--        proto_targets += srcs
+--
+--    if not proto_only:
+--        codegen_grpc_target = "_" + name + "_grpc_codegen"
+--        generate_cc(
+--            name = codegen_grpc_target,
+--            srcs = proto_targets,
+--            plugin = "@com_github_grpc_grpc//src/compiler:grpc_cpp_plugin",
+--            well_known_protos = well_known_protos,
+--            generate_mocks = generate_mocks,
+--            **kwargs
+--        )
+--
+--        native.cc_library(
+--            name = name,
+--            srcs = [":" + codegen_grpc_target],
+--            hdrs = [":" + codegen_grpc_target],
+--            deps = deps +
+--                   extra_deps +
+--                   ["@com_github_grpc_grpc//:grpc++_codegen_proto"],
+--            **kwargs
+--        )
+-+    if len(srcs) != 1:
+-+        fail("The srcs attribute must be a singleton list but was " + str(srcs),
+-+             "srcs")
+-+
+-+    codegen_grpc_target = "_" + name + "_grpc_codegen"
+-+    generate_cc(
+-+        name = codegen_grpc_target,
+-+        srcs = srcs,
+-+        plugin = "//third_party/grpc:cpp_plugin",
+-+        generate_mocks = generate_mocks,
+-+        protoc = "//third_party/protobuf:protoc",
+-+        **kwargs
+-+    )
+-+
+-+    cc_library_kwargs = dict(**extra_cc_library_kwargs)
+-+    cc_library_kwargs.update(**kwargs)
+-+    native.cc_library(
+-+        name = name,
+-+        srcs = [":" + codegen_grpc_target],
+-+        hdrs = [":" + codegen_grpc_target],
+-+        deps = deps + ["//third_party/grpc:grpc++_codegen_proto"],
+-+        **cc_library_kwargs
+-+    )
+-diff --git a/third_party/grpc/bazel/generate_cc.bzl b/third_party/grpc/bazel/generate_cc.bzl
+-index 484959ebb7..38a5b460f9 100644
+---- a/third_party/grpc/bazel/generate_cc.bzl
+-+++ b/third_party/grpc/bazel/generate_cc.bzl
+-@@ -5,7 +5,7 @@ directly.
+- """
+- 
+- load(
+--    "//bazel:protobuf.bzl",
+-+    ":protobuf.bzl",
+-     "get_include_directory",
+-     "get_plugin_args",
+-     "get_proto_root",
+-@@ -118,34 +118,18 @@ def generate_cc_impl(ctx):
+-     arguments += ["--proto_path={0}{1}".format(dir_out, proto_root)]
+-     arguments += [_get_srcs_file_path(proto) for proto in protos]
+- 
+--    # create a list of well known proto files if the argument is non-None
+--    well_known_proto_files = []
+--    if ctx.attr.well_known_protos:
+--        f = ctx.attr.well_known_protos.files.to_list()[0].dirname
+--        if f != "external/com_google_protobuf/src/google/protobuf":
+--            print(
+--                "Error: Only @com_google_protobuf//:well_known_protos is supported",
+--            )
+--        else:
+--            # f points to "external/com_google_protobuf/src/google/protobuf"
+--            # add -I argument to protoc so it knows where to look for the proto files.
+--            arguments += ["-I{0}".format(f + "/../..")]
+--            well_known_proto_files = [
+--                f
+--                for f in ctx.attr.well_known_protos.files.to_list()
+--            ]
+--
+-     ctx.actions.run(
+--        inputs = protos + includes + well_known_proto_files,
+-+        inputs = protos + includes,
+-         tools = tools,
+-         outputs = out_files,
+--        executable = ctx.executable._protoc,
+-+        executable = ctx.executable.protoc,
+-         arguments = arguments,
+-+        use_default_shell_env = True,
+-     )
+- 
+-     return struct(files = depset(out_files))
+- 
+--_generate_cc = rule(
+-+generate_cc = rule(
+-     attrs = {
+-         "srcs": attr.label_list(
+-             mandatory = True,
+-@@ -161,13 +145,12 @@ _generate_cc = rule(
+-             mandatory = False,
+-             allow_empty = True,
+-         ),
+--        "well_known_protos": attr.label(mandatory = False),
+-         "generate_mocks": attr.bool(
+-             default = False,
+-             mandatory = False,
+-         ),
+--        "_protoc": attr.label(
+--            default = Label("//external:protocol_compiler"),
+-+        "protoc": attr.label(
+-+            mandatory = True,
+-             executable = True,
+-             cfg = "host",
+-         ),
+-@@ -176,12 +159,3 @@ _generate_cc = rule(
+-     output_to_genfiles = True,
+-     implementation = generate_cc_impl,
+- )
+--
+--def generate_cc(well_known_protos, **kwargs):
+--    if well_known_protos:
+--        _generate_cc(
+--            well_known_protos = "@com_google_protobuf//:well_known_protos",
+--            **kwargs
+--        )
+--    else:
+--        _generate_cc(**kwargs)
+-diff --git a/third_party/grpc/bazel/protobuf.bzl b/third_party/grpc/bazel/protobuf.bzl
+-index 7af27a8b30..0d6a4135f0 100644
+---- a/third_party/grpc/bazel/protobuf.bzl
+-+++ b/third_party/grpc/bazel/protobuf.bzl
+-@@ -3,22 +3,6 @@
+- _PROTO_EXTENSION = ".proto"
+- _VIRTUAL_IMPORTS = "/_virtual_imports/"
+- 
+--def well_known_proto_libs():
+--    return [
+--        "@com_google_protobuf//:any_proto",
+--        "@com_google_protobuf//:api_proto",
+--        "@com_google_protobuf//:compiler_plugin_proto",
+--        "@com_google_protobuf//:descriptor_proto",
+--        "@com_google_protobuf//:duration_proto",
+--        "@com_google_protobuf//:empty_proto",
+--        "@com_google_protobuf//:field_mask_proto",
+--        "@com_google_protobuf//:source_context_proto",
+--        "@com_google_protobuf//:struct_proto",
+--        "@com_google_protobuf//:timestamp_proto",
+--        "@com_google_protobuf//:type_proto",
+--        "@com_google_protobuf//:wrappers_proto",
+--    ]
+--
+- def get_proto_root(workspace_root):
+-     """Gets the root protobuf directory.
+- 
+--- 
+-2.25.0.rc1.283.g88dfdc4193-goog
+-
diff --git a/third_party/grpc/grpc-api-1.41.0.jar b/third_party/grpc/grpc-api-1.41.0.jar
new file mode 100644
index 0000000..8693c50
--- /dev/null
+++ b/third_party/grpc/grpc-api-1.41.0.jar
Binary files differ
diff --git a/third_party/grpc/grpc-auth-1.41.0.jar b/third_party/grpc/grpc-auth-1.41.0.jar
new file mode 100644
index 0000000..7647b86
--- /dev/null
+++ b/third_party/grpc/grpc-auth-1.41.0.jar
Binary files differ
diff --git a/third_party/grpc/grpc-context-1.41.0.jar b/third_party/grpc/grpc-context-1.41.0.jar
new file mode 100644
index 0000000..b6680d0
--- /dev/null
+++ b/third_party/grpc/grpc-context-1.41.0.jar
Binary files differ
diff --git a/third_party/grpc/grpc-core-1.41.0.jar b/third_party/grpc/grpc-core-1.41.0.jar
new file mode 100644
index 0000000..52654c0
--- /dev/null
+++ b/third_party/grpc/grpc-core-1.41.0.jar
Binary files differ
diff --git a/third_party/grpc/grpc-netty-1.41.0.jar b/third_party/grpc/grpc-netty-1.41.0.jar
new file mode 100644
index 0000000..f478288
--- /dev/null
+++ b/third_party/grpc/grpc-netty-1.41.0.jar
Binary files differ
diff --git a/third_party/grpc/grpc-protobuf-1.41.0.jar b/third_party/grpc/grpc-protobuf-1.41.0.jar
new file mode 100644
index 0000000..825aba4
--- /dev/null
+++ b/third_party/grpc/grpc-protobuf-1.41.0.jar
Binary files differ
diff --git a/third_party/grpc/grpc-protobuf-lite-1.41.0.jar b/third_party/grpc/grpc-protobuf-lite-1.41.0.jar
new file mode 100644
index 0000000..245a0d9
--- /dev/null
+++ b/third_party/grpc/grpc-protobuf-lite-1.41.0.jar
Binary files differ
diff --git a/third_party/grpc/grpc-stub-1.41.0.jar b/third_party/grpc/grpc-stub-1.41.0.jar
new file mode 100644
index 0000000..746ab8c
--- /dev/null
+++ b/third_party/grpc/grpc-stub-1.41.0.jar
Binary files differ
diff --git a/third_party/grpc/grpc_1.41.0.patch b/third_party/grpc/grpc_1.41.0.patch
new file mode 100644
index 0000000..660551b
--- /dev/null
+++ b/third_party/grpc/grpc_1.41.0.patch
@@ -0,0 +1,94 @@
+commit bb0d04663c7dc6c0096f8717cb4ec26330a5ae40
+Author: Yun Peng <pcloudy@google.com>
+Date:   Wed Jun 3 15:35:31 2020 +0200
+
+    Patch grpc v1.26.0 for Bazel build
+    
+    - Avoid loading dependencies that're not needed for the gRPC C++
+    libraries
+    - Redirect zlib to @//third_party/zlib
+
+diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl
+index 7bb6b8bdb9..7644107b70 100644
+--- a/bazel/grpc_build_system.bzl
++++ b/bazel/grpc_build_system.bzl
+@@ -25,7 +25,7 @@
+ load("//bazel:cc_grpc_library.bzl", "cc_grpc_library")
+ load("//bazel:copts.bzl", "GRPC_DEFAULT_COPTS")
+ load("@upb//bazel:upb_proto_library.bzl", "upb_proto_library")
+-load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
++# load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
+ 
+ # The set of pollers to test against if a test exercises polling
+ POLLERS = ["epollex", "epoll1", "poll"]
+@@ -181,13 +181,13 @@ def ios_cc_test(
+             testonly = 1,
+         )
+         ios_test_deps = [ios_test_adapter, ":" + test_lib_ios]
+-        ios_unit_test(
+-            name = name + "_on_ios",
+-            size = kwargs.get("size"),
+-            tags = ios_tags,
+-            minimum_os_version = "9.0",
+-            deps = ios_test_deps,
+-        )
++        # ios_unit_test(
++        #     name = name + "_on_ios",
++        #     size = kwargs.get("size"),
++        #     tags = ios_tags,
++        #     minimum_os_version = "9.0",
++        #     deps = ios_test_deps,
++        # )
+
+ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data = [], uses_polling = True, language = "C++", size = "medium", timeout = None, tags = [], exec_compatible_with = [], exec_properties = {}, shard_count = None, flaky = None, copts = []):
+     copts = copts + if_mac(["-DGRPC_CFSTREAM"])
+diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl
+index 09fcad95a2..9b737e5deb 100644
+--- a/bazel/grpc_deps.bzl
++++ b/bazel/grpc_deps.bzl
+@@ -33,7 +33,7 @@ def grpc_deps():
+ 
+     native.bind(
+         name = "madler_zlib",
+-        actual = "@zlib//:zlib",
++        actual = "@//third_party/zlib",
+     )
+ 
+     native.bind(
+diff --git a/bazel/grpc_extra_deps.bzl b/bazel/grpc_extra_deps.bzl
+index 09fcad95a2..9b737e5deb 100644
+--- a/bazel/grpc_extra_deps.bzl
++++ b/bazel/grpc_extra_deps.bzl
+@@ -15,11 +15,6 @@
+ 
+ load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
+ load("@upb//bazel:workspace_deps.bzl", "upb_deps")
+-load("@envoy_api//bazel:repositories.bzl", "api_dependencies")
+-load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
+-load("@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependencies")
+-load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies")
+-load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
+ 
+ def grpc_extra_deps(ignore_version_differences = False):
+     """Loads the extra dependencies.
+@@ -43,20 +38,3 @@
+     protobuf_deps()
+ 
+     upb_deps()
+-
+-    api_dependencies()
+-
+-    go_rules_dependencies()
+-    go_register_toolchains()
+-
+-    apple_rules_dependencies(ignore_version_differences = ignore_version_differences)
+-
+-    apple_support_dependencies()
+-
+-    # Initialize Google APIs with only C++ and Python targets
+-    switched_rules_by_language(
+-        name = "com_google_googleapis_imports",
+-        cc = True,
+-        grpc = True,
+-        python = True,
+-    )