API export of IDistroSeries.getBuildRecords() can't filter on active source publications

Bug #369112 reported by William Grant
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

The API export of IDistroSeries.getBuildRecords() should optionally filter on active source publications, so that clients don't have to download superseded builds whose sources are no longer published.

This is most useful when looking for FTBFS builds.

Tags: api lp-soyuz
Changed in soyuz:
assignee: nobody → Julian Edwards (julian-edwards)
importance: Undecided → Medium
milestone: none → 2.2.5
status: New → Triaged
tags: added: api
tags: added: trivial
Changed in soyuz:
milestone: 2.2.5 → 2.2.6
Changed in soyuz:
status: Triaged → In Progress
Revision history for this message
Julian Edwards (julian-edwards) wrote :

William, what are you doing with your application here? I wonder if we can be more helpful than simply exposing IDs.

Revision history for this message
William Grant (wgrant) wrote :

I was intending to use it to more efficiently generate a full package vs. arch grid of FTBFSes for a distroseries. getBuildSummariesForSourceIds should allow me to do that without making 7 requests for each package.

Revision history for this message
Julian Edwards (julian-edwards) wrote : Re: [Bug 369112] Re: API export of IArchive.getBuildSummariesForSourceIds could be more useful

On Monday 08 June 2009 23:54:07 William Grant wrote:
> I was intending to use it to more efficiently generate a full package
> vs. arch grid of FTBFSes for a distroseries.
> getBuildSummariesForSourceIds should allow me to do that without making
> 7 requests for each package.

How are you getting hold of the SPPH objects? ie. how are you filtering which
ones you get?

Revision history for this message
William Grant (wgrant) wrote : Re: API export of IArchive.getBuildSummariesForSourceIds could be more useful

I find all failed, current builds, and get the SPPHs from them.

Revision history for this message
Michael Bienia (geser) wrote :

For reference:
http://bazaar.launchpad.net/~geser/%2Bjunk/qa-ftbfs/annotate/head%3A/source/build_status.py is the current source and http://qa.ubuntuwire.com/ftbfs/ the result of it.

Perhaps you have some ideas how to improve it or the LP API.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

William

Celso says he showed you the launchpadlib code snippet that uses a different way to get the failed builds. He and I both think that this is more efficient that the current way you're using, but is still not optimal because you end up throwing away some builds that were downloaded since they no longer have published sources.

So, I will change the description on this bug to reflect that series.getBuildRecords() needs to also filter on active builds (i.e. published ones).

Changed in soyuz:
assignee: Julian Edwards (julian-edwards) → nobody
milestone: 2.2.6 → none
status: In Progress → Triaged
tags: removed: trivial
summary: - API export of IArchive.getBuildSummariesForSourceIds could be more
- useful
+ API export of IDistroSeries.getBuildRecords() should optionally filter
+ on active source publications
description: updated
Revision history for this message
Fabien Tassin (fta) wrote : Re: API export of IDistroSeries.getBuildRecords() should optionally filter on active source publications

something as simple as this is not usable:

        for pkg in ppa.getBuildRecords():
            csp = pkg.current_source_publication
            if not csp:
                continue
            if pkg.buildstate == 'Successfully built':
                continue
            print " %-28s %-8s %-5s %-20s %s" % (csp.source_package_name, csp.distro_series.name, pkg.arch_tag, pkg.buildstate, pkg.build_log_url)

in my case, it takes ~10 minutes, does ~300 HTTP requests, and download more than 10MB, just to display between 0 and 12 lines.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I'm going to see how far I can get with this one...

Changed in soyuz:
assignee: nobody → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer)
Changed in soyuz:
assignee: Jelmer Vernooij (jelmer) → nobody
Curtis Hovey (sinzui)
Changed in launchpad:
importance: Medium → Low
summary: - API export of IDistroSeries.getBuildRecords() should optionally filter
- on active source publications
+ API export of IDistroSeries.getBuildRecords() can't filter on active
+ source publications
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.