Merge lp:~lifeless/launchpad/bug-1011390 into lp:launchpad

Proposed by Robert Collins
Status: Merged
Approved by: Stuart Bishop
Approved revision: no longer in the source branch.
Merged at revision: 15388
Proposed branch: lp:~lifeless/launchpad/bug-1011390
Merge into: lp:launchpad
Diff against target: 77 lines (+18/-12)
3 files modified
lib/lp/app/doc/displaying-paragraphs-of-text.txt (+4/-4)
lib/lp/registry/tests/test_oopsreferences.py (+13/-7)
lib/lp/services/config/schema-lazr.conf (+1/-1)
To merge this branch: bzr merge lp:~lifeless/launchpad/bug-1011390
Reviewer Review Type Date Requested Status
Stuart Bishop (community) Approve
Review via email: mp+109559@code.launchpad.net

Commit message

Support the new oops.canonical.com

Description of the change

The existing lp-oops.canonical.com site will go into readonly mode shortly, so we should stop linking to it. This will naturally break links to older oopses which are only on the old site, because linkification can't sensibly link to both.

Along the way, we want to be sure we capture OOPS references in urls pointing to either site, so I tweaked a test upwards to support that.

The extra LOC can be offset against the 1000 credit I have coming in with memcache cleanups.

To post a comment you must log in.
Revision history for this message
Stuart Bishop (stub) wrote :

Looks good.

review: Approve
Revision history for this message
Stuart Bishop (stub) wrote :

with ec2 land

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/app/doc/displaying-paragraphs-of-text.txt'
2--- lib/lp/app/doc/displaying-paragraphs-of-text.txt 2012-04-02 05:42:19 +0000
3+++ lib/lp/app/doc/displaying-paragraphs-of-text.txt 2012-06-11 04:06:19 +0000
4@@ -431,21 +431,21 @@
5 True
6
7 >>> print test_tales('foo/fmt:text-to-html', foo=text)
8- <p><a href="https://lp-oops.canonical.com/oops.py/?oopsid=OOPS-38C23">OOPS-38C23</a></p>
9+ <p><a href="https://oops.canonical.com/oops/?oopsid=OOPS-38C23">OOPS-38C23</a></p>
10
11 OOPS references can take a number of forms:
12
13 >>> text = 'OOPS-38C23'
14 >>> print test_tales('foo/fmt:text-to-html', foo=text)
15- <p><a href="https://lp-oops.canonical.com/oops.py/?oopsid=OOPS-38C23">OOPS-38C23</a></p>
16+ <p><a href="https://oops.canonical.com/oops/?oopsid=OOPS-38C23">OOPS-38C23</a></p>
17
18 >>> text = 'OOPS-123abcdef'
19 >>> print test_tales('foo/fmt:text-to-html', foo=text)
20- <p><a href="https://lp-oops.canonical.com/oops.py/?oopsid=OOPS-123abcdef">OOPS-123abcdef</a></p>
21+ <p><a href="https://oops.canonical.com/oops/?oopsid=OOPS-123abcdef">OOPS-123abcdef</a></p>
22
23 >>> text = 'OOPS-abcdef123'
24 >>> print test_tales('foo/fmt:text-to-html', foo=text)
25- <p><a href="https://lp-oops.canonical.com/oops.py/?oopsid=OOPS-abcdef123">OOPS-abcdef123</a></p>
26+ <p><a href="https://oops.canonical.com/oops/?oopsid=OOPS-abcdef123">OOPS-abcdef123</a></p>
27
28 If the configuration value doesn't end with a slash, we won't add one. This
29 lets us configure the URL to use query parameters.
30
31=== modified file 'lib/lp/registry/tests/test_oopsreferences.py'
32--- lib/lp/registry/tests/test_oopsreferences.py 2012-01-25 04:01:19 +0000
33+++ lib/lp/registry/tests/test_oopsreferences.py 2012-06-11 04:06:19 +0000
34@@ -173,17 +173,23 @@
35 # a reference even though they are not formatted specially - this
36 # requires somewhat special handling in the reference calculation
37 # function.
38- oopsid = "OOPS-abcdef1234"
39- bug = self.factory.makeBug()
40- with person_logged_in(bug.owner):
41- bug.description = (
42+ oopsid_old = "OOPS-abcdef1234"
43+ oopsid_new = "OOPS-4321"
44+ bug_old = self.factory.makeBug()
45+ bug_new = self.factory.makeBug()
46+ with person_logged_in(bug_old.owner):
47+ bug_old.description = (
48 "foo https://lp-oops.canonical.com/oops.py?oopsid=%s bar"
49- % oopsid)
50- self.store.flush()
51+ % oopsid_old)
52+ with person_logged_in(bug_new.owner):
53+ bug_new.description = (
54+ "foo https://oops.canonical.com/oops.py?oopsid=%s bar"
55+ % oopsid_new)
56+ self.store.flush()
57 now = datetime.now(tz=utc)
58 day = timedelta(days=1)
59 self.failUnlessEqual(
60- set([oopsid]),
61+ set([oopsid_old, oopsid_new]),
62 referenced_oops(now - day, now, "product=1", {}))
63 self.failUnlessEqual(
64 set([]),
65
66=== modified file 'lib/lp/services/config/schema-lazr.conf'
67--- lib/lp/services/config/schema-lazr.conf 2012-06-03 23:11:40 +0000
68+++ lib/lp/services/config/schema-lazr.conf 2012-06-11 04:06:19 +0000
69@@ -986,7 +986,7 @@
70
71 # OOPS reports root for linking to OOPS reports.
72 # datatype: urlbase
73-oops_root_url: https://lp-oops.canonical.com/oops.py/?oopsid=
74+oops_root_url: https://oops.canonical.com/oops/?oopsid=
75
76 # Domain part of the bugs' email addresses. All email addresses in
77 # this domain should get redirected to the MailIntoLaunchpad handler.