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
=== modified file 'lib/lp/app/doc/displaying-paragraphs-of-text.txt'
--- lib/lp/app/doc/displaying-paragraphs-of-text.txt 2012-04-02 05:42:19 +0000
+++ lib/lp/app/doc/displaying-paragraphs-of-text.txt 2012-06-11 04:06:19 +0000
@@ -431,21 +431,21 @@
431 True431 True
432432
433 >>> print test_tales('foo/fmt:text-to-html', foo=text)433 >>> print test_tales('foo/fmt:text-to-html', foo=text)
434 <p><a href="https://lp-oops.canonical.com/oops.py/?oopsid=OOPS-38C23">OOPS-38C23</a></p>434 <p><a href="https://oops.canonical.com/oops/?oopsid=OOPS-38C23">OOPS-38C23</a></p>
435435
436OOPS references can take a number of forms:436OOPS references can take a number of forms:
437437
438 >>> text = 'OOPS-38C23'438 >>> text = 'OOPS-38C23'
439 >>> print test_tales('foo/fmt:text-to-html', foo=text)439 >>> print test_tales('foo/fmt:text-to-html', foo=text)
440 <p><a href="https://lp-oops.canonical.com/oops.py/?oopsid=OOPS-38C23">OOPS-38C23</a></p>440 <p><a href="https://oops.canonical.com/oops/?oopsid=OOPS-38C23">OOPS-38C23</a></p>
441441
442 >>> text = 'OOPS-123abcdef'442 >>> text = 'OOPS-123abcdef'
443 >>> print test_tales('foo/fmt:text-to-html', foo=text)443 >>> print test_tales('foo/fmt:text-to-html', foo=text)
444 <p><a href="https://lp-oops.canonical.com/oops.py/?oopsid=OOPS-123abcdef">OOPS-123abcdef</a></p>444 <p><a href="https://oops.canonical.com/oops/?oopsid=OOPS-123abcdef">OOPS-123abcdef</a></p>
445445
446 >>> text = 'OOPS-abcdef123'446 >>> text = 'OOPS-abcdef123'
447 >>> print test_tales('foo/fmt:text-to-html', foo=text)447 >>> print test_tales('foo/fmt:text-to-html', foo=text)
448 <p><a href="https://lp-oops.canonical.com/oops.py/?oopsid=OOPS-abcdef123">OOPS-abcdef123</a></p>448 <p><a href="https://oops.canonical.com/oops/?oopsid=OOPS-abcdef123">OOPS-abcdef123</a></p>
449449
450If the configuration value doesn't end with a slash, we won't add one. This450If the configuration value doesn't end with a slash, we won't add one. This
451lets us configure the URL to use query parameters.451lets us configure the URL to use query parameters.
452452
=== modified file 'lib/lp/registry/tests/test_oopsreferences.py'
--- lib/lp/registry/tests/test_oopsreferences.py 2012-01-25 04:01:19 +0000
+++ lib/lp/registry/tests/test_oopsreferences.py 2012-06-11 04:06:19 +0000
@@ -173,17 +173,23 @@
173 # a reference even though they are not formatted specially - this173 # a reference even though they are not formatted specially - this
174 # requires somewhat special handling in the reference calculation174 # requires somewhat special handling in the reference calculation
175 # function.175 # function.
176 oopsid = "OOPS-abcdef1234"176 oopsid_old = "OOPS-abcdef1234"
177 bug = self.factory.makeBug()177 oopsid_new = "OOPS-4321"
178 with person_logged_in(bug.owner):178 bug_old = self.factory.makeBug()
179 bug.description = (179 bug_new = self.factory.makeBug()
180 with person_logged_in(bug_old.owner):
181 bug_old.description = (
180 "foo https://lp-oops.canonical.com/oops.py?oopsid=%s bar"182 "foo https://lp-oops.canonical.com/oops.py?oopsid=%s bar"
181 % oopsid)183 % oopsid_old)
182 self.store.flush()184 with person_logged_in(bug_new.owner):
185 bug_new.description = (
186 "foo https://oops.canonical.com/oops.py?oopsid=%s bar"
187 % oopsid_new)
188 self.store.flush()
183 now = datetime.now(tz=utc)189 now = datetime.now(tz=utc)
184 day = timedelta(days=1)190 day = timedelta(days=1)
185 self.failUnlessEqual(191 self.failUnlessEqual(
186 set([oopsid]),192 set([oopsid_old, oopsid_new]),
187 referenced_oops(now - day, now, "product=1", {}))193 referenced_oops(now - day, now, "product=1", {}))
188 self.failUnlessEqual(194 self.failUnlessEqual(
189 set([]),195 set([]),
190196
=== modified file 'lib/lp/services/config/schema-lazr.conf'
--- lib/lp/services/config/schema-lazr.conf 2012-06-03 23:11:40 +0000
+++ lib/lp/services/config/schema-lazr.conf 2012-06-11 04:06:19 +0000
@@ -986,7 +986,7 @@
986986
987# OOPS reports root for linking to OOPS reports.987# OOPS reports root for linking to OOPS reports.
988# datatype: urlbase988# datatype: urlbase
989oops_root_url: https://lp-oops.canonical.com/oops.py/?oopsid=989oops_root_url: https://oops.canonical.com/oops/?oopsid=
990990
991# Domain part of the bugs' email addresses. All email addresses in991# Domain part of the bugs' email addresses. All email addresses in
992# this domain should get redirected to the MailIntoLaunchpad handler.992# this domain should get redirected to the MailIntoLaunchpad handler.