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

Rails 7 & Ruby 3.1 #9328

Draft
wants to merge 9 commits into
base: develop
Choose a base branch
from
Draft

Rails 7 & Ruby 3.1 #9328

wants to merge 9 commits into from

Conversation

@theforeman-bot
Copy link
Member

Issues: #32685

@ekohl
Copy link
Member Author

ekohl commented Aug 2, 2022

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.

@theforeman-bot
Copy link
Member

@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:

    $ git pull --rebase upstream develop

This message was auto-generated by Foreman's prprocessor

4 similar comments
@theforeman-bot
Copy link
Member

@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:

    $ git pull --rebase upstream develop

This message was auto-generated by Foreman's prprocessor

@theforeman-bot
Copy link
Member

@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:

    $ git pull --rebase upstream develop

This message was auto-generated by Foreman's prprocessor

@theforeman-bot
Copy link
Member

@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:

    $ git pull --rebase upstream develop

This message was auto-generated by Foreman's prprocessor

@theforeman-bot
Copy link
Member

@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:

    $ git pull --rebase upstream develop

This message was auto-generated by Foreman's prprocessor

@ekohl
Copy link
Member Author

ekohl commented Sep 28, 2022

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.

@ekohl
Copy link
Member Author

ekohl commented Sep 28, 2022

Katello needs to update:

[2022-09-28T09:51:13.727Z] Bundler could not find compatible versions for gem "railties":
[2022-09-28T09:51:13.727Z]   In Gemfile:
[2022-09-28T09:51:13.727Z]     katello was resolved to 4.7.0.pre.master, which depends on
[2022-09-28T09:51:13.727Z]       angular-rails-templates (~> 1.1.0) was resolved to 1.1.0, which depends on
[2022-09-28T09:51:13.727Z]         railties (< 7, >= 4.2)
[2022-09-28T09:51:13.727Z] 
[2022-09-28T09:51:13.727Z]     rails (~> 7.0.3) was resolved to 7.0.3, which depends on
[2022-09-28T09:51:13.727Z]       railties (= 7.0.3)

Version 1.2 of that gem does support Rails 7.

@theforeman-bot
Copy link
Member

Thank you for your contribution, @ekohl! 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.

Copy link

github-actions bot commented Nov 6, 2023

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.

@ekohl
Copy link
Member Author

ekohl commented Nov 16, 2023

Rebased to drop now irrelevant. No real changes compared to the previous one.

Copy link

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.

@ekohl
Copy link
Member Author

ekohl commented Mar 4, 2024

Needs a rebase now that #9770 is merged, but I've opened #10076 which is a part of the Zeitwerk work commit that's included here. To avoid continuously rebasing, I'm waiting for that to be merged.

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.
@ekohl
Copy link
Member Author

ekohl commented Apr 26, 2024

Tests fail at least on 2 issues:

  • It can't create a temporary facet to test out facets
  • uninitialized constant Fog::Ovirt::Compute::OperatingSystem

I wonder if the latter is because lib/fog/ovirt/models/compute/operating_system.rb contains Fog::Ovirt::Compute::OperatingSystem, which doesn't follow the regular convention.

Or this bit isn't working anymore:

# CRs in fog core with extra dependencies will have those deps loaded, so then
# load the corresponding bit of fog
require 'fog/ovirt' if defined?(::OVIRT)

Though I really question why it would be needed, since we already attempt to load the ovirt group:

optional_bundler_groups = %w[assets ec2 fog libvirt openstack ovirt vmware redis]
optional_bundler_groups.each do |group|
Bundler.require(group)

Perhaps it raises an exception that's quietly swallowed?

@github-actions github-actions bot added the Stale label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants