Skip to content

Commit

Permalink
Remove ruby 2.4 support (grpc#28522)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
apolcyn and jtattermusch authored Jan 11, 2022
1 parent 4b3045b commit 95b313d
Show file tree
Hide file tree
Showing 19 changed files with 41 additions and 164 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion grpc.gemspec

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion templates/grpc.gemspec.template
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
8 changes: 4 additions & 4 deletions tools/dockerfile/distribtest/ruby_centos7_x64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 0 additions & 39 deletions tools/dockerfile/distribtest/ruby_fedora23_x64/Dockerfile

This file was deleted.

40 changes: 0 additions & 40 deletions tools/dockerfile/distribtest/ruby_jessie_x64_ruby_2_4/Dockerfile

This file was deleted.

19 changes: 0 additions & 19 deletions tools/dockerfile/distribtest/ruby_jessie_x86/Dockerfile

This file was deleted.

30 changes: 0 additions & 30 deletions tools/dockerfile/distribtest/ruby_opensuse_x64/Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@
# 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

#==================
# 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@
# 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

#==================
# 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@
# 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

#==================
# 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@
# 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

#==================
# 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
Expand Down
8 changes: 4 additions & 4 deletions tools/dockerfile/distribtest/ruby_ubuntu1604_x64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
3 changes: 2 additions & 1 deletion tools/internal_ci/linux/grpc_build_artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion tools/internal_ci/linux/grpc_build_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion tools/internal_ci/linux/grpc_distribtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion tools/internal_ci/linux/grpc_distribtests_ruby.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
17 changes: 5 additions & 12 deletions tools/run_tests/artifacts/distribtest_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 95b313d

Please sign in to comment.