From 88db9cb888ee3449ee8c8d15a10da289a40a6b96 Mon Sep 17 00:00:00 2001 From: Evgeny Antyshev Date: Thu, 4 Jun 2015 12:51:40 +0000 Subject: [PATCH] Don't send reports without any job Some CIs like to narrow their scope to a certain set of files. For that, they specify file mask on per-job basis. So there appear annoying comments with only "Build succeeded". (an example complaint: http://lists.openstack.org/pipermail/openstack-dev/2015-June/065367.html) Moreover, most of CIs which don't bother filtering, make lots of comments to doc/unittest changes, which is also wrong. By this change we drop such reports, leaving a record at debug level. We also don't want to report on failures in such configuration, as it's impossible to recheck them. Change-Id: Ifa43b6a2cd07d81b26dd2fe48e780c5ac94dbbb9 --- zuul/scheduler.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zuul/scheduler.py b/zuul/scheduler.py index 131ad62c3f..39d19b8c34 100644 --- a/zuul/scheduler.py +++ b/zuul/scheduler.py @@ -1521,7 +1521,13 @@ class BasePipelineManager(object): def _reportItem(self, item): self.log.debug("Reporting change %s" % item.change) ret = True # Means error as returned by trigger.report - if self.pipeline.didAllJobsSucceed(item): + if not self.pipeline.getJobs(item): + # We don't send empty reports with +1, + # and the same for -1's (merge failures or transient errors) + # as they cannot be followed by +1's + self.log.debug("No jobs for change %s" % item.change) + actions = [] + elif self.pipeline.didAllJobsSucceed(item): self.log.debug("success %s" % (self.pipeline.success_actions)) actions = self.pipeline.success_actions item.setReportedResult('SUCCESS')