launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #05383
[Merge] lp:~lifeless/python-oops-tools/amqp-polish into lp:python-oops-tools
Robert Collins has proposed merging lp:~lifeless/python-oops-tools/amqp-polish into lp:python-oops-tools.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #884571 in python-oops-tools: "amqp2disk oopses with lower case hashes are not accessible"
https://bugs.launchpad.net/python-oops-tools/+bug/884571
For more details, see:
https://code.launchpad.net/~lifeless/python-oops-tools/amqp-polish/+merge/81083
The code path that the linked bug thought was broken isn't. This changes the test environment a little to cover the case we exercise (which already worked).
--
https://code.launchpad.net/~lifeless/python-oops-tools/amqp-polish/+merge/81083
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~lifeless/python-oops-tools/amqp-polish into lp:python-oops-tools.
=== modified file 'src/oopstools/NEWS.txt'
--- src/oopstools/NEWS.txt 2011-11-02 20:25:00 +0000
+++ src/oopstools/NEWS.txt 2011-11-02 21:35:28 +0000
@@ -8,10 +8,6 @@
* Flush stdout when logging an OOPS receipt in amqp2disk.
(Robert Collins, #884569)
-* Force received OOPS ids to uppercase in amqp2disk to fit in with the UI
- - otherwise they cannot be accessed.
- (Robert Collins, #884571)
-
* OOPS reports that don't meet the normal rules for req_vars are handled
a bit better (Robert Collins, William Grant, #885416)
=== modified file 'src/oopstools/oops/test/bug-672984.txt'
--- src/oopstools/oops/test/bug-672984.txt 2011-10-13 20:18:51 +0000
+++ src/oopstools/oops/test/bug-672984.txt 2011-11-02 21:35:28 +0000
@@ -19,7 +19,7 @@
>>> pprint(
... [(oops, oops.http_method) for oops in
... sorted(found_oopses, key=lambda oops: oops.date)])
- [(<Oops: OOPS-1308X1>, u'1234567890')]
+ [(<Oops: OOPS-1308x1>, u'1234567890')]
Reset the database.
=== modified file 'src/oopstools/oops/test/db-summary.txt'
--- src/oopstools/oops/test/db-summary.txt 2011-10-24 05:21:01 +0000
+++ src/oopstools/oops/test/db-summary.txt 2011-11-02 21:35:28 +0000
@@ -45,10 +45,10 @@
>>> print get_section_contents("Top 10 Durations", webapp_summary)
26.46s OOPS-689S4 FooBar:+questions
20.67s OOPS-689S6 FooBar:+bug-text
- 0.28s OOPS-1308X1 Unknown
+ 0.28s OOPS-1308x1 Unknown
>>> print get_section_contents("Top 10 Statement Counts", webapp_summary)
- 14 OOPS-1308X1 Unknown
+ 14 OOPS-1308x1 Unknown
4 OOPS-689S6 FooBar:+bug-text
3 OOPS-689S4 FooBar:+questions
=== modified file 'src/oopstools/oops/test/files/oops-sample/dir2/2009-07-31/72358.X1'
--- src/oopstools/oops/test/files/oops-sample/dir2/2009-07-31/72358.X1 2011-10-13 20:18:51 +0000
+++ src/oopstools/oops/test/files/oops-sample/dir2/2009-07-31/72358.X1 2011-11-02 21:35:28 +0000
@@ -1,4 +1,4 @@
-Oops-Id: OOPS-1308X1
+Oops-Id: OOPS-1308x1
Exception-Type: NotFound
Exception-Value: Object: <canonical.launchpad.webapp.publisher.RootObject object at 0x40b83fec>, name: u'foobar'
Date: 2009-07-31T20:05:58.274049+00:00
=== modified file 'src/oopstools/oops/test/oops.txt'
--- src/oopstools/oops/test/oops.txt 2011-10-13 20:18:51 +0000
+++ src/oopstools/oops/test/oops.txt 2011-11-02 21:35:28 +0000
@@ -262,7 +262,7 @@
Information about which Storm store is being used by the application is
recorded together with the SQL statement.
- >>> oops_with_db_id = Oops.objects.get(oopsid__exact="OOPS-1308X1")
+ >>> oops_with_db_id = Oops.objects.get(oopsid__exact="OOPS-1308x1")
>>> for start, stop, db_id, statement in oops_with_db_id.statements:
... print start, stop, db_id, statement
4 5 session UPDATE SessionData SET last_accessed ...
=== modified file 'src/oopstools/oops/test/pagetest.txt'
--- src/oopstools/oops/test/pagetest.txt 2011-10-13 20:18:51 +0000
+++ src/oopstools/oops/test/pagetest.txt 2011-11-02 21:35:28 +0000
@@ -25,15 +25,15 @@
Using a valid OOPS id the OOPS page is correctly rendered.
- >>> b.getControl(name="oopsid").value = "OOPS-689S4"
+ >>> b.getControl(name="oopsid").value = "OOPS-1308X1"
>>> b.getControl("Search OOPS").click()
>>> b.url
- 'http://localhost/oops/?oopsid=OOPS-689S4'
+ 'http://localhost/oops/?oopsid=OOPS-1308X1'
>>> print b.contents
<...
- ...<title>OOPS-689S4</title>...
+ ...<title>OOPS-1308x1</title>...
...
...<div id="request_variables">...
...
@@ -43,29 +43,29 @@
It also accepts the OOPS id without the "OOPS-" part.
>>> b.open('http://localhost/oops/')
- >>> b.getControl(name="oopsid").value = "689S4"
+ >>> b.getControl(name="oopsid").value = "1308X1"
>>> b.getControl("Search OOPS").click()
>>> b.url
- 'http://localhost/oops/?oopsid=689S4'
+ 'http://localhost/oops/?oopsid=1308X1'
>>> print b.contents
<...
- ...<title>OOPS-689S4</title>...
+ ...<title>OOPS-1308x1</title>...
...
It doesn't care about case.
>>> b.open('http://localhost/oops/')
- >>> b.getControl(name="oopsid").value = "oops-689S4"
+ >>> b.getControl(name="oopsid").value = "oops-1308x1"
>>> b.getControl("Search OOPS").click()
>>> b.url
- 'http://localhost/oops/?oopsid=oops-689S4'
+ 'http://localhost/oops/?oopsid=oops-1308x1'
>>> print b.contents
<...
- ...<title>OOPS-689S4</title>...
+ ...<title>OOPS-1308x1</title>...
...
It will also allow lower-case IDs with no OOPS- prefix, as used in ISD.
=== modified file 'src/oopstools/scripts/amqp2disk.py'
--- src/oopstools/scripts/amqp2disk.py 2011-11-01 03:06:49 +0000
+++ src/oopstools/scripts/amqp2disk.py 2011-11-02 21:35:28 +0000
@@ -120,8 +120,6 @@
# the first publisher will either inherit or assign, so this should be
# impossible.
assert report['id'] is not None
- # Fit in with the upper-case assumption in oops-tools.
- report['id'] = report['id'].upper()
# Some fallback methods could lead to duplicate paths into the DB: exit
# early if the OOPS is already loaded.
try:
Follow ups