Add MBS (Module Build Service) consumer
ClosedPublic

Authored by mkrizek on Mar 27 2017, 6:10 PM.

Details

Test Plan

Unit tests included. More of a "is this what we want" review, I guess more testing will be done when more fedmsgs will be triggered.

Diff Detail

Repository
rTRGR taskotron-trigger
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mkrizek created this revision.Mar 27 2017, 6:10 PM

It looks reasonable to me.

@ralph - does this seem to match what you were looking for?

jscotka added a comment.EditedMar 29 2017, 1:15 PM

Hi,
I'm waiting for these messages to be able to use them in taskotron.
I'm doing modularity testing framework https://pagure.io/modularity-testing-framework
what should do testing of build modules and for now I would like to use these messages to trigger that.
I have own parsing lib (it creates for me REPO URL ans some other args, also stores modulemd file to file) https://pagure.io/modularity-testing-framework/blob/master/f/tools/taskotron-msg-reader.py
and then I'll trigger "avocado tests" for module (like examples for memcached, haproxy, etc...)

Thanks
Honza
ralph added a comment.Apr 3 2017, 3:11 PM

Requesting one change to the way item is passed to the check.

Otherwise, this looks good.

(Technically, we can use that scmurl here to figure out the name-stream-version, but passing the name-stream-version in as the item is more direct.)

jobtriggers/module_build_msg.py
14

I think item should be "{name}-{stream}-{version}".format(**msg['msg'])

We can probably *derive* that from the scmurl in a check, but the name-stream-version value is the most straightforward identifier for the built module.

Is it possible to pass also raw fedora MBS message via some variable like FEDMSG_RAW what will contains whole message? It could help if there will be missing some data.

tflink added a comment.Apr 3 2017, 3:47 PM

Is it possible to pass also raw fedora MBS message via some variable like FEDMSG_RAW what will contains whole message? It could help if there will be missing some data.

The thing that I'm worried about here is having a huge amount of data as a CLI arg. At the moment, anything passed into libtaskotron needs to be passed as an argument in bash and there are length limits on what you can have in a single command.

What do you need or anticipate needing that isn't covered by name-stream-version?

Hi,
I'm not sure now, what could be missing there. I think that everything could be covered by this "name-stream-version" at least there will be way how to get this data
At least this is unique identifier, so that in theory I can find whole message from datagrepper and then I have every fields (I'm not sure how long datagrepper stores these messages) but I can do that at least for one day I think. Or I'll hardcode there some specific fedora paths + this identifier shows me location of everything and in case something will change in infra but I'll need to adapt all changes In every script what will translate it to final sources.

Is it possible to show me how to construct these data like: eg. provide me location of used modulemd file derived from these "name-stream-version"

Thanks&Regards
 Honza
mkrizek updated this revision to Diff 3009.Apr 4 2017, 6:13 AM

Update item format as ralph suggested

tflink accepted this revision.Apr 4 2017, 1:12 PM
This revision is now accepted and ready to land.Apr 4 2017, 1:12 PM
Closed by commit rTRGRa9d20b0d8657: Add MBS (Module Build Service) consumer (authored by Martin Krizek <mkrizek@redhat.com>). · Explain WhyApr 4 2017, 2:21 PM
This revision was automatically updated to reflect the committed changes.