Modify fedmsg Imports
AbandonedPublic

Authored by mprahl on Nov 4 2016, 6:15 PM.

Details

Reviewers
tflink
jskladan
Summary

This moves the location of the fedmsg import statements so that it is only imported when it is turned on.
This is beneficial for users who do not use fedmsg but use ResultsDB.

Test Plan

NA

Diff Detail

Repository
rRSDB resultsdb
Branch
fedmsg-imports (branched from develop)
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 906
Build 906: arc lint + arc unit
mprahl retitled this revision from to Modify fedmsg Imports.Nov 4 2016, 6:15 PM
mprahl updated this object.
mprahl edited the test plan for this revision. (Show Details)
mprahl added reviewers: tflink, jskladan.
mprahl added a subscriber: ralph2.
mprahl added a comment.Nov 4 2016, 6:21 PM

The unit tests pass and the app runs in Docker

jskladan requested changes to this revision.Nov 6 2016, 9:10 AM

I'm not a huge fan of imports needlessly being in the middle of the code. This would IMO work equally if the conditional import was (e.g.) just before the QUERY_LIMIT in the "header" part.

Also - what is the actual benefit of doing that? I'm almost certain that it's not "doing one less import, just for the fun of it", but fail to see the actual use-case.

This revision now requires changes to proceed.Nov 6 2016, 9:10 AM
mprahl updated this revision to Diff 2671.Nov 7 2016, 2:10 PM

Address feedback

mprahl updated this revision to Diff 2672.Nov 7 2016, 2:11 PM
  • Address feedback
mprahl added a comment.Nov 7 2016, 2:15 PM

@jskladan I believe I addressed your concern in the latest commit. Please let me know your thoughts.

The reason why I created this PR is that we are in the process of deploying ResultsDB as a standalone service, but we will not be using fedmsg. By making the import conditional, it allows us to avoid installing fedmsg on our servers since it isn't needed.

jskladan accepted this revision.Nov 7 2016, 8:45 PM

Code looks good. Thanks!

In D1045#19608, @mprahl wrote:

... By making the import conditional, it allows us to avoid installing fedmsg on our servers since it isn't needed.

OK, but fedmsg package is required by the resultsdb package, so this would need specfile changes as well, right? Because as it is, the fedmsg won't be imported, but the dependency is still there.

This revision is now accepted and ready to land.Nov 7 2016, 8:45 PM
mprahl added a comment.Nov 7 2016, 8:48 PM

@jskladan you're right on the spec file change, but as of now I will resort to modifying it locally for internal builds until @tflink and I come together on something that works for both upstream and for internal.

Awesome, thanks for the info. That was the bit that did not make sense to me :)

kparal added a subscriber: kparal.Jan 24 2017, 4:10 PM

@jskladan: bleep, bloop, stale review warning!

We can close this review. If I still need this later on, I'll rebase and resubmit.

mprahl abandoned this revision.Jan 26 2017, 10:27 AM