getBuildSummariesForSourceIds doesn't include copied builds
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
Copied packages are not exposed by getBuildSummari
>>> team = launchpad.
>>> team.ppas
<lazr.restfulcl
>>> team.ppas[0]
<archive at https:/
>>> ppa=team.ppas[0]
let's compare gyp lucid (built) vs gyp maverick (copied):
>>> for src in ppa.getPublishe
... if src.source_
... src_id = src.self_
... builds = ppa.getBuildSum
... builds
...
{u'1009041': {u'status': u'FULLYBUILT', u'builds': [{u'can_
>>> for src in ppa.getPublishe
... if src.source_
... src_id = src.self_
... builds = ppa.getBuildSum
... builds
...
{u'1152029': {u'status': u'FULLYBUILT', u'builds': []}}
>>>
affects: | launchpad → soyuz |
tags: | added: package-copies |
summary: |
- lp API not reporting copied packages + getBuildSummariesForSourceIds doesn't include copied builds |
Hi Fabien, thanks for the detailed instructions to reproduce the situation.
Just to pin-point the issue to the underlying method that is being called (getBuilds()):
{{{
>>> team = launchpad. people[ 'chromium- daily'] dSources( source_ name="gyp" , exact_match=True, status="Published") .distro_ series. name .getBuilds( )[0] .distro_ series. name .getBuilds( )[0] /api.launchpad. net/1.0/ ~chromium- daily/+ archive/ ppa/+build/ 1583876>
>>> ppa=team.ppas[0]
>>> srcs = ppa.getPublishe
>>> srcs[0]
u'maverick'
>>> srcs[0]
...
IndexError: list index out of range
>>> srcs[1]
u'lucid'
>>> srcs[1]
<build at https:/
}}}
Now on one side, it is actually correct that there are no builds for maverick (assuming you copied with binaries? in which case there were no new binaries built). But I'm assuming that you're saying (and rightly) that it should return the corresponding builds for the source publishing even if its the builds from the other distroseries.
Now the logic of src_pub.getBuilds() currently is (well, it uses IPublishingSet. getBuildsForSou rceIds( )):
1) Look for the actual builds in the same archive and *distroseries* as the src publishing (of which there are non for maverick, as the binaries were copied right?)
2) Look for any builds from *other* archives that have binaries published in the src pubs archive and *distroseries* (ie. that were copied from *other* archives)
and return the union of (1) and (2).
As you've found, what is missing are the builds that were copied from another distroseries within the same archive. Perhaps we can modify (2) to : Look for any builds from other contexts (ie. could be different distroseries in same archive, or different archive) that have binaries published .... (ie. that were copied from other archives or other distroseries).