How to solve inter-plugin dependencies

Hey,

with puppet extraction, foreman discovery now depends on foreman_puppet.

How are we going to solve plugin inter-dependencies long term?

And short term, how do I solve problem of loading FactoryBot definitions or other sources? This is what discovery does:

FactoryBot.definition_file_paths << File.join(File.dirname(__FILE__), 'factories')
FactoryBot.reload

Any advice?

This isn’t really new, a lot of plugins already have dependencies between each other. For example ansible depends on rex, rex depends on tasks.

This is what we do in REX to make tasks factories available

1 Like

Oh cool, I could not find Engine.root, great.

What’s probably new tho is a weak dependency. Discovery has to work with or without Puppet plugin installed. But I can create an if-statement.

Katello has a weak dependency on rex. There are large chunks of code hidden behind Katello.with_remote_execution? so this seems to be the way to go.

1 Like