Merge "Fix runtime stats reporting for noop job"

This commit is contained in:
Zuul 2018-03-16 20:11:50 +00:00 committed by Gerrit Code Review
commit ccf29c4407
2 changed files with 5 additions and 4 deletions

View File

@ -269,6 +269,10 @@ class ExecutorClient(object):
build.parameters = params build.parameters = params
build.nodeset = nodeset build.nodeset = nodeset
self.log.debug("Adding build %s of job %s to item %s" %
(build, job, item))
item.addBuild(build)
if job.name == 'noop': if job.name == 'noop':
self.sched.onBuildStarted(build) self.sched.onBuildStarted(build)
self.sched.onBuildCompleted(build, 'SUCCESS', {}) self.sched.onBuildCompleted(build, 'SUCCESS', {})

View File

@ -392,13 +392,10 @@ class PipelineManager(object):
try: try:
nodeset = item.current_build_set.getJobNodeSet(job.name) nodeset = item.current_build_set.getJobNodeSet(job.name)
self.sched.nodepool.useNodeSet(nodeset) self.sched.nodepool.useNodeSet(nodeset)
build = self.sched.executor.execute( self.sched.executor.execute(
job, item, self.pipeline, job, item, self.pipeline,
build_set.dependent_changes, build_set.dependent_changes,
build_set.merger_items) build_set.merger_items)
self.log.debug("Adding build %s of job %s to item %s" %
(build, job, item))
item.addBuild(build)
except Exception: except Exception:
self.log.exception("Exception while executing job %s " self.log.exception("Exception while executing job %s "
"for change %s:" % (job, item.change)) "for change %s:" % (job, item.change))