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

Fixes #37453 - Support Zeitwerk loader #895

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ofedoren
Copy link
Member

@ofedoren ofedoren commented May 14, 2024

@ekohl
Copy link
Member

ekohl commented May 28, 2024

requires theforeman/foreman-tasks#752

We support gemfile.d where you can add the foreman-tasks dependency with your branch:
https://github.com/theforeman/actions/blob/61c576caf6aea7bf18178a2bac7b21178fb44ed9/.github/workflows/foreman_plugin.yml#L121-L123

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something is unhappy:

NoMethodError: undefined method `config' for nil:NilClass
    test/test_helper.rb:181:in `setup_set_script_name'
    test/test_helper.rb:84:in `before_setup'

https://github.com/theforeman/foreman/blob/9fccd97887938c718cda9f638ed8e049091852b3/test/test_helper.rb#L180-L182

Looks like some test doesn't set @controller, which is weird because this isn't changing any of that and we haven't changed it in Foreman itself either.

foreman_remote_execution.gemspec Outdated Show resolved Hide resolved
@ofedoren ofedoren force-pushed the feat-37453-support-zeitwerk branch from ec867e5 to 049e637 Compare May 30, 2024 12:45
@ofedoren
Copy link
Member Author

Something is unhappy:

NoMethodError: undefined method `config' for nil:NilClass
    test/test_helper.rb:181:in `setup_set_script_name'
    test/test_helper.rb:84:in `before_setup'

https://github.com/theforeman/foreman/blob/9fccd97887938c718cda9f638ed8e049091852b3/test/test_helper.rb#L180-L182

Looks like some test doesn't set @controller, which is weird because this isn't changing any of that and we haven't changed it in Foreman itself either.

It was a silly mistake in test/functional/ui_job_wizard_controller_test.rb. The test case's class name should comply with the actual controller (Ui -> UI).

@ekohl
Copy link
Member

ekohl commented Jun 18, 2024

@evgeni this failed to build and has already been rotated, but I'm assumed it failed to build because it needs a patched Foreman and/or foreman-tasks. I recall you did something similar with a lookaside repo. Do you recall how?

@evgeni
Copy link
Member

evgeni commented Jun 18, 2024

If the only thing you need is a build against a Zeitwerk-enabled Foreman: Add the packit for theforeman/foreman#10131 to external_repos of packit and run with it.
If you want it more stable, mirror those builds to an external URL so they remain even if Copr cleans them up.

@ekohl
Copy link
Member

ekohl commented Jun 18, 2024

Ah yes. Looks like I'll manually compose a repository with all packages. Then it's also an easy place to test everything.

@evgeni
Copy link
Member

evgeni commented Jun 18, 2024

That's what I did for webpack5, and it was quite fine to test with

@ofedoren ofedoren force-pushed the feat-37453-support-zeitwerk branch from 049e637 to 295772a Compare June 22, 2024 14:02
@ofedoren ofedoren marked this pull request as ready for review June 22, 2024 14:03
@ofedoren ofedoren force-pushed the feat-37453-support-zeitwerk branch from 295772a to a08d7ea Compare July 8, 2024 15:05
@ofedoren ofedoren force-pushed the feat-37453-support-zeitwerk branch from a08d7ea to 5276f11 Compare July 30, 2024 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
3 participants