-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fix warning: Kernel#open is deprecated #264
Fix warning: Kernel#open is deprecated #264
Conversation
Build failure look unrelated:
It is also happening in other MRs, e.g.: https://buildkite.com/chef-oss/chef-license-scout-master-verify/builds/140#f51d32ff-3efe-4342-9c6b-dc773e962cc4 |
@tduffield Could you or another maintainer do a code review and assist with fixing the build? Build failures do not look related to recent changes in pull requests. |
There are also 3 tests that fail locally after a fresh checkout of the project when on
Will break out a separate issue for this. |
|
Or @danielsdeleo maybe? |
@mttkay Apologies for the delay; I'm out on PTO this week. I'll take a look at this first thing when I get back (next Tuesday). |
No worries! I happen to be out on PTO myself all of next week -- enjoy your time off and thanks for looking into it! |
Okay, I've fixed the issue in the pipeline. You should be able to rebase on the latest |
Excellent, thanks! I am traveling all day today, but should be able to get to this some time tomorrow 👍 |
c758222
to
9c83bca
Compare
Opening URIs by redirecting through Kernel#open is deprecated as of Ruby 2.7 and is dropped in Ruby 3.0. To unblock applications that use Ruby 3, we need to replace these calls with URI.open. Cf.: https://rubyreferences.github.io/rubychanges/2.7.html#network-and-web ruby/open-uri@53862fa Signed-off-by: Matthias Kaeppler <[email protected]>
9c83bca
to
e61f685
Compare
Thanks @tduffield, build is green now. |
Thank you @tduffield for including this in 2.6.2 and tagging a new release. I am not familiar with the release cycle of Chef, but I noticed that the latest version on rubygems.org is still 2.5.1: https://rubygems.org/gems/license_scout To adopt the new version, would we have to wait for a new Chef release, or is it possible to deploy 2.6.2 of |
@mttkay the new ruby gem (2.6.2) exists now |
Thanks @nkierpiec -- sorry to be a bother, but I only now realized that chef-omnibus actually pins Should this be I'm not very familiar with the chef ecosystem of libraries and dependencies so I could be missing something. |
To illustrate:
|
Hey, @mttkay, not a bother, I am going to have to see if Tom has more insight on this since he has worked more closely with this product. @tduffield is this something you can clarify for @mttkay? Thanks! |
@mttkay There are changes required to Omnibus in order to have it support LicenseScout 2.x. If you're having issues with 1.x, you can open a PR against the 1-stable branch, which is our release branch for 1.x. |
Thanks all. I consulted with a co-worker as well, and it looks like we use a fork of Omnibus 7.0 so I was able to test these changes against our own repo; however, just requiring the newer licsense_scout version did not work because I ran into dependency errors with I am now testing if we can relax that pin here: #269 Not sure I'm venturing in the right direction with this but I hope this will fix the problem. |
Description
Opening URIs by redirecting through
Kernel#open
is deprecated as of Ruby 2.7 and is dropped in Ruby 3.0.To unblock applications that use Ruby 3, we need to replace these calls with
URI.open
.See also:
Related Issue
n/a
Types of changes
Checklist: