zuul/zuul
James E. Blair 8d144dc4f8 Wait for merger to complete before item is ready
In zuul v2, prepareRef waited until the merger had completed its
work before telling the pipeline manager that the item was ready.
This was important as it ensured there was a zuul ref on a merger
for jobs to be able to fetch from.  We dropped that in v3 because
the jobs would build their own repo states on the executor, however,
we're about to put something similar back in that we're going have
the merger return the complete repo state so that the executors can
later use that to reconstruct the work the merger performed.

Because prepareItem (essentially the v3 version of prepareRef) did
not wait for the merger result before declaring the item ready, we
can end up launching jobs before the merger completes.  This isn't
a big deal, yet, but it could still produce surprising results and
make for extra work.  This change restores the old behavior, as well
as makes a test less suceptible to race conditions (again, which
are more likely to be seen in future changes).

Similarly, we also lost setting ready to false in the case of a merge
conflict (a behavior which was present in v2).  This corrects that
as well to ensure that we don't execute jobs if there is a merge
conflict.

Because some tests were written with the assumption that only one
merger is running, and we are now running two (a dedicated merger and
one in the executor), they are more likely to fail due to race
conditions, especially now that we are waiting for mergers to complete
before executing jobs.  This change also removes the dedicated merger
from the test infrastructure so we rely only on the merger in the
executor.

Change-Id: I6d4da3d901d99290ef99b478ea9a4659058fe839
2017-05-24 14:19:13 -07:00
..
ansible Merge "Re-enable F405 pep8 errors" into feature/zuulv3 2017-05-22 01:36:15 +00:00
cmd merger/executor: configure source connections only. 2017-05-21 23:58:28 +00:00
connection Allow using webapp from connections 2017-04-25 16:24:33 -07:00
driver Merge "Add driver-specific pipeline requirements" into feature/zuulv3 2017-05-23 20:37:12 +00:00
executor Merge "Fix inventory vars containing spaces" into feature/zuulv3 2017-05-22 19:18:47 +00:00
lib merger/executor: configure source connections only. 2017-05-21 23:58:28 +00:00
manager Wait for merger to complete before item is ready 2017-05-24 14:19:13 -07:00
merger Merge "Remove unused merger:update task" into feature/zuulv3 2017-05-20 17:21:35 +00:00
reporter Set filter according to PR/Change in URL 2017-05-11 17:21:09 -07:00
source Add driver-specific pipeline requirements 2017-05-19 13:24:00 -07:00
trigger Merge "Tidy up loggers" 2017-02-09 14:56:35 +00:00
__init__.py Initial commit. 2012-05-29 14:49:32 -07:00
change_matcher.py GitHub file matching support 2017-05-10 14:32:02 -07:00
configloader.py Merge "Add driver-specific pipeline requirements" into feature/zuulv3 2017-05-23 20:37:12 +00:00
exceptions.py Support post jobs by supporting rev checkout 2016-07-12 12:51:51 +10:00
model.py Add driver-specific pipeline requirements 2017-05-19 13:24:00 -07:00
nodepool.py Improve safety around canceling node requests 2017-05-19 12:12:33 -07:00
rpcclient.py Use gear Text interface 2017-05-19 06:39:15 -07:00
rpclistener.py Use gear Text interface 2017-05-19 06:39:15 -07:00
scheduler.py Improve safety around canceling node requests 2017-05-19 12:12:33 -07:00
version.py Migrate to pbr. 2013-06-25 19:04:30 +00:00
webapp.py fix webapp tests for py3 2017-05-19 06:45:31 -07:00
zk.py Encoding changes in tests for py3 2017-05-19 06:45:31 -07:00