-
Notifications
You must be signed in to change notification settings - Fork 984
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
Rails 7 & Ruby 3.1 #9328
base: develop
Are you sure you want to change the base?
Rails 7 & Ruby 3.1 #9328
Conversation
Issues: #32685 |
Rebased since some preparation work was merged. No real change compared to the previous version. My plan is to submit the gem updates after branching, which would give us a much more solid base to work on. Then we can also look at the Zeitwerk changes in more detail. |
@ekohl, this pull request is currently not mergeable. Please rebase against the develop branch and push again. If you have a remote called 'upstream' that points to this repository, you can do this by running:
This message was auto-generated by Foreman's prprocessor |
4 similar comments
@ekohl, this pull request is currently not mergeable. Please rebase against the develop branch and push again. If you have a remote called 'upstream' that points to this repository, you can do this by running:
This message was auto-generated by Foreman's prprocessor |
@ekohl, this pull request is currently not mergeable. Please rebase against the develop branch and push again. If you have a remote called 'upstream' that points to this repository, you can do this by running:
This message was auto-generated by Foreman's prprocessor |
@ekohl, this pull request is currently not mergeable. Please rebase against the develop branch and push again. If you have a remote called 'upstream' that points to this repository, you can do this by running:
This message was auto-generated by Foreman's prprocessor |
@ekohl, this pull request is currently not mergeable. Please rebase against the develop branch and push again. If you have a remote called 'upstream' that points to this repository, you can do this by running:
This message was auto-generated by Foreman's prprocessor |
d5f05a4
to
7175bd6
Compare
This is still not ready for consumption, but since a lot of preparation work has been merged I've rebased this to make the PR a bit easier to grasp. |
Katello needs to update:
Version 1.2 of that gem does support Rails 7. |
Thank you for your contribution, @ekohl! This PR has been inactive for 3 months, closing for now. |
Thank you for your contribution! This PR has been inactive for 3 months, closing for now. Feel free to reopen when you return to it. This is an automated process. |
d6e5273
to
2cc8679
Compare
Rebased to drop now irrelevant. No real changes compared to the previous one. |
Thank you for your contribution! This PR has been inactive for 3 months, closing for now. Feel free to reopen when you return to it. This is an automated process. |
2cc8679
to
4e52974
Compare
Zeitwerk uses constant to snake case to resolve the paths. If we want to change some constants to be Uppercase, we need to use the inflector.
Ruby 3.1 ships rdoc 6.1 by default.
Currently version 2 is used, but version 3 brings Ruby 3 support. Version 4 is the latest. The only backwards incompatible changes they mention[1] are requiring Ruby >= 2.7 and Rails >= 6.0, which is not a problem for Foreman. Version 3 enforces that cache_classes is turned off, in particular for test environments. [1]: https://github.com/rails/spring/blob/main/CHANGELOG.md
While there is a setting which we change, this allows running with Rails 5+ default settings.
This drops the redirect_back_or_to method that Rails now natively implements. It also configures Foreman to raise errors on open redirects, similar to what was implemented in 2517ba4. Rails 7.0 introduced this as a config option, but only enables it if you load the 7.0 defaults while after this change it still loads the 6.1 defaults.
Tests fail at least on 2 issues:
I wonder if the latter is because Or this bit isn't working anymore: Lines 68 to 70 in a57aac0
Though I really question why it would be needed, since we already attempt to load the ovirt group: Lines 59 to 61 in a57aac0
Perhaps it raises an exception that's quietly swallowed? |
This is what I had to do to get Rails 7 to at least migrate and start up on Ruby 3.1. Then I noticed #9287 does a lot of the same work.
There's also a bunch of gem updates prepended to this which can be submitted separately. Split off PRs:
Fixes #35432 - Use Rails 6.1 defaults #9382Fixes #35432 - Use Rails 6.1 defaults #9748