Remove ruby 2.4 support (#28522)

* changes to remove ruby 2.4 support

* some fixes

* remove opensuse since eol

* fixes

* remove unused x86 dockerfile

* stop building for ruby 2.4

* update build scripts

* fix scripts

* fix sanity

Co-authored-by: Jan Tattermusch <jtattermusch@google.com>
pull/28530/head
apolcyn 3 years ago committed by GitHub
parent 4b3045b788
commit 95b313de82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Rakefile
  2. 2
      grpc.gemspec
  3. 2
      templates/grpc.gemspec.template
  4. 8
      tools/dockerfile/distribtest/ruby_centos7_x64/Dockerfile
  5. 39
      tools/dockerfile/distribtest/ruby_fedora23_x64/Dockerfile
  6. 40
      tools/dockerfile/distribtest/ruby_jessie_x64_ruby_2_4/Dockerfile
  7. 19
      tools/dockerfile/distribtest/ruby_jessie_x86/Dockerfile
  8. 30
      tools/dockerfile/distribtest/ruby_opensuse_x64/Dockerfile
  9. 2
      tools/dockerfile/distribtest/ruby_stretch_x64/Dockerfile
  10. 6
      tools/dockerfile/distribtest/ruby_stretch_x64_ruby_2_5/Dockerfile
  11. 6
      tools/dockerfile/distribtest/ruby_stretch_x64_ruby_2_6/Dockerfile
  12. 6
      tools/dockerfile/distribtest/ruby_stretch_x64_ruby_2_7/Dockerfile
  13. 6
      tools/dockerfile/distribtest/ruby_stretch_x64_ruby_3_0/Dockerfile
  14. 8
      tools/dockerfile/distribtest/ruby_ubuntu1604_x64/Dockerfile
  15. 3
      tools/internal_ci/linux/grpc_build_artifacts.sh
  16. 3
      tools/internal_ci/linux/grpc_build_packages.sh
  17. 3
      tools/internal_ci/linux/grpc_distribtests.sh
  18. 3
      tools/internal_ci/linux/grpc_distribtests_ruby.sh
  19. 17
      tools/run_tests/artifacts/distribtest_targets.py

@ -117,7 +117,7 @@ task 'gem:native' do
verbose = ENV['V'] || '0'
grpc_config = ENV['GRPC_CONFIG'] || 'opt'
ruby_cc_versions = ['3.0.0', '2.7.0', '2.6.0', '2.5.0', '2.4.0'].join(':')
ruby_cc_versions = ['3.0.0', '2.7.0', '2.6.0', '2.5.0'].join(':')
if RUBY_PLATFORM =~ /darwin/
FileUtils.touch 'grpc_c.32.ruby'

2
grpc.gemspec generated

@ -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.4.0'
s.required_ruby_version = '>= 2.5.0'
s.files = %w( Makefile .yardopts )
s.files += %w( etc/roots.pem )

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

@ -17,15 +17,15 @@ FROM centos:7
RUN yum update -y && yum install -y curl tar which
# Install rvm
RUN gpg --keyserver hkp://keys.gnupg.net --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
# Install Ruby 2.3
RUN /bin/bash -l -c "rvm install ruby-2.4.9"
RUN /bin/bash -l -c "rvm use --default ruby-2.4.9"
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.4.9' >> ~/.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

@ -1,39 +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 fedora:23
# Make yum work properly under docker when using overlay storage driver.
# https://bugzilla.redhat.com/show_bug.cgi?id=1213602#c9
# https://github.com/docker/docker/issues/10180
RUN yum install -y yum-plugin-ovl
# distro-sync and install openssl, per https://github.com/fedora-cloud/docker-brew-fedora/issues/19
RUN yum clean all && yum update -y && yum distro-sync -y && yum install -y openssl gnupg which findutils tar procps
# Install rvm
RUN gpg --keyserver hkp://keys.gnupg.net --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.4.9"
RUN /bin/bash -l -c "rvm use --default ruby-2.4.9"
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.4.9' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler -v 1.17.3 --no-document"
RUN mkdir /var/local/jenkins
RUN /bin/bash -l -c "echo '. /etc/profile.d/rvm.sh' >> ~/.bashrc"

@ -1,40 +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:jessie
# Install Git and basic packages.
RUN apt-get update && apt-get install -y \
curl \
gcc && apt-get clean
#==================
# Ruby dependencies
# Install rvm
RUN gpg --keyserver hkp://keys.gnupg.net --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.4.9"
RUN /bin/bash -l -c "rvm use --default ruby-2.4.9"
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.4.9' >> ~/.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"]

@ -1,19 +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 i386/debian:jessie
RUN apt-get update && apt-get install -y ruby-full
RUN gem install bundler -v 1.17.3 --no-document

@ -1,30 +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 opensuse:42.1
RUN zypper --non-interactive install curl
RUN zypper --non-interactive install tar which
RUN zypper --non-interactive install ca-certificates-mozilla
# Install rvm
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
RUN \curl -sSL https://get.rvm.io | bash -s stable --ruby
# OpenSUSE is a bit crazy and ignores .bashrc for login shell.
RUN /bin/bash -l -c "echo '. /etc/profile.d/rvm.sh' >> ~/.profile"
RUN /bin/bash -l -c 'gem install --update bundler'

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM debian:jessie
FROM debian:stretch
RUN apt-get update && apt-get install -y ruby-full

@ -12,10 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM debian:jessie
FROM debian:stretch
# Install Git and basic packages.
RUN apt-get update && apt-get install -y \
gnupg2 \
procps \
curl \
gcc && apt-get clean
@ -23,7 +25,7 @@ RUN apt-get update && apt-get install -y \
# Ruby dependencies
# Install rvm
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
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

@ -12,10 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM debian:jessie
FROM debian:stretch
# Install Git and basic packages.
RUN apt-get update && apt-get install -y \
gnupg2 \
procps \
curl \
gcc && apt-get clean
@ -23,7 +25,7 @@ RUN apt-get update && apt-get install -y \
# Ruby dependencies
# Install rvm
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN gpg2 --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN \curl -sSL https://get.rvm.io | bash -s stable
# Install Ruby 2.6

@ -12,10 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM debian:jessie
FROM debian:stretch
# Install Git and basic packages.
RUN apt-get update && apt-get install -y \
gnupg2 \
procps \
curl \
gcc && apt-get clean
@ -23,7 +25,7 @@ RUN apt-get update && apt-get install -y \
# Ruby dependencies
# Install rvm
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN gpg2 --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN \curl -sSL https://get.rvm.io | bash -s stable
# Install Ruby 2.7

@ -12,10 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM debian:jessie
FROM debian:stretch
# Install Git and basic packages.
RUN apt-get update && apt-get install -y \
gnupg2 \
procps \
curl \
gcc && apt-get clean
@ -23,7 +25,7 @@ RUN apt-get update && apt-get install -y \
# Ruby dependencies
# Install rvm
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN gpg2 --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN \curl -sSL https://get.rvm.io | bash -s stable
# Install Ruby 3.0

@ -23,13 +23,13 @@ RUN apt-get update -y && apt-get install -y \
# Ruby dependencies
# Install rvm
RUN gpg --keyserver hkp://keys.gnupg.net --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
# Install Ruby 2.4
RUN /bin/bash -l -c "rvm install ruby-2.4.9"
RUN /bin/bash -l -c "rvm use --default ruby-2.4.9"
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.4.9' >> ~/.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"

@ -26,7 +26,8 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc
set +ex
[[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh
set -e # rvm commands are very verbose
rvm --default use ruby-2.4.1
rvm install ruby-2.5.7
rvm --default use ruby-2.5.7
set -ex
tools/run_tests/task_runner.py -f artifact linux ${TASK_RUNNER_EXTRA_FILTERS} -j 12 || FAILED="true"

@ -26,7 +26,8 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc
set +ex
[[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh
set -e # rvm commands are very verbose
rvm --default use ruby-2.4.1
rvm install ruby-2.5.7
rvm --default use ruby-2.5.7
set -ex
# Move artifacts generated by the previous step in the build chain to a place

@ -31,7 +31,8 @@ source tools/internal_ci/helper_scripts/prepare_qemu_rc
set +ex
[[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh
set -e # rvm commands are very verbose
rvm --default use ruby-2.4.1
rvm install ruby-2.5.7
rvm --default use ruby-2.5.7
set -ex
# Move packages generated by the previous step in the build chain to a place

@ -26,7 +26,8 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc
set +ex
[[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh
set -e # rvm commands are very verbose
rvm --default use ruby-2.4.1
rvm install ruby-2.5.7
rvm --default use ruby-2.5.7
set -ex
# Build all ruby linux artifacts (this step actually builds all the binary wheels and source archives)

@ -443,28 +443,21 @@ def targets():
PythonDistribTest('linux', 'x64', 'arch', source=True),
PythonDistribTest('linux', 'x64', 'ubuntu1804', source=True),
# Ruby
RubyDistribTest('linux', 'x64', 'stretch', ruby_version='ruby_2_5'),
RubyDistribTest('linux', 'x64', 'stretch', ruby_version='ruby_2_6'),
RubyDistribTest('linux',
'x64',
'jessie',
ruby_version='ruby_2_4',
presubmit=True),
RubyDistribTest('linux', 'x64', 'jessie', ruby_version='ruby_2_5'),
RubyDistribTest('linux', 'x64', 'jessie', ruby_version='ruby_2_6'),
RubyDistribTest('linux',
'x64',
'jessie',
'stretch',
ruby_version='ruby_2_7',
presubmit=True),
# TODO(apolcyn): add a ruby 3.0 test once protobuf adds support
RubyDistribTest('linux',
'x64',
'jessie',
ruby_version='ruby_2_4',
'stretch',
ruby_version='ruby_2_5',
source=True,
presubmit=True),
RubyDistribTest('linux', 'x64', 'centos7'),
RubyDistribTest('linux', 'x64', 'fedora23'),
RubyDistribTest('linux', 'x64', 'opensuse'),
RubyDistribTest('linux', 'x64', 'ubuntu1604'),
RubyDistribTest('linux', 'x64', 'ubuntu1804', presubmit=True),
# PHP7

Loading…
Cancel
Save