Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added grpc@1.70.1 #3671

Merged
merged 10 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions modules/grpc/1.70.1/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Copyright 2025 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.

module(
name = "grpc",
version = "1.70.1",
compatibility_level = 1,
repo_name = "com_github_grpc_grpc",
)

bazel_dep(name = "abseil-cpp", version = "20240722.0", repo_name = "com_google_absl")
bazel_dep(name = "apple_support", version = "1.17.1", repo_name = "build_bazel_apple_support")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "boringssl", version = "0.20241024.0") # mistmatched 20241211
bazel_dep(name = "c-ares", version = "1.15.0", repo_name = "com_github_cares_cares") # mistmatched 1.19.1
bazel_dep(name = "envoy_api", version = "0.0.0-20241214-918efc9") # mistmatched 20250106
bazel_dep(name = "googleapis", version = "0.0.0-20240819-fe8ba054a", repo_name = "com_google_googleapis")
bazel_dep(name = "googletest", version = "1.15.2", repo_name = "com_google_googletest")
bazel_dep(name = "opencensus-cpp", version = "0.0.0-20230502-50eb5de", repo_name = "io_opencensus_cpp")
bazel_dep(name = "opentelemetry-cpp", version = "1.16.0", repo_name = "io_opentelemetry_cpp") # mistmached 1.18.0
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "protobuf", version = "29.0", repo_name = "com_google_protobuf")
bazel_dep(name = "re2", version = "2024-07-02", repo_name = "com_googlesource_code_re2") # mistmached 2022-04-01
bazel_dep(name = "rules_apple", version = "3.16.0", repo_name = "build_bazel_rules_apple")
bazel_dep(name = "rules_cc", version = "0.0.17")
bazel_dep(name = "rules_proto", version = "7.0.2")
bazel_dep(name = "xds", version = "0.0.0-20240423-555b57e", repo_name = "com_github_cncf_xds") # mismatched 20231116
bazel_dep(name = "zlib", version = "1.3.1.bcr.3")

switched_rules = use_extension("@com_google_googleapis//:extensions.bzl", "switched_rules")
switched_rules.use_languages(
cc = True,
grpc = True,
python = True,
)

bazel_dep(name = "rules_python", version = "0.37.1")

PYTHON_VERSIONS = [
"3.8",
"3.9",
"3.10",
"3.11",
"3.12",
"3.13",
]

python = use_extension("@rules_python//python/extensions:python.bzl", "python")

[
python.toolchain(
is_default = python_version == PYTHON_VERSIONS[-1],
python_version = python_version,
)
for python_version in PYTHON_VERSIONS
]

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")

[
pip.parse(
hub_name = "grpc_python_dependencies",
python_version = python_version,
requirements_lock = "//:requirements.bazel.txt",
)
for python_version in PYTHON_VERSIONS
]

use_repo(pip, "grpc_python_dependencies")

bazel_dep(name = "cython", version = "3.0.11-1")
34 changes: 34 additions & 0 deletions modules/grpc/1.70.1/patches/adopt_bzlmod.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/bazel/cython_library.bzl b/bazel/cython_library.bzl
index dc2ef7a890..93e99962db 100644
--- a/bazel/cython_library.bzl
+++ b/bazel/cython_library.bzl
@@ -72,7 +72,10 @@ def pyx_library(name, deps = [], py_deps = [], srcs = [], **kwargs):
native.cc_binary(
name = shared_object_name,
srcs = [stem + ".cpp"],
- deps = deps + ["@local_config_python//:python_headers"],
+ deps = deps + [
+ "@rules_python//python/cc:current_py_cc_headers",
+ "@rules_python//python/cc:current_py_cc_libs",
+ ],
defines = defines,
linkshared = 1,
)
+grpc_repo_deps_ext = module_extension(implementation = lambda ctx: grpc_deps(bzlmod = True))
diff --git a/bazel/python_rules.bzl b/bazel/python_rules.bzl
index f5fa1a0550..56b2a2d42c 100644
--- a/bazel/python_rules.bzl
+++ b/bazel/python_rules.bzl
@@ -191,11 +191,7 @@ def _generate_pb2_grpc_src_impl(context):
arguments = []
tools = [context.executable._protoc, context.executable._grpc_plugin]
out_dir = get_out_dir(protos, context)
- if out_dir.import_path:
- # is virtual imports
- out_path = out_dir.path
- else:
- out_path = context.genfiles_dir.path
+ out_path = out_dir.path
arguments += get_plugin_args(
context.executable._grpc_plugin,
plugin_flags,
47 changes: 47 additions & 0 deletions modules/grpc/1.70.1/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
matrix:
platform:
- debian11
- macos
- macos_arm64
- ubuntu2004
- ubuntu2204
- ubuntu2404
bazel:
- 7.x
- 8.x

tasks:
verify_targets:
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- "@grpc//:grpc"
- "@grpc//:grpc_unsecure"
- "@grpc//:grpc_opencensus_plugin"
- "@grpc//:grpc_security_base"
- "@grpc//:grpc++"
- "@grpc//:grpc++_unsecure"
- "@grpc//:grpc++_reflection"
- "@grpc//:grpc++_test"
- "@grpc//:grpcpp_admin"
- "@grpc//:grpcpp_channelz"
- "@grpc//:grpcpp_csds"
- "@grpc//:grpcpp_orca_service"
- "@grpc//examples/protos/..."

verify_targets_on_windows:
platform: "windows"
bazel: ${{ bazel }}
build_targets:
- "@grpc//:grpc"
- "@grpc//:grpc_unsecure"
- "@grpc//:grpc_opencensus_plugin"
- "@grpc//:grpc_security_base"
- "@grpc//:grpc++"
- "@grpc//:grpc++_unsecure"
- "@grpc//:grpc++_reflection"
- "@grpc//:grpc++_test"
- "@grpc//:grpcpp_admin"
- "@grpc//:grpcpp_channelz"
- "@grpc//:grpcpp_csds"
- "@grpc//:grpcpp_orca_service"
9 changes: 9 additions & 0 deletions modules/grpc/1.70.1/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"integrity": "sha256-Yq8qmRs0e6q3KybzRhsPYY0pFTD3cDbKmrAeYbbO8GQ=",
"strip_prefix": "grpc-b73dbd94df4bd9f9362d16b76f34e4c7c2358409",
"url": "https://github.com/grpc/grpc/archive/b73dbd94df4bd9f9362d16b76f34e4c7c2358409.tar.gz",
"patch_strip": 1,
"patches": {
"adopt_bzlmod.patch": "sha256-MJbyswKT9oNCKHkNt1RvOcHnHOU5WyJGk3EhE2vxszQ="
}
}
3 changes: 2 additions & 1 deletion modules/grpc/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"1.66.0.bcr.2",
"1.66.0.bcr.3",
"1.68.0",
"1.69.0"
"1.69.0",
"1.70.1"
],
"yanked_versions": {}
}
Loading