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
1=== removed file 'lib/canonical/launchpad/pagetests/standalone/xx-librarian-upload-errors.txt'
2--- lib/canonical/launchpad/pagetests/standalone/xx-librarian-upload-errors.txt 2010-09-22 15:49:41 +0000
3+++ lib/canonical/launchpad/pagetests/standalone/xx-librarian-upload-errors.txt 1970-01-01 00:00:00 +0000
4@@ -1,60 +0,0 @@
5-Librarian errors
6-================
7-
8-Librarian errors are shown in a special error page. We record OOPSes
9-for these failures and display the OOPS ID in the error message.
10-
11- >>> from canonical.config import config
12- >>> post_data = r"""
13- ... POST /firefox/+bug/1/+addcomment HTTP/1.1
14- ... Authorization: Basic Zm9vLmJhckBjYW5vbmljYWwuY29tOnRlc3Q=
15- ... Content-Type: multipart/form-data; boundary=---------------------------482515227376903752137397980
16- ...
17- ... -----------------------------482515227376903752137397980
18- ... Content-Disposition: form-data; name="field.subject"
19- ...
20- ... Re: Firefox does not support SVG
21- ... -----------------------------482515227376903752137397980
22- ... Content-Disposition: form-data; name="field.comment"
23- ...
24- ... -----------------------------482515227376903752137397980
25- ... Content-Disposition: form-data; name="field.filecontent.used"
26- ...
27- ... -----------------------------482515227376903752137397980
28- ... Content-Disposition: form-data; name="field.filecontent"; filename="foo.txt"
29- ... Content-Type: text/plain
30- ...
31- ... file content
32- ...
33- ... -----------------------------482515227376903752137397980
34- ... Content-Disposition: form-data; name="field.patch.used"
35- ...
36- ... -----------------------------482515227376903752137397980
37- ... Content-Disposition: form-data; name="field.attachment_description"
38- ...
39- ... -----------------------------482515227376903752137397980
40- ... Content-Disposition: form-data; name="field.actions.save"
41- ...
42- ... Post Comment
43- ... -----------------------------482515227376903752137397980--
44- ... """
45- >>> real_upload_port = config.librarian.upload_port
46- >>> # We can force a Librarian error by setting the Librarian upload
47- >>> # port to the download port.
48- >>> config.librarian.update(
49- ... [('upload_port', str(config.librarian.download_port))])
50- []
51- >>> response = http(post_data)
52- >>> print extract_text(response.getOutput())
53- HTTP/1.1 500 Internal Server Error
54- ...
55- We've recorded what happened. The error ID is:
56- OOPS-...
57- Traceback (most recent call last):
58- ...
59- UploadFailed: Server said: foo.txt 501 Not Implemented<br />
60- ...
61-
62- >>> config.librarian.update(
63- ... [('upload_port', str(real_upload_port))])
64- []
65
66=== removed file 'lib/canonical/launchpad/templates/launchpad-librarianfailure.pt'
67--- lib/canonical/launchpad/templates/launchpad-librarianfailure.pt 2010-09-22 15:49:41 +0000
68+++ lib/canonical/launchpad/templates/launchpad-librarianfailure.pt 1970-01-01 00:00:00 +0000
69@@ -1,23 +0,0 @@
70-<html
71- xmlns="http://www.w3.org/1999/xhtml"
72- xmlns:tal="http://xml.zope.org/namespaces/tal"
73- xmlns:metal="http://xml.zope.org/namespaces/metal"
74- xmlns:i18n="http://xml.zope.org/namespaces/i18n"
75- metal:use-macro="view/macro:page/locationless"
76- i18n:domain="launchpad"
77->
78- <body>
79- <div class="top-portlet" metal:fill-slot="main">
80- <h1 class="exception">Sorry, you can't do this right now</h1>
81- <p>
82- Sorry, you can't upload or download files from Launchpad at the moment,
83- because we're doing feng shui in the server room. Normal service will
84- resume within an hour.
85- </p>
86- <p>We've recorded what happened. The error ID is:
87- <tal:oops replace="structure view/oops_id_text" />
88- </p>
89- <tal:replace tal:replace="structure view/maybeShowTraceback" />
90- </div>
91- </body>
92-</html>
93
94=== modified file 'lib/canonical/launchpad/zcml/launchpad.zcml'
95--- lib/canonical/launchpad/zcml/launchpad.zcml 2010-09-20 16:45:03 +0000
96+++ lib/canonical/launchpad/zcml/launchpad.zcml 2010-09-23 10:16:17 +0000
97@@ -118,15 +118,6 @@
98 class="canonical.launchpad.webapp.error.TranslationUnavailableView"
99 />
100
101- <!-- LibrarianFailure -->
102- <browser:page
103- for="canonical.librarian.interfaces.LibrarianFailure"
104- name="index.html"
105- permission="zope.Public"
106- template="../templates/launchpad-librarianfailure.pt"
107- class="canonical.launchpad.webapp.error.SystemErrorView"
108- />
109-
110 <!-- ReadOnlyModeViolation -->
111 <browser:page
112 for="canonical.launchpad.webapp.interfaces.ReadOnlyModeViolation"