Zeitwerk merge imminent

As part of our Rails 7 upgrade @ofedoren and I feel that we’re close to the point where we want to merge our changes. This will break various plugins so plugin authors should pay attention.

First of all, what is Zeitwerk? Zeitwerk is the new loader introduced in Rails 6. Foreman has remained on the classic loader, but Rails 7 has dropped the classic loader. Classic to Zeitwerk HOWTO — Ruby on Rails Guides is the official guide on conversion.

When testing, please use Fixes #29991 - Enable Zeitwerk by ofedoren · Pull Request #10131 · theforeman/foreman · GitHub as the base and where needed foreman-tasks, foreman_remote_execution, foreman_openscap, foreman_templates, foreman_webhooks, katello. In particular foreman_remote_execution shows how you can point to patched versions of both core and foreman-tasks, allowing CI to do its thing.

If you maintain a plugin that isn’t mentioned, please make sure you’re compatible.

This week we’ll do more testing and set a final date for merge, even if not all plugins are compatible. This is done to make sure we have sufficient time to harden before 3.12 branches. If all goes well, we hope to merge this next week.

As part of testing, an RPM repository with patched versions will also be built.

Please also review existing patches. In the core PR the question came up whether HTTP should also be an acronym. I’d be good to answer that question.


We’ve decided to postpone a bit because there was no yum repository with patched versions. There is now a COPR repository with RPMs: ekohl/foreman-zeitwerk-patches Copr.

There’s also a remaining failure with foreman_openscap.

Next Tuesday (2024-07-02) we’ll evaluate the exact merge date again.


This has been resolved.

Currently COPR is building the latest RPMs. Last week @aruzicka already did some testing, but we’d like to do some final testing with the latest patches.

We’ve decided that, unless any serious issues show up, we’ll merge Monday (2024-07-08). Mostly because Thursday is a holiday in the US (and various people will take Friday off) and Friday in the Czech Republic. We’d like to avoid a situation where we need help from someone who’s unavailable.

Last week we did additional testing and identified at least one issue that was always there, but not covered by unit tests. We also missed some plugins we care about. Big thanks to @Shimon_Shtein for testing and writing at least some of the missing patches.

Because of this we’ve decided to postpone it until after Foreman 3.12 branching. While it may seem far away (August 20th), we have a stabilization period before that and this has a potentially large disruptive impact. Zeitwerk itself is needed to upgrade Rails, but doesn’t give us anything in the short term. Given the amount of work and other priorities, we can’t get Rails 7 into Foreman 3.12. That means we’re going to focus on other features first. After branching we’ve pick this up again and then we’re more open to breaking things.

The new target is the first week of September.