Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for ruby 2.5 #30699

Merged
merged 14 commits into from
Aug 26, 2022
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -144,7 +144,7 @@ task 'gem:native', [:plat] do |t, args|
verbose = ENV['V'] || '0'

grpc_config = ENV['GRPC_CONFIG'] || 'opt'
ruby_cc_versions = ['3.1.0', '3.0.0', '2.7.0', '2.6.0', '2.5.0'].join(':')
ruby_cc_versions = ['3.1.0', '3.0.0', '2.7.0', '2.6.0'].join(':')
selected_plat = "#{args[:plat]}"

if RUBY_PLATFORM =~ /darwin/
Expand Down
10 changes: 5 additions & 5 deletions templates/tools/dockerfile/ruby_deps.include
Expand Up @@ -6,11 +6,11 @@ RUN apt-get update && apt-get install -y gnupg2 && apt-get clean
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN \curl -sSL https://get.rvm.io | bash -s stable

# Install Ruby 2.5
# Install Ruby 2.7
RUN apt-get update && apt-get install -y procps && apt-get clean
RUN /bin/bash -l -c "rvm install ruby-2.5"
RUN /bin/bash -l -c "rvm use --default ruby-2.5"
RUN /bin/bash -l -c "rvm install ruby-2.7"
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.5' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document -v 1.9"
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.7' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document"
10 changes: 5 additions & 5 deletions tools/dockerfile/distribtest/ruby_centos7_x64/Dockerfile
Expand Up @@ -20,13 +20,13 @@ RUN yum update -y && yum install -y curl tar which
RUN gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN curl -sSL https://get.rvm.io | bash -s stable

# Install Ruby 2.3
RUN /bin/bash -l -c "rvm install ruby-2.5.7"
RUN /bin/bash -l -c "rvm use --default ruby-2.5.7"
# 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"
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.5.7' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler -v 1.17.3 --no-document"
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.7' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document"

RUN mkdir /var/local/jenkins

Expand Down

This file was deleted.

10 changes: 5 additions & 5 deletions tools/dockerfile/distribtest/ruby_ubuntu1604_x64/Dockerfile
Expand Up @@ -26,10 +26,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.4
RUN /bin/bash -l -c "rvm install ruby-2.5.7"
RUN /bin/bash -l -c "rvm use --default ruby-2.5.7"
# 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"
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.5.7' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler -v 1.17.3 --no-document"
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.7' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document"
18 changes: 16 additions & 2 deletions tools/dockerfile/distribtest/ruby_ubuntu1804_x64/Dockerfile
Expand Up @@ -14,6 +14,20 @@

FROM ubuntu:18.04

RUN apt-get update -y && apt-get install -y ruby-full
# Install Git and basic packages.
RUN apt-get update -y && apt-get install -y \
curl \
gnupg2 \
gcc && apt-get clean

RUN gem install bundler
# Install rvm
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"
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"
10 changes: 5 additions & 5 deletions tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile
Expand Up @@ -86,14 +86,14 @@ RUN apt-get update && apt-get install -y gnupg2 && apt-get clean
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN \curl -sSL https://get.rvm.io | bash -s stable

# Install Ruby 2.5
# Install Ruby 2.7
RUN apt-get update && apt-get install -y procps && apt-get clean
RUN /bin/bash -l -c "rvm install ruby-2.5"
RUN /bin/bash -l -c "rvm use --default ruby-2.5"
RUN /bin/bash -l -c "rvm install ruby-2.7"
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.5' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document -v 1.9"
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.7' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document"

#=================
# Install cmake
Expand Down
Expand Up @@ -27,7 +27,7 @@ ${name}')
cp -r /var/local/jenkins/service_account $HOME || true

cd /var/local/git/grpc
rvm --default use ruby-2.5
rvm --default use ruby-2.7

# build Ruby interop client and server
(cd src/ruby && gem install bundler -v 1.17.3 && bundle && bundle exec rake compile)
(cd src/ruby && gem install bundler && bundle && bundle exec rake compile)
10 changes: 5 additions & 5 deletions tools/dockerfile/test/ruby_debian11_arm64/Dockerfile
Expand Up @@ -86,14 +86,14 @@ RUN apt-get update && apt-get install -y gnupg2 && apt-get clean
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN \curl -sSL https://get.rvm.io | bash -s stable

