Upgrade bazel version to bazel 5.3 (repo-wide) (#30844)

* update bazel to 5.3.0

* regenerate dockerfiles

* update bazel distribtest

* update docker image templates

* regenerate dockerfiles 2

* regenerate bazel_support.md

* upgrade rules_apple and apple_support bazel deps

* Revert "upgrade rules_apple and apple_support bazel deps"

This reverts commit eb9a0d2155.

* fix objc bazel 5.3 build on kokoro mojave image
pull/30896/head
Jan Tattermusch 3 years ago committed by GitHub
parent b45c5244cb
commit 631392f2e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      bazel/supported_versions.txt
  2. 4
      bazel/update_mirror.sh
  3. 2
      doc/bazel_support.md
  4. 2
      templates/tools/dockerfile/bazel.include
  5. 4
      templates/tools/dockerfile/oss_fuzz_base.include
  6. 2
      tools/bazel
  7. 6
      tools/dockerfile/test/bazel/Dockerfile
  8. 2
      tools/dockerfile/test/bazel_arm64/Dockerfile
  9. 6
      tools/dockerfile/test/binder_transport_apk/Dockerfile
  10. 2
      tools/dockerfile/test/sanity/Dockerfile
  11. 5
      tools/internal_ci/macos/grpc_objc_bazel_test.sh

@ -1,3 +1,3 @@
5.0.0
5.3.0
4.2.2
3.7.2

@ -73,6 +73,10 @@ upload github.com/bazelbuild/bazel/releases/download/4.2.1/bazel-4.2.1-linux-x86
upload github.com/bazelbuild/bazel/releases/download/4.2.1/bazel-4.2.1-darwin-x86_64
upload github.com/bazelbuild/bazel/releases/download/4.2.1/bazel-4.2.1-windows-x86_64.exe
upload github.com/bazelbuild/bazel/releases/download/5.3.0/bazel-5.3.0-linux-x86_64
upload github.com/bazelbuild/bazel/releases/download/5.3.0/bazel-5.3.0-darwin-x86_64
upload github.com/bazelbuild/bazel/releases/download/5.3.0/bazel-5.3.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
echo "Updating mirror for ${line}"

@ -39,6 +39,6 @@ recent LTS versions of Bazel. However individual releases may have a broader
compatibility range. The currently supported versions are captured by the
following list:
- [`5.0.0`](https://github.com/bazelbuild/bazel/releases/tag/5.0.0)
- [`5.3.0`](https://github.com/bazelbuild/bazel/releases/tag/5.3.0)
- [`4.2.2`](https://github.com/bazelbuild/bazel/releases/tag/4.2.2)
- [`3.7.2`](https://github.com/bazelbuild/bazel/releases/tag/3.7.2)

@ -2,7 +2,7 @@
# Bazel installation
# Must be in sync with tools/bazel
ENV BAZEL_VERSION 4.2.1
ENV BAZEL_VERSION 5.3.0
# The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper.
ENV DISABLE_BAZEL_WRAPPER 1

@ -1,8 +1,8 @@
# Pinned version of the base image is used to avoid regressions caused
# by rebuilding of this docker image. To see available versions, you can run
# "gcloud container images list-tags gcr.io/oss-fuzz-base/base-builder"
# Image(5eceb81f5759) is built on Jan 31, 2022
FROM gcr.io/oss-fuzz-base/base-builder@sha256:5eceb81f57599d63ca7c9a70c8968b23b128119699626ca749017019eb0b523f
# Image(8a3a7b8072a9) is built on Sep 5, 2022
FROM gcr.io/oss-fuzz-base/base-builder@sha256:8a3a7b8072a93ba737b02e0c0941903f5408b4def6333fdc823b77aede5b2afd
# -------------------------- WARNING --------------------------------------
# If you are making changes to this file, consider changing

@ -42,7 +42,7 @@ fi
# IMPORTANT: if you update the version here, other parts of infrastructure might needs updating as well
# (e.g. sanity checks, bazel toolchains etc.)
VERSION=${OVERRIDE_BAZEL_VERSION:-4.2.1}
VERSION=${OVERRIDE_BAZEL_VERSION:-5.3.0}
echo "INFO: Running bazel wrapper (see //tools/bazel for details), bazel version $VERSION will be used instead of system-wide bazel installation." >&2
# update tools/update_mirror.sh to populate the mirror with new bazel archives

@ -15,8 +15,8 @@
# Pinned version of the base image is used to avoid regressions caused
# by rebuilding of this docker image. To see available versions, you can run
# "gcloud container images list-tags gcr.io/oss-fuzz-base/base-builder"
# Image(5eceb81f5759) is built on Jan 31, 2022
FROM gcr.io/oss-fuzz-base/base-builder@sha256:5eceb81f57599d63ca7c9a70c8968b23b128119699626ca749017019eb0b523f
# Image(8a3a7b8072a9) is built on Sep 5, 2022
FROM gcr.io/oss-fuzz-base/base-builder@sha256:8a3a7b8072a93ba737b02e0c0941903f5408b4def6333fdc823b77aede5b2afd
# -------------------------- WARNING --------------------------------------
# If you are making changes to this file, consider changing
@ -38,7 +38,7 @@ RUN apt-get update && apt-get -y install \
# Bazel installation
# Must be in sync with tools/bazel
ENV BAZEL_VERSION 4.2.1
ENV BAZEL_VERSION 5.3.0
# The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper.
ENV DISABLE_BAZEL_WRAPPER 1

@ -88,7 +88,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 4.2.1
ENV BAZEL_VERSION 5.3.0
# The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper.
ENV DISABLE_BAZEL_WRAPPER 1

@ -15,8 +15,8 @@
# Pinned version of the base image is used to avoid regressions caused
# by rebuilding of this docker image. To see available versions, you can run
# "gcloud container images list-tags gcr.io/oss-fuzz-base/base-builder"
# Image(5eceb81f5759) is built on Jan 31, 2022
FROM gcr.io/oss-fuzz-base/base-builder@sha256:5eceb81f57599d63ca7c9a70c8968b23b128119699626ca749017019eb0b523f
# Image(8a3a7b8072a9) is built on Sep 5, 2022
FROM gcr.io/oss-fuzz-base/base-builder@sha256:8a3a7b8072a93ba737b02e0c0941903f5408b4def6333fdc823b77aede5b2afd
# -------------------------- WARNING --------------------------------------
# If you are making changes to this file, consider changing
@ -38,7 +38,7 @@ RUN apt-get update && apt-get -y install \
# Bazel installation
# Must be in sync with tools/bazel
ENV BAZEL_VERSION 4.2.1
ENV BAZEL_VERSION 5.3.0
# The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper.
ENV DISABLE_BAZEL_WRAPPER 1

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

@ -23,6 +23,11 @@ cd $(dirname $0)/../../..
source tools/internal_ci/helper_scripts/prepare_build_macos_rc
# Make sure actions run by bazel can find python3.
# Without this the build will fail with "env: python3: No such file or directory".
# When on kokoro MacOS Mojave image.
sudo ln -s $(which python3) /usr/bin/python3 || true
# make sure bazel is available
tools/bazel version

Loading…
Cancel
Save