Code review comment for lp:~gmb/launchpad/indexed-message-parents

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

This branch fixes bug 394097.

The bug was caused by messages in the offending bug's set of message having parent messages that weren't linked to the bug. This caused the webservice machinery to blow up.

To counter this, we've made it so that bug.indexed_messages ensures that IIndexedMessage.parent returns None if the parent of a message isn't linked to the same bug as the child message.

Gavin has added a regression test to cover the bug and I've added tests to cover the changes to Bug.indexed_messages.

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/canonical/launchpad/interfaces/message.py
  lib/lp/bugs/model/bug.py
  lib/lp/bugs/tests/test_bug_messages.py
  lib/lp/bugs/tests/test_bugs_webservice.py

== Pylint notices ==

lib/canonical/launchpad/interfaces/message.py
    35: [F0401] Unable to import 'lazr.delegates' (No module named delegates)
    36: [F0401] Unable to import 'lazr.restful.fields' (No module named restful)
    37: [F0401] Unable to import 'lazr.restful.declarations' (No module named restful)

lib/lp/bugs/model/bug.py
    25: [F0401] Unable to import 'email.Utils' (No module named Utils)
    38: [F0401] Unable to import 'lazr.lifecycle.event' (No module named lifecycle)
    40: [F0401] Unable to import 'lazr.lifecycle.snapshot' (No module named lifecycle)

« Back to merge proposal