Skip to content
Permalink
Browse files
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`
  • Loading branch information
nicknezis committed Jul 23, 2020
1 parent 82ee354 commit f35ba157f6e57c2b90f66e347babeacf7a75a10a
Showing 18 changed files with 42 additions and 25 deletions.
@@ -27,7 +27,7 @@ addons:
- libgoogle-perftools-dev

env:
- BAZEL_VERSION=3.0.0 ENABLE_HEAPCHECK=1
- BAZEL_VERSION=3.4.1 ENABLE_HEAPCHECK=1

before_install:
# download and install bazel
@@ -32,7 +32,7 @@ Confluence: https://cwiki.apache.org/confluence/display/HERON
#### Heron Requirements:
* Java 11
* Python 3.6
* Bazel 3.0.0
* Bazel 3.4.1

## Contact

@@ -158,8 +158,9 @@ pinned_maven_install()

http_archive(
name = "rules_python",
sha256 = "aa96a691d3a8177f3215b14b0edc9641787abaaa30363a080165d06ab65e1161",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.1/rules_python-0.0.1.tar.gz",
sha256 = "b5668cde8bb6e3515057ef465a35ad712214962f0b3a314e551204266c7be90c",
strip_prefix = "rules_python-0.0.2",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.2/rules_python-0.0.2.tar.gz",
)

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

# for docker image building
DOCKER_RULES_VERSION = "0.14.1"
DOCKER_RULES_VERSION = "0.14.4"

http_archive(
name = "io_bazel_rules_docker",
sha256 = "dc97fccceacd4c6be14e800b2a00693d5e8d07f69ee187babfd04a80a9f8e250",
sha256 = "4521794f0fba2e20f3bf15846ab5e01d5332e587e9ce81629c7f96c793bb7036",
strip_prefix = "rules_docker-%s" % DOCKER_RULES_VERSION,
urls = ["https://github.com/bazelbuild/rules_docker/archive/v%s.tar.gz" % DOCKER_RULES_VERSION],
)
@@ -375,13 +377,16 @@ load(
"@io_bazel_rules_docker//repositories:repositories.bzl",
container_repositories = "repositories",
)

container_repositories()

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

container_deps()

load("@io_bazel_rules_docker//repositories:pip_repositories.bzl", "pip_deps")

pip_deps()

load(
"@io_bazel_rules_docker//container:container.bzl",
"container_pull",
@@ -394,13 +399,15 @@ container_pull(
repository = "heron/base",
tag = "0.5.0",
)

# end docker image building

http_archive(
name = "rules_pkg",
url = "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.5/rules_pkg-0.2.5.tar.gz",
sha256 = "352c090cc3d3f9a6b4e676cf42a6047c16824959b438895a76c2989c6d7c246a",
urls = [
"https://github.com/bazelbuild/rules_pkg/releases/download/0.2.6/rules_pkg-0.2.6.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.2.6/rules_pkg-0.2.6.tar.gz",
],
sha256 = "aeca78988341a2ee1ba097641056d168320ecc51372ef7ff8e64b139516a4937",
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
@@ -19,7 +19,6 @@ FROM centos:centos7

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

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

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

ENV bazelVersion 3.4.1

RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
&& chmod +x /tmp/bazel.sh \
&& /tmp/bazel.sh
@@ -19,7 +19,6 @@ FROM openjdk:11.0.6-jdk-buster

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

RUN apt-get update && apt-get -y install \
ant \
@@ -43,6 +42,8 @@ RUN apt-get update && apt-get -y install \
wget \
zip

ENV bazelVersion 3.4.1

RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
&& chmod +x /tmp/bazel.sh \
&& /tmp/bazel.sh
@@ -19,7 +19,6 @@ FROM openjdk:11-jdk-stretch

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

RUN apt-get update && apt-get -y install \
ant \
@@ -42,6 +41,8 @@ RUN apt-get update && apt-get -y install \
wget \
zip

ENV bazelVersion 3.4.1

RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
&& chmod +x /tmp/bazel.sh \
&& /tmp/bazel.sh
@@ -19,7 +19,6 @@ FROM ubuntu:14.04

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

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

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

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

ENV bazelVersion 3.4.1

RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
&& chmod +x /tmp/bazel.sh \
&& /tmp/bazel.sh
@@ -19,7 +19,6 @@ FROM ubuntu:16.04

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

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

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

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

ENV bazelVersion 3.4.1

RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
&& chmod +x /tmp/bazel.sh \
&& /tmp/bazel.sh
@@ -19,7 +19,6 @@ FROM ubuntu:18.04

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

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

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

ENV bazelVersion 3.4.1

RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
&& chmod +x /tmp/bazel.sh \
&& /tmp/bazel.sh
@@ -19,7 +19,6 @@ FROM ubuntu:20.04

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

ARG DEBIAN_FRONTEND=noninteractive

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

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

ENV bazelVersion 3.4.1

RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
&& chmod +x /tmp/bazel.sh \
&& /tmp/bazel.sh
@@ -19,7 +19,6 @@ FROM centos:centos7

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

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

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

ENV bazelVersion 3.4.1

RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
&& chmod +x /tmp/bazel.sh \
&& /tmp/bazel.sh
@@ -19,7 +19,6 @@ FROM ubuntu:18.04

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

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

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

ENV bazelVersion 3.4.1

RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
&& chmod +x /tmp/bazel.sh \
&& /tmp/bazel.sh
@@ -24,6 +24,7 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.slf4j.Logger;
@@ -220,7 +221,7 @@ private Method findCompatibleMethod(List<Object> args, Class target, String meth
}
if (eligibleCount > 1) {
LOG.warn("Found multiple invokable methods for class, method, given arguments {} "
+ new Object[]{target, methodName, args});
+ Arrays.toString(new Object[]{target, methodName, args}));
}
return retval;
}
@@ -29,7 +29,7 @@ if [ "$#" -ne 1 ]; then
exit 1
fi
BAZEL_OS=$1
BAZEL_VERSION=3.0.0
BAZEL_VERSION=3.4.1

# Install Bazel
BAZEL_INSTALLER=bazel-$BAZEL_VERSION-installer-$BAZEL_OS-x86_64.sh
@@ -43,7 +43,7 @@ install_marathon() {
service marathon start
}

bazelVersion=3.0.0
bazelVersion=3.4.1
bazel_install() {
apt-get install -y automake cmake gcc g++ zlib1g-dev zip pkg-config wget libssl-dev libunwind-dev
mkdir -p /opt/bazel
@@ -34,7 +34,7 @@ $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/inst

### Step 2 -- Install Bazel
```bash
wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/3.0.0/bazel-3.0.0-installer-darwin-x86_64.sh
wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/3.4.1/bazel-3.4.1-installer-darwin-x86_64.sh
chmod +x /tmp/bazel.sh
/tmp/bazel.sh --user
```
@@ -19,7 +19,7 @@ FROM ubuntu:18.04

# This is passed to the heron build command via the --config flag
ENV TARGET_PLATFORM ubuntu
ENV bazelVersion 3.0.0
ENV bazelVersion 3.4.1


RUN apt-get update && apt-get -y install \
@@ -38,7 +38,7 @@ const bazelVersions = {
'0.20.0-incubating': '0.14.1',
'0.20.1-incubating': '0.26.0',
'0.20.2-incubating': '0.26.0',
'latest': '3.0.0',
'latest': '3.4.1',
}

function replaceBazel(version) {

0 comments on commit f35ba15

Please sign in to comment.