Skip to content

Commit

Permalink
Nuage provider assumes Qpid constant is loaded or autoloadable
Browse files Browse the repository at this point in the history
manageiq-providers-nuage can be eager loaded on all platforms.  It's dependency,
qpid_proton, is hidden because it can't be required on macos. Because this is an
optional dependency, any platforms that can install it will need to eager require it
since EventCatcher::MessagingHandler needs it at require/load time.

The alternative is to make qpid_proton require work on mac and define these constants.

For example:
class ManageIQ::Providers::Nuage::NetworkManager::EventCatcher::MessagingHandler < Qpid::Proton::MessagingHandler
...
end
https://github.com/ManageIQ/manageiq-providers-nuage/blob/541494cded64b1ef281c71767d7d5f88cf4bb08d/app/models/manageiq/providers/nuage/network_manager/event_catcher/messaging_handler.rb#L1
  • Loading branch information
jrafanie committed Oct 25, 2023
1 parent 443d219 commit 3b3f192
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,11 @@ group :red_hat_virtualization, :manageiq_default do
end

group :qpid_proton, :optional => true do
gem "qpid_proton", "~>0.30.0", :require => false
# We're eager requiring the qpid_proton gem on platforms that install it because
# zeitwerk wants to be able to eager/autoload the nuage provider which expects
# qpid constants to be defined. For mac platform, we have stubs for these constants
# defined in lib/qpid/proton.
gem "qpid_proton", "~>0.30.0"
end

group :systemd, :optional => true do
Expand Down

0 comments on commit 3b3f192

Please sign in to comment.