coala / cEPs

coala Enhancement Proposals
MIT License
33 stars 53 forks source link

cEP-0015.md: corobo enhancement #113

Closed nvzard closed 6 years ago

nvzard commented 6 years ago

Closes https://github.com/coala/cEPs/issues/110

nvzard commented 6 years ago

A lot needs to be added to this cEP at the moment. I'll be adding more details in the coming days. Please leave reviews, suggestions, and ideas which might help in the development of this project :)

gbin commented 6 years ago

The configs you can set with !plugin config can be set with the command line under the key 'core' like the documentation shows. They are completely equivalent so I think it is relevant for your requirement for provisioning your plugins ahead of time.

Plugins have a place to validate their config is well formed by overriding check_configuration and will send to the bot admin a message explaining why a plugin could not start in case of failure.

On Sat, Jun 16, 2018, 02:25 John Vandenberg notifications@github.com wrote:

@jayvdb requested changes on this pull request.

In cEP-0015.md https://github.com/coala/cEPs/pull/113#discussion_r195895764:

+`` + +## Configurability + +corobo has a potential to be used by other organizations for similar tasks like +onboarding and automation. Currently, it is not configurable and many plugins +are still very coala specific. Making it more configurable will allow other +organizations to adapt corobo to cater their needs. + +Making existing coala specific plugins generic for other organizations and +letting them configure the plugins as per their needs will ensure +configurability. + +Errobot provides [plugin configuration](http://errbot.io/en/latest/user_guide/plugin_development/configuration.html) +through the built-in!config` command which can be used by other organizations +to configure the plugins as per their needs.

Please help me out here.

http://errbot.io/en/latest/user_guide/provisioning.html

says

Plugins can be configured by talking to the bot with: !plugin config my_plugin {'key': 'value'} Also plugins can store values in the storage as key value pairs. ... echo "{'FACTOID': {'errbot': 'awesome'}}" | errbot --storage-merge Factoid

Can the same config variable by configured by !config and by errbot --storage-merge... ?

Are they a unified system? If so, show a worked example using the same config variables, e.g. GH_TEAM_NAMES and GH_TOKEN and GH_ORG_NAME, and then also state unambiguously that the bot will react to !config changes of those critical config variables, and reload correctly with the new settings. Also specifically wrt labhub at startup for repo forks, who do not have sufficient access for the org in GH_ORG_NAME, the plugin needs to gracefully handle failures in those config values during startup, such as tokens with incorrect scopes. There are lots of issues about this, and it is limiting the ability of newcomers to get involved in this project.

I havent seen a bot plugin which has the same config variable in storage and accessible via !config, so pardon my skepticism and growing impatience with this problem, which was raised here 4 weeks ago. Dumping into the cEP examples which show different mechanisms being used doesnt describe a solution ... it just shows errbot has lots of available options ... and pretends they can be used in a unified way when they can not.

If the can not be used in a unified way, this cEP is confusing because it is talking about two different ways of configuring the bot and not clarifying which types of config settings will be done in each of the two ways.

One possible way to solve this is to consider how it might be possible to have the same config variable in storage and accessible via !config. It might be a hack in corobo, like coala/corobo#380 (comment) https://github.com/coala/corobo/issues/380#issuecomment-391575383 mentioned 4 weeks ago, or it might be an enhancement to errbot if upstream are interested in solving this problem.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/coala/cEPs/pull/113#pullrequestreview-129355792, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7izD1-MdodEmsgnGpgVD-l_LWB8ReJks5t9KTZgaJpZM4Tw8uG .

jayvdb commented 6 years ago

@gitmate-bot rebase

gitmate-bot commented 6 years ago

Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently :warning:

gitmate-bot commented 6 years ago

Automated rebase with GitMate.io was successful! :tada:

jayvdb commented 6 years ago

@gitmate-bot rebase

gitmate-bot commented 6 years ago

Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently :warning:

gitmate-bot commented 6 years ago

Automated rebase with GitMate.io was successful! :tada:

jayvdb commented 6 years ago

ack https://github.com/coala/cEPs/pull/113/commits/d20be0e33dfb9f026af3bc3b30b11f2b2609e99e

jayvdb commented 6 years ago

@gitmate-bot ff

gitmate-bot commented 6 years ago

Hey! I'm GitMate.io! This pull request is being fastforwarded automatically. Please DO NOT push while fastforward is in progress or your changes would be lost permanently :warning:

gitmate-bot commented 6 years ago

Automated fastforward with GitMate.io was successful! :tada: