foreman_remote_execution icon indicating copy to clipboard operation
foreman_remote_execution copied to clipboard

Fixes #37453 - Support Zeitwerk loader

Open ofedoren opened this issue 1 year ago • 6 comments

~WIP~

requires https://github.com/theforeman/foreman-tasks/pull/752

ofedoren avatar May 14 '24 15:05 ofedoren

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

ekohl avatar May 28 '24 12:05 ekohl

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).

ofedoren avatar May 30 '24 12:05 ofedoren

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

ekohl avatar Jun 18 '24 12:06 ekohl

If the only thing you need is a build against a Zeitwerk-enabled Foreman: Add the packit for https://github.com/theforeman/foreman/pull/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.

evgeni avatar Jun 18 '24 13:06 evgeni

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

ekohl avatar Jun 18 '24 13:06 ekohl

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

evgeni avatar Jun 18 '24 13:06 evgeni

Ready to merge after https://github.com/theforeman/foreman/pull/10131 is merged, dropped the commit for testing with Foreman PR, the latest run was green: Screenshot_20240903_143351

ofedoren avatar Sep 03 '24 12:09 ofedoren

Thank you @ofedoren !

adamruzicka avatar Sep 10 '24 13:09 adamruzicka