BugTask.conjoined_master shouldn't use shortlist()
Bug #226535 reported by
Graham Binns
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
Curtis Hovey |
Bug Description
There are a lot of warnings in the checkwatches log of this nature:
/srv/launchpad.
/bugtask.py:467: UserWarning: shortlist() should not be used here. It's meant to
listify sequences with no more than 15 items. There were 47 items.
shortlist() is used in BugTask.
Related branches
lp:~sinzui/launchpad/conjoined-shortlist-0
- Curtis Hovey (community): Approve (code)
-
Diff: 36 lines (+6/-3)1 file modifiedlib/lp/bugs/model/bugtask.py (+6/-3)
Changed in launchpad: | |
importance: | Low → Critical |
Changed in launchpad: | |
assignee: | nobody → Curtis Hovey (sinzui) |
status: | Triaged → In Progress |
milestone: | none → 11.03 |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
On Sun, May 04, 2008 at 03:56:03PM -0000, Graham Binns wrote: conjoined_ master to listify the BugTask's
> shortlist() is used in BugTask.
> Bug's BugTasks sequence. If this warning is getting raised this often it
> should probably be changed to use list().
No, it shouldn't use list(); shortlist() is the right thing to use here,
since whenever getting an unknown (unbounded) number of things from the
db, we want to put a limit on the number of rows returned.
The right thing to do there is to increase the limit. You can specify
the limit when calling shortlist().