On Tue, 2016-02-16 at 14:02 +1100, Amit Saha wrote:
I wrote a small script which will print out the failing live cd builds:
from lxml import html import requests
def main(): page = requests.get('http://koji.fedoraproject.org/koji/tasks?state=all&view=tree&method=...') tree = html.fromstring(page.content)
a_class_failed = tree.xpath('//a[@class="taskfailed"]') for image in a_class_failed: print image.text
if __name__ == '__main__': main()
To try it, install "requests" and "lxml" Python packages.
Hope someone else finds it useful too.
Nice idea, but I don't think screen scraping Koji is the way to go. It has an API, and a Python client library.
fedfind's code might be a help in figuring out how to talk to koji:
https://www.happyassassin.net/cgit/fedfind/tree/fedfind/kojiclient.py
I use plain xmlrpc_client to make the code usable on other distros, but there's a koji.ClientSession class you can use if you don't care about that which makes things a bit easier.
the 'compose check' emails report when an image that failed the previous day succeeded, or an image that succeeded the previous day failed, e.g.:
http://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/m...
shows "Security live x86_64" and "Security live i386" in "Images in Rawhide 20160212 but not this:", so you know the compose stopped working on 20160213.
I've been meaning to hook up check-compose to include Koji links for failed image builds, but haven't had the roundtuits yet...
When pungi4 goes live this will be much simpler, as you can just check the compose metadata.