[xDS Proto] Update Bazel build dependencies for Envoy API (#29219)

* [xDS Proto] Update Bazel build dependencies for Envoy API

* Remove protoc_gen_validate as a submodule

* Remove unused import
pull/29251/head
Lidi Zheng 3 years ago committed by GitHub
parent 44167bdfd3
commit af97f15b9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 22
      bazel/grpc_deps.bzl
  2. 17
      bazel/grpc_extra_deps.bzl
  3. 1
      third_party/BUILD
  4. 1
      third_party/protoc-gen-validate
  5. 14
      third_party/protoc-gen-validate.patch
  6. 1
      tools/run_tests/sanity/check_submodules.sh

@ -366,10 +366,10 @@ def grpc_deps():
if "io_bazel_rules_go" not in native.existing_rules():
http_archive(
name = "io_bazel_rules_go",
sha256 = "dbf5a9ef855684f84cac2e7ae7886c5a001d4f66ae23f6904da0faaaef0d61fc",
sha256 = "f2dcd210c7095febe54b804bb1cd3a58fe8435a909db2ec04e31542631cf715c",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.24.11/rules_go-v0.24.11.tar.gz",
"https://github.com/bazelbuild/rules_go/releases/download/v0.24.11/rules_go-v0.24.11.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.31.0/rules_go-v0.31.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.31.0/rules_go-v0.31.0.zip",
],
)
@ -419,11 +419,10 @@ def grpc_deps():
if "bazel_gazelle" not in native.existing_rules():
http_archive(
name = "bazel_gazelle",
sha256 = "d987004a72697334a095bbaa18d615804a28280201a50ed6c234c40ccc41e493",
strip_prefix = "bazel-gazelle-0.19.1",
sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/bazel-gazelle/archive/v0.19.1.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/archive/v0.19.1.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
],
)
@ -441,12 +440,13 @@ def grpc_deps():
if "com_envoyproxy_protoc_gen_validate" not in native.existing_rules():
http_archive(
name = "com_envoyproxy_protoc_gen_validate",
sha256 = "dd4962e4a9e8388a4fbc5c33e64d73bdb222f103e4bad40ca5535f81c2c606c2",
strip_prefix = "protoc-gen-validate-59da36e59fef2267fc2b1849a05159e3ecdf24f3",
strip_prefix = "protoc-gen-validate-4694024279bdac52b77e22dc87808bd0fd732b69",
sha256 = "1e490b98005664d149b379a9529a6aa05932b8a11b76b4cd86f3d22d76346f47",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/envoyproxy/protoc-gen-validate/archive/59da36e59fef2267fc2b1849a05159e3ecdf24f3.tar.gz",
"https://github.com/envoyproxy/protoc-gen-validate/archive/59da36e59fef2267fc2b1849a05159e3ecdf24f3.tar.gz",
"https://github.com/envoyproxy/protoc-gen-validate/archive/4694024279bdac52b77e22dc87808bd0fd732b69.tar.gz",
],
patches = ["@com_github_grpc_grpc//third_party:protoc-gen-validate.patch"],
patch_args = ["-p1"],
)
if "com_github_cncf_udpa" not in native.existing_rules():

@ -13,13 +13,15 @@
# limitations under the License.
"""Loads the dependencies necessary for the external repositories defined in grpc_deps.bzl."""
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies")
load("@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependencies")
load("@com_envoyproxy_protoc_gen_validate//:dependencies.bzl", "go_third_party")
load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
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")
load("@upb//bazel:workspace_deps.bzl", "upb_deps")
def grpc_extra_deps(ignore_version_differences = False):
"""Loads the extra dependencies.
@ -51,7 +53,12 @@ def grpc_extra_deps(ignore_version_differences = False):
api_dependencies()
go_rules_dependencies()
go_register_toolchains()
go_register_toolchains(version = "1.18")
gazelle_dependencies()
# Pull-in the go 3rd party dependencies for protoc_gen_validate, which is
# needed for building C++ xDS protos
go_third_party()
apple_rules_dependencies(ignore_version_differences = ignore_version_differences)

1
third_party/BUILD vendored

@ -13,4 +13,5 @@ exports_files([
"libuv.BUILD",
"protobuf.patch",
"rules_python.patch",
"protoc-gen-validate.patch",
])

@ -1 +0,0 @@
Subproject commit 59da36e59fef2267fc2b1849a05159e3ecdf24f3

@ -0,0 +1,14 @@
index 5b2443d..c26a9dd 100644
--- a/dependencies.bzl
+++ b/dependencies.bzl
@@ -104,8 +104,8 @@ def go_third_party():
go_repository(
name = "org_golang_google_protobuf",
importpath = "google.golang.org/protobuf",
- sum = "h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=",
- version = "v1.27.1",
+ sum = "h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=",
+ version = "v1.28.0",
)
go_repository(
name = "org_golang_x_crypto",

@ -37,7 +37,6 @@ third_party/libuv 02a9e1be252b623ee032a3137c0b0c94afbe6809
third_party/opencensus-proto 4aa53e15cbf1a47bc9087e6cfdca214c1eea4e89
third_party/opentelemetry 60fa8754d890b5c55949a8c68dcfd7ab5c2395df
third_party/protobuf 22d0e265de7d2b3d2e9a00d071313502e7d4cccf
third_party/protoc-gen-validate 59da36e59fef2267fc2b1849a05159e3ecdf24f3
third_party/re2 8e08f47b11b413302749c0d8b17a1c94777495d5
third_party/xds cb28da3451f158a947dfc45090fe92b07b243bc1
third_party/zlib cacf7f1d4e3d44d871b605da3b647f07d718623f

Loading…
Cancel
Save