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

Compatibility with Zeitwerk #27

Merged
merged 4 commits into from
Jan 10, 2025
Merged

Compatibility with Zeitwerk #27

merged 4 commits into from
Jan 10, 2025

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Jan 8, 2025

Completely untested by now, which is why I added CI.

Fixes #26

@ekohl ekohl marked this pull request as draft January 8, 2025 17:22
@ekohl ekohl force-pushed the fix-plugin branch 3 times, most recently from a8bbb1f to 446df67 Compare January 8, 2025 19:29
@ekohl
Copy link
Member Author

ekohl commented Jan 8, 2025

@ofedoren I couldn't quite figure this out. I had a theory that DHCP was an acronym that broke it, but that doesn't appear to work. Could you have a look?

Copy link
Member

@ofedoren ofedoren left a comment

Choose a reason for hiding this comment

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

Thanks, @ekohl, pretty much everything is covered as far as I can tell, nice one 🥇

It seems the plugin is even older than me, it lacks inline suggestion at least:

@@ -1,16 +1,19 @@
require 'deface'
module ForemanDhcpBrowser
module ForemanDHCPBrowser
class Engine < ::Rails::Engine
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
class Engine < ::Rails::Engine
class Engine < ::Rails::Engine
engine_name 'foreman_dhcp_browser'

@ekohl
Copy link
Member Author

ekohl commented Jan 9, 2025

Nice. Now it fails because of:

Don't know how to build task 'test:foreman_dhcp_browser' (See the list of available tasks with `rake --tasks`)
/home/runner/work/foreman_dhcp_browser/foreman_dhcp_browser/vendor/bundle/ruby/2.7.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'

This is because there is no such task because it doesn't have tests. I'll modify CI to skip it so we just rely on seeds and assets (which already identified if the plugin could be loaded or not).

@ekohl ekohl marked this pull request as ready for review January 9, 2025 18:01
@ekohl
Copy link
Member Author

ekohl commented Jan 9, 2025

With a dummy task this is now green.

@ekohl ekohl merged commit 13ce09e into theforeman:master Jan 10, 2025
11 checks passed
@ekohl ekohl deleted the fix-plugin branch January 10, 2025 13:51
@Stricken1670
Copy link

Much appreciated! How can I apply this update, so I can test drive it?

@ekohl
Copy link
Member Author

ekohl commented Jan 14, 2025

I've submitted #28 so that for every PR we create an RPM you can test. No guarantee it works on a stable branch, but should work on nightly. I should create a release, but I got a bit distracted with investigating the best way to do so.

@Stricken1670
Copy link

Looks like scl-utils as a builddep is missing.


Complete!
Finish: build setup for rubygem-foreman_dhcp_browser-0.0.8-6.20250114195036906049.pr28.9.gd8f6514.el9.src.rpm
Start: rpmbuild rubygem-foreman_dhcp_browser-0.0.8-6.20250114195036906049.pr28.9.gd8f6514.el9.src.rpm
Building target platforms: x86_64
Building for target x86_64
setting SOURCE_DATE_EPOCH=1736812800
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.myBS2u
+ umask 022
+ cd /builddir/build/BUILD
+ scl enable '%{scl}' -
/var/tmp/rpm-tmp.myBS2u: line 31: scl: command not found

@ekohl
Copy link
Member Author

ekohl commented Jan 17, 2025

Yes, but we dropped EL7 and I don't think we'll ever introduce it again so we might as well clean up the spec

@Stricken1670
Copy link

Stricken1670 commented Jan 24, 2025

See also: https://community.theforeman.org/t/foreman-3-13-broken-plugin-foreman-plugin-dhcp-browser/40533/6?u=hboetes

My foreman is broken at the moment. I need it working for an urgent update in the company.

EDIT: puppet is working again, theforman is dead.

@ekohl
Copy link
Member Author

ekohl commented Jan 24, 2025

I just released 0.1.1 (0.1.0 broke because of an issue in the release workflow) so I'll look at packaging as well.

@ekohl
Copy link
Member Author

ekohl commented Jan 24, 2025

theforeman/foreman-packaging#11657 & theforeman/foreman-packaging#11654 are for nightly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plugin broken since 3.13
3 participants