Merge lp://staging/~elachuni/ubuntu-recommender/oops-ids into lp://staging/ubuntu-recommender

Proposed by Anthony Lenton
Status: Merged
Merged at revision: 80
Proposed branch: lp://staging/~elachuni/ubuntu-recommender/oops-ids
Merge into: lp://staging/ubuntu-recommender
Diff against target: 555 lines (+222/-126)
12 files modified
.bzrignore (+1/-0)
django_project/config/main.cfg (+2/-2)
fabtasks/bootstrap.py (+7/-5)
requirements.txt (+1/-1)
src/recommender/management/commands/runserver.py (+20/-0)
src/recommender/schema.py (+2/-1)
src/recommender/templates/500.html (+9/-112)
src/recommender/tests/__init__.py (+1/-0)
src/recommender/tests/test_commands.py (+3/-4)
src/recommender/tests/test_wsgi.py (+122/-0)
src/recommender/views.py (+3/-1)
src/recommender/wsgi.py (+51/-0)
To merge this branch: bzr merge lp://staging/~elachuni/ubuntu-recommender/oops-ids
Reviewer Review Type Date Requested Status
Anthony Lenton (community) Approve
Review via email: mp+150096@code.staging.launchpad.net

Commit message

Added a custom wsgi handler to get oops ids on all error responses.

Description of the change

This branch adds a custom wsgi handler to get oops ids on all error pages, and in API errors too.

It also customizes Django's runserver command to use our custom wsgi stack, so that now oops reports are also generated in dev as they are in prod. Dev only has a datedir publisher configured by default.

Also, it updates to oops-dictconfig 0.0.4 so that we can set inherit_id=True on our publishers.

While I was there, I removed all static external resources from the error pages, that aren't set up on staging/production and make the error pages look ugly. If we can provide better error pages eventually, great.

Finally, I also made 'fab bootstrap' not start from scratch every time. If you want the current behaviour you will now need to do 'fab clean bootstrap'.

To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote :

> Also, it updates to oops-dictconfig 0.0.4 so that we can set inherit_id=True on our publishers.

Actually 0.0.4 is needed so you can set 'new_only = False' as well, otherwise you won't get any
oopses saved to disk.

110 'instance_id': 'dev',

I've since learned that setting this is deprecated. It won't matter with the
pre-generation of ids, but please remove it anyway.

339 + self.assertTrue(expected in last_output)

Isn't there assertIn for a better error message?

503 + """Pre-generates an oops id for all requests."""

It only pre-generates an oops id on exception.

Aside from this the oops setup looks good. I haven't reviewed the css/template/test/fabric changes.

Thanks,

James

Revision history for this message
Anthony Lenton (elachuni) :
review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (56.3 KiB)

The attempt to merge lp:~elachuni/ubuntu-recommender/oops-ids into lp:ubuntu-recommender failed. Below is the output from the failed tests.

[localhost] local: /usr/bin/python /usr/bin/virtualenv --no-site-packages virtualenv
The --no-site-packages flag is deprecated; it is now the default behavior.
New python executable in virtualenv/bin/python
Installing distribute.............................................................................................................................................................................................done.
Installing pip...............done.
[localhost] local: virtualenv/bin/pip install -r requirements.txt
Downloading/unpacking bzr (from -r requirements.txt (line 1))
  Running setup.py egg_info for package bzr
    No Cython, trying Pyrex...

    The python package 'Pyrex' is not available. If the .c files are available,
    they will be built, but modifying the .pyx files will not rebuild them.

Downloading/unpacking configglue==1.0.1 (from -r requirements.txt (line 2))
  Downloading configglue-1.0.1.tar.gz
  Running setup.py egg_info for package configglue

Downloading/unpacking coverage (from -r requirements.txt (line 3))
  Running setup.py egg_info for package coverage

    warning: no previously-included files matching '*.pyc' found anywhere in distribution
Downloading/unpacking django==1.3 (from -r requirements.txt (line 4))
  Running setup.py egg_info for package django

Downloading/unpacking django-configglue==0.6.1 (from -r requirements.txt (line 5))
  Downloading django-configglue-0.6.1.tar.gz
  Running setup.py egg_info for package django-configglue

    warning: no previously-included files matching '*.pyc' found anywhere in distribution
Obtaining django-pgtools from bzr+http://bazaar.launchpad.net/~canonical-isd-hackers/django-pgtools/trunk (from -r requirements.txt (line 6))
  Checking out http://bazaar.launchpad.net/~canonical-isd-hackers/django-pgtools/trunk to ./virtualenv/src/django-pgtools
  Running setup.py egg_info for package django-pgtools

Obtaining django-openid-auth from bzr+http://bazaar.launchpad.net/~django-openid-auth/django-openid-auth/trunk (from -r requirements.txt (line 7))
  Checking out http://bazaar.launchpad.net/~django-openid-auth/django-openid-auth/trunk to ./virtualenv/src/django-openid-auth
  Running setup.py egg_info for package django-openid-auth

Downloading/unpacking django-piston==0.2.2.1 (from -r requirements.txt (line 8))
  Downloading django-piston-0.2.2.1.tar.gz
  Running setup.py egg_info for package django-piston

Downloading/unpacking fabric (from -r requirements.txt (line 9))
  Running setup.py egg_info for package fabric

    warning: no previously-included files matching '*' found under directory 'docs/_build'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
Downloading/unpacking mock (from -r requirements.txt (line 10))
  Running setup.py egg_info for package mock

    warning: no files found matching '*.png' under directory 'docs'
    warning: no files found ma...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches