Plugins are installed into `scripts/plugins` which could lead to a conflict
Closed this issue · 1 comments
Describe the bug
Plugins are installed in scripts/plugins
along side the code that runs plugins (here: https://github.com/bitovi/bitops/blob/main/scripts/plugins/settings.py#L104).
This could lead to a conflict if BitOps core defined, for example, a directory called scripts/plugins/test
and someone built a plugin called test
. In this example, the install process would install the plugin test
to scripts/plugins/test
- which would either override the core code or would error.
A better approach would be to have a dedicated directory (like scripts/installed_plugins
or scripts/plugins/installed
or similar). This way, any plugin would be installed into a directory that is dedicated to installed plugins (i.e. each plugin installed would only be at risk for colliding with each other rather than with the BitOps core code), and the core code could define any directory without concern of conflict from installed plugins
Expected behavior
Directories can be defined in BitOps core's scripts/plugins
without concern for conflict of any named plugins.
Updated install_plugin.py
to use the BITOPS_installed_plugins_dir
variable.
Output
The important bit here being /opt/bitops/scripts/installed_plugins/aws/plugin.config.yaml
now using installed_plugins
#8 1.059 ~#~#~#~INSTALLING PLUGIN [aws]~#~#~#~
#8 1.059 PLUGIN_INSTALL_SCRIPT: [install.sh]
#8 1.059 PLUGIN_INSTALL_LANGUAGE: [bash]
#8 1.059 PLUGIN_DEPENDENCIES: [None]
#8 1.059 PLUGIN_CONFIG_PATH: [/opt/bitops/scripts/installed_plugins/aws/plugin.config.yaml]
#8 1.059 #~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#