-
Notifications
You must be signed in to change notification settings - Fork 30
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
Move to Faraday 2.x, which requires Ruby 2.6+ #99
Conversation
This avoids the need to install bundler and adds caching between runs.
The minimum version was declared as Ruby 2.4 so these conditionals do not make sense. Fixes: 05a4e77
It does not attempt to support Faraday 1.x as well because dependency wise it would be impossible to pull in the correct middleware. That is why a hard switch was made. This moves the minimum Ruby version to 2.6 since that's what Faraday 2 has as the minimum version. It also pulls in faraday-follow_redirects, which was previously part of Faraday itself. The registration is now done without a lamba since it's allowed to pass in a constant. CI is also modified to test on all actual Ruby version that currently match the required_ruby_version in the gemspec. That is, 2.6 - 3.1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me. I suggest to update the PR title so it mentions Ruby 2.5 removal as well.
What are the advantages of moving to Faraday 2.x? It's only been released for a few months. The latest 1.x release is also just a few months old. Ruby 2.5 reached end of life more than a year ago though. https://endoflife.date/ruby |
@binford2k Fewer runtime dependencies than the 1.x series and (presumably) active development will continue only on the 2.x series at some point. Skeletor is working on getting faraday updated in orchestrator_client and bolt, and the 1.x series has 11 runtime dependencies we'd need to pull in and ship. The 2.x series works with minimal changes and has a single runtime dependency, which is appealing since there are far fewer gem components to track and maintain. |
@binford2k on newer Rubies you get deprecation warnings. It was reported in voxpupuli/librarian-puppet#91 and voxpupuli/modulesync_config#784, pointing to faraday-multipart. However, I now see that lostisland/faraday-multipart@2127a0c was released in https://github.com/lostisland/faraday-multipart/releases/tag/v1.0.4 so perhaps it's less urgent now. That said, being compatible with the latest version is probably a good thing. Having at least something that works is a good start to investigate possible collisions. For example, https://github.com/github-changelog-generator/github-changelog-generator is also a commonly used tool in modules and also pulls in Faraday. That doesn't pin the version so it can create conflicts. I'll submit the unrelated commits in separate PRs because they can get merged and reduce the size of this PR. |
@binford2k I'm packaging Ruby packages for Linux distributions. Many tools already allow faraday (some might have already dropped support for faraday 1). Using faraday 2 in forge-ruby would allow me to update the package on Arch Linux. Besides that I agree with the statements from @ekohl and @beechtom . |
@binford2k Can we please have a new release with this soon. Those warning message are annoying me every time I run my rspec tests. |
Would be really nice if we could make this PR possible soon, I getting more and more frustrated because of this issue and dependency issues like:
I would like to update kitchen-puppet in our CI - but I am not able because of this issue. |
Thanks! |
This breaks puppet-agent 6.X (EOL July 2023) as it ships with ruby 2.5.x (https://puppet.com/docs/puppet/6/platform_lifecycle.html#puppet-agent-components) We now have to pin |
@johnwarburton can you explain how you trigger the error / how we can repeoduce it? |
@bastelfreak IIRC the rubygems version in Ruby 2.5 doesn't work well with the minimum ruby version that's declared. Perhaps it's ignoring it and causing problems. |
Hi @bastelfreak - no problem: start with a clean machine - EL7 - with no puppet installed
|
Ah yes. IMO this is expected and you need to pin to older versions (or don't use an EoL Ruby Version or install r10k in a different way). |
Yes, we've come to that conclusion already Its more of an FYI that this is happening with an official currently supported release of puppet which is EOL July 2023 and it ships with "EoL" ruby 2.5.x (https://puppet.com/docs/puppet/6/platform_lifecycle.html#puppet-agent-components) so there is no choice apart from moving to puppet 7 - which is in progress This is the officially documented way to install r10k |
[This pull request](puppetlabs/forge-ruby#99) dropped support for Ruby 2.5, which still ships with some Puppet versions. Let's pin to the previous version so that Dropsonde still operates on older Puppet versions for now. We'll update this once community adoption of Puppet 7+ catches up.
It does not attempt to support Faraday 1.x as well because dependency wise it would be impossible to pull in the correct middleware. That is why a hard switch was made.
See individual commits for details.
Replaces #98, #97 & #96.
This would be a major version bump.