+upstreamreport oopses for some distributions

Bug #277118 reported by Matthew Paul Thomas
10
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Abel Deuring
Arch Linux
Invalid
Undecided
Unassigned

Bug Description

These URLs return valid Launchpad pages:
* https://launchpad.net/ubuntu/+upstreamreport
* https://launchpad.net/zubuntu/+upstreamreport
* https://launchpad.net/altlinux/+upstreamreport

But these URLs consistently return an "Oops!" error page:
* https://launchpad.net/baltix/+upstreamreport (e.g. OOPS-1006F1883)
* https://launchpad.net/elbuntu/+upstreamreport (e.g. OOPS-1006E1882)
* https://launchpad.net/fluxbuntu/+upstreamreport (e.g. OOPS-1006A2235)
* https://launchpad.net/archlinux/+upstreamreport (e.g. OOPS-1006F1891)

NoCanonicalUrl: No url for None because None broke the chain.

Related branches

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

It seems as though any distribution returns an oops unless (a) it's Ubuntu or (b) it has zero bugs filed against it in Launchpad.

Graham Binns (gmb)
Changed in malone:
status: New → Triaged
Changed in malone:
importance: Undecided → Low
Changed in launchpad:
importance: Low → Critical
Abel Deuring (adeuring)
Changed in launchpad:
assignee: nobody → Abel Deuring (adeuring)
status: Triaged → In Progress
Revision history for this message
Abel Deuring (adeuring) wrote :

The OOPS occurs for distributions where currentseries is None.

Revision history for this message
Robert Collins (lifeless) wrote :

There is a current discussion on the list about simplying the bug model; in it I propose that we do for distros what we do for products: we make sure the minimum data present is viable to run without special cases. For products this is:
 - every product has a development_focus

It might not be sufficient, but if it is, consider fixing this bug my making sure that:
 - every distribution has a currentseries
(and enforcing it in the UI)

I've chatted with Julian and soyuz won't care; its the only thing that I expected to be particularly invested in the state of $arbitrary distributions.

Revision history for this message
Abel Deuring (adeuring) wrote :

I see several ways to fix this bug:

1. As Robert suggests, we can enforce the existence of a distroseries.

2. We can simply "protect" the failing line

    self.packaging_url = canonical_url(self.dssp)

with a "if self.dssp is not None". Note that packaging_url
is only used in lp/bugs/templates/distribution-upstream-bug-report.pt:

    <td align="center" class="bad" colspan="4">
        Missing corresponding project.
        <a href="/projects"><small>(find)</small></a>
        <a tal:condition="item/dssp"
           tal:attributes="href item/packaging_url">
           <small>(link)</small></a>
    </td>

So, the template already expects that dssp can be None, and
not setting packaging_url should not cause any other problems.

3. We might consider to simply not show anything at all
on the +upstreamreport page if no distroseries/current series
exists: If this distribution does not have any series, it
indicates that there is no really interesting information for
the upstream projects, at least on Launchpad. (Well, we should
not display an empty page, but something like "sorry, this
distribution does not use Launchpad for development, so
there is not interesting upstream data available")

In any case, we should fix this inconsistency in
lp.bugs.browser.distribution_upstream_bug_report.py:

in DistributionUpstreamBugReport.initialize():

            if self.current_distro_series:
                dssp = self.current_distro_series.getSourcePackage(
                    dsp.sourcepackagename)
            else:
                dssp = None
            [...]
            item = PackageBugReportData(dsp, dssp, ...)

in PackageBugReportData.__init__self, dsp, dssp, ...):
        self.dssp = dssp
        self.packaging_url = canonical_url(self.dssp) + "/+edit-packaging"

So, we should drop the "if self.current_distro_series" check (if we
ensure that a series exists for each distribution, or we still allow
distributions without a seris, and protect the failing canical_url()
call with "if self.dssp is not None".

Not sure, what the Right Launchpad Way (tm) is...

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

> "sorry, this distribution does not use Launchpad for development"

Would get my vote. Let's not create a default currentseries, that's a greasy hack!

Revision history for this message
Curtis Hovey (sinzui) wrote :

Lets not expose this report to any distro that does not us Launchpad. The bug report is predicated on packaging links. Only Ubuntu and Debian have published packages that can be linked too, derivative distros will have them soon.

Changed in archlinux:
status: New → Invalid
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 277118] Re: +upstreamreport oopses for some distributions

On Fri, Apr 22, 2011 at 3:51 AM, Julian Edwards
<email address hidden> wrote:
>> "sorry, this distribution does not use Launchpad for development"
>
> Would get my vote.  Let's not create a default currentseries, that's a
> greasy hack!

FWIW I'm fine with any of the options. I want to note though that
enforcing a default currentseries is:
 - done for products
 - possibly going to be done for distros anyway as part of making the
bugtask schema leaner and faster.

Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
milestone: none → 11.05
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
tags: added: qa-ok
removed: qa-needstesting
Brad Crittenden (bac)
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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