Browse Source

Set merge result correctly on exceptions

If an exception was received during a report, _reportItem would
erroneously indicate that it had been reported without error.
If a merge was expected, isMerged would be called which may then
raise a further exception which would stop queue processing.

Instead, set the default return value for _reportItem to True
because trigger.report returns a true value on error.  This will
cause the change to be marked as reported (with a value of ERROR),
the merge check skipped, and the change will be quickly removed
from the pipeline.

Change-Id: I08b7cee486111200ac9857644d478727c635908d
changes/15/43815/2
James E. Blair 9 years ago
parent
commit
b98fcdb499
  1. 2
      zuul/scheduler.py

2
zuul/scheduler.py

@ -1065,7 +1065,7 @@ class BasePipelineManager(object):
if item.change.is_reportable and item.reported:
return 0
self.log.debug("Reporting change %s" % item.change)
ret = None
ret = True # Means error as returned by trigger.report
if self.pipeline.didAllJobsSucceed(item):
self.log.debug("success %s %s" % (self.success_action,
self.failure_action))

Loading…
Cancel
Save