-
Notifications
You must be signed in to change notification settings - Fork 360
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
[WIP] Ruby 3 upgrade #2623
[WIP] Ruby 3 upgrade #2623
Conversation
Authored-by: Seth Boyles <[email protected]>
Co-authored-by: Seth Boyles <[email protected]> Co-authored-by: Mona Mohebbi <[email protected]>
* In Ruby 3.0, regexes are immutable and can't have singleton methods defined Co-authored-by: Seth Boyles <[email protected]> Co-authored-by: Mona Mohebbi <[email protected]>
Co-authored-by: Seth Boyles <[email protected]> Co-authored-by: Mona Mohebbi <[email protected]>
eql is primarily used as a mathematical equals. Using it here was causing a divison by 0 error due to some confusion. Co-authored-by: Seth Boyles <[email protected]> Co-authored-by: Mona Mohebbi <[email protected]>
87502a5
to
3e55c7d
Compare
I think something about the Sinatra upgrade (2.0 -> 2.1) is causing some tests to fail:
Our test calls this endpoint: cloud_controller_ng/spec/unit/lib/sinatra/vcap_spec.rb Lines 27 to 32 in cf3a1b3
Which divides by zero, and the expectation is that Sinatra returns a 500. Looking at the Sinatra changelog, I'm not sure why this behavior would have changed... |
Authored-by: Seth Boyles <[email protected]>
Reason for divide by 0 issues: sinatra/sinatra#1214. cloud_controller_ng/spec/unit/lib/sinatra/vcap_spec.rb Lines 19 to 21 in cf3a1b3
doesn't override helpers like this anymore: cloud_controller_ng/lib/sinatra/vcap.rb Lines 10 to 14 in cf3a1b3
|
Authored-by: Seth Boyles <[email protected]>
Due to another fog issue, we ended up pinning fog-google to |
This has suddenly been made more pressing, as Ruby 3 (3.1?) is required for the new Jammy Jellyfish stemcells: https://bosh.io/docs/jammy-migration/#openssl-3 |
Closing, superseded by #2703 |
Working on Ruby 3 upgrade.
Biggest issue so far was changing keyword args: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
There is the https://github.com/ruby/ruby2_keywords gem, but we figured we would try to adapt to the new, stricter usage first. If it's too risky, we can try the gem instead
What needs to be done before this is good to go:
If the first 3 are done, and ruby 2.7 tests are passing, I think might be able to ahead and merge, and update the package in capi-release after. But it's probably best to have these ready to go at the same time.
We are unsure if the unit tests have adequate coverage of the different fog gems (e.g fog-aliyun, fog-google, etc). We have run into a few issue where we were using old versions of the fog gems that were using the now removed URI.escape. We are wondering if might run into similar errors when running CATS and BARAS against these providers.