Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(CAT-2113) Adjusting minimum ruby version required #481

Closed
wants to merge 2 commits into from

Conversation

LukasAud
Copy link
Contributor

Following investigation on an issue that prevented puppet-resource_api from consuming latest puppetlabs_spec_helper, it was noted that this repository assumes Ruby 2.7 as the minimum required version, causing some repositories to fail their testing environment builds due to the fact that they are consuming some form of Ruby 2.6 in order to test properly against puppetserver.

This commit adjusts the required Ruby version to the standard used across other modules/tools of the ecosystem.

Following investigation on an issue that prevented puppet-resource_api
from consuming latest puppetlabs_spec_helper, it was noted that this repository
assumes Ruby 2.7 as the minimum required version, causing some repositories to
fail their testing environment builds due to the fact that they are consuming
some form of Ruby 2.6 in order to test properly against puppetserver.

This commit adjusts the required Ruby version to the standard used across other
modules/tools of the ecosystem.
@LukasAud LukasAud requested review from bastelfreak and a team as code owners February 25, 2025 11:57
Copy link

codecov bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.95%. Comparing base (c06c7bb) to head (7868b39).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #481   +/-   ##
=======================================
  Coverage   43.95%   43.95%           
=======================================
  Files          10       10           
  Lines         662      662           
=======================================
  Hits          291      291           
  Misses        371      371           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bastelfreak
Copy link
Collaborator

Why does the resource API still need to support Ruby 2.6 but also latest puppetlabs_spec_helper?

Comment on lines +9 to +14
# Offense count: 1
# Configuration parameters: Severity, Include.
# Include: **/*.gemspec
Gemspec/RequiredRubyVersion:
Exclude:
- 'puppetlabs_spec_helper.gemspec'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd consider this poor practice. You are telling RuboCop to assume you can use Ruby 2.7 features while being Ruby 2.6 compatible. It's just a matter of time before that breaks IMHO.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I think the resource-api needs to drop Ruby 2.6 support

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you misunderstood the issue. IIRC the real issue is that JRuby used in Puppetserver 7 is officially only Ruby 2.6 compatible so I'm guessing some of Perforce's internal CI jobs run with Ruby 2.6.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. But that's EoL in three days: https://www.puppet.com/products/puppet-enterprise/support-lifecycle. So why does resource-api now need to use latest puppetlabs_spec_helper + Ruby 2.6?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's something I can't answer.

@LukasAud
Copy link
Contributor Author

@bastelfreak @ekohl So my idea was to release one last minor version compatible with 2.6 before major changes happen once Puppet 7 is EOL (a "just in case someone needs it" scenario).

After chatting with my team, we agreed it makes sense to just wait until P7 EOL and just remove the unsupported Ruby testing. So I'll be closing down this PR.

@LukasAud LukasAud closed this Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants