On Fri, Dec 29, 2017 at 11:09 PM Amit Saha <amitsaha.in@gmail.com> wrote:
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:

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/message/54GVUFI43NS3E3TWLNUTSL4POR4NEPIM/

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?

Alternatively, can I leverage fedmsg here somehow? Not sure if the right data is published there.
 

Thanks.

Best Wishes,
Amit.

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

_______________________________________________
spins mailing list
spins@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/spins@lists.fedoraproject.org