Fish Trophy

chipx86 got a fish trophy!

Fish Trophy

Future-proof config file loading, and allow control of config file location.

Review Request #11511 — Created March 11, 2021 and submitted — Latest diff uploaded

Information

ReviewBot
release-3.0.x

Reviewers

The worker config file has historically been loaded through an
imp.load_module call, which is deprecated in Python 3. Instead, we're
now using the same logic we used in RBTools to load in the configuration
file.

The configuration file's location can also be controlled now through the
$REVIEWBOT_CONFIG_FILE environment variable, making it easier to test
Review Bot and run it in more locked-down setups.

Better logging has been added for when things go wrong, and unit tests
have been added to test all the conditions.

Tested with both Python 2 and 3, with Celery 3.x and 4.x (respectively).

Tested looking up config files in the standard location, setting
$REVIEWBOT_CONFIG_FILE, and without a config file available.

Tested that I saw all variations of log messages when using -l INFO.

Unit tests pass on Python 2 and 3.

Commits

Files