Merge lp://staging/~elachuni/ubuntu-recommender/oops-ids into lp://staging/ubuntu-recommender
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 |
Related bugs: |
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'.
> 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