according to #228 <https://fedorahosted.org/autoqa/ticket/228>
and discussions with kparal, I've rewritten the koji watcher,
so it can check also the -pending tags in koji.
For the -pendig tags, we're using quite a different querying model
based on parsing the tagHistory (e.g.
# koji list-tag-history --tag='dist-f14-updates-pending'
The benefit of this solution is, that we can catch the situations
1) package Foo is built at date XYZ. It gains tag dist-f14-updates-pending
2) koji-watcher founds out "ha, new package, let's test it"
3) tests are OK
4) package Foo gains dist-f14-updates-testing-pending tag
5) we'd like to run tests like depcheck on it, but because the 'built at'
date, which the actual watcher checks is not altered, we miss the change
But parsing the tag history, we only check for new 'events' in the tag
history (i.e. 'package foo got the -pending tag few minutes ago'), independently
on the build time -> win :)
The drawback is, that at the moment, querying for the tag history takes time
because koji sends the whole tag history (a lot of data). I'm discussing a minor
change which would allow us to specify "give me the history which is newer than
date XYZ" (as is currently used for fetching new builds) with jkeating.
Because of this, the non-pending repos are still handled the 'old' way.
We also found us in need of 'batch' scheduling - e.g. we don't want to run
depcheck for every package built, but we'd like just to inform autoqa
"hey, there is new stuff in dist-f14-updates-pending tag, run stuff".
So there is new watch-koji-builds-batch watcher.
The thing is, that it is not really a watcher as such, only the hook.py
file. The reason to do this is, that querying koji is time-consuming operation,
and there is no need to do it twice, to get the same data. So there are two
different 'schedule jobs' methods in the watch-koji-build hook, and one
schedules 'per package' jobs, and the second does it as a 'batch'.
(note that the batch one is not yet tested - I just wanted to post you the
patch, so you can see the new 'concept'. The per-package part is tested,
and considered to be working).
Comments are more than welcomed - looking forward to hearing from you!