You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, plugins aren't dependencies of chronicle-etl and we just check for which chronicle-* gems are available at runtime and try to load them all. The problem is that plugins can have conflicting dependencies.
A typical scenario: for two platforms foo.com and bar.com, the ruby client libraries ruby-foo and ruby-bar will require different versions of faraday. If a user runs gem install chronicle-foo and gem install chronicle-bar and then tries to use them both within chronicle-etl, we'll get a Gem::ConflictError.
Possible solutions:
Make this project a monolith. We centralize plugins into the chronicle-etl repo and let bundler handle dependency resolution and accept that our bundle size will be huge and potentially hard to install if any plugins require native extensions.
Only allow one plugin to be used at the same time. Because we won't load all available plugins, the Connector Registry won't know which connectors are available (because the register_connector macro won't be called) so we'll need another technique
Adding commonly-used plugins as dependencies in chronicle-etl.gemspec and we can guarantee that at least those ones can run well together.
In any case, it'll be important to provide enough infrastructure in chronicle-etl so that plugins will need only a few additional dependencies.
The text was updated successfully, but these errors were encountered:
Right now, the connector Registry needs a plugin to be loaded to learn which connectors are available (via the #register_connector macro called in connectors).
Instead, we could use a plugin's chronicle-PLUGIN.gemspec's metadata hash to list which connectors are available. Example: spec.metadata["extractor:history"] = "Shell command history".
The Registry could then populate itself by looking for these metadata keys in Gem::Specification.filter{|s| s.name.match(/^chronicle-/) }
Attempts to require a plugin (and its dependencies) would only happen at runtime when running a job that uses them and we'd only be using one (or a handful at most), thus reducing the potential for conflict.
Right now, plugins aren't dependencies of
chronicle-etl
and we just check for whichchronicle-*
gems are available at runtime and try to load them all. The problem is that plugins can have conflicting dependencies.A typical scenario: for two platforms foo.com and bar.com, the ruby client libraries ruby-foo and ruby-bar will require different versions of faraday. If a user runs
gem install chronicle-foo
andgem install chronicle-bar
and then tries to use them both withinchronicle-etl
, we'll get aGem::ConflictError
.Possible solutions:
register_connector
macro won't be called) so we'll need another techniquechronicle-etl.gemspec
and we can guarantee that at least those ones can run well together.In any case, it'll be important to provide enough infrastructure in
chronicle-etl
so that plugins will need only a few additional dependencies.The text was updated successfully, but these errors were encountered: