Michael Vogt has proposed merging
lp:~mvo/launchpad/exclude-cancelled-builds-from-completed_builds into
lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~mvo/launchpad/exclude-cancelled-builds-from-completed_builds/+merge/265655
Tiny branch that excludes canceled builds from the "completed_builds" results
in livefs.py (I guess its a bit of a philosophical question if a successfully
canceled build is a completed build or not, but I would argue most users do not
care about canceled builds and if so, certainly not as much that the builds are
on top which is probably a side-effect of the order_by clause).
The rational is that
https://launchpad.net/~ubuntu-cdimage/+livefs/ubuntu/vivid/ubuntu-core-system-image
is taken over by canceled builds ;)
I did not write a test or test formally, sorry, I don't have a LP build setup
right now, this is really a bit of a drive-by fix. Hope that this is ok.
--
Your team Launchpad code reviewers is requested to review the proposed merge of
lp:~mvo/launchpad/exclude-cancelled-builds-from-completed_builds into
lp:launchpad.
=== modified file 'lib/lp/soyuz/model/livefs.py'
--- lib/lp/soyuz/model/livefs.py 2015-07-20 20:31:20 +0000
+++ lib/lp/soyuz/model/livefs.py 2015-07-23 13:02:05 +0000
@@ -196,7 +196,8 @@
@property
def completed_builds(self):
"""See `ILiveFS`."""
- filter_term = (Not(LiveFSBuild.status.is_in(self._pending_states)))
+ filter_term = (Not(LiveFSBuild.status.is_in(
+ self._pending_states+[BuildStatus.CANCELLED])))
order_by = (
NullsLast(Desc(Greatest(
LiveFSBuild.date_started,
_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help : https://help.launchpad.net/ListHelp