coala / corobo

A bot to help newcomers onboard OS projects! It's awesome!
MIT License
65 stars 103 forks source link

Production instance is relying on the default repository config #366

Closed jayvdb closed 6 years ago

jayvdb commented 6 years ago

Currently config.py contains

# Also listen to cobot, if the bot being ran is corobo
if not os.environ.get('COBOT_PREFIX'):
    BOT_ALT_PREFIXES = ('cobot ', )

That means if the production service had set COBOT_PREFIX, using cobot wont work. devops needs to fix this, and then this part of the config should be removed, as dev/test instances do not need an alt prefix by default.

But I tested, and the production instance does recognise cobot ....

This is blocking https://github.com/coala/corobo/issues/365

yukiisbored commented 6 years ago

Currently, prod instance doesn't have COBOT_PREFIX set. BOT_ALT_PREFIXES should be set to os.environ.get('COBOT_ALT_PREFIXES', '').split() instead of making this the default.

jayvdb commented 6 years ago

@yukiisbored , you are missing the point.

BOT_ALT_PREFIXES is currently the default values on production, which means if we change this in #365, production will fail.

Can you please do git grep environ, and ensure every environment variable is hard coded in the production instance, and not using a default value.

And then we also have to plan how we migrate production values that are only defined in config.py at the moment.

Either,

  1. you set them as environment variables in production, and then we change config.py to use those variables. (and note, please use BOT_*, not COBOT_* as we are deprecating the latter.)
  2. Change production startup so that it does not use the repository config.py , until such time as the repository version of config.py loads everything from environment variables and then you can change back to using the repository version of config.py with the environment variables that it uses.
yukiisbored commented 6 years ago

Done desu! https://github.com/coala/devops/commit/42a353caeb4a238529637082f8c3ecd6194f6b5c

jayvdb commented 6 years ago

No, please re-read my comment above.

yukiisbored commented 6 years ago

There https://github.com/coala/devops/commit/b86e202c086000dab571b47ff7a30d444fb6339c

jayvdb commented 6 years ago

I think that does it.