Merge lp://staging/~rharding/launchpad/bugnom_874250 into lp://staging/launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Richard Harding | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 15227 | ||||
Proposed branch: | lp://staging/~rharding/launchpad/bugnom_874250 | ||||
Merge into: | lp://staging/launchpad | ||||
Diff against target: |
218 lines (+88/-21) 6 files modified
lib/lp/bugs/doc/bugtask.txt (+15/-0) lib/lp/bugs/interfaces/bug.py (+3/-0) lib/lp/bugs/interfaces/bugtask.py (+4/-0) lib/lp/bugs/model/bug.py (+4/-0) lib/lp/bugs/model/bugnomination.py (+2/-2) lib/lp/bugs/model/bugtask.py (+60/-19) |
||||
To merge this branch: | bzr merge lp://staging/~rharding/launchpad/bugnom_874250 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
j.c.sackett (community) | Approve | ||
Review via email:
|
Commit message
Support a createManyTasks so that we perform a single query when approving nominations.
Description of the change
= Summary =
This takes another hack at improving the performance of approving the
bug nomination when the bug is listed across many source packages and several
series.
See:
https:/
== Pre Implementation ==
Had a chat with Deryck. The goal is to fix the queries doing the 'INSERT INTO
bugtask' by avoiding the loop
== Implementation Notes ==
To do this we add a createManyTasks method and using that when approving bug.
== Q/A ==
We're going to have to try to get a bug nomination such as the bug we're linked against and approve it. It'll still probably oops,but we need to check the oops out and make sure we're only seeing one instance of the 'INSERT INTO bugtask' query that is all over the oops linked in the `Summary`.
== Tests ==
lib/lp/
lib/lp/
== Lint ==
All clean
== LoC Qualification ==
A follow up branch will include porting all of doc/bugtask.txt into unit tests. In order to aid in review, these are done as two branches.
This looks good to me. I have some nitpicks below, but nothing blocking.
> === modified file 'lib/lp/ bugs/model/ bug.py' bugs/model/ bug.py 2012-05-09 06:12:52 +0000 bugs/model/ bug.py 2012-05-10 14:54:18 +0000 IBugTaskSet) .createTask( self, owner, target) IBugTaskSet) .createManyTask s(self, owner, targets)
> --- lib/lp/
> +++ lib/lp/
> @@ -1237,6 +1237,11 @@
> """See `IBug`."""
> return getUtility(
>
> + def addManyTasks(self, owner, targets):
> + """See `IBug`."""
> + new_tasks = getUtility(
> + return new_tasks
> +
Is there any reason to not just have this be?
def addManyTasks(self, owner, targets): IBugTaskSet) .createManyTask s(self, owner, targets)
"""See `IBug`."""
return getUtility(
> === modified file 'lib/lp/ bugs/model/ bugtask. py' bugs/model/ bugtask. py 2012-05-09 13:39:12 +0000 bugs/model/ bugtask. py 2012-05-10 14:54:18 +0000 rams(user, **kwargs) IBugTask[ 'status' ].default, IBugTask[ 'importance' ].default, task(self, bug, owner, target, status, importance, assignee, 'status' ].default
> --- lib/lp/
> +++ lib/lp/
> @@ -1604,11 +1603,8 @@
> params = BugTaskSearchPa
> return self.search(params)
>
> - def createTask(self, bug, owner, target,
> - status=
> - importance=
> - assignee=None, milestone=None):
> - """See `IBugTaskSet`."""
> + def _init_new_
> + milestone):
> if not status:
> status = IBugTask[
> if not importance:
This is a bit nitpicky, but methods, private or otherwise, should still
be camelCase.