"Launchpad could not mirror this branch" error overwhelms the branch page

Bug #105570 reported by Andrew Bennetts
2
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Undecided
Unassigned
Launchpad itself
Fix Released
Medium
Jonathan Lange

Bug Description

https://code.launchpad.net/~bzr/bzr-webserve/webserve-dev currently has a very very long message about being unable to mirror the branch:

"Launchpad could not mirror this branch 5 hours ago. The error was: Unknown branch format: '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n<html>..." (a heap of HTML and inline CSS elided).

This is ugly, and also obscures the other interesting information on the page, i.e. you need to scroll for more than a page to see the "Recent revisions".

I'm attaching a screenshot for posterity.

Revision history for this message
Andrew Bennetts (spiv) wrote :

Screenshot.

Changed in launchpad-bazaar:
status: Unconfirmed → Confirmed
Revision history for this message
David Allouche (ddaa) wrote :

Wow! That's a really funny screenshot.

The underlying problem is that bzr should truncate the text of UnknownFormatError exceptions when it is too long.

This problem happens in cases like this when the URL is is bogus and points to something that's not a branch, causing the web server to send a full web page. Presumably the web server is also bogus for not sending an 404 error.

Revision history for this message
David Allouche (ddaa) wrote :

Medium importance on launchpad-bazaar: there's only one branch with this problem, and it's merely ugly, not blocking. The page template should truncate the error message to a reasonable length (e.g. 1000 chars).

Changed in launchpad-bazaar:
importance: Undecided → Medium
Revision history for this message
Aaron Bentley (abentley) wrote :

I'm not sure that bzrlib should take care of the truncation. Surely the user-facing code (the bzr executable, or Launchpad) has a better idea of when to truncate and how much.

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 105570] Re: "Launchpad could not mirror this branch" error overwhelms the branch page

Maybe.

I could also say that the branch format code knows that it is looking
for a single line, not a whole page. So it knows right away that the
'branch-format' file is not correct when the first line doesn't match.

Depending on the abstraction, it is hard for the high-level code to know
how to format the error it is getting. Or it has to special case every
possible error that is being raised.

It is possible to do so, but I can see an argument either way.

John
=:->

Revision history for this message
Andrew Bennetts (spiv) wrote :

I agree with John. It's not useful as a bzr user to have my terminal flooded
with HTML that scrolls the interesting part of the error ("Unknown branch
format", and the URL) off the screen, and possibly right out of my scrollback.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 105570] Re: "Launchpad could not mirror this branch" error overwhelms the branch page

On Wed, 2007-04-11 at 18:53 +0000, John A Meinel wrote:
> Maybe.
>
> I could also say that the branch format code knows that it is looking
> for a single line, not a whole page. So it knows right away that the
> 'branch-format' file is not correct when the first line doesn't match.
>
> Depending on the abstraction, it is hard for the high-level code to know
> how to format the error it is getting. Or it has to special case every
> possible error that is being raised.
>
> It is possible to do so, but I can see an argument either way.

I think bzr should not hide data.

Lp is completely capable of trimming the data for display.

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

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

Seems clear its not a bzrlib issue.

Changed in bzr:
status: Unconfirmed → Rejected
Jonathan Lange (jml)
Changed in launchpad-bazaar:
assignee: nobody → jml
status: Confirmed → In Progress
Revision history for this message
Jonathan Lange (jml) wrote :

r4223

Changed in launchpad-bazaar:
status: In Progress → Fix Committed
Jonathan Lange (jml)
Changed in launchpad-bazaar:
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.