Return RETRY_LIMIT on completion of last build

Change-Id: I5d38735681d478b74b98b868b47454acfae3145a
Story: 2001104
Task: 4776
This commit is contained in:
James E. Blair 2017-07-08 08:45:17 -07:00
parent 077f2f3e98
commit 00254ae253
1 changed files with 5 additions and 7 deletions

View File

@ -340,12 +340,6 @@ class ExecutorClient(object):
build.__gearman_manager = None
self.builds[uuid] = build
# NOTE(pabelanger): Rather then looping forever, check to see if job
# has passed attempts limit.
if item.current_build_set.getTries(job.name) > job.attempts:
self.onBuildCompleted(gearman_job, 'RETRY_LIMIT')
return build
if pipeline.precedence == zuul.model.PRECEDENCE_NORMAL:
precedence = gear.PRECEDENCE_NORMAL
elif pipeline.precedence == zuul.model.PRECEDENCE_HIGH:
@ -420,7 +414,11 @@ class ExecutorClient(object):
if result is None:
result = data.get('result')
if result is None:
build.retry = True
if (build.build_set.getTries(build.job.name) >=
build.job.attempts):
result = 'RETRY_LIMIT'
else:
build.retry = True
self.log.info("Build %s complete, result %s" %
(job, result))
self.sched.onBuildCompleted(build, result)