Merge lp:~lifeless/python-oops-tools/timeline into lp:python-oops-tools

Proposed by Robert Collins
Status: Merged
Approved by: Robert Collins
Approved revision: 46
Merged at revision: 43
Proposed branch: lp:~lifeless/python-oops-tools/timeline
Merge into: lp:python-oops-tools
Diff against target: 135 lines (+30/-3)
6 files modified
buildout-templates/bin/oopstools.wsgi.in (+14/-1)
buildout-templates/src/oopstools/settings.py.in (+1/-0)
buildout.cfg (+0/-1)
setup.py (+4/-0)
src/oopstools/NEWS.txt (+6/-0)
versions.cfg (+5/-1)
To merge this branch: bzr merge lp:~lifeless/python-oops-tools/timeline
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+125086@code.launchpad.net

Commit message

Django 1.3.3, new djangorecipe, and start capturing SQL activity in OOPSes raised by oops-tools itself.

Description of the change

Upgrade oops-tools infrastructure a bit, get latest django in the 1.3 series - 1.3.3, and then on top of that introduce timeline-django so we can capture the SQL calls being made when oops-tools itself has an issue.

This also provides a bit of a reference-use-case for using django-timeline.

We may find we need to implement tighter query filtering - I don't know whether the django-sso-auth stuff will be caught properly, so we may end up deploying, getting a couple of traces, and then disabling in prod.

To post a comment you must log in.
44. By Robert Collins

Add missed timeline_django dep.

Revision history for this message
William Grant (wgrant) wrote :

I'm a little reluctant to switch SQL logging on by default, but otherwise fine

review: Approve (code)
Revision history for this message
Robert Collins (lifeless) wrote :

So yeah, I can see that - however, we'll drill in and do some data gathering when we deploy and disable if problematic. From there, we can land a change if needed or not.

I'll add a NEWS entry and land.

45. By Robert Collins

Merge trunk.

46. By Robert Collins

