Merge lp:~adeuring/launchpad/no-feng-shui-in-the-server-room into lp:launchpad

Proposed by Abel Deuring
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: 11621
Proposed branch: lp:~adeuring/launchpad/no-feng-shui-in-the-server-room
Merge into: lp:launchpad
Diff against target: 112 lines (+0/-92)
3 files modified
lib/canonical/launchpad/pagetests/standalone/xx-librarian-upload-errors.txt (+0/-60)
lib/canonical/launchpad/templates/launchpad-librarianfailure.pt (+0/-23)
lib/canonical/launchpad/zcml/launchpad.zcml (+0/-9)
To merge this branch: bzr merge lp:~adeuring/launchpad/no-feng-shui-in-the-server-room
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+36427@code.launchpad.net

Commit message

removed the special page template for Librarian related failures.

Description of the change

(11:49:07) lifeless: adeuring: regarding the librarian OOPS ID change
(11:49:14) lifeless: adeuring: could we just delete that template altogether ?
(11:49:20) lifeless: adeuring: and stop special casing it?
(11:49:43) adeuring: lifeless: yeah, I wondered too if we really needed it. but...
(11:49:51) adeuring: there might be one reason:
(11:49:58) lifeless: adeuring: if you'd like to delete it, +1 from me :)
(11:50:57) adeuring: lifeless: well, these errors involve another machine, the librarian server, so they can occur due to reasons like hardware failures, network problems etc
(11:51:09) lifeless: adeuring: so do all our requests.
(11:51:23) lifeless: adeuring: (the database server is another machine ...)
(11:51:28) adeuring: well, yes, but there one more machine involved that usually
(11:51:49) lifeless: true, but its not a unique thing
(11:51:53) lifeless: its just more of the same
(11:51:59) lifeless: global searches use google
(11:52:08) lifeless: gpg key checking uses the keyserver
(11:52:47) adeuring: hrmm, yeah... ok, I delete it. Though I'll be missing the "feng shui in the server room" message ;)

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

Might be nice to check (manually) that it does generate and show an oops without this - and then land it!

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

yes, i checked that before I sumitted the branch ;) (changed the upload port number in configs/development/launchpad-lazr.conf and uploaded a bug attachment)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== removed file 'lib/canonical/launchpad/pagetests/standalone/xx-librarian-upload-errors.txt'
--- lib/canonical/launchpad/pagetests/standalone/xx-librarian-upload-errors.txt 2010-09-22 15:49:41 +0000
+++ lib/canonical/launchpad/pagetests/standalone/xx-librarian-upload-errors.txt 1970-01-01 00:00:00 +0000
@@ -1,60 +0,0 @@
1Librarian errors
2================
3
4Librarian errors are shown in a special error page. We record OOPSes
5for these failures and display the OOPS ID in the error message.
6
7 >>> from canonical.config import config
8 >>> post_data = r"""
9 ... POST /firefox/+bug/1/+addcomment HTTP/1.1
10 ... Authorization: Basic Zm9vLmJhckBjYW5vbmljYWwuY29tOnRlc3Q=
11 ... Content-Type: multipart/form-data; boundary=---------------------------482515227376903752137397980
12 ...
13 ... -----------------------------482515227376903752137397980
14 ... Content-Disposition: form-data; name="field.subject"
15 ...
16 ... Re: Firefox does not support SVG
17 ... -----------------------------482515227376903752137397980
18 ... Content-Disposition: form-data; name="field.comment"
19 ...
20 ... -----------------------------482515227376903752137397980
21 ... Content-Disposition: form-data; name="field.filecontent.used"
22 ...
23 ... -----------------------------482515227376903752137397980
24 ... Content-Disposition: form-data; name="field.filecontent"; filename="foo.txt"
25 ... Content-Type: text/plain
26 ...
27 ... file content
28 ...
29 ... -----------------------------482515227376903752137397980
30 ... Content-Disposition: form-data; name="field.patch.used"
31 ...
32 ... -----------------------------482515227376903752137397980
33 ... Content-Disposition: form-data; name="field.attachment_description"
34 ...
35 ... -----------------------------482515227376903752137397980
36 ... Content-Disposition: form-data; name="field.actions.save"
37 ...
38 ... Post Comment
39 ... -----------------------------482515227376903752137397980--
40 ... """
41 >>> real_upload_port = config.librarian.upload_port
42 >>> # We can force a Librarian error by setting the Librarian upload
43 >>> # port to the download port.
44 >>> config.librarian.update(
45 ... [('upload_port', str(config.librarian.download_port))])
46 []
47 >>> response = http(post_data)
48 >>> print extract_text(response.getOutput())
49 HTTP/1.1 500 Internal Server Error
50 ...
51 We've recorded what happened. The error ID is:
52 OOPS-...
53 Traceback (most recent call last):
54 ...
55 UploadFailed: Server said: foo.txt 501 Not Implemented<br />
56 ...
57
58 >>> config.librarian.update(
59 ... [('upload_port', str(real_upload_port))])
60 []
610
=== removed file 'lib/canonical/launchpad/templates/launchpad-librarianfailure.pt'
--- lib/canonical/launchpad/templates/launchpad-librarianfailure.pt 2010-09-22 15:49:41 +0000
+++ lib/canonical/launchpad/templates/launchpad-librarianfailure.pt 1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
1<html
2 xmlns="http://www.w3.org/1999/xhtml"
3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 metal:use-macro="view/macro:page/locationless"
7 i18n:domain="launchpad"
8>
9 <body>
10 <div class="top-portlet" metal:fill-slot="main">
11 <h1 class="exception">Sorry, you can't do this right now</h1>
12 <p>
13 Sorry, you can't upload or download files from Launchpad at the moment,
14 because we're doing feng shui in the server room. Normal service will
15 resume within an hour.
16 </p>
17 <p>We've recorded what happened. The error ID is:
18 <tal:oops replace="structure view/oops_id_text" />
19 </p>
20 <tal:replace tal:replace="structure view/maybeShowTraceback" />
21 </div>
22 </body>
23</html>
240
=== modified file 'lib/canonical/launchpad/zcml/launchpad.zcml'
--- lib/canonical/launchpad/zcml/launchpad.zcml 2010-09-20 16:45:03 +0000
+++ lib/canonical/launchpad/zcml/launchpad.zcml 2010-09-23 10:16:17 +0000
@@ -118,15 +118,6 @@
118 class="canonical.launchpad.webapp.error.TranslationUnavailableView"118 class="canonical.launchpad.webapp.error.TranslationUnavailableView"
119 />119 />
120120
121 <!-- LibrarianFailure -->
122 <browser:page
123 for="canonical.librarian.interfaces.LibrarianFailure"
124 name="index.html"
125 permission="zope.Public"
126 template="../templates/launchpad-librarianfailure.pt"
127 class="canonical.launchpad.webapp.error.SystemErrorView"
128 />
129
130 <!-- ReadOnlyModeViolation -->121 <!-- ReadOnlyModeViolation -->
131 <browser:page122 <browser:page
132 for="canonical.launchpad.webapp.interfaces.ReadOnlyModeViolation"123 for="canonical.launchpad.webapp.interfaces.ReadOnlyModeViolation"