Skip to content

Commit

Permalink
Update gRPC version to 1.54.0. Update gRPC to v1.55.0. Update gRPC ve…
Browse files Browse the repository at this point in the history
…rsion to v1.58.0. Remove gRPC authz log level patching. Updated GO version to 1.21.1. (sonic-net#657)

Co-authored-by: Srikishen Pondicherry Shanmugam <kishanps@google.com>
  • Loading branch information
bibhuprasad-hcl and kishanps authored Oct 25, 2024
1 parent a031f8a commit 7bf8713
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 228 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.1.0
5.4.0
88 changes: 53 additions & 35 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,29 @@

workspace(name = "com_github_google_pins_infra")

# -- Load buildifier -----------------------------------------------------------
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# Bazel toolchain to build go-lang.
http_archive(
name = "io_bazel_rules_go",
sha256 = "91585017debb61982f7054c9688857a2ad1fd823fc3f9cb05048b0025c47d023",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.42.0/rules_go-v0.42.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.42.0/rules_go-v0.42.0.zip",
],
)

# Gazelle to auto generate go-lang BUILD rules.
http_archive(
name = "bazel_gazelle",
sha256 = "b7387f72efb59f876e4daae42f1d3912d0d45563eac7cb23d1de0b094ab588cf",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.34.0/bazel-gazelle-v0.34.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.34.0/bazel-gazelle-v0.34.0.tar.gz",
],
)

load("pins_infra_deps.bzl", "pins_infra_deps")

pins_infra_deps()
Expand All @@ -24,13 +47,28 @@ load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_depende

rules_foreign_cc_dependencies()

# -- Load GoLang Rules -----------------------------------------------------

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
# load("//:ondatra/binding_deps.bzl", "binding_deps")

# binding_deps()

go_rules_dependencies()

go_register_toolchains(version = "1.21.1")

gazelle_dependencies(go_repository_default_config = "@//:WORKSPACE.bazel")

# -- Load GRPC -------------------------------------------------------------

load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")

switched_rules_by_language(
name = "com_google_googleapis_imports",
cc = True,
go = True,
grpc = True,
)

Expand All @@ -54,6 +92,21 @@ rules_proto_dependencies()

rules_proto_toolchains()


### Bazel rules for many languages to compile PROTO into gRPC libraries
http_archive(
name = "rules_proto_grpc",
sha256 = "bbe4db93499f5c9414926e46f9e35016999a4e9f6e3522482d3760dc61011070",
strip_prefix = "rules_proto_grpc-4.2.0",
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/archive/4.2.0.tar.gz"],
)

load("@rules_proto_grpc//:repositories.bzl", "rules_proto_grpc_repos", "rules_proto_grpc_toolchains")

rules_proto_grpc_toolchains()

rules_proto_grpc_repos()

# -- Load P4Runtime ------------------------------------------------------------

load("@com_github_p4lang_p4runtime//:p4runtime_deps.bzl", "p4runtime_deps")
Expand All @@ -78,39 +131,4 @@ load("@com_github_nelhage_rules_boost//:boost/boost.bzl", "boost_deps")

boost_deps()

# -- Load buildifier -----------------------------------------------------------

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "io_bazel_rules_go",
sha256 = "2b1641428dff9018f9e85c0384f03ec6c10660d935b750e3fa1492a281a53b0f",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip",
],
)

load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies")

go_rules_dependencies()

http_archive(
name = "bazel_gazelle",
sha256 = "be9296bfd64882e3c08e3283c58fcb461fa6dd3c171764fcc4cf322f60615a9b",
urls = [
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/bazel-gazelle/releases/download/0.18.1/bazel-gazelle-0.18.1.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/0.18.1/bazel-gazelle-0.18.1.tar.gz",
],
)

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")

gazelle_dependencies()

http_archive(
name = "com_github_bazelbuild_buildtools",
sha256 = "a02ba93b96a8151b5d8d3466580f6c1f7e77212c4eb181cba53eb2cae7752a23",
strip_prefix = "buildtools-3.5.0",
url = "https://github.com/bazelbuild/buildtools/archive/3.5.0.tar.gz",
)
22 changes: 0 additions & 22 deletions bazel/patches/grpc-002-change_authz_log_level.patch

This file was deleted.

12 changes: 12 additions & 0 deletions bazel/patches/grpc-003-fix_go_gazelle_register_toolchain.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/bazel/grpc_extra_deps.bzl b/bazel/grpc_extra_deps.bzl
index 4d8afa3..b090036 100755
--- a/bazel/grpc_extra_deps.bzl
+++ b/bazel/grpc_extra_deps.bzl
@@ -53,7 +53,6 @@ def grpc_extra_deps(ignore_version_differences = False):
api_dependencies()

go_rules_dependencies()
- go_register_toolchains(version = "1.18")
gazelle_dependencies()

# Pull-in the go 3rd party dependencies for protoc_gen_validate, which is
166 changes: 0 additions & 166 deletions gutil/status_test.cc

This file was deleted.

8 changes: 4 additions & 4 deletions pins_infra_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ def pins_infra_deps():
# url = "https://github.com/grpc/grpc/archive/v1.46.0.zip",
# strip_prefix = "grpc-1.46.0",
# sha256 = "1cbd6d6dfc9b1235766fc6b1d66d4f1dbb87f877a44c2a799bc8ee6b383af0fa",
url = "https://github.com/grpc/grpc/archive/v1.56.1.zip",
strip_prefix = "grpc-1.56.1",
sha256 = "04a52a313926f0f6ec2ed489ac7552aa5949693b071eaf45ae13b66e5910c32f",
url = "https://github.com/grpc/grpc/archive/v1.58.0.zip",
strip_prefix = "grpc-1.58.0",
sha256 = "aa329c7de707a03511c88206ef4483e9346ab6336b6be4378d294060aa7400b3",
patch_args = ["-p1"],
patches = [
"//:bazel/patches/grpc-001-fix_file_watcher_race_condition.patch",
"//:bazel/patches/grpc-002-change_authz_log_level.patch",
"//:bazel/patches/grpc-003-fix_go_gazelle_register_toolchain.patch",
],
)
if not native.existing_rule("com_google_absl"):
Expand Down

0 comments on commit 7bf8713

Please sign in to comment.