launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #06170
[Merge] lp:~wgrant/launchpad/bug-911520 into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/bug-911520 into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #911520 in Launchpad itself: "Pruning fails to find any references, deleting all OOPSes older than a week"
https://bugs.launchpad.net/launchpad/+bug/911520
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/bug-911520/+merge/90040
14:18:30 < lifeless> wgrant: I'm curious what is mangling the case in the first place; is it just fimble-fingered copy-pastes ?
14:18:37 < wgrant> lifeless: Hmm?
14:18:47 < wgrant> lifeless: Your LP API upper()s them before they're returned.
14:18:59 < lifeless> wgrant: it does? Ok, so I am stupid.
14:19:26 < lifeless> I have -no- idea what I was thinking.
14:19:50 < lifeless> just checking the schema
14:20:04 < wgrant> oops-tools was already upper()ing them in parts.
14:20:26 < StevenK> wgrant: So I guess I write a IBugTag and then a tales adapter?
14:20:45 < lifeless> wgrant: that was eliminated a while ago
14:20:50 < wgrant> StevenK: No. There's no sensible way to do a fmt:url here.
14:21:00 < lifeless> wgrant: it does that on input only, for old-style oopses
14:21:12 < lifeless> wgrant: the db is case sensitive, and indexed case sensitively
14:21:13 < wgrant> lifeless: Ah, right, I remember that now.
14:21:28 < lifeless> wgrant: I'd fix the API TBH
14:21:48 < wgrant> I only didn't fix it because I presumed you had your reasons :)
14:21:58 < wgrant> I'll not land the datedir-repo fix, then.
14:22:04 * lifeless is apparently a camel toenail smoking crackhead
14:22:06 < wgrant> Just cowboy it and prune to get us out of immediate peril..
14:22:17 < wgrant> And fix the API this afternoon :)
14:22:28 < lifeless> which is another way to say I have -no- idea why I did that. Probably to make some test pass or something
--
https://code.launchpad.net/~wgrant/launchpad/bug-911520/+merge/90040
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/bug-911520 into lp:launchpad.
=== modified file 'lib/lp/registry/model/oopsreferences.py'
--- lib/lp/registry/model/oopsreferences.py 2011-12-30 06:14:56 +0000
+++ lib/lp/registry/model/oopsreferences.py 2012-01-25 04:14:29 +0000
@@ -76,6 +76,6 @@
cur.execute(query)
for content in (row[0] for row in cur.fetchall()):
for oops in oops_re.findall(content):
- referenced_codes.add(oops.upper())
+ referenced_codes.add(oops)
return referenced_codes
=== modified file 'lib/lp/registry/tests/test_distribution.py'
--- lib/lp/registry/tests/test_distribution.py 2011-12-30 06:14:56 +0000
+++ lib/lp/registry/tests/test_distribution.py 2012-01-25 04:14:29 +0000
@@ -595,7 +595,7 @@
now = datetime.datetime.now(tz=pytz.utc)
day = datetime.timedelta(days=1)
self.failUnlessEqual(
- [oopsid.upper()],
+ [oopsid],
ws_distro.findReferencedOOPS(start_date=now - day, end_date=now))
self.failUnlessEqual(
[],
=== modified file 'lib/lp/registry/tests/test_oopsreferences.py'
--- lib/lp/registry/tests/test_oopsreferences.py 2012-01-01 02:58:52 +0000
+++ lib/lp/registry/tests/test_oopsreferences.py 2012-01-25 04:14:29 +0000
@@ -40,7 +40,7 @@
now = datetime.now(tz=utc)
day = timedelta(days=1)
self.failUnlessEqual(
- set([oopsid.upper()]),
+ set([oopsid]),
referenced_oops(now - day, now, "product=1", {}))
self.failUnlessEqual(
set(),
@@ -54,7 +54,7 @@
now = datetime.now(tz=utc)
day = timedelta(days=1)
self.failUnlessEqual(
- set([oopsid.upper()]),
+ set([oopsid]),
referenced_oops(now - day, now, "product=1", {}))
self.failUnlessEqual(
set(),
@@ -69,7 +69,7 @@
now = datetime.now(tz=utc)
day = timedelta(days=1)
self.failUnlessEqual(
- set([oopsid.upper()]),
+ set([oopsid]),
referenced_oops(now - day, now, "product=1", {}))
self.failUnlessEqual(
set(),
@@ -84,7 +84,7 @@
now = datetime.now(tz=utc)
day = timedelta(days=1)
self.failUnlessEqual(
- set([oopsid.upper()]),
+ set([oopsid]),
referenced_oops(now - day, now, "product=1", {}))
self.failUnlessEqual(
set(),
@@ -97,7 +97,7 @@
now = datetime.now(tz=utc)
day = timedelta(days=1)
self.failUnlessEqual(
- set([oopsid.upper()]),
+ set([oopsid]),
referenced_oops(now - day, now, "product=%(product)s",
{'product': question.product.id}))
self.failUnlessEqual(
@@ -125,7 +125,7 @@
now = datetime.now(tz=utc)
day = timedelta(days=1)
self.failUnlessEqual(
- set([oopsid.upper()]),
+ set([oopsid]),
referenced_oops(now - day, now, "product=%(product)s",
{'product': question.product.id}))
self.failUnlessEqual(
@@ -142,7 +142,7 @@
now = datetime.now(tz=utc)
day = timedelta(days=1)
self.failUnlessEqual(
- set([oopsid.upper()]),
+ set([oopsid]),
referenced_oops(now - day, now, "product=%(product)s",
{'product': question.product.id}))
self.failUnlessEqual(
@@ -160,7 +160,7 @@
now = datetime.now(tz=utc)
day = timedelta(days=1)
self.failUnlessEqual(
- set([oopsid.upper()]),
+ set([oopsid]),
referenced_oops(now - day, now, "distribution=%(distribution)s",
{'distribution': distro.id}))
self.failUnlessEqual(
@@ -183,7 +183,7 @@
now = datetime.now(tz=utc)
day = timedelta(days=1)
self.failUnlessEqual(
- set([oopsid.upper()]),
+ set([oopsid]),
referenced_oops(now - day, now, "product=1", {}))
self.failUnlessEqual(
set([]),
=== modified file 'lib/lp/registry/tests/test_product.py'
--- lib/lp/registry/tests/test_product.py 2012-01-01 02:58:52 +0000
+++ lib/lp/registry/tests/test_product.py 2012-01-25 04:14:29 +0000
@@ -488,7 +488,7 @@
now = datetime.datetime.now(tz=pytz.utc)
day = datetime.timedelta(days=1)
self.failUnlessEqual(
- [oopsid.upper()],
+ [oopsid],
ws_product.findReferencedOOPS(start_date=now - day, end_date=now))
self.failUnlessEqual(
[],