Skip to content
This repository was archived by the owner on Aug 15, 2022. It is now read-only.

Conversation

kpaleniu
Copy link

@kpaleniu kpaleniu commented May 11, 2018

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've been mindful about doing atomic commits, adding documentation to my changes, not refactoring too much.
  • I've a descriptive title and added any useful information for the reviewer. Where appropriate, I've attached a screenshot and/or screencast (gif preferably).
  • I've written tests to cover the new code and functionality included in this PR.
  • I've read, agree to, and signed the Contributor License Agreement (CLA).

PR Summary

This pull request adds functionality for overriding configuration file content from environment variables.
For example:

$ SLACK_TOKEN="xoxb-foo-bar" REPEAT_PLUGIN_DUMMY_VARIABLE="true" rtmbot

This will result in effectively the following rtmbot.conf:

SLACK_TOKEN: "xoxb-foo-bar"
plugins.repeat.RepeatPlugin:
    dummy_variable: "true"

All rtmbot-specific configuration variables can overridden. For plugin-specific configuration
I left the limitation of treating all values as strings to keep code from getting overly complex.

All this is mentioned in the README.md that is also updated by this pull request.

Related Issues

Implements at least the environment variable portion of #89.

Test strategy

tests/test_rtmbot_runner.py includes unit tests that cover most usual cases that came to mind.

@CLAassistant
Copy link

CLAassistant commented May 11, 2018

CLA assistant check
All committers have signed the CLA.

@Roach Roach self-requested a review May 29, 2018 23:16
@Roach Roach self-assigned this May 29, 2018
@nyukhalov
Copy link

Hi. What is the ETA for merging the change?
I really miss this feature #86

@fzipi
Copy link

fzipi commented Nov 21, 2018

@Roach I think this should be merged. Having config in env vars is critical when running rtmbot in containers and/or kubernetes.

fzipi pushed a commit to Perceptyx/python-rtmbot that referenced this pull request Nov 22, 2018
fzipi added a commit to Perceptyx/python-rtmbot that referenced this pull request Nov 22, 2018
@iangoldsmithsf
Copy link

iangoldsmithsf commented May 23, 2019

@Roach could you merge this please - from the Perceptyx version I saw it also seemed to incorporate allowing the log to be set to STDOUT - which is also crucial.

Containers don't like log-files - the environments are ephemeral, but typically have good logging of stdout etc.

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

Successfully merging this pull request may close these issues.

6 participants