Code review comment for lp:~julian-edwards/launchpad/die-buildqueue-die--bug-492632

Revision history for this message
Julian Edwards (julian-edwards) wrote :

= Summary =
Make sure buildqueue rows are deleted properly

== Proposed fix ==
Last cycle the buildqueue record was refactored a bit and now it also has an
associated Job and BuildPackageJob.

This fix makes sure that the other two are deleted when
buildqueue.destroySelf() is called.

This is a tentative fix for https://bugs.edge.launchpad.net/soyuz/+bug/492632
since we don't really have a better idea right now.

== Pre-implementation notes ==
Does 4 days of investigative hacking count?

== Implementation details ==
I added a destroySelf() method to the content class which calls the SQLObject
method and deletes the other table rows at the same time.

== Tests ==
bin/test -cvvt testBuildqueueRemoval

== Demo and Q/A ==

= Launchpad lint =

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

Linting changed files:
  lib/lp/soyuz/tests/test_build.py
  lib/lp/soyuz/model/buildqueue.py

« Back to merge proposal