Closed bribroder closed 2 years ago
Does this mean that every errbot restart the config would get loaded and override any changes through the bot?
From my testing no, the plugin config options in the database are loaded later and override the config file, which seems like an ok compromise in terms of making it easy to deploy standardized bots without disrupting the chat / db state management
It looks like it overrides all the plugin configs even if you want to override only one.
You need to make a kind of merge in the configs dictionary.
Errbot plugins configs can be set and changed with its command line tool, what feature does this bring compare to it?
Hey @gbin, could you give me an example of a plugin which behaves badly with this change, when some other options are passed in the config.py file? I think I can add something to assist with merging the config dictionaries but I am having trouble reproducing the problem exactly.
Re: advantages / benefits of this feature, configuring the bot on the CLI requires that your storage backend be functional and persistent--destroying the storage destroys the configuration. The ability to configure the plugins without a backend is helpful when you want to provide better defaults or when you want to programmatically change config based on environmental factors like running in a container or in a virtual machine, etc.
Closing
storage-*
or restore options may helpful here too
Hi there,
Presently, plugins like the webserver must be configured after startup by chatting with the bot or running CLI commands. This PR allows a dictionary in the config file to provide defaults to plugins during startup, which improves configuration management and deployment experience.
I think this may also address other requests for plugin config outside of chat, e.g. https://github.com/errbotio/errbot/issues/608
Please let me know what you think of this approach and any ideas for improvement!