BugzillaAPI.setLaunchpadBugId starts a transaction
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Gavin Panella |
Bug Description
It fetches the bug from the database so it can calculate the canonical
URL for it. However, code in the externalbugtracker module is
forbidden from starting transactions.
OOPS-1566CCW1529
The OOPS above is interesting because it's caused by a weird
interaction. The definition of BugzillaAPI.
follows:
@ensure_
@needs_
def setLaunchpadBug
...
...
ensure_
calling the wrapped function. needs_authentic
function, catches errors relating to authentication and then tries to
authenticate before calling the function again.
What happens is:
* setLaunchpadBugId() is called. There is no transaction is progress,
so it proceeds normally.
* The line starting "launchpad_bug = " starts a transaction.
* The call to update_see_also() fails because authentication is
needed. needs_authentic
_authenticate().
* _authenticate() is wrapped with ensure_
raises a TransactionInPr
Related branches
- Jeroen T. Vermeulen (community): Approve
-
Diff: 206 lines (+25/-20)9 files modifiedlib/lp/bugs/doc/checkwatches.txt (+1/-1)
lib/lp/bugs/doc/externalbugtracker-bugzilla-api.txt (+2/-1)
lib/lp/bugs/doc/externalbugtracker-bugzilla-lp-plugin.txt (+2/-1)
lib/lp/bugs/doc/externalbugtracker-linking-back.txt (+2/-1)
lib/lp/bugs/doc/externalbugtracker-trac-lp-plugin.txt (+4/-3)
lib/lp/bugs/externalbugtracker/bugzilla.py (+4/-8)
lib/lp/bugs/externalbugtracker/trac.py (+2/-1)
lib/lp/bugs/interfaces/externalbugtracker.py (+3/-2)
lib/lp/bugs/scripts/checkwatches/updater.py (+5/-2)
Changed in malone: | |
assignee: | nobody → Gavin Panella (allenap) |
milestone: | none → 10.04 |
status: | Triaged → In Progress |
tags: | added: qa-untestable |
Changed in malone: | |
status: | In Progress → Fix Committed |
Changed in malone: | |
status: | Fix Committed → Fix Released |