Rought out the consumer
ClosedPublic

Authored by jskladan on Feb 2 2017, 3:08 PM.

Details

Summary

This adds a rough idea of what the pagure commit consumer could look
like.
We are once again misusing the item to carry additional information.
I'd really like to be able to have libtaskotron take the arbitrary input
(and I think we will have to do this sooner than later), but it is out
of the scope for this diff

This also fixes a heisenbug in testing, where depending on the order in
which the tests ran, the dist_git_commit/pagure_git_received were getting
either [x86_64] or [i386, x86_64] as valid arches, because some of the
testsuites change the default config value and do not clean up.

Test Plan

Added an unittest, but I'll try this out later on from the CLI anyway
Feel free to test on my behalf ;)

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.
jskladan retitled this revision from to Rought out the consumer.Feb 2 2017, 3:08 PM
jskladan updated this object.
jskladan edited the test plan for this revision. (Show Details)
jskladan added reviewers: mkrizek, tflink, kparal.
tflink added inline comments.Feb 7 2017, 2:16 PM
jobtriggers/pagure_git_received.py
9

I'm being picky, but can you fix this? I don't see a reason why that has to be an "end of line" commit

16

Am I missing a reason why this and the .config line above are here?

testing/test_pagure_commit_trigger.py
36

Can't this be split up onto multiple lines?

tflink added a comment.Feb 7 2017, 2:17 PM

Bah, hit the "submit" button too quickly. Overall it looks good to me, I just had some picky bits and questions before hitting approve

jskladan added inline comments.Feb 7 2017, 2:41 PM
jobtriggers/pagure_git_received.py
9

What do you mean by "end of line commit"? I sure can change it, just used this in order to not make any changes to libtaskotron at the moment. Sure would change it before merging into the code.

16

I'll most probably add the start/end commit to the data structure.
The .config import is important for unit tests, which then change some of the configuration during the test-run. We do this in the other consumers too, for the same exact reason.

testing/test_pagure_commit_trigger.py
36

Sure can. I'll split it before the merge.

jskladan updated this revision to Diff 2856.Feb 8 2017, 8:34 AM
  • make it more git source agnostic
  • store server
mkrizek accepted this revision.Feb 8 2017, 9:43 AM

I didn't test it, but seems like a straightforward change, the code looks good to me.

This revision is now accepted and ready to land.Feb 8 2017, 9:43 AM
Closed by commit rTRGRdab986695b11: Add pagure git commit consumer (authored by Josef Skladanka <jskladan@redhat.com>). · Explain WhyFeb 9 2017, 2:26 PM
This revision was automatically updated to reflect the committed changes.