Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Commit f35ba15

Browse files
authored
Upgrade to Bazel 3.4.1 (#3576)
* Upgrade to Bazel 3.4.1 * Fixing ArrayToString error see https://errorprone.info/bugpattern/ArrayToString * Updating Docker rules and Pkg rules * Updating `rules_python`
1 parent 82ee354 commit f35ba15

18 files changed

+42
-25
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ addons:
2727
- libgoogle-perftools-dev
2828

2929
env:
30-
- BAZEL_VERSION=3.0.0 ENABLE_HEAPCHECK=1
30+
- BAZEL_VERSION=3.4.1 ENABLE_HEAPCHECK=1
3131

3232
before_install:
3333
# download and install bazel

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Confluence: https://cwiki.apache.org/confluence/display/HERON
3232
#### Heron Requirements:
3333
* Java 11
3434
* Python 3.6
35-
* Bazel 3.0.0
35+
* Bazel 3.4.1
3636

3737
## Contact
3838

WORKSPACE

+15-8
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,9 @@ pinned_maven_install()
158158

159159
http_archive(
160160
name = "rules_python",
161-
sha256 = "aa96a691d3a8177f3215b14b0edc9641787abaaa30363a080165d06ab65e1161",
162-
url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.1/rules_python-0.0.1.tar.gz",
161+
sha256 = "b5668cde8bb6e3515057ef465a35ad712214962f0b3a314e551204266c7be90c",
162+
strip_prefix = "rules_python-0.0.2",
163+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.2/rules_python-0.0.2.tar.gz",
163164
)
164165

165166
load("@rules_python//python:repositories.bzl", "py_repositories")
@@ -363,10 +364,11 @@ http_archive(
363364
# end helm
364365

365366
# for docker image building
366-
DOCKER_RULES_VERSION = "0.14.1"
367+
DOCKER_RULES_VERSION = "0.14.4"
368+
367369
http_archive(
368370
name = "io_bazel_rules_docker",
369-
sha256 = "dc97fccceacd4c6be14e800b2a00693d5e8d07f69ee187babfd04a80a9f8e250",
371+
sha256 = "4521794f0fba2e20f3bf15846ab5e01d5332e587e9ce81629c7f96c793bb7036",
370372
strip_prefix = "rules_docker-%s" % DOCKER_RULES_VERSION,
371373
urls = ["https://github.com/bazelbuild/rules_docker/archive/v%s.tar.gz" % DOCKER_RULES_VERSION],
372374
)
@@ -375,13 +377,16 @@ load(
375377
"@io_bazel_rules_docker//repositories:repositories.bzl",
376378
container_repositories = "repositories",
377379
)
378-
379380
container_repositories()
380381

381382
load("@io_bazel_rules_docker//repositories:deps.bzl", container_deps = "deps")
382383

383384
container_deps()
384385

386+
load("@io_bazel_rules_docker//repositories:pip_repositories.bzl", "pip_deps")
387+
388+
pip_deps()
389+
385390
load(
386391
"@io_bazel_rules_docker//container:container.bzl",
387392
"container_pull",
@@ -394,13 +399,15 @@ container_pull(
394399
repository = "heron/base",
395400
tag = "0.5.0",
396401
)
397-
398402
# end docker image building
399403

400404
http_archive(
401405
name = "rules_pkg",
402-
url = "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.5/rules_pkg-0.2.5.tar.gz",
403-
sha256 = "352c090cc3d3f9a6b4e676cf42a6047c16824959b438895a76c2989c6d7c246a",
406+
urls = [
407+
"https://github.com/bazelbuild/rules_pkg/releases/download/0.2.6/rules_pkg-0.2.6.tar.gz",
408+
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.2.6/rules_pkg-0.2.6.tar.gz",
409+
],
410+
sha256 = "aeca78988341a2ee1ba097641056d168320ecc51372ef7ff8e64b139516a4937",
404411
)
405412
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
406413
rules_pkg_dependencies()

docker/compile/Dockerfile.centos7

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ FROM centos:centos7
1919

2020
# This is passed to the heron build command via the --config flag
2121
ENV TARGET_PLATFORM centos
22-
ENV bazelVersion 3.0.0
2322

2423
RUN yum -y upgrade
2524
RUN yum -y install \
@@ -49,6 +48,8 @@ RUN yum -y install \
4948

5049
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk
5150

51+
ENV bazelVersion 3.4.1
52+
5253
RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
5354
&& chmod +x /tmp/bazel.sh \
5455
&& /tmp/bazel.sh

docker/compile/Dockerfile.debian10

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ FROM openjdk:11.0.6-jdk-buster
1919

2020
# This is passed to the heron build command via the --config flag
2121
ENV TARGET_PLATFORM debian
22-
ENV bazelVersion 3.0.0
2322

2423
RUN apt-get update && apt-get -y install \
2524
ant \
@@ -43,6 +42,8 @@ RUN apt-get update && apt-get -y install \
4342
wget \
4443
zip
4544

45+
ENV bazelVersion 3.4.1
46+
4647
RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
4748
&& chmod +x /tmp/bazel.sh \
4849
&& /tmp/bazel.sh

docker/compile/Dockerfile.debian9

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ FROM openjdk:11-jdk-stretch
1919

2020
# This is passed to the heron build command via the --config flag
2121
ENV TARGET_PLATFORM debian
22-
ENV bazelVersion 3.0.0
2322

2423
RUN apt-get update && apt-get -y install \
2524
ant \
@@ -42,6 +41,8 @@ RUN apt-get update && apt-get -y install \
4241
wget \
4342
zip
4443

44+
ENV bazelVersion 3.4.1
45+
4546
RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
4647
&& chmod +x /tmp/bazel.sh \
4748
&& /tmp/bazel.sh

docker/compile/Dockerfile.ubuntu14.04

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ FROM ubuntu:14.04
1919

2020
# This is passed to the heron build command via the --config flag
2121
ENV TARGET_PLATFORM ubuntu
22-
ENV bazelVersion 3.0.0
2322

2423
RUN apt-get update && apt-get install -y software-properties-common
2524

@@ -48,6 +47,8 @@ RUN apt-get update && apt-get -y install \
4847

4948
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
5049

50+
ENV bazelVersion 3.4.1
51+
5152
RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
5253
&& chmod +x /tmp/bazel.sh \
5354
&& /tmp/bazel.sh

docker/compile/Dockerfile.ubuntu16.04

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ FROM ubuntu:16.04
1919

2020
# This is passed to the heron build command via the --config flag
2121
ENV TARGET_PLATFORM ubuntu
22-
ENV bazelVersion 3.0.0
2322

2423
RUN apt-get update && apt-get install -y software-properties-common
2524

@@ -50,6 +49,8 @@ RUN apt-get update && apt-get -y install \
5049

5150
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
5251

52+
ENV bazelVersion 3.4.1
53+
5354
RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
5455
&& chmod +x /tmp/bazel.sh \
5556
&& /tmp/bazel.sh

docker/compile/Dockerfile.ubuntu18.04

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ FROM ubuntu:18.04
1919

2020
# This is passed to the heron build command via the --config flag
2121
ENV TARGET_PLATFORM ubuntu
22-
ENV bazelVersion 3.0.0
2322

2423
RUN apt-get update && apt-get -y install \
2524
ant \
@@ -44,6 +43,8 @@ RUN apt-get update && apt-get -y install \
4443

4544
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
4645

46+
ENV bazelVersion 3.4.1
47+
4748
RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
4849
&& chmod +x /tmp/bazel.sh \
4950
&& /tmp/bazel.sh

docker/compile/Dockerfile.ubuntu20.04

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ FROM ubuntu:20.04
1919

2020
# This is passed to the heron build command via the --config flag
2121
ENV TARGET_PLATFORM ubuntu
22-
ENV bazelVersion 3.0.0
2322

2423
ARG DEBIAN_FRONTEND=noninteractive
2524

@@ -46,6 +45,8 @@ RUN apt-get update && apt-get -y install \
4645

4746
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
4847

48+
ENV bazelVersion 3.4.1
49+
4950
RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
5051
&& chmod +x /tmp/bazel.sh \
5152
&& /tmp/bazel.sh

docker/test/Dockerfile.centos7

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ FROM centos:centos7
1919

2020
# This is passed to the heron build command via the --config flag
2121
ENV TARGET_PLATFORM centos
22-
ENV bazelVersion 3.0.0
2322

2423
RUN yum -y upgrade
2524
RUN yum -y install \
@@ -48,6 +47,8 @@ RUN yum -y install \
4847

4948
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk
5049

50+
ENV bazelVersion 3.4.1
51+
5152
RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
5253
&& chmod +x /tmp/bazel.sh \
5354
&& /tmp/bazel.sh

docker/test/Dockerfile.ubuntu18.04

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ FROM ubuntu:18.04
1919

2020
# This is passed to the heron build command via the --config flag
2121
ENV TARGET_PLATFORM ubuntu
22-
ENV bazelVersion 3.0.0
2322

2423
RUN apt-get update && apt-get -y install \
2524
g++ \
@@ -41,6 +40,8 @@ RUN apt-get update && apt-get -y install \
4140

4241
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
4342

43+
ENV bazelVersion 3.4.1
44+
4445
RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
4546
&& chmod +x /tmp/bazel.sh \
4647
&& /tmp/bazel.sh

eco/src/java/org/apache/heron/eco/builder/ObjectBuilder.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import java.lang.reflect.InvocationTargetException;
2525
import java.lang.reflect.Method;
2626
import java.util.ArrayList;
27+
import java.util.Arrays;
2728
import java.util.List;
2829

2930
import org.slf4j.Logger;
@@ -220,7 +221,7 @@ private Method findCompatibleMethod(List<Object> args, Class target, String meth
220221
}
221222
if (eligibleCount > 1) {
222223
LOG.warn("Found multiple invokable methods for class, method, given arguments {} "
223-
+ new Object[]{target, methodName, args});
224+
+ Arrays.toString(new Object[]{target, methodName, args}));
224225
}
225226
return retval;
226227
}

scripts/ci/setup_bazel.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if [ "$#" -ne 1 ]; then
2929
exit 1
3030
fi
3131
BAZEL_OS=$1
32-
BAZEL_VERSION=3.0.0
32+
BAZEL_VERSION=3.4.1
3333

3434
# Install Bazel
3535
BAZEL_INSTALLER=bazel-$BAZEL_VERSION-installer-$BAZEL_OS-x86_64.sh

vagrant/init.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ install_marathon() {
4343
service marathon start
4444
}
4545

46-
bazelVersion=3.0.0
46+
bazelVersion=3.4.1
4747
bazel_install() {
4848
apt-get install -y automake cmake gcc g++ zlib1g-dev zip pkg-config wget libssl-dev libunwind-dev
4949
mkdir -p /opt/bazel

website2/docs/compiling-osx.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/inst
3434

3535
### Step 2 -- Install Bazel
3636
```bash
37-
wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/3.0.0/bazel-3.0.0-installer-darwin-x86_64.sh
37+
wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/3.4.1/bazel-3.4.1-installer-darwin-x86_64.sh
3838
chmod +x /tmp/bazel.sh
3939
/tmp/bazel.sh --user
4040
```

website2/website/scripts/Dockerfile.ubuntu18.04

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ FROM ubuntu:18.04
1919

2020
# This is passed to the heron build command via the --config flag
2121
ENV TARGET_PLATFORM ubuntu
22-
ENV bazelVersion 3.0.0
22+
ENV bazelVersion 3.4.1
2323

2424

2525
RUN apt-get update && apt-get -y install \

website2/website/scripts/replace.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const bazelVersions = {
3838
'0.20.0-incubating': '0.14.1',
3939
'0.20.1-incubating': '0.26.0',
4040
'0.20.2-incubating': '0.26.0',
41-
'latest': '3.0.0',
41+
'latest': '3.4.1',
4242
}
4343

4444
function replaceBazel(version) {

0 commit comments

Comments
 (0)