Peripli / service-manager

Service Manager Core
Apache License 2.0
69 stars 28 forks source link

Allow enabling and disabling of filters and plugins with startup configuration #177

Open KirilKabakchiev opened 5 years ago

KirilKabakchiev commented 5 years ago

Currently, there is no way to disable specific plugins by using external config (for example env vars, flags, config file). However, there are often SM plugins that would talk to other systems which might often be missing or not accessible in some development environments.

Each filter/plugin should be configurable using the SM environment abstraction (which would mean that using env vars/flags/adding values to application.yml should allow disabling/enabling plugins/filters.

dzahariev commented 5 years ago

Better approach would be to do not have all plugins packed inside the binary, but to allow installation (provisioning) of plugins as part of application initialisation, or by triggering a call to the application itself. The plugins should run as separate processes - similar to gometalinter approach that gets and installs only required plugins and runs the separate processes for each installed plugin. This will bring:

KirilKabakchiev commented 5 years ago

In gometalinter ( I just check the code) - here is what happens:

I don't see how this approach would be benefical for SM. Actually, a couple major drawbacks

Rather then downloading binaries i would prefer to have a config file in which we specified which of the already vendored plugins to be enabled/disabled. Then when testing SM, we can write tests that start SM with different plugin configurations. These tests will use the same plugin versions because the plugins are already vendored by the dependency management tool (dep/gomods)