zuul/zuul
James E. Blair fef7163d52 Fix NNFI bug with two failing changes at head
If A is the head in A <- B <- C, and B failed, then C would be
correctly reparented to A.  Then if A failed, B and C would be
restarted, but C would not be reparented back to B.  This is
because the check around moving a change short-circuited if
there was no change ahead (which is the case if C is behind A
and A reports).

The solution to this is to still perform the move check even if
there is no change currently ahead (so that if there is a NNFI
change ahead, the current change will be moved behind it).  This
effectively means we should remove the "not item ahead" part of
the conditional around the move.

This part of the conditional serves two additional purposes --
to make sure that we don't dereference an attribute on item_ahead
if it is None, and also to ensure that the NNFI algorithm is not
applied to independent queues.

So the fix moves that part of the conditional out so that we can
safely reference the needed attributes if there is a change ahead,
and also makes explicit that we ignore the situation if we are
working on an independent change queue.

This also adds a test that failed (at the indicated position) with
the previous code.

Change-Id: I4cf5e868af7cddb7e95ef378abb966613ac9701c
2013-09-23 11:15:47 -07:00
..
cmd Add support for emailing results via SMTP 2013-09-02 09:55:49 +10:00
launcher Re-launch a job if the worker fails to run it 2013-08-23 15:17:33 -07:00
lib Revert "report message even if no action is specified" 2013-05-15 14:42:57 +00:00
reporter Add support for emailing results via SMTP 2013-09-02 09:55:49 +10:00
trigger Separate reporters from triggers 2013-08-29 13:17:12 +10:00
__init__.py Initial commit. 2012-05-29 14:49:32 -07:00
layoutvalidator.py Use NNFI scheduler algorithm 2013-09-20 09:01:30 -05:00
merger.py Revert bogus merger optimizations 2013-08-27 17:14:51 -07:00
model.py Fix items_behind error when moving a change 2013-09-20 11:40:17 -07:00
scheduler.py Fix NNFI bug with two failing changes at head 2013-09-23 11:15:47 -07:00
version.py Migrate to pbr. 2013-06-25 19:04:30 +00:00
webapp.py Add a JSON status test 2013-07-06 18:20:54 +00:00