From 062c4fb6f25578450371a861c429176d72ca3347 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 26 Sep 2013 07:46:00 -0700 Subject: [PATCH] Better English in failing_reasons So that the status display and logs read more better. Also, include the Zuul ref in JSON output so that the status screen can do something intelligent with unprocessed items (also it's an important bit of into). Change-Id: I1429344917856edfaeefa4e9655c2dad8081cae5 --- zuul/model.py | 1 + zuul/scheduler.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/zuul/model.py b/zuul/model.py index 056f41d9bb..3b5a1a5cf5 100644 --- a/zuul/model.py +++ b/zuul/model.py @@ -304,6 +304,7 @@ class Pipeline(object): ret['item_ahead'] = None ret['items_behind'] = [i.change._id() for i in item.items_behind] ret['failing_reasons'] = item.current_build_set.failing_reasons + ret['zuul_ref'] = item.current_build_set.ref ret['project'] = changeish.project.name ret['enqueue_time'] = int(item.enqueue_time * 1000) ret['jobs'] = [] diff --git a/zuul/scheduler.py b/zuul/scheduler.py index 46897bdb8b..8b6c20c874 100644 --- a/zuul/scheduler.py +++ b/zuul/scheduler.py @@ -998,7 +998,7 @@ class BasePipelineManager(object): self.cancelJobs(item) self.prepareRef(item) if item.current_build_set.unable_to_merge: - failing_reasons.append("merge conflict") + failing_reasons.append("it has a merge conflict") if self.launchJobs(item): changed = True if self.pipeline.didAnyJobFail(item): @@ -1007,7 +1007,7 @@ class BasePipelineManager(object): try: self.reportItem(item) except MergeFailure: - failing_reasons.append("did not merge") + failing_reasons.append("it did not merge") for item_behind in item.items_behind: self.log.info("Resetting builds for change %s because the " "item ahead, %s, failed to merge" %