Jira (PUP-11718) Delete ruby < 3.1 specific code paths

12 views
Skip to first unread message

Josh Cooper (Jira)

unread,
Mar 21, 2023, 8:28:02 PM3/21/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Puppet / Task PUP-11718
Delete ruby < 3.1 specific code paths
Change By: Josh Cooper
Summary: Drop support for Delete ruby < 3.1 specific code paths
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Josh Cooper (Jira)

unread,
Mar 21, 2023, 8:58:01 PM3/21/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 .

Also
MRI 3.1 ships with the openssl 3.0.0 gem (https://github.com/ruby/ruby/blob/v3_1_0/NEWS.md#stdlib-updates) and that version requires openssl 1.1.1 or later greater (https://github.com/ruby/openssl/blob/v3.0.0/History.md#version-300), so we can delete any code paths that are specific to openssl 1.0.2.

Michael Hashizume (Jira)

unread,
Mar 29, 2023, 1:08:04 PM3/29/23
to puppe...@googlegroups.com
Michael Hashizume updated an issue
Change By: Michael Hashizume
Sprint: Phoenix 2023-04-12

Michael Hashizume (Jira)

unread,
Apr 11, 2023, 6:48:03 PM4/11/23
to puppe...@googlegroups.com
Michael Hashizume assigned an issue to Michael Hashizume
Change By: Michael Hashizume
Assignee: Michael Hashizume

Josh Cooper (Jira)

unread,
Apr 12, 2023, 1:05:03 PM4/12/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Phoenix 2023-04-12 , Phoenix 2023-04-26

Aria Li (Jira)

unread,
Apr 18, 2023, 5:53:02 PM4/18/23
to puppe...@googlegroups.com
Aria Li updated an issue
Change By: Aria Li
Fix Version/s: PUP 8.0.0

Aria Li (Jira)

unread,
Apr 18, 2023, 6:40:02 PM4/18/23
to puppe...@googlegroups.com
Aria Li updated an issue
Change By: Aria Li
Release Notes: Not Needed
Reply all
Reply to author
Forward
0 new messages