diff options
author | James E. Blair <jim@acmegating.com> | 2022-07-09 10:58:52 -0700 |
---|---|---|
committer | James E. Blair <jim@acmegating.com> | 2022-07-21 18:16:42 -0700 |
commit | feb032d9b50fee81420e7ab0340daad360386c01 (patch) | |
tree | a595193e25311c2e5e52a76a940649b712c20f46 /zuul/reporter | |
parent | cce45ec1dd4b526c75e3d0d5e65b647a1deafcbb (diff) | |
download | zuul-feb032d9b50fee81420e7ab0340daad360386c01.tar.gz |
Hide skipped jobs in status/reports
For heavy users of "dispatch jobs" (where many jobs are declared as
dependencies of a single job which then mutates the child_jobs
return value to indicate which few of those should be run), there
may be large numbers of "SKIPPED" jobs in the status page and in the
final job report, which reduces the usability of both of those.
Yet it is important for users to be able to see skipped jobs since
they may represent an error (they may be inadvertently skipped).
To address this, we remove "SKIPPED" jobs from the status page by
default, but add a button at the bottom of the change box which
can toggle their display.
We remove "SKIPPED" jobs from the report, but add a note at the
bottom which says "Skipped X jobs". Users can follow the buildset
link to see which ones were skipped.
The buildset page will continue to show all the jobs for the buildset.
Change-Id: Ie297168cdf5b39d1d6f219e9b2efc44c01e87f35
Diffstat (limited to 'zuul/reporter')
-rw-r--r-- | zuul/reporter/__init__.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/zuul/reporter/__init__.py b/zuul/reporter/__init__.py index 9b8f2c11c..5723316a3 100644 --- a/zuul/reporter/__init__.py +++ b/zuul/reporter/__init__.py @@ -257,9 +257,13 @@ class BaseReporter(object, metaclass=abc.ABCMeta): # Extract the report elements from an item config = self.connection.sched.config jobs_fields = [] + skipped = 0 for job in item.getJobs(): build = item.current_build_set.getBuild(job.name) (result, url) = item.formatJobResult(job) + if result == 'SKIPPED': + skipped += 1 + continue if not job.voting: voting = ' (non-voting)' else: @@ -300,12 +304,15 @@ class BaseReporter(object, metaclass=abc.ABCMeta): success_message = job.success_message jobs_fields.append( (name, url, result, error, elapsed, voting, success_message)) - return jobs_fields + return jobs_fields, skipped def _formatItemReportJobs(self, item): # Return the list of jobs portion of the report ret = '' - jobs_fields = self._getItemReportJobsFields(item) + jobs_fields, skipped = self._getItemReportJobsFields(item) for job_fields in jobs_fields: ret += '- %s%s : %s%s%s%s\n' % job_fields[:6] + if skipped: + jobtext = 'job' if skipped == 1 else 'jobs' + ret += 'Skipped %i %s\n' % (skipped, jobtext) return ret |