Cronscripts should have top-level exception handler
Bug #605822 reported by
Andrew Bennetts
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Stuart Bishop |
Bug Description
[This was an idea that came up in a discussion with Robert Collins, I'm filing it as a bug at his request.]
Sometimes cronscripts fail with unhandled exceptions. It would be nice to have these errors reported as OOPSes automatically. So cronscripts should be run with a sys.excepthook (the same way apport intercepts unhandled errors) to do this.
(Perhaps apport itself could be used?)
Related branches
lp:~stub/launchpad/cronscripts
- Robert Collins (community): Approve
- Canonical Launchpad Engineering: Pending requested
-
Diff: 1068 lines (+537/-90)16 files modifiedlib/canonical/launchpad/scripts/logger.py (+147/-61)
lib/canonical/launchpad/scripts/tests/loglevels.py (+9/-10)
lib/canonical/launchpad/scripts/tests/test_logger.txt (+28/-5)
lib/canonical/launchpad/scripts/tests/test_scriptmonitor.py (+1/-1)
lib/canonical/launchpad/webapp/errorlog.py (+5/-4)
lib/lp/codehosting/codeimport/tests/test_dispatcher.py (+11/-0)
lib/lp/services/log/loglevels.py (+91/-0)
lib/lp/services/log/mappingfilter.py (+27/-0)
lib/lp/services/scripts/base.py (+60/-3)
lib/lp/services/scripts/doc/launchpad-scripts.txt (+39/-0)
lib/lp/services/scripts/tests/cronscript-crash.py (+44/-0)
lib/lp/services/scripts/tests/test_doc.py (+7/-2)
lib/lp/translations/doc/remove-translations-by.txt (+2/-2)
lib/lp/translations/scripts/tests/test_reupload_translations.py (+4/-2)
lib/lp_sitecustomize.py (+56/-0)
scripts/branch-rewrite.py (+6/-0)
Changed in launchpad-foundations: | |
assignee: | nobody → Stuart Bishop (stub) |
tags: | added: cron |
tags: |
added: qa-untestable removed: qa-needstesting |
Changed in launchpad-foundations: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
We'd want to capture into the regular oops system, so apport itself would be a larger change, at first glance.