Abort reconfiguration when cat jobs fail
Currently, if a cat job fails during reconfiguration, we simply proceed without that section of the config, which usually doesn't work out well. Instead, raise an exception which will abort the reconfiguration. Change-Id: I87f2d870f007e3df5f47c04ef49add27c8a0b554
This commit is contained in:
parent
5762fd15be
commit
3b5b335ca2
|
@ -1342,6 +1342,8 @@ class TenantParser(object):
|
|||
continue
|
||||
TenantParser.log.debug("Waiting for cat job %s" % (job,))
|
||||
job.wait()
|
||||
if not job.updated:
|
||||
raise Exception("Cat job %s failed" % (job,))
|
||||
TenantParser.log.debug("Cat job %s got files %s" %
|
||||
(job, job.files))
|
||||
loaded = False
|
||||
|
|
|
@ -134,18 +134,18 @@ class MergeClient(object):
|
|||
def onBuildCompleted(self, job):
|
||||
data = getJobData(job)
|
||||
merged = data.get('merged', False)
|
||||
updated = data.get('updated', False)
|
||||
job.updated = data.get('updated', False)
|
||||
commit = data.get('commit')
|
||||
files = data.get('files', {})
|
||||
repo_state = data.get('repo_state', {})
|
||||
job.files = files
|
||||
self.log.info("Merge %s complete, merged: %s, updated: %s, "
|
||||
"commit: %s" %
|
||||
(job, merged, updated, commit))
|
||||
(job, merged, job.updated, commit))
|
||||
job.setComplete()
|
||||
if job.build_set:
|
||||
self.sched.onMergeCompleted(job.build_set,
|
||||
merged, updated, commit, files,
|
||||
merged, job.updated, commit, files,
|
||||
repo_state)
|
||||
# The test suite expects the job to be removed from the
|
||||
# internal account after the wake flag is set.
|
||||
|
|
Loading…
Reference in New Issue