On Wed, Feb 17, 2016 at 3:56 PM Adam Williamson <adamwill@fedoraproject.org> wrote:
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=livecd')
>    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:


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.:


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.

I have been a bit off the updates, I think pungi4 is now live. Where can I look at the compose metadata?


Best Wishes,

Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net

spins mailing list