# Install Ruby 2.5
# Install Ruby 2.7
RUN apt-get update && apt-get install -y procps && apt-get clean
RUN /bin/bash -l -c "rvm install ruby-2.5"
RUN /bin/bash -l -c "rvm use --default ruby-2.5"
RUN /bin/bash -l -c "rvm install ruby-2.7"
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.5' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document -v 1.9"
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.7' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document"

#=================
# Install cmake
Expand Down
10 changes: 5 additions & 5 deletions tools/dockerfile/test/ruby_debian11_x64/Dockerfile
Expand Up @@ -86,14 +86,14 @@ RUN apt-get update && apt-get install -y gnupg2 && apt-get clean
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN \curl -sSL https://get.rvm.io | bash -s stable

# Install Ruby 2.5
# Install Ruby 2.7
RUN apt-get update && apt-get install -y procps && apt-get clean
RUN /bin/bash -l -c "rvm install ruby-2.5"
RUN /bin/bash -l -c "rvm use --default ruby-2.5"
RUN /bin/bash -l -c "rvm install ruby-2.7"
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.5' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document -v 1.9"
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.7' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document"

#=================
# Install cmake
Expand Down
2 changes: 1 addition & 1 deletion tools/internal_ci/helper_scripts/prepare_build_macos_rc
Expand Up @@ -83,7 +83,7 @@ then
time rvm install "ruby-${RUBY_VERSION}"
done;
echo "Setting default ruby version."
rvm use 2.5.0 --default
rvm use 2.7.0 --default
echo "Installing cocoapods."
time gem install cocoapods --version 1.3.1 --no-document
echo "Updating osx-ssl-certs."
Expand Down
9 changes: 3 additions & 6 deletions tools/run_tests/artifacts/distribtest_targets.py
Expand Up @@ -442,19 +442,16 @@ def targets():
PythonDistribTest('linux', 'x64', 'arch', source=True),
PythonDistribTest('linux', 'x64', 'ubuntu2004', source=True),
# Ruby
RubyDistribTest('linux', 'x64', 'stretch', ruby_version='ruby_2_5'),
RubyDistribTest('linux', 'x64', 'stretch', ruby_version='ruby_2_6'),
RubyDistribTest('linux',
'x64',
'stretch',
ruby_version='ruby_2_7',
ruby_version='ruby_2_6',
source=True,
presubmit=True),
# TODO(apolcyn): add a ruby 3.0 test once protobuf adds support
RubyDistribTest('linux',
'x64',
'stretch',
ruby_version='ruby_2_5',
source=True,
ruby_version='ruby_2_7',
presubmit=True),
RubyDistribTest('linux', 'x64', 'centos7'),
RubyDistribTest('linux', 'x64', 'ubuntu1604'),
Expand Down
8 changes: 6 additions & 2 deletions tools/run_tests/run_tests.py
Expand Up @@ -809,11 +809,15 @@ def test_specs(self):
timeout_seconds=10 * 60,
environ=_FORCE_ENVIRON_FOR_WRAPPERS)
]
# TODO(apolcyn): re-enable the following tests after
# https://bugs.ruby-lang.org/issues/15499 is fixed:
# They previously worked on ruby 2.5 but needed to be disabled
# after dropping support for ruby 2.5:
# - src/ruby/end2end/channel_state_test.rb
# - src/ruby/end2end/sig_int_during_channel_watch_test.rb
for test in [
'src/ruby/end2end/sig_handling_test.rb',
'src/ruby/end2end/channel_state_test.rb',
'src/ruby/end2end/channel_closing_test.rb',
'src/ruby/end2end/sig_int_during_channel_watch_test.rb',
'src/ruby/end2end/killed_client_thread_test.rb',
'src/ruby/end2end/forking_client_test.rb',
'src/ruby/end2end/grpc_class_init_test.rb',
Expand Down