NEWS entry.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'buildout-templates/bin/oopstools.wsgi.in'
--- buildout-templates/bin/oopstools.wsgi.in 2011-12-12 06:11:11 +0000
+++ buildout-templates/bin/oopstools.wsgi.in 2012-09-19 04:28:18 +0000
@@ -14,6 +14,11 @@
14from oops_wsgi.django import OOPSWSGIHandler14from oops_wsgi.django import OOPSWSGIHandler
1515
16application = OOPSWSGIHandler()16application = OOPSWSGIHandler()
17from timeline import wsgi as timeline_wsgi
18from timeline_django.setup import setup_for_requests as timeline_django_setup
19
20timeline_django_setup()
21application = timeline_wsgi.make_app(application)
1722
18# Report OOPSes back to us.23# Report OOPSes back to us.
19from functools import partial24from functools import partial
@@ -28,6 +33,13 @@
28config = Config()33config = Config()
29config.template['reporter'] = '${configuration:oops-web-amqp-reporter}'34config.template['reporter'] = '${configuration:oops-web-amqp-reporter}'
30install_hooks(config)35install_hooks(config)
36
37# Attach the timeline to error reports
38import oops_timeline
39from timeline_django.filters import install_hooks
40oops_timeline.install_hooks(config)
41install_hooks(config)
42
31# Can add custom filters / hooks if needed - see docs.43# Can add custom filters / hooks if needed - see docs.
32factory = partial(amqp.Connection, host=settings.OOPS_WEB_AMQP_HOST,44factory = partial(amqp.Connection, host=settings.OOPS_WEB_AMQP_HOST,
33 userid=settings.OOPS_WEB_AMQP_USER,45 userid=settings.OOPS_WEB_AMQP_USER,
@@ -38,4 +50,5 @@
38config.publishers.append(publisher)50config.publishers.append(publisher)
3951
40# finally we can wrap the app with OOPS reporting52# finally we can wrap the app with OOPS reporting
41application = make_app(application, config, oops_on_status=['500'])53application = make_app(application, config, oops_on_status=['500'],
54 soft_start_timeout=20000)
4255
=== modified file 'buildout-templates/src/oopstools/settings.py.in'
--- buildout-templates/src/oopstools/settings.py.in 2012-07-27 04:27:53 +0000
+++ buildout-templates/src/oopstools/settings.py.in 2012-09-19 04:28:18 +0000
@@ -62,6 +62,7 @@
62)62)
6363
64MIDDLEWARE_CLASSES = (64MIDDLEWARE_CLASSES = (
65 'timeline_django.middleware.TimelineMiddleware',
65 'django.middleware.common.CommonMiddleware',66 'django.middleware.common.CommonMiddleware',
66 'django.contrib.sessions.middleware.SessionMiddleware',67 'django.contrib.sessions.middleware.SessionMiddleware',
67 'django.contrib.auth.middleware.AuthenticationMiddleware',68 'django.contrib.auth.middleware.AuthenticationMiddleware',
6869
=== modified file 'buildout.cfg'
--- buildout.cfg 2011-12-12 06:11:11 +0000
+++ buildout.cfg 2012-09-19 04:28:18 +0000
@@ -60,7 +60,6 @@
6060
61[django]61[django]
62recipe = djangorecipe62recipe = djangorecipe
63version = 1.3
64project = oopstools63project = oopstools
65projectegg = oopstools64projectegg = oopstools
66settings = settings65settings = settings
6766
=== modified file 'setup.py'
--- setup.py 2011-12-12 06:11:11 +0000
+++ setup.py 2012-09-19 04:28:18 +0000
@@ -50,6 +50,7 @@
50 'src/oopstools/NEWS.txt'),50 'src/oopstools/NEWS.txt'),
51 install_requires=[51 install_requires=[
52 'BeautifulSoup',52 'BeautifulSoup',
53 'django',
53 'fixtures',54 'fixtures',
54 'launchpadlib',55 'launchpadlib',
55 'lazr.config',56 'lazr.config',
@@ -57,12 +58,15 @@
57 'oops-amqp',58 'oops-amqp',
58 'oops-datedir-repo',59 'oops-datedir-repo',
59 'oops-wsgi',60 'oops-wsgi',
61 'oops-timeline',
60 'psycopg2',62 'psycopg2',
61 'pytz',63 'pytz',
62 'setuptools',64 'setuptools',
63 'South',65 'South',
64 'sqlparse',66 'sqlparse',
65 'testtools',67 'testtools',
68 'timeline',
69 'timeline_django',
66 'zope.cachedescriptors',70 'zope.cachedescriptors',
67 'zope.testbrowser',71 'zope.testbrowser',
68 #'Django', - installed through djangorecipe.72 #'Django', - installed through djangorecipe.
6973
=== modified file 'src/oopstools/NEWS.txt'
--- src/oopstools/NEWS.txt 2012-09-18 07:46:18 +0000
+++ src/oopstools/NEWS.txt 2012-09-19 04:28:18 +0000
@@ -5,6 +5,12 @@
5NEXT5NEXT
6====6====
77
8* Oops-tools now depends on newer djangorecipe, django 1.3.3. (Robert Collins)
9
10* Oops reports generated by oops-tools itself will now include django event
11 data from timeline_django. This can be disabled if needed by disabling the
12 oops_timeline hook in oopstools.wsgi. (Robert Collins)
13
8* When pruning, look for OOPS references up to now rather than up to14* When pruning, look for OOPS references up to now rather than up to
9 prune_until. Otherwise we miss any references created in the last15 prune_until. Otherwise we miss any references created in the last
10 week, probably only finding references within 24 hours of the OOPS16 week, probably only finding references within 24 hours of the OOPS
1117
=== modified file 'versions.cfg'
--- versions.cfg 2012-03-23 00:49:01 +0000
+++ versions.cfg 2012-09-19 04:28:18 +0000
@@ -13,7 +13,8 @@
13South = 0.7.3-r92913South = 0.7.3-r929
14Sphinx = 1.0.714Sphinx = 1.0.7
15sqlparse = 0.1.315sqlparse = 0.1.3
16djangorecipe = 0.19.216django = 1.3.3
17djangorecipe = 1.3
17distribute = 0.6.1218distribute = 0.6.12
18docutils = 0.619docutils = 0.6
19launchpadlib = 1.9.1120launchpadlib = 1.9.11
@@ -22,12 +23,15 @@
22oops = 0.0.1023oops = 0.0.10
23oops-amqp = 0.0.524oops-amqp = 0.0.5
24oops-datedir-repo = 0.0.1525oops-datedir-repo = 0.0.15
26oops-timeline = 0.0.2
25oops-wsgi = 0.0.1027oops-wsgi = 0.0.10
26# XXX: 2011-11-17 GavinPanella bug=891249: pyscopg2 2.4.2 is28# XXX: 2011-11-17 GavinPanella bug=891249: pyscopg2 2.4.2 is
27# incompatible with Django 1.3, but 2.4.1 works fine.29# incompatible with Django 1.3, but 2.4.1 works fine.
28psycopg2 = 2.4.130psycopg2 = 2.4.1
29setuptools = 0.6c1131setuptools = 0.6c11
30testtools = 0.9.1232testtools = 0.9.12
33timeline = 0.0.3
34timeline_django = 0.0.1
31z3c.recipe.filetemplate = 2.1.035z3c.recipe.filetemplate = 2.1.0
32z3c.recipe.sphinxdoc = 0.0.836z3c.recipe.sphinxdoc = 0.0.8
33z3c.recipe.tag = 0.4.037z3c.recipe.tag = 0.4.0

Subscribers

People subscribed via source and target branches

to all changes: