Add fuse scheduler
ClosedPublic

Authored by mkrizek on Jun 20 2014, 1:32 PM.

Details

Summary

Fixes T240

Test Plan

Tests included.

Diff Detail

Repository
rTRGR taskotron-trigger
Lint
Lint Skipped
Unit
Unit Tests Skipped
mkrizek retitled this revision from to Add fuse scheduler.Jun 20 2014, 1:32 PM
mkrizek updated this object.
mkrizek edited the test plan for this revision. (Show Details)
mkrizek added reviewers: tflink, kparal.
mkrizek added inline comments.Jun 20 2014, 1:34 PM
conf/trigger.cfg.example
16

Add comment that fuse_delay is in seconds.

jobtriggers/bodhi_msg.py
5

Should this be in the spec file in Requires? moksha.hub.reactor already includes this.

jobtriggers/config.py
41

Same as above.

Overall, looks pretty good to me. I wanted to test it locally first but there aren't really many updates changing right now.

I assume that you've run this locally some, how long did you let it run?

I'm wondering if we want unit tests to cover the fuse scheduler case but I'm also not sure how much work it would be to stub out the live bits of fedmsg. Looking at their unite test suite may help, there.

jobtriggers/bodhi_msg.py
5

If we're directly importing it, I'd add it to the specfile's requires. Not strictly required but does help show which packages we're directly depending on

tflink requested changes to this revision.Jun 23 2014, 2:54 AM
tflink added inline comments.
jobtriggers/bodhi_msg.py
60–63

Can you add some logging statements here to indicate that a fused task has been "scheduled"?

This revision now requires changes to proceed.Jun 23 2014, 2:54 AM
mkrizek updated this revision to Diff 430.Jun 23 2014, 11:15 AM

Addressing issues

tflink requested changes to this revision.Jun 23 2014, 12:16 PM

We talked about this over IRC but I'd like to see some test coverage for the fuse scheduling - stubbing out the twisted/fedmsg components is fine but make sure that the proper items are queued and dequeued.

jobtriggers/bodhi_msg.py
60–63

Minor nit, but could you change that to "setting fuse (%d seconds) for koji_tag %s', (config.fuse_delay, koji_tag)"

This revision now requires changes to proceed.Jun 23 2014, 12:16 PM
mkrizek updated this revision to Diff 434.Jun 23 2014, 12:28 PM

Add missing test

mkrizek updated this revision to Diff 435.Jun 23 2014, 12:34 PM

Fix log statement

tflink accepted this revision.Jun 23 2014, 12:52 PM

Looks good to me

This revision is now accepted and ready to land.Jun 23 2014, 12:52 PM
mkrizek closed this revision.Jun 23 2014, 1:38 PM
mkrizek updated this revision to Diff 441.

Closed by commit rTRGR2c8ff34b3516 (authored by @mkrizek).