Don't set the build result to ABORTED

We pass 'ABORTED' back from the executor in some cases, mostly to
aid in testing (so we know when the executor has intentionally
aborted a job).  However, that's a non-final result, and other
parts of zuul (like areAllJobsCompleted) shouldn't need to know
about it.  If the executor client receives ABORTED (or DISCONNECT),
log it, but don't pass it any further up the chain.

Change-Id: If2cbf2f6eecb9a7fdef4d0a6eebeb5fe2549e276
This commit is contained in:
James E. Blair 2017-10-17 15:13:15 -07:00
parent bacbb888b6
commit d0033b71e1
1 changed files with 5 additions and 0 deletions

View File

@ -379,6 +379,11 @@ class ExecutorClient(object):
result_data = data.get('data', {})
self.log.info("Build %s complete, result %s" %
(job, result))
# If the build should be retried, don't supply the result
# so that elsewhere we don't have to deal with keeping
# track of which results are non-final.
if build.retry:
result = None
self.sched.onBuildCompleted(build, result, result_data)
# The test suite expects the build to be removed from the
# internal dict after it's added to the report queue.