Needlessly asks for exact package name, file size, uploaded version

Bug #1088527 reported by Matthew Paul Thomas on 2012-12-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Developer registration portal
High
Michael Nelson
Launchpad itself
Low
Michael Nelson

Bug Description

Currently the package review form for an ARB application or a commercial application both have:
* a text field for "Package name"
* a text field for "Binary file size" (bytes)
* a text field for "Uploaded version".

This text is copied from Launchpad to the form by humans, which is slow and error-prone.

Instead, when a PPA is chosen, MyApps could use the Launchpad API to:
* show a menu of packages in that PPA, and whenever you choose a package from the menu:
* fetch the file size for the package and show it read-only, and
* fetch the uploaded version, and show it read-only.

[Originally reported by David Pitkin.]

QA Notes:
 * QA for the LP api change: https://pastebin.canonical.com/85923/

Related branches

description: updated
John Pugh (jpugh) wrote :

Moved to high as this would exponentially increase reviewer efficiency.

Changed in developer-portal:
status: New → Confirmed
importance: Undecided → High
tags: added: ca-escalated
Anthony Lenton (elachuni) wrote :

Retrieving data from Launchpad would be an option for apps in a PPA, and *may* be an option for ARB apps, but it would be two separate fixes most likely.

Another issue is that on the review page you'd need to first enter the PPA and then select the package from a dropdown, which means we either submit and reload the page at that point or fetch the list of package data from LP via ajax. I'd suggest the latter.

Changed in developer-portal:
assignee: nobody → Łukasz Czyżykowski (lukasz-czyzykowski)

Currently there's no way to get the filesize from the Launchpad API. Suggested approaches were to screen-scrape ppa details page or issue HEAD to binary file URL.

Both of those require to have proper credentials for web version of Launchpad.

Additionally HEAD request seems to be treated like GET by the Launchpad, so that would be heavy weight approach (downloading every file from the PPA)

Changed in developer-portal:
assignee: Łukasz Czyżykowski (lukasz-czyzykowski) → nobody
Changed in developer-portal:
status: Confirmed → Won't Fix
Matthew Paul Thomas (mpt) wrote :

So fix the API, then! Preserving Launchpad's SLOC count shouldn't be an excuse to waste human time and money.

Changed in developer-portal:
status: Won't Fix → New
Changed in launchpad:
status: New → Triaged
importance: Undecided → Low
Michael Nelson (michael.nelson) wrote :

I think we can do this without needing to update the LP API . Here's a demo using python or wget on a public ppa:

https://pastebin.canonical.com/85510/

The auth may be an issue - I'll try with a private PPA next.

Changed in developer-portal:
assignee: nobody → Michael Nelson (michael.nelson)
Michael Nelson (michael.nelson) wrote :

So here's a way to get the size of a binary in a private PPA using the current LP API:

https://pastebin.canonical.com/85536/

It relies on two things:
 * the special sca user having a subscription to each commercial PPA (which we'd create),
 * the (standard) location of binaries for an archive at private-ppa.launchpad.net.

It may provide more value to add it to the LP api as mpt suggests, rather than using this method. I'll investigate that next.

Michael Nelson (michael.nelson) wrote :

I took a look at the LP api, and it seems pretty straight forward for us to add an include_sizes option to the LP API call for binaryFileURLs() - I'll ask wgrant (or an LP person) if that'd be ok, or whether they'd prefer a separate api method, but either way, should be cleaner (and straight-forward) than the way I pasted above. @wgrant?

William Grant (wgrant) wrote :

An extra arg to make the existing method return a list of dicts rather than a list of strings probably makes the most sense. It might almost be worth it to include hashes while you're there, but there are so many to choose from that it's probably overcomplicated.

Changed in launchpad:
status: Triaged → In Progress
assignee: nobody → Michael Nelson (michael.nelson)
description: updated
Changed in launchpad:
status: In Progress → Fix Committed
Changed in developer-portal:
status: New → In Progress
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Steve Kowalik (stevenk) on 2013-03-05
tags: added: qa-ok
removed: qa-needstesting
Steve Kowalik (stevenk) on 2013-03-08
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers