Merge lp:~michael.nelson/ubuntu-recommender/944075-python-oops-wsgi into lp:ubuntu-recommender
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | James Westby | ||||
Approved revision: | 58 | ||||
Merged at revision: | 52 | ||||
Proposed branch: | lp:~michael.nelson/ubuntu-recommender/944075-python-oops-wsgi | ||||
Merge into: | lp:ubuntu-recommender | ||||
Diff against target: |
317 lines (+242/-2) 8 files modified
django_project/urls.py (+2/-0) requirements.txt (+4/-0) src/recommender/schema.py (+14/-0) src/recommender/templates/recommender/500_api.txt (+6/-0) src/recommender/tests/__init__.py (+2/-1) src/recommender/tests/test_oops_wsgi_setup.py (+162/-0) src/recommender/urls.py (+1/-0) src/recommender/views.py (+51/-1) |
||||
To merge this branch: | bzr merge lp:~michael.nelson/ubuntu-recommender/944075-python-oops-wsgi | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Westby (community) | Approve | ||
Review via email: mp+96333@code.launchpad.net |
Commit message
Adds schema config options for for oops_wsgi integration and tests.
Description of the change
Overview
========
This branch just documents and adds tests to confirm that a configuration using oops-wsgi will work (and updates our schema to support it).
Turning this on in production will simply require updating the settings and django.wsgi in our config branch as documented here. But that can't be done until https:/
The new dependencies are available in cat (thanks james_w!), so we'll need to ensure they are installed on the machine: python-oops-wsgi, python-oops-dictconfig and python-
I'll create a ca-config/ur-config branch that can land once that's done.
NOTE: lazr.restfulclient and launchpad lib are pulled in via oops_datedir_repo :/ see the XXX below with a bug.
On Wed, 07 Mar 2012 15:15:22 -0000, Michael Nelson <email address hidden> wrote: ca-hackers) /code.launchpad .net/~michael. nelson/ ubuntu- recommender/ 944075- python- oops-wsgi/ +merge/ 96333
Non-text part: multipart/mixed
> Michael Nelson has proposed merging lp:~michael.nelson/ubuntu-recommender/944075-python-oops-wsgi into lp:ubuntu-recommender.
>
> Requested reviews:
> Canonical Consumer Applications Hackers (canonical-
>
> For more details, see:
> https:/
>
> Overview
> ========
> This branch just documents and adds tests to confirm that a configuration using oops-wsgi will work (and updates our schema to support it).
Hi Michael,
Thanks for working on this, it will be great to have this in use across
all our services.
> Turning this on in production will simply require updating the settings and django.wsgi in our config branch as documented here. But that can't be done until https:/ /portal. admin.canonical .com/50529 is complete (unless we want to simply store the oopses locally, which could be done immediately with a config branch?) oops_datedir_ repo are available on lucid.
>
> The new dependencies will need to be added via branches, as none of python-oops-wsgi, python-oops-dictconfig or python-
They are all packaged and available in lucid-cat though :-) canonical. com ~jamesw/cat-madison
(You can use queries like "ssh people.
python-oops-wsgi" to see what is in cat)
I'd be happy to work with you on getting the oops id available to the
500 handler, as it's a very useful thing, and something we will need in
many places.
> + class oops_wsgi( schema. Section) : DictOption( default= {
> + oopses = schema.
> + 'publishers': [{
> + 'type': 'datedir',
> + 'error_dir': 'oopses',
> + 'instance_id': 'dev',
> + }],
> + })
You could use the OopsOption from python-oops-dictconfig here.
> + def test_traceback_ in_api_ response( self):
> + # The API response should contain the traceback.
Is the API open for use by the public? Would we want to disclose
tracebacks in that case?
Thanks,
James