Please expose queues/recently accepted in the API

Bug #285008 reported by James Westby
4
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Medium
Julian Edwards

Bug Description

Hi,

I have a use case for that API that I would like to see implemented.

In order to import all Ubuntu packages in to bzr I need to find what was
recently accepted and grab the corresponding source package.

My current solution for doing this is to watch the various -changes
mailing lists and react to the mails on there. I'd like to be able
to do it with the API though.

The obvious difference would be that it would be a polling solution
rather than a notification one, so it would have to work a little bit
differently.

The basic information I need to know is the source package,
the version that was uploaded, and the release and pocket that
it was uploaded to. A way to grab the associated source package
directly would be great.

Reliably querying for a list of uploads since a certain time seems
error-prone, and getting the list of every upload ever sounds like
a lot of work when most won't be interesting, I would appreciate
your ideas on what a useful API would be.

Whatever it is has to work with pocket copies and other things where
the version package in a pocket changes whether or not it was
triggered by a dput.

Thanks,

James

Changed in launchpad:
importance: Undecided → Medium
Changed in soyuz:
milestone: none → pending
status: New → Triaged
Revision history for this message
James Westby (james-w) wrote :

Hi,

archive.getPublishedSources goes a long way to doing this, thanks.

here's what I currently do:

  publications = ubuntu_archive.getPublishedSources(status="Published")
  for publication in publications:
     if publication.datepublished > last_known_published:
        scan over all the publishing for this package and import anything we don't yet have

only doing it once per source package name.

The last_known_published is updated on each run, so that I only do the expensive stuff
for packages that are newly published in at least one series.

This works pretty well, and does what I want, thanks.

However, it requires getting every "Published" record for Ubuntu on every
run, only to filter them afterwards. If getPublishedSources grew a "published
since" parameter or similar, so that I could do the filtering on the query, instead
of on the results I would be a very happy man.

Currently it takes a while to walk the collection to determine what is new, and
means transferring lots of data (this query is run a lot).

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :

Hi,

I'm getting things like OOPS-1159EC124 when I try and loop this,
so it's not going to work to have to query the whole thing.

I can break it down by series for now, but I'd love to be able
to filter by date to make it more efficient.

Thanks,

James

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

I'll add the date filtering soon, nice idea.

Changed in soyuz:
assignee: nobody → julian-edwards
milestone: pending → 2.2.3
Revision history for this message
James Westby (james-w) wrote : Re: [Bug 285008] Re: Please expose queues/recently accepted in the API

On Mon, 2009-03-09 at 15:09 +0000, Julian Edwards wrote:
> I'll add the date filtering soon, nice idea.

Thanks, that will be great.

James

Changed in soyuz:
status: Triaged → In Progress
Revision history for this message
Julian Edwards (julian-edwards) wrote :

date filtering added in r7998. See the new "published_since_date" parameter.

Changed in soyuz:
status: In Progress → Fix Committed
Revision history for this message
William Grant (wgrant) wrote :

On Thu, 2009-03-19 at 16:55 +0000, Julian Edwards wrote:
> date filtering added in r7998. See the new "published_since_date"
> parameter.
>
> ** Changed in: soyuz
> Status: In Progress => Fix Committed

Wouldn't it be more useful to have a parameter that checks any of the
dates? Special-casing it to the publishing date doesn't seem useful,
when I could just search for anything with status Published that has had
its state changed since some date.

Celso Providelo (cprov)
Changed in soyuz:
status: Fix Committed → Fix Released
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.