Update merge status after merge:merge is submitted
When preparing a reference, we set the merge state to PENDING before emitting the merge:merge function. If any exception occurs when submitting the merge:merge job, the buildset is left PENDING and is never retried because prepareRef() early exit in such case. Move the merge_state change after the job has been submitted. An exception would let the state as is (ie NEW) and thus indicate it should be retried. Closes-Bug: #1358517 Change-Id: I4d91a15aaae878ed231d50ab5f4f7a65f0d0e830
This commit is contained in:
parent
f760f0e49f
commit
fe20ccf98b
|
@ -1441,7 +1441,6 @@ class BasePipelineManager(object):
|
|||
return True
|
||||
if build_set.merge_state == build_set.PENDING:
|
||||
return False
|
||||
build_set.merge_state = build_set.PENDING
|
||||
ref = build_set.ref
|
||||
if hasattr(item.change, 'refspec') and not ref:
|
||||
self.log.debug("Preparing ref for: %s" % item.change)
|
||||
|
@ -1459,6 +1458,8 @@ class BasePipelineManager(object):
|
|||
self.sched.merger.updateRepo(item.change.project.name,
|
||||
url, build_set,
|
||||
self.pipeline.precedence)
|
||||
# merge:merge has been emitted properly:
|
||||
build_set.merge_state = build_set.PENDING
|
||||
return False
|
||||
|
||||
def _launchJobs(self, item, jobs):
|
||||
|
|
Loading…
Reference in New Issue