[Build] Dropped Bazel 5.x and Upgraded Bazel 6.4.0 (#34813)

- Dropped Bazel 5.x support aligned with [Foundational C++ support
policy:
Bazel](https://opensource.google/documentation/policies/cplusplus-support).
- Upgraded Bazel 6 to 6.4.0 (the latest)
- Updated gRPC Bazel documentation to be aligned with the policy above.
pull/33733/head
Esun Kim 1 year ago committed by GitHub
parent 8a000f45f8
commit d77e5c0dd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .bazelversion
  2. 3
      bazel/supported_versions.txt
  3. 14
      bazel/update_mirror.sh
  4. 11
      doc/bazel_support.md
  5. 8
      templates/doc/bazel_support.md.template
  6. 8
      tools/bazelify_tests/dockerimage_current_versions.bzl
  7. 3
      tools/bazelify_tests/test/supported_bazel_versions.bzl
  8. 2
      tools/dockerfile/test/bazel.current_version
  9. 2
      tools/dockerfile/test/bazel/Dockerfile
  10. 2
      tools/dockerfile/test/bazel_arm64.current_version
  11. 2
      tools/dockerfile/test/bazel_arm64/Dockerfile
  12. 2
      tools/dockerfile/test/binder_transport_apk.current_version
  13. 2
      tools/dockerfile/test/binder_transport_apk/Dockerfile
  14. 2
      tools/dockerfile/test/sanity.current_version
  15. 2
      tools/dockerfile/test/sanity/Dockerfile

@ -1 +1 @@
6.3.2
6.4.0

@ -1,2 +1 @@
6.3.2
5.4.1
6.4.0

@ -57,17 +57,9 @@ function upload {
# upload "github.com/google/boringssl/archive/1c2769383f027befac5b75b6cedd25daf3bf4dcf.tar.gz"
# bazel binaries used by the tools/bazel wrapper script
upload github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-linux-x86_64
upload github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-darwin-x86_64
upload github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-windows-x86_64.exe
upload github.com/bazelbuild/bazel/releases/download/6.1.2/bazel-6.1.2-linux-x86_64
upload github.com/bazelbuild/bazel/releases/download/6.1.2/bazel-6.1.2-darwin-x86_64
upload github.com/bazelbuild/bazel/releases/download/6.1.2/bazel-6.1.2-windows-x86_64.exe
upload github.com/bazelbuild/bazel/releases/download/6.3.2/bazel-6.3.2-linux-x86_64
upload github.com/bazelbuild/bazel/releases/download/6.3.2/bazel-6.3.2-darwin-x86_64
upload github.com/bazelbuild/bazel/releases/download/6.3.2/bazel-6.3.2-windows-x86_64.exe
upload github.com/bazelbuild/bazel/releases/download/6.4.0/bazel-6.4.0-linux-x86_64
upload github.com/bazelbuild/bazel/releases/download/6.4.0/bazel-6.4.0-darwin-x86_64
upload github.com/bazelbuild/bazel/releases/download/6.4.0/bazel-6.4.0-windows-x86_64.exe
# Collect the github archives to mirror from grpc_deps.bzl
grep -o '"https://github.com/[^"]*"' bazel/grpc_deps.bzl | sed 's/^"https:\/\///' | sed 's/"$//' | while read -r line ; do

@ -34,10 +34,13 @@ grpc_extra_deps()
## Supported Versions
In general, gRPC supports building with the latest patch release of the two most
recent LTS versions of Bazel. However individual releases may have a broader
gRPC supports building with the latest stable release of Bazel,
as well as the previous major version release for at least 6 months
after it transitions into maintenance mode.
This is consistent with the supported build systems of
[the Google Foundational C++ Support Policy](https://opensource.google/documentation/policies/cplusplus-support).
However individual releases may have a broader
compatibility range. The currently supported versions are captured by the
following list:
- [`6.3.2`](https://github.com/bazelbuild/bazel/releases/tag/6.3.2)
- [`5.4.1`](https://github.com/bazelbuild/bazel/releases/tag/5.4.1)
- [`6.4.0`](https://github.com/bazelbuild/bazel/releases/tag/6.4.0)

@ -36,8 +36,12 @@
${ '##' } Supported Versions
In general, gRPC supports building with the latest patch release of the two most
recent LTS versions of Bazel. However individual releases may have a broader
gRPC supports building with the latest stable release of Bazel,
as well as the previous major version release for at least 6 months
after it transitions into maintenance mode.
This is consistent with the supported build systems of
[the Google Foundational C++ Support Policy](https://opensource.google/documentation/policies/cplusplus-support).
However individual releases may have a broader
compatibility range. The currently supported versions are captured by the
following list:

@ -89,9 +89,9 @@ DOCKERIMAGE_CURRENT_VERSIONS = {
"tools/dockerfile/interoptest/grpc_interop_ruby.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_ruby@sha256:7b044d6848f82234dba81b38d8eca220b608f830f93b42932df59ed6fe20b24d",
"tools/dockerfile/interoptest/lb_interop_fake_servers.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/lb_interop_fake_servers@sha256:b89a51dd9147e1293f50ee64dd719fce5929ca7894d3770a3d80dbdecb99fd52",
"tools/dockerfile/test/android_ndk.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/android_ndk@sha256:64ffc5d1e117172ca4dda89720087616830996181192de25fe10e03a88f0b3e5",
"tools/dockerfile/test/bazel.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/bazel@sha256:023fdfd072e278d4129f2c8f8564f6697e767c9847aae8c9411ea853f3faaa6f",
"tools/dockerfile/test/bazel_arm64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/bazel_arm64@sha256:1b7200c85ba8bc10529e1867a27ee81ad303ec8c8efec8bbc5863b4ee8ac6d03",
"tools/dockerfile/test/binder_transport_apk.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/binder_transport_apk@sha256:38c1da5544c717ef0e3d3492833b0fd1ce5c70fbe71eea8a9bfb0ab0b1217f1b",
"tools/dockerfile/test/bazel.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/bazel@sha256:32bde2dcb2087f2a32afab59e4dfedf7e8c76a52c69881f63a239d311f0e5ecf",
"tools/dockerfile/test/bazel_arm64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/bazel_arm64@sha256:3b087387c44dee405c1b80d6ff50994e6d8e90a4ef67cc94b4291f1a29c0ef41",
"tools/dockerfile/test/binder_transport_apk.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/binder_transport_apk@sha256:bf60a187cd2ce1abe8b4f32ae6479040a72ca6aa789cd5ab509f60ceb37a41f9",
"tools/dockerfile/test/csharp_debian11_arm64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/csharp_debian11_arm64@sha256:4d4bc5f15e03f3d3d8fd889670ecde2c66a2e4d2dd9db80733c05c1d90c8a248",
"tools/dockerfile/test/csharp_debian11_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/csharp_debian11_x64@sha256:b2e5c47d986312ea0850e2f2e696b45d23ee0aabceea161d31e28559e19ec4a5",
"tools/dockerfile/test/cxx_alpine_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_alpine_x64@sha256:f2019edf9f2afd5042567f11afb1aa78a789fc9acdcce5ee0c14cc11f6830ed7",
@ -112,5 +112,5 @@ DOCKERIMAGE_CURRENT_VERSIONS = {
"tools/dockerfile/test/rbe_ubuntu2004.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rbe_ubuntu2004@sha256:d3951aeadf43e3bee6adc5b86d26cdaf0b9d1b5baf790d7b2530d1c197adc9f8",
"tools/dockerfile/test/ruby_debian11_arm64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_arm64@sha256:7e77cf17e2e8657f4cc23ac9f93630bf13213fff961799e0f16dae17cd45cf6d",
"tools/dockerfile/test/ruby_debian11_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64@sha256:e4cb502caccf2db733268ce2ddc951fda8a9df2f7f53d6b74523c33d40c83006",
"tools/dockerfile/test/sanity.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/sanity@sha256:49745399fdef994b033fd8a5cad293d822ac25289770b7c342e34e781ff41590",
"tools/dockerfile/test/sanity.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/sanity@sha256:f1f5ca30491698f793cae75d5989cb53887d159800aef662cf7e6c3df6f86a88",
}

@ -17,6 +17,5 @@ This file is generated from the supported_bazel_versions.bzl.template
"""
SUPPORTED_BAZEL_VERSIONS = [
"6.3.2",
"5.4.1",
"6.4.0",
]

@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/bazel:c8658dbcb51352d5e9c5d9f15282835e45d5ce80@sha256:023fdfd072e278d4129f2c8f8564f6697e767c9847aae8c9411ea853f3faaa6f
us-docker.pkg.dev/grpc-testing/testing-images-public/bazel:cacad91746cd598d8756de89b912be291de1f019@sha256:32bde2dcb2087f2a32afab59e4dfedf7e8c76a52c69881f63a239d311f0e5ecf

@ -38,7 +38,7 @@ RUN apt-get update && apt-get -y install \
# Bazel installation
# Must be in sync with tools/bazel
ENV BAZEL_VERSION 6.3.2
ENV BAZEL_VERSION 6.4.0
# The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper.
ENV DISABLE_BAZEL_WRAPPER 1

@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/bazel_arm64:b80154c9d14839d4e387155401c5204f2cc09262@sha256:1b7200c85ba8bc10529e1867a27ee81ad303ec8c8efec8bbc5863b4ee8ac6d03
us-docker.pkg.dev/grpc-testing/testing-images-public/bazel_arm64:2638335cbe0cbd8f77c54affdf0e4b36f7741785@sha256:3b087387c44dee405c1b80d6ff50994e6d8e90a4ef67cc94b4291f1a29c0ef41

@ -97,7 +97,7 @@ RUN apt-get update && apt-get -y install libc++-dev clang && apt-get clean
# Bazel installation
# Must be in sync with tools/bazel
ENV BAZEL_VERSION 6.3.2
ENV BAZEL_VERSION 6.4.0
# The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper.
ENV DISABLE_BAZEL_WRAPPER 1

@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/binder_transport_apk:86b356231e6878000efa10a7d471ab7b332a92de@sha256:38c1da5544c717ef0e3d3492833b0fd1ce5c70fbe71eea8a9bfb0ab0b1217f1b
us-docker.pkg.dev/grpc-testing/testing-images-public/binder_transport_apk:783671f597502a2dc3ebf190d52d55be70836a33@sha256:bf60a187cd2ce1abe8b4f32ae6479040a72ca6aa789cd5ab509f60ceb37a41f9

@ -38,7 +38,7 @@ RUN apt-get update && apt-get -y install \
# Bazel installation
# Must be in sync with tools/bazel
ENV BAZEL_VERSION 6.3.2
ENV BAZEL_VERSION 6.4.0
# The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper.
ENV DISABLE_BAZEL_WRAPPER 1

@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/sanity:4df7e77523dc402f423cb024d8ae9693b562cba1@sha256:49745399fdef994b033fd8a5cad293d822ac25289770b7c342e34e781ff41590
us-docker.pkg.dev/grpc-testing/testing-images-public/sanity:091d8e85bebb7b9f089178ae96435926cdc82fb8@sha256:f1f5ca30491698f793cae75d5989cb53887d159800aef662cf7e6c3df6f86a88

@ -111,7 +111,7 @@ RUN apt-get update && apt-get install -y jq git cmake zlib1g-dev libtinfo-dev li
# Bazel installation
# Must be in sync with tools/bazel
ENV BAZEL_VERSION 6.3.2
ENV BAZEL_VERSION 6.4.0
# The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper.
ENV DISABLE_BAZEL_WRAPPER 1

Loading…
Cancel
Save