Make messaging plugin loading more pleasant for dev
ClosedPublic

Authored by jskladan on Jan 18 2017, 4:23 PM.

Details

Summary

The way the messaging plugins are loaded, it is required to run
python setup.py develop for resultsdb to function properly,
if you use it from git checkout.

To make the development a bit more pleasant, I made sure the
dummy plugin can be loaded even without that.

Test Plan

As @ralph noted at IRC, doing this kind of lets us in the dark most
of the time, so to catch the plugin loading issues, I updated the
unitests with code that tries to load both dummy (should work always)
and fedmsg (only works after setup.py develop) plugins.
Helpfull message is shown when loading the fedmsg plugin fails.

Diff Detail

Repository
rRSDB resultsdb
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jskladan retitled this revision from to Make messaging plugin loading more pleasant for dev.Jan 18 2017, 4:23 PM
jskladan updated this object.
jskladan edited the test plan for this revision. (Show Details)
jskladan added reviewers: resultsdb, ralph.
jskladan added a subscriber: ralph.
ralph requested changes to this revision.Jan 18 2017, 4:36 PM

Tiny cosmetic change requested.

resultsdb/messaging.py
111

This might be simpler if you just put classes['dummy'] = DummyPlugin up here. You could get rid of the conditional.

This revision now requires changes to proceed.Jan 18 2017, 4:36 PM
jskladan updated this revision to Diff 2767.Jan 18 2017, 5:00 PM
  • Changed to remove the if-clause
  • lint
ralph accepted this revision.Jan 18 2017, 5:01 PM

Awesome. :)

This revision is now accepted and ready to land.Jan 18 2017, 5:01 PM
Closed by commit rRSDBc4dad4054abf: Make messaging plugin loading more pleasant for dev (authored by Josef Skladanka <jskladan@redhat.com>). · Explain WhyJan 18 2017, 5:15 PM
This revision was automatically updated to reflect the committed changes.