Handle "re-trigger tests" requests from Bodhi (#91)
Bodhi has a button that lets an update owner (or proven packager)
request a re-run of automated tests on the update. When the
button is clicked, Bodhi publishes a message with the topic
"bodhi.update.status.testing.koji-build-group.build.complete",
which is also what it does when an update is pushed to testing
after being created or edited. We did not previously handle these
messages because there was no way to distinguish between "new/
edited update" messages and "re-trigger" messages due to a couple
of Bodhi bugs, but those are now fixed, and the messages can be
identified by the "re-trigger" key (it's True for re-trigger
requests, False for new/edited update messages). So, this handles
them.
The messages don't have all the info about the update that other
Bodhi messages do, in particular they don't have the best
'version' field (so we have to parse something that's close
enough), the advisory ID has an appendix (so we have to strip
that), and there's no indication whether the update is critpath
(so instead of 'deciding' whether to test it as we do with
new/edited updates, we just see if we have already tested the
same update, and if so, we test it again, on the same flavors -
which is the spirit of the request anyway).
Signed-off-by: Adam Williamson <awilliam@redhat.com>