cannot call getBranches on a source package using the API

Bug #579602 reported by Ursula Junque
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Ian Booth

Bug Description

As seen on OOPS-1592EC825:
  ForbiddenAttribute: ('getBranches', <lp.registry.model.distributionsourcepackage.DistributionSourcePackage object at 0x2aaab3430cd0>)

Steps to reproduce:
>>> ubuntu = lp.distributions['ubuntu']
>>> gedit = ubuntu.getSourcePackage(name="gedit")
>>> gedit.getBranches()
HTTPError: HTTP Error 500: Internal Server Error

Related branches

affects: soyuz → launchpad-code
Revision history for this message
Tim Penhey (thumper) wrote :

It appears there is no IHasBranches for Distribution Source Packages.

Changed in launchpad-code:
status: New → Triaged
importance: Undecided → Medium
Changed in launchpad:
importance: Medium → Critical
Revision history for this message
Leonard Richardson (leonardr) wrote :

My branch to fix 271029 will get rid of the OOPS, possibly decreasing this bug's priority, but I don't think the OOPS is the problem here. That launchpadlib code in the example should actually work.

Changed in launchpad:
importance: Critical → High
summary: - Trying to getBranches of a source package using the API oopses with
- ForbiddenAttribute
+ cannot call getBranches on a source package using the API
Revision history for this message
Jonathan Lange (jml) wrote :

Why is this not Critical? It is an oops?

Revision history for this message
Martin Pool (mbp) wrote :

As of today I get a failure, but not an oops. By the letter of the law perhaps that means it's not critical, but that seems like a dissatisfying reason to deescalate the bug:

HTTPError: HTTP Error 401: Unauthorized
Response headers:
---
content-length: 108
content-type: text/plain
date: Thu, 17 Mar 2011 10:22:18 GMT
server: zope.server.http (HTTP)
status: 401
vary: Accept,Accept-Encoding
via: 1.1 wildcard.staging.launchpad.net
x-powered-by: Zope (www.zope.org), Python (www.python.org)
---
Response body:
---
('getBranches', <lp.registry.model.distributionsourcepackage.DistributionSourcePackage object at 0xa69ead0>)
---

that's also a shoddy error body.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 579602] Re: cannot call getBranches on a source package using the API

On Thu, Mar 17, 2011 at 11:23 PM, Martin Pool <email address hidden> wrote:
> As of today I get a failure, but not an oops.  By the letter of the law
> perhaps that means it's not critical, but that seems like a
> dissatisfying reason to deescalate the bug:

Its absolutely a great reason to downgrade the bug: If this API had
never OOPsed, this bug would never have been critical.

We use OOPSes to determine when we have to Jump To It and Fix A Major
Problem: it is thus important that that signal is clean, and thats why
oopses are all critical (so that when a real emergency hits we know
about it). This bug is now just a nonfunctional bit of the API, which
never was functional, and isn't muddying that diagnostic signal.

It is something we should do sooner rather than later and that is why
it is High, not Low.

If you want it done sooner, please either escalate it, or submit a patch :)

William Grant (wgrant)
tags: removed: oops
Changed in launchpad:
importance: High → Critical
tags: added: oops
Ian Booth (wallyworld)
Changed in launchpad:
status: Triaged → In Progress
assignee: nobody → Ian Booth (wallyworld)
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
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.