From 43181f496aa3437dcbd304d923efa91cfe95f1d7 Mon Sep 17 00:00:00 2001 From: apolcyn Date: Fri, 9 Aug 2024 16:41:01 +0000 Subject: [PATCH] [ruby] drop ruby 2.7 support (#37430) EOL > 1 year Closes #37430 PiperOrigin-RevId: 661296775 --- Rakefile | 2 +- grpc.gemspec | 2 +- templates/grpc.gemspec.template | 2 +- .../bazelify_tests/dockerimage_current_versions.bzl | 2 +- .../distribtest/ruby_ubuntu2004_x64.current_version | 2 +- .../distribtest/ruby_ubuntu2004_x64/Dockerfile | 12 +++++------- 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Rakefile b/Rakefile index acd9df2db78..d383cb5ff2f 100755 --- a/Rakefile +++ b/Rakefile @@ -143,7 +143,7 @@ task 'gem:native', [:plat] do |t, args| verbose = ENV['V'] || '0' grpc_config = ENV['GRPC_CONFIG'] || 'opt' - ruby_cc_versions = ['3.3.0', '3.2.0', '3.1.0', '3.0.0', '2.7.0'].join(':') + ruby_cc_versions = ['3.3.0', '3.2.0', '3.1.0', '3.0.0'].join(':') selected_plat = "#{args[:plat]}" # use env variable to set artifact build paralellism diff --git a/grpc.gemspec b/grpc.gemspec index 2fb9d03a2d4..ce35bf58521 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -13,7 +13,7 @@ Gem::Specification.new do |s| s.description = 'Send RPCs from Ruby using GRPC' s.license = 'Apache-2.0' - s.required_ruby_version = '>= 2.5.0' + s.required_ruby_version = '>= 3.0' s.files = %w( Makefile .yardopts ) s.files += %w( etc/roots.pem ) diff --git a/templates/grpc.gemspec.template b/templates/grpc.gemspec.template index 316b705313d..363f9ca4c25 100644 --- a/templates/grpc.gemspec.template +++ b/templates/grpc.gemspec.template @@ -15,7 +15,7 @@ s.description = 'Send RPCs from Ruby using GRPC' s.license = 'Apache-2.0' - s.required_ruby_version = '>= 2.5.0' + s.required_ruby_version = '>= 3.0' s.files = %w( Makefile .yardopts ) s.files += %w( etc/roots.pem ) diff --git a/tools/bazelify_tests/dockerimage_current_versions.bzl b/tools/bazelify_tests/dockerimage_current_versions.bzl index 996b09a38dc..70b6b5bbbc6 100644 --- a/tools/bazelify_tests/dockerimage_current_versions.bzl +++ b/tools/bazelify_tests/dockerimage_current_versions.bzl @@ -58,7 +58,7 @@ DOCKERIMAGE_CURRENT_VERSIONS = { "tools/dockerfile/distribtest/ruby_debian11_x64_ruby_3_1.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64_ruby_3_1@sha256:a48bb08275a588fbcea21b6b6056514b69454f6844bd7db9fd72c796892d02e1", "tools/dockerfile/distribtest/ruby_debian11_x64_ruby_3_2.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64_ruby_3_2@sha256:9604f8d07c3ea330cdc1ebe394f67828710bbfef52f0dc144e513e3627279b5a", "tools/dockerfile/distribtest/ruby_debian11_x64_ruby_3_3.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64_ruby_3_3@sha256:38f27eb75a55df6e9a7d7a01bca40448d0971faee94d0332324ad85ee7200bac", - "tools/dockerfile/distribtest/ruby_ubuntu2004_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_ubuntu2004_x64@sha256:da092bce25e292a75daf0e44e8a33dfe9219c761d4f6750cde6c7e1a7710d075", + "tools/dockerfile/distribtest/ruby_ubuntu2004_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_ubuntu2004_x64@sha256:d754f48a8119b725613bc3c31548ee8770d9bfddd9f49f00f14651aba8e7f760", "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/ruby_ubuntu2004_x64.current_version b/tools/dockerfile/distribtest/ruby_ubuntu2004_x64.current_version index a0d1ee3dd46..e104fc5ff02 100644 --- a/tools/dockerfile/distribtest/ruby_ubuntu2004_x64.current_version +++ b/tools/dockerfile/distribtest/ruby_ubuntu2004_x64.current_version @@ -1 +1 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_ubuntu2004_x64:41b5e3380e01ef6687e29071fedc6d9b90d96d09@sha256:da092bce25e292a75daf0e44e8a33dfe9219c761d4f6750cde6c7e1a7710d075 \ No newline at end of file +us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_ubuntu2004_x64:e5a335768218f15bcde434af6355b6531190d33a@sha256:d754f48a8119b725613bc3c31548ee8770d9bfddd9f49f00f14651aba8e7f760 \ No newline at end of file diff --git a/tools/dockerfile/distribtest/ruby_ubuntu2004_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_ubuntu2004_x64/Dockerfile index f491661a57b..d39667dc580 100644 --- a/tools/dockerfile/distribtest/ruby_ubuntu2004_x64/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_ubuntu2004_x64/Dockerfile @@ -24,12 +24,10 @@ RUN apt-get update -y && apt-get install -y \ RUN gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB RUN \curl -sSL https://get.rvm.io | bash -s stable -# Install Ruby 2.7 -RUN /bin/bash -l -c "rvm install ruby-2.7" -RUN /bin/bash -l -c "rvm use --default ruby-2.7" +# Install Ruby 3.3 +RUN /bin/bash -l -c "rvm install ruby-3.0" +RUN /bin/bash -l -c "rvm use --default ruby-3.0" 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" -# 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" +RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.0' >> ~/.bashrc" +RUN /bin/bash -l -c "gem install bundler --no-document"