From bd1eb96b5b5bc938cac54b66a9b3f4a8ee1eb42e Mon Sep 17 00:00:00 2001 From: AJ Heller Date: Wed, 3 Jan 2024 15:12:12 -0800 Subject: [PATCH] [test-infra] Update all Ubuntu docker images to v20.04 or newer (#35440) Closes #35440 PiperOrigin-RevId: 595515422 --- .bazelci/presubmit.yml | 2 +- .../dockerimage_current_versions.bzl | 4 +--- .../python_dev_ubuntu1804_x64.current_version | 1 - .../python_dev_ubuntu1804_x64/Dockerfile | 22 ------------------- .../python_ubuntu1804_x64.current_version | 1 - .../python_ubuntu1804_x64/Dockerfile | 19 ---------------- .../ruby_ubuntu1804_x64.current_version | 1 - .../ruby_ubuntu2004_x64.current_version | 1 + .../Dockerfile | 6 +++-- .../create_linux_kokoro_performance_worker.sh | 2 +- .../linux_kokoro_performance_worker_init.sh | 2 +- .../artifacts/distribtest_targets.py | 2 +- 12 files changed, 10 insertions(+), 53 deletions(-) delete mode 100644 tools/dockerfile/distribtest/python_dev_ubuntu1804_x64.current_version delete mode 100644 tools/dockerfile/distribtest/python_dev_ubuntu1804_x64/Dockerfile delete mode 100644 tools/dockerfile/distribtest/python_ubuntu1804_x64.current_version delete mode 100644 tools/dockerfile/distribtest/python_ubuntu1804_x64/Dockerfile delete mode 100644 tools/dockerfile/distribtest/ruby_ubuntu1804_x64.current_version create mode 100644 tools/dockerfile/distribtest/ruby_ubuntu2004_x64.current_version rename tools/dockerfile/distribtest/{ruby_ubuntu1804_x64 => ruby_ubuntu2004_x64}/Dockerfile (87%) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 8349d412a70..fea3b6be721 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -12,7 +12,7 @@ --- # TODO(yannic): Ideally, we should also enable buildifier and all platforms should test `//...`. tasks: - ubuntu1804: + ubuntu2004: build_targets: - //:all - //src/proto/... diff --git a/tools/bazelify_tests/dockerimage_current_versions.bzl b/tools/bazelify_tests/dockerimage_current_versions.bzl index ce34a70136f..b3b65e16c1f 100644 --- a/tools/bazelify_tests/dockerimage_current_versions.bzl +++ b/tools/bazelify_tests/dockerimage_current_versions.bzl @@ -47,20 +47,18 @@ DOCKERIMAGE_CURRENT_VERSIONS = { "tools/dockerfile/distribtest/python_dev_buster_x86.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_dev_buster_x86@sha256:179146fd5d5cc15846c6bf0284c2e261f383caf944559d2d9f7a5af0e0f7152d", "tools/dockerfile/distribtest/python_dev_centos7_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_dev_centos7_x64@sha256:e6e9a1b23a0a543050db91e17d621aa899bad04308adaf961c11fa88ba941a95", "tools/dockerfile/distribtest/python_dev_fedora36_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_dev_fedora36_x64@sha256:d10ea0c54ecaa861b67942b4adc69178585cd071c9d0c8997fa274a362beea55", - "tools/dockerfile/distribtest/python_dev_ubuntu1804_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_dev_ubuntu1804_x64@sha256:157a89cd6d0e69b89ac1975e0314aade556a35aafbaa5fe9f9890f90321d6c89", "tools/dockerfile/distribtest/python_dev_ubuntu2004_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_dev_ubuntu2004_x64@sha256:91f0d88c43ec52ecd63f99acb424c88ff9a67fa046fae207a75e99bee37eef11", "tools/dockerfile/distribtest/python_dev_ubuntu2204_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_dev_ubuntu2204_x64@sha256:9e6c9ddc738afcd73fcf2de27b22fdc22a74f1e90e214345838373d9c65ea215", "tools/dockerfile/distribtest/python_fedora36_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_fedora36_x64@sha256:85b2d2fbbcfc1b995ce3916dcf8240c29dbc72f91bd47f04187c2db008570ba4", "tools/dockerfile/distribtest/python_opensuse_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_opensuse_x64@sha256:da52566b078d10e537aa219e59641731a57e5dc7d17d6737f5e5a7d447acf5cc", "tools/dockerfile/distribtest/python_python38_buster_aarch64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_python38_buster_aarch64@sha256:487b9af2ad1459ee2630694e61074d4ac525d4f90b2bdb026dbf6f77fb3e9878", - "tools/dockerfile/distribtest/python_ubuntu1804_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_ubuntu1804_x64@sha256:edcd5f342d77ad9129cc0a0e6988b47b144815e7a93091d5b45e850111eefbcf", "tools/dockerfile/distribtest/python_ubuntu2004_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_ubuntu2004_x64@sha256:342e9dc23b674ad256b220745745be818708a1baa25a2690f0d4f777e28a22a3", "tools/dockerfile/distribtest/python_ubuntu2204_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_ubuntu2204_x64@sha256:b6ca497348741615406d1d571cf5042008da934c4f708877aa06a66b5dc3036c", "tools/dockerfile/distribtest/ruby_centos7_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_centos7_x64@sha256:4d529b984b78ca179086f7f9b416605e2d9a96ca0a28a71f4421bb5ffdc18f96", "tools/dockerfile/distribtest/ruby_debian10_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64@sha256:1298c39c950b2a48261555b6cff1ae66230a5020f100d3b381759285f0caf84e", "tools/dockerfile/distribtest/ruby_debian10_x64_ruby_2_7.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_2_7@sha256:5ee26ad3abe2683c9a8ee03987ab0ae63f50793c3d3f5e4be6e6cbacb4556fcf", "tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_0.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_0@sha256:9190da90a2a95eca1370cef64dcba7ddee9f59cc7487093da6711c1280a0b0f9", - "tools/dockerfile/distribtest/ruby_ubuntu1804_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_ubuntu1804_x64@sha256:d38b3dd34cffc027e9a1bf82bc7ace75b8a9829c2d04d5cf7cc8323655edd27a", + "tools/dockerfile/distribtest/ruby_ubuntu2004_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_ubuntu2004_x64@sha256:426cbf625df0c0e7451b9716041996dc6a35a3788c1a24d68891256f84733d8e", "tools/dockerfile/distribtest/ruby_ubuntu2204_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_ubuntu2204_x64@sha256:1c74c312f8a4ab37e629732a35daa3056e12136b90f37540cdf9fa11303c7eb8", "tools/dockerfile/grpc_artifact_centos6_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_centos6_x64@sha256:3285047265ea2b7c5d4df4c769b2d05f56288d947c75e16d27ae2dee693f791b", "tools/dockerfile/grpc_artifact_centos6_x86.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_centos6_x86@sha256:19783239da92208f0f39cf563529cd02e889920497ef81c60d20391fa998af62", diff --git a/tools/dockerfile/distribtest/python_dev_ubuntu1804_x64.current_version b/tools/dockerfile/distribtest/python_dev_ubuntu1804_x64.current_version deleted file mode 100644 index b3968343514..00000000000 --- a/tools/dockerfile/distribtest/python_dev_ubuntu1804_x64.current_version +++ /dev/null @@ -1 +0,0 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/python_dev_ubuntu1804_x64:483ff054a378bc704ae38ff1e1713947472c60d6@sha256:157a89cd6d0e69b89ac1975e0314aade556a35aafbaa5fe9f9890f90321d6c89 \ No newline at end of file diff --git a/tools/dockerfile/distribtest/python_dev_ubuntu1804_x64/Dockerfile b/tools/dockerfile/distribtest/python_dev_ubuntu1804_x64/Dockerfile deleted file mode 100644 index 8b15fdce2ac..00000000000 --- a/tools/dockerfile/distribtest/python_dev_ubuntu1804_x64/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2020 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. - -FROM ubuntu:18.04 - -RUN apt-get update -y && apt-get install -y python3 python3-pip - -RUN apt-get install -y build-essential -RUN apt-get install -y python3-dev - -RUN python3 -m pip install virtualenv diff --git a/tools/dockerfile/distribtest/python_ubuntu1804_x64.current_version b/tools/dockerfile/distribtest/python_ubuntu1804_x64.current_version deleted file mode 100644 index 3a0b031a69d..00000000000 --- a/tools/dockerfile/distribtest/python_ubuntu1804_x64.current_version +++ /dev/null @@ -1 +0,0 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/python_ubuntu1804_x64:ee3ea8950f46d21ef06d3848294ae518c68f144f@sha256:edcd5f342d77ad9129cc0a0e6988b47b144815e7a93091d5b45e850111eefbcf \ No newline at end of file diff --git a/tools/dockerfile/distribtest/python_ubuntu1804_x64/Dockerfile b/tools/dockerfile/distribtest/python_ubuntu1804_x64/Dockerfile deleted file mode 100644 index 30337403d67..00000000000 --- a/tools/dockerfile/distribtest/python_ubuntu1804_x64/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2020 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. - -FROM ubuntu:18.04 - -RUN apt-get update -y && apt-get install -y python3 python3-pip - -RUN python3 -m pip install virtualenv diff --git a/tools/dockerfile/distribtest/ruby_ubuntu1804_x64.current_version b/tools/dockerfile/distribtest/ruby_ubuntu1804_x64.current_version deleted file mode 100644 index a5daff2b3b4..00000000000 --- a/tools/dockerfile/distribtest/ruby_ubuntu1804_x64.current_version +++ /dev/null @@ -1 +0,0 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_ubuntu1804_x64:aca247e97f04a9cd5922a310337a4b5ee646fb9d@sha256:d38b3dd34cffc027e9a1bf82bc7ace75b8a9829c2d04d5cf7cc8323655edd27a \ No newline at end of file diff --git a/tools/dockerfile/distribtest/ruby_ubuntu2004_x64.current_version b/tools/dockerfile/distribtest/ruby_ubuntu2004_x64.current_version new file mode 100644 index 00000000000..e0f20260357 --- /dev/null +++ b/tools/dockerfile/distribtest/ruby_ubuntu2004_x64.current_version @@ -0,0 +1 @@ +us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_ubuntu2004_x64:41b5e3380e01ef6687e29071fedc6d9b90d96d09@sha256:426cbf625df0c0e7451b9716041996dc6a35a3788c1a24d68891256f84733d8e \ No newline at end of file diff --git a/tools/dockerfile/distribtest/ruby_ubuntu1804_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_ubuntu2004_x64/Dockerfile similarity index 87% rename from tools/dockerfile/distribtest/ruby_ubuntu1804_x64/Dockerfile rename to tools/dockerfile/distribtest/ruby_ubuntu2004_x64/Dockerfile index fa359aa95c6..f491661a57b 100644 --- a/tools/dockerfile/distribtest/ruby_ubuntu1804_x64/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_ubuntu2004_x64/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM ubuntu:18.04 +FROM ubuntu:20.04 # Install Git and basic packages. RUN apt-get update -y && apt-get install -y \ @@ -30,4 +30,6 @@ RUN /bin/bash -l -c "rvm use --default ruby-2.7" RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.7' >> ~/.bashrc" -RUN /bin/bash -l -c "gem install bundler --no-document" +# TODO(apolcyn): Bundler v2.4.22 is the last to support ruby 2.7. Latest bundler +# requires ruby 3. +RUN /bin/bash -l -c "gem install bundler --no-document -v 2.4.22" diff --git a/tools/gce/create_linux_kokoro_performance_worker.sh b/tools/gce/create_linux_kokoro_performance_worker.sh index 62e0fdf4ad7..34e82af4e21 100755 --- a/tools/gce/create_linux_kokoro_performance_worker.sh +++ b/tools/gce/create_linux_kokoro_performance_worker.sh @@ -37,7 +37,7 @@ gcloud compute instances create "$INSTANCE_NAME" \ --zone "$ZONE" \ --machine-type $MACHINE_TYPE \ --image-project ubuntu-os-cloud \ - --image-family ubuntu-1804-lts \ + --image-family ubuntu-2004-lts \ --boot-disk-size 300 \ --scopes https://www.googleapis.com/auth/bigquery \ --tags=allow-ssh diff --git a/tools/gce/linux_kokoro_performance_worker_init.sh b/tools/gce/linux_kokoro_performance_worker_init.sh index 14083a2c889..06a950dee71 100755 --- a/tools/gce/linux_kokoro_performance_worker_init.sh +++ b/tools/gce/linux_kokoro_performance_worker_init.sh @@ -117,7 +117,7 @@ sudo apt-get update sudo apt-get install -y mono-devel # C# .NET Core dependencies (https://www.microsoft.com/net/download) -wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb +wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb sudo apt-get install -y apt-transport-https diff --git a/tools/run_tests/artifacts/distribtest_targets.py b/tools/run_tests/artifacts/distribtest_targets.py index c5d2c3059fa..1e58b2c19fa 100644 --- a/tools/run_tests/artifacts/distribtest_targets.py +++ b/tools/run_tests/artifacts/distribtest_targets.py @@ -477,7 +477,7 @@ def targets(): "linux", "x64", "debian10", ruby_version="ruby_3_0", presubmit=True ), RubyDistribTest("linux", "x64", "centos7"), - RubyDistribTest("linux", "x64", "ubuntu1804"), + RubyDistribTest("linux", "x64", "ubuntu2004"), RubyDistribTest("linux", "x64", "ubuntu2204", presubmit=True), # PHP7 PHP7DistribTest("linux", "x64", "debian10", presubmit=True),