From 3b7c595037ee7a82709cd8165b62936fd190645c Mon Sep 17 00:00:00 2001 From: maleo Date: Fri, 20 Dec 2024 10:51:51 +0000 Subject: [PATCH] Add grpc and grpc-java 1.69.0 --- modules/grpc-java/1.69.0/MODULE.bazel | 195 ++++++++++++++++++ .../1.69.0/patches/module_dot_bazel.patch | 50 +++++ modules/grpc-java/1.69.0/presubmit.yml | 9 + modules/grpc-java/1.69.0/source.json | 9 + modules/grpc-java/metadata.json | 3 +- modules/grpc/1.69.0/MODULE.bazel | 77 +++++++ .../1.69.0/patches/add_module_bazel.patch | 83 ++++++++ .../grpc/1.69.0/patches/adopt_bzlmod.patch | 107 ++++++++++ .../patches/disable-layering-check.patch | 13 ++ modules/grpc/1.69.0/presubmit.yml | 34 +++ modules/grpc/1.69.0/source.json | 11 + modules/grpc/metadata.json | 3 +- 12 files changed, 592 insertions(+), 2 deletions(-) create mode 100644 modules/grpc-java/1.69.0/MODULE.bazel create mode 100644 modules/grpc-java/1.69.0/patches/module_dot_bazel.patch create mode 100644 modules/grpc-java/1.69.0/presubmit.yml create mode 100644 modules/grpc-java/1.69.0/source.json create mode 100644 modules/grpc/1.69.0/MODULE.bazel create mode 100644 modules/grpc/1.69.0/patches/add_module_bazel.patch create mode 100644 modules/grpc/1.69.0/patches/adopt_bzlmod.patch create mode 100644 modules/grpc/1.69.0/patches/disable-layering-check.patch create mode 100644 modules/grpc/1.69.0/presubmit.yml create mode 100644 modules/grpc/1.69.0/source.json diff --git a/modules/grpc-java/1.69.0/MODULE.bazel b/modules/grpc-java/1.69.0/MODULE.bazel new file mode 100644 index 00000000000..b45a15dd10a --- /dev/null +++ b/modules/grpc-java/1.69.0/MODULE.bazel @@ -0,0 +1,195 @@ +module( + name = "grpc-java", + compatibility_level = 0, + repo_name = "io_grpc_grpc_java", + version = "1.69.0", # CURRENT_GRPC_VERSION +) + +# GRPC_DEPS_START +IO_GRPC_GRPC_JAVA_ARTIFACTS = [ + "com.google.android:annotations:4.1.1.4", + "com.google.api.grpc:proto-google-common-protos:2.48.0", + "com.google.auth:google-auth-library-credentials:1.24.1", + "com.google.auth:google-auth-library-oauth2-http:1.24.1", + "com.google.auto.value:auto-value-annotations:1.11.0", + "com.google.auto.value:auto-value:1.11.0", + "com.google.code.findbugs:jsr305:3.0.2", + "com.google.code.gson:gson:2.11.0", + "com.google.errorprone:error_prone_annotations:2.30.0", + "com.google.guava:failureaccess:1.0.1", + "com.google.guava:guava:33.3.1-android", + "com.google.re2j:re2j:1.7", + "com.google.truth:truth:1.4.2", + "com.squareup.okhttp:okhttp:2.7.5", + "com.squareup.okio:okio:2.10.0", # 3.0+ needs swapping to -jvm; need work to avoid flag-day + "io.netty:netty-buffer:4.1.110.Final", + "io.netty:netty-codec-http2:4.1.110.Final", + "io.netty:netty-codec-http:4.1.110.Final", + "io.netty:netty-codec-socks:4.1.110.Final", + "io.netty:netty-codec:4.1.110.Final", + "io.netty:netty-common:4.1.110.Final", + "io.netty:netty-handler-proxy:4.1.110.Final", + "io.netty:netty-handler:4.1.110.Final", + "io.netty:netty-resolver:4.1.110.Final", + "io.netty:netty-tcnative-boringssl-static:2.0.65.Final", + "io.netty:netty-tcnative-classes:2.0.65.Final", + "io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.110.Final", + "io.netty:netty-transport-native-unix-common:4.1.110.Final", + "io.netty:netty-transport:4.1.110.Final", + "io.opencensus:opencensus-api:0.31.0", + "io.opencensus:opencensus-contrib-grpc-metrics:0.31.0", + "io.perfmark:perfmark-api:0.27.0", + "junit:junit:4.13.2", + "org.apache.tomcat:annotations-api:6.0.53", + "org.checkerframework:checker-qual:3.12.0", + "org.codehaus.mojo:animal-sniffer-annotations:1.24", +] +# GRPC_DEPS_END + +bazel_dep(name = "bazel_skylib", version = "1.7.1") +bazel_dep(name = "googleapis", repo_name = "com_google_googleapis", version = "0.0.0-20240819-fe8ba054a") +# CEL Spec may be removed when cncf/xds MODULE is no longer using protobuf 27.x +bazel_dep(name = "cel-spec", repo_name = "dev_cel", version = "0.15.0") +bazel_dep(name = "envoy_api", version = "0.0.0-20241214-918efc9") +bazel_dep(name = "grpc", repo_name = "com_github_grpc_grpc", version = "1.69.0") +bazel_dep(name = "grpc-proto", repo_name = "io_grpc_grpc_proto", version = "0.0.0-20240627-ec30f58") +bazel_dep(name = "opencensus-proto", repo_name = "opencensus_proto", version = "0.4.1") +bazel_dep(name = "protobuf", repo_name = "com_google_protobuf", version = "23.1") +bazel_dep(name = "protoc-gen-validate", repo_name = "com_envoyproxy_protoc_gen_validate", version = "1.0.4.bcr.2") +bazel_dep(name = "rules_cc", version = "0.0.9") +bazel_dep(name = "rules_java", version = "5.3.5") +bazel_dep(name = "rules_go", repo_name = "io_bazel_rules_go", version = "0.46.0") +bazel_dep(name = "rules_jvm_external", version = "6.0") +bazel_dep(name = "rules_proto", version = "5.3.0-21.7") +bazel_dep(name = "xds", repo_name = "com_github_cncf_xds", version = "0.0.0-20240423-555b57e") + +maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") + +maven.install( + artifacts = IO_GRPC_GRPC_JAVA_ARTIFACTS, + repositories = [ + "https://repo.maven.apache.org/maven2/", + ], + strict_visibility = True, +) + +use_repo(maven, "maven") + +maven.override( + coordinates = "com.google.protobuf:protobuf-java", + target = "@com_google_protobuf//:protobuf_java", +) + +maven.override( + coordinates = "com.google.protobuf:protobuf-java-util", + target = "@com_google_protobuf//:protobuf_java_util", +) + +maven.override( + coordinates = "com.google.protobuf:protobuf-javalite", + target = "@com_google_protobuf//:protobuf_javalite", +) + +maven.override( + coordinates = "io.grpc:grpc-alts", + target = "@io_grpc_grpc_java//alts", +) + +maven.override( + coordinates = "io.grpc:grpc-api", + target = "@io_grpc_grpc_java//api", +) + +maven.override( + coordinates = "io.grpc:grpc-auth", + target = "@io_grpc_grpc_java//auth", +) + +maven.override( + coordinates = "io.grpc:grpc-census", + target = "@io_grpc_grpc_java//census", +) + +maven.override( + coordinates = "io.grpc:grpc-context", + target = "@io_grpc_grpc_java//context", +) + +maven.override( + coordinates = "io.grpc:grpc-core", + target = "@io_grpc_grpc_java//core:core_maven", +) + +maven.override( + coordinates = "io.grpc:grpc-googleapis", + target = "@io_grpc_grpc_java//googleapis", +) + +maven.override( + coordinates = "io.grpc:grpc-grpclb", + target = "@io_grpc_grpc_java//grpclb", +) + +maven.override( + coordinates = "io.grpc:grpc-inprocess", + target = "@io_grpc_grpc_java//inprocess", +) + +maven.override( + coordinates = "io.grpc:grpc-netty", + target = "@io_grpc_grpc_java//netty", +) + +maven.override( + coordinates = "io.grpc:grpc-netty-shaded", + target = "@io_grpc_grpc_java//netty:shaded_maven", +) + +maven.override( + coordinates = "io.grpc:grpc-okhttp", + target = "@io_grpc_grpc_java//okhttp", +) + +maven.override( + coordinates = "io.grpc:grpc-protobuf", + target = "@io_grpc_grpc_java//protobuf", +) + +maven.override( + coordinates = "io.grpc:grpc-protobuf-lite", + target = "@io_grpc_grpc_java//protobuf-lite", +) + +maven.override( + coordinates = "io.grpc:grpc-rls", + target = "@io_grpc_grpc_java//rls", +) + +maven.override( + coordinates = "io.grpc:grpc-services", + target = "@io_grpc_grpc_java//services:services_maven", +) + +maven.override( + coordinates = "io.grpc:grpc-stub", + target = "@io_grpc_grpc_java//stub", +) + +maven.override( + coordinates = "io.grpc:grpc-testing", + target = "@io_grpc_grpc_java//testing", +) + +maven.override( + coordinates = "io.grpc:grpc-xds", + target = "@io_grpc_grpc_java//xds:xds_maven", +) + +maven.override( + coordinates = "io.grpc:grpc-util", + target = "@io_grpc_grpc_java//util", +) + +switched_rules = use_extension("@com_google_googleapis//:extensions.bzl", "switched_rules") + +switched_rules.use_languages(java = True) diff --git a/modules/grpc-java/1.69.0/patches/module_dot_bazel.patch b/modules/grpc-java/1.69.0/patches/module_dot_bazel.patch new file mode 100644 index 00000000000..2f32da6af9b --- /dev/null +++ b/modules/grpc-java/1.69.0/patches/module_dot_bazel.patch @@ -0,0 +1,50 @@ +commit f404a428de32492511b106e28bb1d4a2e330ff10 +Author: maleo +Date: Sat Dec 14 12:14:21 2024 +0000 + + Use more Bazel module dependencies + +diff --git a/MODULE.bazel b/MODULE.bazel +index 3159f470f..2a63bd732 100644 +--- a/MODULE.bazel ++++ b/MODULE.bazel +@@ -47,33 +47,21 @@ IO_GRPC_GRPC_JAVA_ARTIFACTS = [ + # GRPC_DEPS_END + + bazel_dep(name = "bazel_skylib", version = "1.7.1") +-bazel_dep(name = "googleapis", repo_name = "com_google_googleapis", version = "0.0.0-20240326-1c8d509c5") ++bazel_dep(name = "googleapis", repo_name = "com_google_googleapis", version = "0.0.0-20240819-fe8ba054a") + # CEL Spec may be removed when cncf/xds MODULE is no longer using protobuf 27.x + bazel_dep(name = "cel-spec", repo_name = "dev_cel", version = "0.15.0") ++bazel_dep(name = "envoy_api", version = "0.0.0-20241214-918efc9") +-bazel_dep(name = "grpc", repo_name = "com_github_grpc_grpc", version = "1.56.3.bcr.1") ++bazel_dep(name = "grpc", repo_name = "com_github_grpc_grpc", version = "1.69.0") + bazel_dep(name = "grpc-proto", repo_name = "io_grpc_grpc_proto", version = "0.0.0-20240627-ec30f58") ++bazel_dep(name = "opencensus-proto", repo_name = "opencensus_proto", version = "0.4.1") + bazel_dep(name = "protobuf", repo_name = "com_google_protobuf", version = "23.1") ++bazel_dep(name = "protoc-gen-validate", repo_name = "com_envoyproxy_protoc_gen_validate", version = "1.0.4.bcr.2") + bazel_dep(name = "rules_cc", version = "0.0.9") + bazel_dep(name = "rules_java", version = "5.3.5") + bazel_dep(name = "rules_go", repo_name = "io_bazel_rules_go", version = "0.46.0") + bazel_dep(name = "rules_jvm_external", version = "6.0") + bazel_dep(name = "rules_proto", version = "5.3.0-21.7") +- +-non_module_deps = use_extension("//:repositories.bzl", "grpc_java_repositories_extension") +- +-use_repo( +- non_module_deps, +- "com_github_cncf_xds", +- "envoy_api", +-) +- +-grpc_repo_deps_ext = use_extension("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_repo_deps_ext") +- +-use_repo( +- grpc_repo_deps_ext, +- "com_envoyproxy_protoc_gen_validate", +- "opencensus_proto", +-) ++bazel_dep(name = "xds", repo_name = "com_github_cncf_xds", version = "0.0.0-20240423-555b57e") + + maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") + diff --git a/modules/grpc-java/1.69.0/presubmit.yml b/modules/grpc-java/1.69.0/presubmit.yml new file mode 100644 index 00000000000..81fea0e712b --- /dev/null +++ b/modules/grpc-java/1.69.0/presubmit.yml @@ -0,0 +1,9 @@ +matrix: + platform: ["debian10", "macos", "ubuntu2004", "windows"] + bazel: ["7.x", "8.x"] +tasks: + verify_targets: + platform: ${{ platform }} + bazel: ${{ bazel }} + build_targets: + - '@grpc-java//:java_grpc_library__external_repo_test' diff --git a/modules/grpc-java/1.69.0/source.json b/modules/grpc-java/1.69.0/source.json new file mode 100644 index 00000000000..8cff363f093 --- /dev/null +++ b/modules/grpc-java/1.69.0/source.json @@ -0,0 +1,9 @@ +{ + "integrity": "sha256-XDF48RgZDXP1JGDWcce2/EIkm3tYkNIozkIvLKILGmg=", + "strip_prefix": "grpc-java-1.69.0", + "url": "https://github.com/grpc/grpc-java/archive/refs/tags/v1.69.0.tar.gz", + "patch_strip": 1, + "patches": { + "module_dot_bazel.patch": "sha256-om3FIHRKoAkKkmJxD5LCVibwqETuWlTgd1cs6M+waz4=" + } +} diff --git a/modules/grpc-java/metadata.json b/modules/grpc-java/metadata.json index f9f7acbf5e3..aeeb3cad447 100644 --- a/modules/grpc-java/metadata.json +++ b/modules/grpc-java/metadata.json @@ -14,7 +14,8 @@ "1.64.0", "1.66.0", "1.67.1", - "1.68.1" + "1.68.1", + "1.69.0" ], "yanked_versions": {} } diff --git a/modules/grpc/1.69.0/MODULE.bazel b/modules/grpc/1.69.0/MODULE.bazel new file mode 100644 index 00000000000..2600aaeb4d6 --- /dev/null +++ b/modules/grpc/1.69.0/MODULE.bazel @@ -0,0 +1,77 @@ +module( + name = "grpc", + version = "1.69.0", + 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.15.1", repo_name = "build_bazel_apple_support") +bazel_dep(name = "bazel_skylib", version = "1.7.1") +bazel_dep(name = "boringssl", version = "0.20241024.0") +bazel_dep(name = "c-ares", version = "1.15.0", repo_name = "com_github_cares_cares") +bazel_dep(name = "envoy_api", version = "0.0.0-20241214-918efc9") +bazel_dep(name = "google_benchmark", version = "1.8.5", repo_name = "com_github_google_benchmark") +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 = "grpc-java", version = "1.69.0") +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") +bazel_dep(name = "platforms", version = "0.0.10") +bazel_dep(name = "protobuf", version = "29.0", repo_name = "com_google_protobuf") +bazel_dep(name = "protoc-gen-validate", version = "1.0.4.bcr.2", repo_name = "com_envoyproxy_protoc_gen_validate") +bazel_dep(name = "re2", version = "2024-07-02", repo_name = "com_googlesource_code_re2") +bazel_dep(name = "rules_apple", version = "3.5.1", repo_name = "build_bazel_rules_apple") +bazel_dep(name = "rules_cc", version = "0.0.16") +bazel_dep(name = "rules_java", version = "7.12.2") +bazel_dep(name = "rules_proto", version = "6.0.2") +bazel_dep(name = "xds", version = "0.0.0-20240423-555b57e", repo_name = "com_github_cncf_xds") +bazel_dep(name = "zlib", version = "1.3.1.bcr.3") + +grpc_repo_deps_ext = use_extension("//bazel:grpc_deps.bzl", "grpc_repo_deps_ext") +use_repo( + grpc_repo_deps_ext, + "google_cloud_cpp", +) + +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.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") diff --git a/modules/grpc/1.69.0/patches/add_module_bazel.patch b/modules/grpc/1.69.0/patches/add_module_bazel.patch new file mode 100644 index 00000000000..310502ccda8 --- /dev/null +++ b/modules/grpc/1.69.0/patches/add_module_bazel.patch @@ -0,0 +1,83 @@ +diff --git a/MODULE.bazel b/MODULE.bazel +new file mode 100644 +index 0000000000..d56122dea1 +--- /dev/null ++++ b/MODULE.bazel +@@ -0,0 +1,77 @@ ++module( ++ name = "grpc", ++ version = "1.69.0", ++ 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.15.1", repo_name = "build_bazel_apple_support") ++bazel_dep(name = "bazel_skylib", version = "1.7.1") ++bazel_dep(name = "boringssl", version = "0.20241024.0") ++bazel_dep(name = "c-ares", version = "1.15.0", repo_name = "com_github_cares_cares") ++bazel_dep(name = "envoy_api", version = "0.0.0-20241214-918efc9") ++bazel_dep(name = "google_benchmark", version = "1.8.5", repo_name = "com_github_google_benchmark") ++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 = "grpc-java", version = "1.69.0") ++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") ++bazel_dep(name = "platforms", version = "0.0.10") ++bazel_dep(name = "protobuf", version = "29.0", repo_name = "com_google_protobuf") ++bazel_dep(name = "protoc-gen-validate", version = "1.0.4.bcr.2", repo_name = "com_envoyproxy_protoc_gen_validate") ++bazel_dep(name = "re2", version = "2024-07-02", repo_name = "com_googlesource_code_re2") ++bazel_dep(name = "rules_apple", version = "3.5.1", repo_name = "build_bazel_rules_apple") ++bazel_dep(name = "rules_cc", version = "0.0.16") ++bazel_dep(name = "rules_java", version = "7.12.2") ++bazel_dep(name = "rules_proto", version = "6.0.2") ++bazel_dep(name = "xds", version = "0.0.0-20240423-555b57e", repo_name = "com_github_cncf_xds") ++bazel_dep(name = "zlib", version = "1.3.1.bcr.3") ++ ++grpc_repo_deps_ext = use_extension("//bazel:grpc_deps.bzl", "grpc_repo_deps_ext") ++use_repo( ++ grpc_repo_deps_ext, ++ "google_cloud_cpp", ++) ++ ++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.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") diff --git a/modules/grpc/1.69.0/patches/adopt_bzlmod.patch b/modules/grpc/1.69.0/patches/adopt_bzlmod.patch new file mode 100644 index 00000000000..a2b719f9556 --- /dev/null +++ b/modules/grpc/1.69.0/patches/adopt_bzlmod.patch @@ -0,0 +1,107 @@ +diff --git a/bazel/cc_grpc_library.bzl b/bazel/cc_grpc_library.bzl +index f23ac0d5b6..f56ed1441c 100644 +--- a/bazel/cc_grpc_library.bzl ++++ b/bazel/cc_grpc_library.bzl +@@ -102,7 +102,7 @@ def cc_grpc_library( + generate_cc( + name = codegen_grpc_target, + srcs = proto_targets, +- plugin = "@com_github_grpc_grpc//src/compiler:grpc_cpp_plugin", ++ plugin = Label("//src/compiler:grpc_cpp_plugin"), + well_known_protos = well_known_protos, + generate_mocks = generate_mocks, + **kwargs +@@ -114,6 +114,6 @@ def cc_grpc_library( + hdrs = [":" + codegen_grpc_target], + deps = deps + + extra_deps + +- ["@com_github_grpc_grpc//:grpc++_codegen_proto"], ++ [Label("//:grpc++_codegen_proto")], + **kwargs + ) +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, + ) +diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl +index f90cce94a7..0d7cfc6a62 100644 +--- a/bazel/grpc_deps.bzl ++++ b/bazel/grpc_deps.bzl +@@ -17,9 +17,23 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + load("//bazel:grpc_python_deps.bzl", "grpc_python_deps") + + # buildifier: disable=unnamed-macro +-def grpc_deps(): ++def grpc_deps(bzlmod = False): + """Loads dependencies need to compile and test the grpc library.""" + ++ if "google_cloud_cpp" not in native.existing_rules(): ++ http_archive( ++ name = "google_cloud_cpp", ++ sha256 = "7ca7f583b60d2aa1274411fed3b9fb3887119b2e84244bb3fc69ea1db819e4e5", ++ strip_prefix = "google-cloud-cpp-2.16.0", ++ urls = [ ++ "https://storage.googleapis.com/grpc-bazel-mirror/github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz", ++ "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz", ++ ], ++ ) ++ ++ if bzlmod: ++ return ++ + if "platforms" not in native.existing_rules(): + http_archive( + name = "platforms", +@@ -349,17 +363,6 @@ def grpc_deps(): + ], + ) + +- if "google_cloud_cpp" not in native.existing_rules(): +- http_archive( +- name = "google_cloud_cpp", +- sha256 = "7ca7f583b60d2aa1274411fed3b9fb3887119b2e84244bb3fc69ea1db819e4e5", +- strip_prefix = "google-cloud-cpp-2.16.0", +- urls = [ +- "https://storage.googleapis.com/grpc-bazel-mirror/github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz", +- "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz", +- ], +- ) +- + grpc_python_deps() + + # TODO: move some dependencies from "grpc_deps" here? +@@ -441,3 +444,5 @@ def grpc_test_only_deps(): + strip_prefix = "libprotobuf-mutator-1f95f8083066f5b38fd2db172e7e7f9aa7c49d2d", + build_file = "@com_github_grpc_grpc//third_party:libprotobuf_mutator.BUILD", + ) ++ ++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, diff --git a/modules/grpc/1.69.0/patches/disable-layering-check.patch b/modules/grpc/1.69.0/patches/disable-layering-check.patch new file mode 100644 index 00000000000..1f4ffcfb1a4 --- /dev/null +++ b/modules/grpc/1.69.0/patches/disable-layering-check.patch @@ -0,0 +1,13 @@ +diff --git a/src/core/BUILD b/src/core/BUILD +index f65a41fbe3..0a1e3dc631 100644 +--- a/src/core/BUILD ++++ b/src/core/BUILD +@@ -27,7 +27,7 @@ licenses(["reciprocal"]) + package( + default_visibility = ["//:__subpackages__"], + features = [ +- "layering_check", ++ "-layering_check", + ], + ) + diff --git a/modules/grpc/1.69.0/presubmit.yml b/modules/grpc/1.69.0/presubmit.yml new file mode 100644 index 00000000000..d858e0307fe --- /dev/null +++ b/modules/grpc/1.69.0/presubmit.yml @@ -0,0 +1,34 @@ +matrix: + platform: ["debian11", "ubuntu2004"] + bazel: + - 7.x + - 8.x + +tasks: + verify_targets: + platform: ${{ platform }} + bazel: ${{ bazel }} + build_targets: + - "@grpc//:grpc" + - "@grpc//:grpc_unsecure" + - "@grpc//:grpc++" + - "@grpc//:grpc++_unsecure" + - "@grpc//examples/protos/..." + + verify_windows: + platform: windows + bazel: ${{ bazel }} + build_targets: + - "@grpc//:grpc" + - "@grpc//:grpc_unsecure" + - "@grpc//:grpc++" + - "@grpc//:grpc++_unsecure" + + verify_macos: + platform: macos + bazel: ${{ bazel }} + build_targets: + - "@grpc//:grpc" + - "@grpc//:grpc_unsecure" + - "@grpc//:grpc++" + - "@grpc//:grpc++_unsecure" diff --git a/modules/grpc/1.69.0/source.json b/modules/grpc/1.69.0/source.json new file mode 100644 index 00000000000..365b26a3464 --- /dev/null +++ b/modules/grpc/1.69.0/source.json @@ -0,0 +1,11 @@ +{ + "integrity": "sha256-zSVtkXgZEdRqV1BpeLOXm/7kXVCGobZmijrhnF53+Nw=", + "strip_prefix": "grpc-1.69.0", + "url": "https://github.com/grpc/grpc/archive/refs/tags/v1.69.0.tar.gz", + "patch_strip": 1, + "patches": { + "add_module_bazel.patch": "sha256-SxqfOani/Crsjw8W0srME8dcpC/B/mVujcxlyqnSeME=", + "adopt_bzlmod.patch": "sha256-4J50d7GvNCHhpzJ1NLJ1mlZbxL2UQcZNac0KyTmUMbY=", + "disable-layering-check.patch": "sha256-rq7Ve33FHb5kyCOBW8rtdmiGCivAJoTBjU7SIaRTsFY=" + } +} diff --git a/modules/grpc/metadata.json b/modules/grpc/metadata.json index 92c97838a30..15add6cdae1 100644 --- a/modules/grpc/metadata.json +++ b/modules/grpc/metadata.json @@ -28,7 +28,8 @@ "1.66.0.bcr.1", "1.66.0.bcr.2", "1.66.0.bcr.3", - "1.68.0" + "1.68.0", + "1.69.0" ], "yanked_versions": {} }