Jira (PUP-11718) Drop support for ruby < 3.2

8 views
Skip to first unread message

Josh Cooper (Jira)

unread,
Jan 17, 2023, 12:37:03 PM1/17/23
to puppe...@googlegroups.com
Josh Cooper created an issue
 
Puppet / Task PUP-11718
Drop support for ruby < 3.2
Issue Type: Task Task
Assignee: Unassigned
Created: 2023/01/17 9:36 AM
Priority: Normal Normal
Reporter: Josh Cooper

This is a follow-on to PUP-11649 and PUP-11716. Ruby 2.7 will be EOL before Puppet 8 ships, so we should more aggressively prune the list of supported ruby versions.

Once we have puppet-agent/ruby 3.2 and puppetserver/jruby 9.4 builds in CI, we should update the minimum required MRI ruby version to at least 3.1 and maybe 3.2. See PUP-11649 for details on how to do that.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Josh Cooper (Jira)

unread,
Jan 27, 2023, 2:59:02 PM1/27/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
This is a follow-on to PUP-11649 and  PUP-11716. Ruby 2.7 will be EOL before Puppet 8 ships, so we should more aggressively prune the list of supported ruby versions.

Once we have puppet-agent/ruby 3.2 and puppetserver/jruby 9.4 builds in CI, we should update the minimum required MRI ruby version to at least 3.1 and maybe 3.2. See PUP-11649 for details on how to do that.

One possible issue with dropping 2.7 is this may affect packaging and shipping jobs that are still using ruby 2.7...

Josh Cooper (Jira)

unread,
Mar 9, 2023, 12:50:02 PM3/9/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Phoenix 2023-03-29

Josh Cooper (Jira)

unread,
Mar 9, 2023, 1:48:02 PM3/9/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
This is a follow-on to PUP-11649 and  PUP-11716. Ruby 2.7 will be EOL before Puppet 8 ships, so we should more aggressively prune the list of supported ruby versions.

Once we have puppet   PUP - agent/ 11716 is complete, we should be able to remove special cases in code and tests for older ruby versions like

