Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Plugin configuration #1121

Closed
dbluhm opened this issue Apr 27, 2021 · 2 comments · Fixed by #1226
Closed

Proposal: Plugin configuration #1121

dbluhm opened this issue Apr 27, 2021 · 2 comments · Fixed by #1226

Comments

@dbluhm
Copy link
Member

dbluhm commented Apr 27, 2021

In our work with pluggable DID resolvers, I found that we needed the ability to configure the plugin at startup to set values relevant to the resolver plugin. However, as a plugin, we can't add command line arguments to the ACA-Py instance so we resorted to loading a separate yaml file specified by an environment variable. This worked fine but it got me thinking about easier to use solutions, especially when considering loading multiple resolvers (i.e. uniresolver + didcomm resolver + ...) and anticipating writing more plugins in the near future that will likewise require their own configuration.

So, to field an idea I had, what do we think of a --plugin-config plugin.yml command line argument that just loads the yaml into a map in settings and performs no further validation? Plugins would then subsequently look underneath their own namespace and perform validation if necessary for the options they define. In essence, I view this as analogous to setup.cfg/setup.ini/pyproject.toml tool configurations, allowing various plugins to retrieve configuration from a single source rather than having one configuration file and environment variable each. This also avoids having to do multiple passes of command line argument parsing to allow plugins to define their own. This multi-pass parsing is, of course, doable but doesn't feel as clean to me.

@burdettadam
Copy link
Contributor

Great idea! I say we do it!

@burdettadam
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants