Drop support for ruby 2.5 (#30699)

* Drop ruby 2.5 support
pull/30826/head
apolcyn 2 years ago committed by GitHub
parent 0932b426f1
commit 8b941bb648
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Rakefile
  2. 10
      templates/tools/dockerfile/ruby_deps.include
  3. 10
      tools/dockerfile/distribtest/ruby_centos7_x64/Dockerfile
  4. 42
      tools/dockerfile/distribtest/ruby_stretch_x64_ruby_2_5/Dockerfile
  5. 10
      tools/dockerfile/distribtest/ruby_ubuntu1604_x64/Dockerfile
  6. 18
      tools/dockerfile/distribtest/ruby_ubuntu1804_x64/Dockerfile
  7. 10
      tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile
  8. 4
      tools/dockerfile/interoptest/grpc_interop_ruby/build_interop.sh
  9. 10
      tools/dockerfile/test/ruby_debian11_arm64/Dockerfile
  10. 10
      tools/dockerfile/test/ruby_debian11_x64/Dockerfile
  11. 2
      tools/internal_ci/helper_scripts/prepare_build_macos_rc
  12. 9
      tools/run_tests/artifacts/distribtest_targets.py
  13. 8
      tools/run_tests/run_tests.py

@ -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/

@ -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"

@ -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

@ -1,42 +0,0 @@
# Copyright 2015 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 debian:stretch
# Install Git and basic packages.
RUN apt-get update && apt-get install -y \
gnupg2 \
procps \
curl \
gcc && apt-get clean
#==================
# Ruby dependencies
# Install rvm
RUN gpg2 --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN \curl -sSL https://get.rvm.io | bash -s stable
# Install Ruby 2.5
RUN /bin/bash -l -c "rvm install ruby-2.5.7"
RUN /bin/bash -l -c "rvm use --default ruby-2.5.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 mkdir /var/local/jenkins
# Define the default command.
CMD ["bash"]

@ -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"

@ -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"

@ -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

@ -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)

@ -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

@ -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

@ -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."

@ -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'),

@ -809,11 +809,15 @@ class RubyLanguage(object):
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',

Loading…
Cancel
Save