Merge lp:~gmb/launchpad/bug-1-timeout into lp:launchpad

Proposed by Graham Binns
Status: Merged
Merged at revision: 12754
Proposed branch: lp:~gmb/launchpad/bug-1-timeout
Merge into: lp:launchpad
Diff against target: 12 lines (+1/-1)
1 file modified
lib/lp/bugs/model/bug.py (+1/-1)
To merge this branch: bzr merge lp:~gmb/launchpad/bug-1-timeout
Reviewer Review Type Date Requested Status
Benji York (community) code Approve
Review via email: mp+56407@code.launchpad.net

Commit message

[r=benji][ui=none][no-qa] Bug._indexed_message()'s signature now matches that declared in the IBug interface.

Description of the change

This branch changes the default for the include_parents parameter on Bug._indexed_message() to False, so that it matches the declaration on IBug._indexed_message(). There is a possibility that this will fix bug 744888, but I won't be able to tell until this has landed.

It doesn't, however, cause any test failures, which is at least something.

To post a comment you must log in.
Revision history for this message
Benji York (benji) wrote :

This looks fine.

> It doesn't, however, cause any test failures, which is at least something.

It seems to me the "something" is that the impact of the default value
is not tested, unfortunately.

review: Approve (code)
Revision history for this message
Robert Collins (lifeless) wrote :

A better way to do changes like this is to just override that
parameter in the callsite that matters.

I suspect that this change will cause massive timeouts in the API for
bugs, because parent calculation is expensive when done late.

Revision history for this message
Robert Collins (lifeless) wrote :

Actually, when I say timeouts, I should say 'will break the API by deleting all parent relations shown on the API'.

Revision history for this message
Graham Binns (gmb) wrote :

On Tuesday, 5 April 2011, Robert Collins <email address hidden> wrote:
> Actually, when I say timeouts, I should say 'will break the API by deleting all parent relations shown on the API'.

Okay. We should probably revert this, then :). We need to add some
tests to cover the expected behaviour, though, because nothing broke
when I changed the default on the model to match what's declared in
the interface,

--
Graham Binns
http://grahambinns.com

Revision history for this message
William Grant (wgrant) wrote :

It has been reverted. Yes, it does need tests.

Revision history for this message
Robert Collins (lifeless) wrote :

An appropriate test would be 'the api shows parent links for messages
with parents'. A simple model check is probably there today but
insufficient because the API != the model [because performance].

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/bugs/model/bug.py'
2--- lib/lp/bugs/model/bug.py 2011-04-05 06:13:17 +0000
3+++ lib/lp/bugs/model/bug.py 2011-04-05 16:49:12 +0000
4@@ -452,7 +452,7 @@
5 # value (in the absence of slices)
6 return self._indexed_messages(include_content=True)
7
8- def _indexed_messages(self, include_content=False, include_parents=True):
9+ def _indexed_messages(self, include_content=False, include_parents=False):
10 """Get the bugs messages, indexed.
11
12 :param include_content: If True retrieve the content for the messages