From b62edde1e31ea45fbdac9920d6d6d45741584766 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 19 Sep 2023 19:27:29 +0200 Subject: [PATCH] [bazelified tests] Add more bazelified portability tests (and make them SOT for presubmit) (#34388) - bring parity between legacy portability_build_only linux job and bazelified RBE portability tests. - make grpc_portability_build_only job a no-op, since it's fully replaced by that bazelified tests (but keep grpc_portability on master job for now). For comparison: [legacy portability linux build only tests](https://source.cloud.google.com/results/invocations/f26f8b32-6878-43c7-9613-05f3111fa07c/targets) [bazel RBE bazelified tests](https://source.cloud.google.com/results/invocations/b656625f-b1e8-4b5c-9be0-b34ac9fcb31e/targets) (before this PR). --- .../test/cxx_alpine_x64/Dockerfile.template | 1 - .../dockerimage_current_versions.bzl | 2 +- .../bazelify_tests/test/portability_tests.bzl | 5 ++-- .../test/cxx_alpine_x64.current_version | 2 +- .../dockerfile/test/cxx_alpine_x64/Dockerfile | 1 - .../linux/grpc_portability_build_only.cfg | 7 +---- .../linux/grpc_portability_build_only.sh | 28 +++++++++++++++++++ 7 files changed, 33 insertions(+), 13 deletions(-) create mode 100755 tools/internal_ci/linux/grpc_portability_build_only.sh diff --git a/templates/tools/dockerfile/test/cxx_alpine_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_alpine_x64/Dockerfile.template index 813bdbfc4c3..684eef015db 100644 --- a/templates/tools/dockerfile/test/cxx_alpine_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/cxx_alpine_x64/Dockerfile.template @@ -23,7 +23,6 @@ bzip2 ${'\\'} build-base ${'\\'} cmake ${'\\'} - ccache ${'\\'} curl ${'\\'} gcc ${'\\'} git ${'\\'} diff --git a/tools/bazelify_tests/dockerimage_current_versions.bzl b/tools/bazelify_tests/dockerimage_current_versions.bzl index 3ff88d077c8..8ab20a882a2 100644 --- a/tools/bazelify_tests/dockerimage_current_versions.bzl +++ b/tools/bazelify_tests/dockerimage_current_versions.bzl @@ -94,7 +94,7 @@ DOCKERIMAGE_CURRENT_VERSIONS = { "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/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:aa9aced0f18b669a2121e2177ce540a2e1610f95a5982535b62df0d2e8b22a06", + "tools/dockerfile/test/cxx_alpine_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_alpine_x64@sha256:f2019edf9f2afd5042567f11afb1aa78a789fc9acdcce5ee0c14cc11f6830ed7", "tools/dockerfile/test/cxx_clang_15_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_clang_15_x64@sha256:c41629b44bfcdbc644ac90c3de4ca9f4d5a4fbc7daea8be2c5d6e4942acf6743", "tools/dockerfile/test/cxx_clang_6_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_clang_6_x64@sha256:8e9ddd6c0f3d04c1bf9370cc59712a4e5883f68f307643a9b6dcb2dbd678b579", "tools/dockerfile/test/cxx_debian11_openssl102_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_debian11_openssl102_x64@sha256:3bae65e56c756c491dfc4b02cff554ae3c4edd9d366d0d05d27e429b59a01b0f", diff --git a/tools/bazelify_tests/test/portability_tests.bzl b/tools/bazelify_tests/test/portability_tests.bzl index 77d2998ab72..55a70bee4ec 100644 --- a/tools/bazelify_tests/test/portability_tests.bzl +++ b/tools/bazelify_tests/test/portability_tests.bzl @@ -53,11 +53,10 @@ def generate_run_tests_portability_tests(name): # C and C++ under different compilers for language in ["c", "c++"]: compiler_configs = [ - # TODO(b/283304471): Add 'gcc10.2_openssl102' once possible ["gcc_7", "", "tools/dockerfile/test/cxx_gcc_7_x64.current_version"], ["gcc_12", "--cmake_configure_extra_args=-DCMAKE_CXX_STANDARD=20", "tools/dockerfile/test/cxx_gcc_12_x64.current_version"], - # TODO(jtattermusch): Re-enable once the build can finish in reasonable time (looks like ccache is not being used?) - #["gcc_musl", "", "tools/dockerfile/test/cxx_alpine_x64.current_version"], + ["gcc_12_openssl309", "--cmake_configure_extra_args=-DgRPC_SSL_PROVIDER=package", "tools/dockerfile/test/cxx_debian12_openssl309_x64.current_version"], + ["gcc_musl", "", "tools/dockerfile/test/cxx_alpine_x64.current_version"], ["clang_6", "--cmake_configure_extra_args=-DCMAKE_C_COMPILER=clang --cmake_configure_extra_args=-DCMAKE_CXX_COMPILER=clang++", "tools/dockerfile/test/cxx_clang_6_x64.current_version"], ["clang_15", "--cmake_configure_extra_args=-DCMAKE_C_COMPILER=clang --cmake_configure_extra_args=-DCMAKE_CXX_COMPILER=clang++", "tools/dockerfile/test/cxx_clang_15_x64.current_version"], ] diff --git a/tools/dockerfile/test/cxx_alpine_x64.current_version b/tools/dockerfile/test/cxx_alpine_x64.current_version index 87d42b9cce1..d96774f6501 100644 --- a/tools/dockerfile/test/cxx_alpine_x64.current_version +++ b/tools/dockerfile/test/cxx_alpine_x64.current_version @@ -1 +1 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_alpine_x64:e0b87db63d92a25d8efa4f88a6d48bd297e3786a@sha256:aa9aced0f18b669a2121e2177ce540a2e1610f95a5982535b62df0d2e8b22a06 \ No newline at end of file +us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_alpine_x64:e515716fa53187d8eaa9d2cb606e9f6cb1d21393@sha256:f2019edf9f2afd5042567f11afb1aa78a789fc9acdcce5ee0c14cc11f6830ed7 \ No newline at end of file diff --git a/tools/dockerfile/test/cxx_alpine_x64/Dockerfile b/tools/dockerfile/test/cxx_alpine_x64/Dockerfile index 93b6a3f185f..5fa24a52fde 100644 --- a/tools/dockerfile/test/cxx_alpine_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_alpine_x64/Dockerfile @@ -21,7 +21,6 @@ RUN apk update && apk add \ bzip2 \ build-base \ cmake \ - ccache \ curl \ gcc \ git \ diff --git a/tools/internal_ci/linux/grpc_portability_build_only.cfg b/tools/internal_ci/linux/grpc_portability_build_only.cfg index 67c692ddd9b..04252f48761 100644 --- a/tools/internal_ci/linux/grpc_portability_build_only.cfg +++ b/tools/internal_ci/linux/grpc_portability_build_only.cfg @@ -15,7 +15,7 @@ # Config file for the internal CI (in protobuf text format) # Location of the continuous shell script in repository. -build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh" +build_file: "grpc/tools/internal_ci/linux/grpc_portability_build_only.sh" timeout_mins: 180 action { define_artifacts { @@ -23,8 +23,3 @@ action { regex: "github/grpc/reports/**" } } - -env_vars { - key: "RUN_TESTS_FLAGS" - value: "-f portability linux c++ --inner_jobs 32 -j 1 --internal_ci --build_only" -} diff --git a/tools/internal_ci/linux/grpc_portability_build_only.sh b/tools/internal_ci/linux/grpc_portability_build_only.sh new file mode 100755 index 00000000000..2c7d40efbf3 --- /dev/null +++ b/tools/internal_ci/linux/grpc_portability_build_only.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# Copyright 2023 The gRPC Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -ex + +# avoid slow finalization after the script has exited. +source $(dirname $0)/../../../tools/internal_ci/helper_scripts/move_src_tree_and_respawn_itself_rc + +# change to grpc repo root +cd $(dirname $0)/../../.. + +source tools/internal_ci/helper_scripts/prepare_build_linux_rc + +echo "The grpc_portability_build_only job on linux has been deprecated and is now a no-op." +echo "The portability tests in 'build_only' mode are running as bazelified tests under tools/bazelify_tests." +echo "Note that the grpc_portability job still runs on master (but not on PRs)."