Upgrade base-builder to the latest for blaze build (#28768)

* Upgrade base-builder to the latest for blaze build

* Fix warnings.

* Added -Wno-deprecated-copy
pull/28776/head
Esun Kim 3 years ago committed by GitHub
parent eb8af70ee0
commit 92738290ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      bazel/copts.bzl
  2. 24
      templates/tools/dockerfile/oss_fuzz_base.include
  3. 4
      templates/tools/dockerfile/test/binder_transport_apk/Dockerfile.template
  4. 7
      test/core/end2end/inproc_callback_test.cc
  5. 2
      test/cpp/naming/resolver_component_tests_runner_invoker.cc
  6. 44
      tools/dockerfile/test/bazel/Dockerfile
  7. 48
      tools/dockerfile/test/binder_transport_apk/Dockerfile

@ -54,6 +54,9 @@ GRPC_LLVM_WARNING_FLAGS = [
# Exceptions but will be removed # Exceptions but will be removed
"-Wno-deprecated-declarations", "-Wno-deprecated-declarations",
"-Wno-unused-function", "-Wno-unused-function",
# googletest 1.11 or later is needed to have this warning
# https://github.com/google/googletest/commit/1b3eb6ef34620c1203263d76ec169ef0853789cc
"-Wno-deprecated-copy",
] ]
GRPC_DEFAULT_COPTS = select({ GRPC_DEFAULT_COPTS = select({

@ -1,8 +1,8 @@
# Pinned version of the base image is used to avoid regressions caused # 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 # 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" # "gcloud container images list-tags gcr.io/oss-fuzz-base/base-builder"
# Image(c7f1523ebd92) is built on Jul 29, 2021 # Image(5eceb81f5759) is built on Jan 31, 2022
FROM gcr.io/oss-fuzz-base/base-builder@sha256:c7f1523ebd9234b9ff57e5240f8c06569143373be019c92f1e6df18a1e048f37 FROM gcr.io/oss-fuzz-base/base-builder@sha256:5eceb81f57599d63ca7c9a70c8968b23b128119699626ca749017019eb0b523f
# -------------------------- WARNING -------------------------------------- # -------------------------- WARNING --------------------------------------
# If you are making changes to this file, consider changing # If you are making changes to this file, consider changing
@ -10,26 +10,12 @@ FROM gcr.io/oss-fuzz-base/base-builder@sha256:c7f1523ebd9234b9ff57e5240f8c065691
# accordingly. # accordingly.
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# Install basic packages and Bazel dependencies. # Install basic packages
RUN apt-get update && apt-get install -y software-properties-common python-software-properties
RUN add-apt-repository ppa:webupd8team/java
RUN apt-get update && apt-get -y install ${'\\'} RUN apt-get update && apt-get -y install ${'\\'}
autoconf ${'\\'} autoconf ${'\\'}
build-essential ${'\\'} build-essential ${'\\'}
curl ${'\\'} curl ${'\\'}
wget ${'\\'}
libtool ${'\\'} libtool ${'\\'}
make ${'\\'} make ${'\\'}
openjdk-8-jdk ${'\\'} vim ${'\\'}
vim wget
#====================
# Python dependencies
# Install dependencies
# TODO(jtattermusch): This installs python3.5. Is it even needed
# when we install python3.6 in the next step?
RUN apt-get update && apt-get install -y ${'\\'}
python3-all-dev
<%include file="./compile_python_36.include"/>

@ -17,6 +17,10 @@
<%include file="../../oss_fuzz_base.include"/> <%include file="../../oss_fuzz_base.include"/>
<%include file="../../bazel.include"/> <%include file="../../bazel.include"/>
#========================
# Java
RUN apt-get install -y openjdk-8-jdk
#======================== #========================
# Android SDK/NDK installation # Android SDK/NDK installation
ENV SDK_ROOT=/opt/android-sdk ENV SDK_ROOT=/opt/android-sdk

@ -296,7 +296,7 @@ static void end_test(grpc_end2end_test_fixture* f) {
grpc_completion_queue_destroy(f->shutdown_cq); grpc_completion_queue_destroy(f->shutdown_cq);
} }
static void simple_request_body(grpc_end2end_test_config config, static void simple_request_body(grpc_end2end_test_config /* config */,
grpc_end2end_test_fixture f) { grpc_end2end_test_fixture f) {
grpc_call* c; grpc_call* c;
grpc_call* s; grpc_call* s;
@ -431,11 +431,6 @@ static void simple_request_body(grpc_end2end_test_config config,
grpc_call_unref(c); grpc_call_unref(c);
grpc_call_unref(s); grpc_call_unref(s);
int expected_calls = 1;
if (config.feature_mask & FEATURE_MASK_SUPPORTS_REQUEST_PROXYING) {
expected_calls *= 2;
}
} }
static void test_invoke_simple_request(grpc_end2end_test_config config) { static void test_invoke_simple_request(grpc_end2end_test_config config) {

@ -87,7 +87,6 @@ void InvokeResolverComponentTestsRunner(
gpr_mu_init(&test_driver_mu); gpr_mu_init(&test_driver_mu);
gpr_cv test_driver_cv; gpr_cv test_driver_cv;
gpr_cv_init(&test_driver_cv); gpr_cv_init(&test_driver_cv);
int test_driver_done = 0;
int status = test_driver->Join(); int status = test_driver->Join();
if (WIFEXITED(status)) { if (WIFEXITED(status)) {
if (WEXITSTATUS(status)) { if (WEXITSTATUS(status)) {
@ -108,7 +107,6 @@ void InvokeResolverComponentTestsRunner(
abort(); abort();
} }
gpr_mu_lock(&test_driver_mu); gpr_mu_lock(&test_driver_mu);
test_driver_done = 1;
gpr_cv_signal(&test_driver_cv); gpr_cv_signal(&test_driver_cv);
gpr_mu_unlock(&test_driver_mu); gpr_mu_unlock(&test_driver_mu);
delete test_driver; delete test_driver;

@ -15,8 +15,8 @@
# Pinned version of the base image is used to avoid regressions caused # 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 # 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" # "gcloud container images list-tags gcr.io/oss-fuzz-base/base-builder"
# Image(c7f1523ebd92) is built on Jul 29, 2021 # Image(5eceb81f5759) is built on Jan 31, 2022
FROM gcr.io/oss-fuzz-base/base-builder@sha256:c7f1523ebd9234b9ff57e5240f8c06569143373be019c92f1e6df18a1e048f37 FROM gcr.io/oss-fuzz-base/base-builder@sha256:5eceb81f57599d63ca7c9a70c8968b23b128119699626ca749017019eb0b523f
# -------------------------- WARNING -------------------------------------- # -------------------------- WARNING --------------------------------------
# If you are making changes to this file, consider changing # If you are making changes to this file, consider changing
@ -24,49 +24,15 @@ FROM gcr.io/oss-fuzz-base/base-builder@sha256:c7f1523ebd9234b9ff57e5240f8c065691
# accordingly. # accordingly.
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# Install basic packages and Bazel dependencies. # Install basic packages
RUN apt-get update && apt-get install -y software-properties-common python-software-properties
RUN add-apt-repository ppa:webupd8team/java
RUN apt-get update && apt-get -y install \ RUN apt-get update && apt-get -y install \
autoconf \ autoconf \
build-essential \ build-essential \
curl \ curl \
wget \
libtool \ libtool \
make \ make \
openjdk-8-jdk \ vim \
vim wget
#====================
# Python dependencies
# Install dependencies
# TODO(jtattermusch): This installs python3.5. Is it even needed
# when we install python3.6 in the next step?
RUN apt-get update && apt-get install -y \
python3-all-dev
#=================
# Compile CPython 3.6.9 from source
RUN apt-get update && apt-get install -y zlib1g-dev libssl-dev && apt-get clean
RUN apt-get update && apt-get install -y jq build-essential libffi-dev && apt-get clean
RUN cd /tmp && \
wget -q https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz && \
tar xzvf Python-3.6.9.tgz && \
cd Python-3.6.9 && \
./configure && \
make -j4 && \
make install
RUN cd /tmp && \
echo "ff7cdaef4846c89c1ec0d7b709bbd54d Python-3.6.9.tgz" > checksum.md5 && \
md5sum -c checksum.md5
RUN python3.6 -m ensurepip && \
python3.6 -m pip install coverage
#======================== #========================
# Bazel installation # Bazel installation

@ -15,8 +15,8 @@
# Pinned version of the base image is used to avoid regressions caused # 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 # 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" # "gcloud container images list-tags gcr.io/oss-fuzz-base/base-builder"
# Image(c7f1523ebd92) is built on Jul 29, 2021 # Image(5eceb81f5759) is built on Jan 31, 2022
FROM gcr.io/oss-fuzz-base/base-builder@sha256:c7f1523ebd9234b9ff57e5240f8c06569143373be019c92f1e6df18a1e048f37 FROM gcr.io/oss-fuzz-base/base-builder@sha256:5eceb81f57599d63ca7c9a70c8968b23b128119699626ca749017019eb0b523f
# -------------------------- WARNING -------------------------------------- # -------------------------- WARNING --------------------------------------
# If you are making changes to this file, consider changing # If you are making changes to this file, consider changing
@ -24,49 +24,15 @@ FROM gcr.io/oss-fuzz-base/base-builder@sha256:c7f1523ebd9234b9ff57e5240f8c065691
# accordingly. # accordingly.
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# Install basic packages and Bazel dependencies. # Install basic packages
RUN apt-get update && apt-get install -y software-properties-common python-software-properties
RUN add-apt-repository ppa:webupd8team/java
RUN apt-get update && apt-get -y install \ RUN apt-get update && apt-get -y install \
autoconf \ autoconf \
build-essential \ build-essential \
curl \ curl \
wget \
libtool \ libtool \
make \ make \
openjdk-8-jdk \ vim \
vim wget
#====================
# Python dependencies
# Install dependencies
# TODO(jtattermusch): This installs python3.5. Is it even needed
# when we install python3.6 in the next step?
RUN apt-get update && apt-get install -y \
python3-all-dev
#=================
# Compile CPython 3.6.9 from source
RUN apt-get update && apt-get install -y zlib1g-dev libssl-dev && apt-get clean
RUN apt-get update && apt-get install -y jq build-essential libffi-dev && apt-get clean
RUN cd /tmp && \
wget -q https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz && \
tar xzvf Python-3.6.9.tgz && \
cd Python-3.6.9 && \
./configure && \
make -j4 && \
make install
RUN cd /tmp && \
echo "ff7cdaef4846c89c1ec0d7b709bbd54d Python-3.6.9.tgz" > checksum.md5 && \
md5sum -c checksum.md5
RUN python3.6 -m ensurepip && \
python3.6 -m pip install coverage
#======================== #========================
# Bazel installation # Bazel installation
@ -83,6 +49,10 @@ RUN wget "https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/b
rm bazel-$BAZEL_VERSION-installer-linux-x86_64.sh rm bazel-$BAZEL_VERSION-installer-linux-x86_64.sh
#========================
# Java
RUN apt-get install -y openjdk-8-jdk
#======================== #========================
# Android SDK/NDK installation # Android SDK/NDK installation
ENV SDK_ROOT=/opt/android-sdk ENV SDK_ROOT=/opt/android-sdk

Loading…
Cancel
Save