{noformat}
Gemfile:  gem 'vcr', RUBY_VERSION.to_f >=
3.2 and puppetserver ? '~> 6.1' : '~> 5.0', require: false
Gemfile:  gem 'webrick', '~> 1.7', require: false if RUBY_VERSION.to_f >= 3.0
benchmarks
/ jruby 9 catalog_memory/benchmarker . 4 builds rb:RUBYVER_ARRAY = RUBY_VERSION.split(".").collect {|s| s.to_i }
lib/puppet.rb:if !defined?(JRUBY_VERSION) && Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new("2.7.0")
lib/puppet.rb:  raise LoadError, "Puppet #{Puppet.version} requires Ruby 2.7.0 or greater, found Ruby #{RUBY_VERSION.dup}."
lib/puppet.rb:Puppet::OLDEST_RECOMMENDED_RUBY_VERSION = '2.7.0'
lib/puppet.rb:  if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new(Puppet::OLDEST_RECOMMENDED_RUBY_VERSION)
lib/puppet.rb:    Puppet.deprecation_warning(_("Support for ruby version %{version} is deprecated and will be removed
in CI a future release. See https://puppet.com/docs/puppet/latest/system_requirements.html for a list of supported ruby versions.") % { version: RUBY_VERSION })
lib/puppet/application.rb:      'ruby_version'   => RUBY_VERSION
, we should update
lib/puppet/defaults.rb:      :default => "Puppet/#{Puppet.version} Ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} (#{RUBY_PLATFORM})",
lib/puppet/util.rb:  if RUBY_VERSION >= "2.6"
lib/puppet/util/monkey_patches.rb:if RUBY_VERSION.to_f < 3.0
spec/unit/http/factory_spec.rb:    it "sets
the minimum required MRI ruby version to at least 3. TLS 1 and maybe 3 . 0", if: RUBY_VERSION.to_f >= 2. See PUP 5 do
spec/unit/network/http/connection_spec.rb:      puppet_ua = "Puppet/#{Puppet.version} Ruby/#{RUBY_VERSION}
- 11649 for details on how to p#{RUBY_PATCHLEVEL} (#{RUBY_PLATFORM})"
spec/unit/puppet_spec.rb:  context "Puppet::OLDEST_RECOMMENDED_RUBY_VERSION"
do that
spec/unit/puppet_spec
. rb:      expect(Puppet::OLDEST_RECOMMENDED_RUBY_VERSION).not_to be_nil
spec/unit/puppet_spec.rb:      expect(Puppet::OLDEST_RECOMMENDED_RUBY_VERSION).to be_a_kind_of(String)
One possible issue with dropping 2 spec/unit/puppet_spec . 7 is this may affect packaging and shipping jobs that are still using ruby 2 rb:      expect(SemanticPuppet::Version) . 7 to be_valid(Puppet::OLDEST_RECOMMENDED_RUBY_VERSION)
spec/unit/reports/store_spec
. rb:      if RUBY_VERSION < "3 . 0"
spec/unit/util_spec
. rb:      :if => Puppet::Util::Platform.windows? && RUBY_VERSION.to_f < 3 do
{noformat}

Also double check lib/puppet/util/monkey_patches.rb to see if any code is no longer relevant.

Josh Cooper (Jira)

unread,
Mar 9, 2023, 1:48:03 PM3/9/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
This is a follow-on to PUP-11649 and  PUP-11716. Ruby 2.7 will be EOL before Puppet 8 ships, so we should more aggressively prune the list of supported ruby versions.

Once  PUP-11716 is complete, we should be able to remove special cases in code and tests for older ruby versions like

{noformat}
Gemfile:  gem 'vcr', RUBY_VERSION.to_f >= 3.2 ? '~> 6.1' : '~> 5.0', require: false

Gemfile:  gem 'webrick', '~> 1.7', require: false if RUBY_VERSION.to_f >= 3.0
benchmarks/catalog_memory/benchmarker.rb:RUBYVER_ARRAY = RUBY_VERSION.split(".").collect {|s| s.to_i }

lib/puppet.rb:if !defined?(JRUBY_VERSION) && Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new("2.7.0")
lib/puppet.rb:  raise LoadError, "Puppet #{Puppet.version} requires Ruby 2.7.0 or greater, found Ruby #{RUBY_VERSION.dup}."
lib/puppet.rb:Puppet::OLDEST_RECOMMENDED_RUBY_VERSION = '2.7.0'
lib/puppet.rb:  if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new(Puppet::OLDEST_RECOMMENDED_RUBY_VERSION)
lib/puppet.rb:    Puppet.deprecation_warning(_("Support for ruby version %{version} is deprecated and will be removed in a future release. See https://puppet.com/docs/puppet/latest/system_requirements.html for a list of supported ruby versions.") % { version: RUBY_VERSION })
lib/puppet/application.rb:      'ruby_version'   => RUBY_VERSION,

lib/puppet/defaults.rb:      :default => "Puppet/#{Puppet.version} Ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} (#{RUBY_PLATFORM})",
lib/puppet/util.rb:  if RUBY_VERSION >= "2.6"
lib/puppet/util/monkey_patches.rb:if RUBY_VERSION.to_f < 3.0
spec/unit/http/factory_spec.rb:    it "sets the minimum version to TLS 1.0", if: RUBY_VERSION.to_f >= 2.5 do
spec/unit/network/http/connection_spec.rb:      puppet_ua = "Puppet/#{Puppet.version} Ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} (#{RUBY_PLATFORM})"

spec/unit/puppet_spec.rb:  context "Puppet::OLDEST_RECOMMENDED_RUBY_VERSION" do
spec/unit/puppet_spec.rb:      expect(Puppet::OLDEST_RECOMMENDED_RUBY_VERSION).not_to be_nil
spec/unit/puppet_spec.rb:      expect(Puppet::OLDEST_RECOMMENDED_RUBY_VERSION).to be_a_kind_of(String)
spec/unit/puppet_spec.rb:      expect(SemanticPuppet::Version).to be_valid(Puppet::OLDEST_RECOMMENDED_RUBY_VERSION)
spec/unit/reports/store_spec.rb:      if RUBY_VERSION < "3.0"
spec/unit/util_spec.rb:      :if => Puppet::Util::Platform.windows? && RUBY_VERSION.to_f < 3 do
{noformat}

Also double check lib/puppet/util/monkey_patches.rb to see if any code is no longer relevant
, especially if MRI 3 . 1 requires openssl 1.1.1 or later

Josh Cooper (Jira)

unread,
Mar 9, 2023, 1:53:01 PM3/9/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Story Points: 2
Reply all
Reply to author
Forward
0 new messages