[ruby] drop ruby 2.7 support (#37430)

EOL > 1 year

Closes #37430

PiperOrigin-RevId: 661296775
pull/37444/head
apolcyn 4 months ago committed by Craig Tiller
parent 10b2e782f6
commit 43181f496a
  1. 2
      Rakefile
  2. 2
      grpc.gemspec
  3. 2
      templates/grpc.gemspec.template
  4. 2
      tools/bazelify_tests/dockerimage_current_versions.bzl
  5. 2
      tools/dockerfile/distribtest/ruby_ubuntu2004_x64.current_version
  6. 12
      tools/dockerfile/distribtest/ruby_ubuntu2004_x64/Dockerfile

@ -143,7 +143,7 @@ task 'gem:native', [:plat] do |t, args|
verbose = ENV['V'] || '0' verbose = ENV['V'] || '0'
grpc_config = ENV['GRPC_CONFIG'] || 'opt' 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]}" selected_plat = "#{args[:plat]}"
# use env variable to set artifact build paralellism # use env variable to set artifact build paralellism

2
grpc.gemspec generated

@ -13,7 +13,7 @@ Gem::Specification.new do |s|
s.description = 'Send RPCs from Ruby using GRPC' s.description = 'Send RPCs from Ruby using GRPC'
s.license = 'Apache-2.0' 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( Makefile .yardopts )
s.files += %w( etc/roots.pem ) s.files += %w( etc/roots.pem )

@ -15,7 +15,7 @@
s.description = 'Send RPCs from Ruby using GRPC' s.description = 'Send RPCs from Ruby using GRPC'
s.license = 'Apache-2.0' 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( Makefile .yardopts )
s.files += %w( etc/roots.pem ) s.files += %w( etc/roots.pem )

@ -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_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_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_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/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_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", "tools/dockerfile/grpc_artifact_centos6_x86.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_centos6_x86@sha256:19783239da92208f0f39cf563529cd02e889920497ef81c60d20391fa998af62",

@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_ubuntu2004_x64:41b5e3380e01ef6687e29071fedc6d9b90d96d09@sha256:da092bce25e292a75daf0e44e8a33dfe9219c761d4f6750cde6c7e1a7710d075 us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_ubuntu2004_x64:e5a335768218f15bcde434af6355b6531190d33a@sha256:d754f48a8119b725613bc3c31548ee8770d9bfddd9f49f00f14651aba8e7f760

@ -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 gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN \curl -sSL https://get.rvm.io | bash -s stable RUN \curl -sSL https://get.rvm.io | bash -s stable
# Install Ruby 2.7 # Install Ruby 3.3
RUN /bin/bash -l -c "rvm install ruby-2.7" RUN /bin/bash -l -c "rvm install ruby-3.0"
RUN /bin/bash -l -c "rvm use --default ruby-2.7" 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 'gem: --no-document' > ~/.gemrc"
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" 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 "echo 'rvm --default use ruby-3.0' >> ~/.bashrc"
# TODO(apolcyn): Bundler v2.4.22 is the last to support ruby 2.7. Latest bundler RUN /bin/bash -l -c "gem install bundler --no-document"
# requires ruby 3.
RUN /bin/bash -l -c "gem install bundler --no-document -v 2.4.22"

Loading…
Cancel
Save