emit fedmsg when job is complete
AbandonedPublic

Authored by adamwill on Aug 13 2015, 6:54 PM.

Details

Summary

I haven't tested it, but I think this literally is all
we'd need to have some basic fedmsg output. We could probably
make it conditional so we don't spam the bus when trying to fix
tests and stuff, but I wanted to show the idea. The openQA
system obviously needs to have fedmsg installed, and where the
message will actually go will depend on the local configuration
(our production instance(s) would need to be configured to send
to the official public bus, and it would need whatever certs
and so forth are required to do that.

Test Plan

set up a fedmsg test environment on an openQA box,
run some jobs and see if fedmsgs appear.

Diff Detail

Repository
rOPENQA fedora_openqa
Branch
emitter
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 82
Build 82: arc lint + arc unit
adamwill retitled this revision from to emit fedmsg when job is complete.Aug 13 2015, 6:54 PM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)
adamwill added reviewers: jskladan, garretraziel.
jskladan accepted this revision.Aug 16 2015, 2:57 PM

I thought that some cert handling was needed to be able to post fedmsgs, but that is IMHO a technicality. We might think about the contents/structure of the FedMsg(s) - is there only one msg when the job is done, or are we going to (for example) emit the information about passed/failed tests/cases?
I guess it all depends on who the consumer should be, but overall, I'm all for doing some Fedmsg stuff. It's the future, right? :)

This revision is now accepted and ready to land.Aug 16 2015, 2:57 PM
adamwill planned changes to this revision.Aug 17 2015, 5:37 AM

You need a cert to be able to emit 'official' fedmsgs (to the Fedora project bus), but at least as I understand it so far, that goes in the system configuration, not in the project code. There's various stuff under /etc/fedmsg.d and probably other places that determines where the system will try and send any fedmsgs, AIUI.

I wouldn't want to merge this yet, though, at least until we manage to test it *somehow* - I was trying to follow the docs for testing message sending to a server running on the openQA box, but I had a bit of trouble. I will try it again and talk to threebean etc. about the conventions for what kind of messages to send (and how often) this week.

It would be great if we could test it before we merge this :-). But hey, I'm all for fedmsg.

Random note: we should talk to threebean about whether we want to get openQA results into PDC, and if so, how we ought to go about doing that, and if fedmsg's are the way.

I'm currently working on a taskotron task for scheduling openQA jobs for Pungi 4 composes. @tflink tells me this will get us fedmsg's basically for free; we can have the taskotron task wait for the openQA jobs to finish and emit a fedmsg when it's done.

adamwill abandoned this revision.Mar 11 2016, 3:44 AM

I've now done this in openQA itself.