Don't display in-progress builds/buildsets in the web listing

The main purpose of the build and buildset listings is to find
completed builds, not in-progress builds (that's the status page),
so when we query the Zuul API, always set "completed=true".

In the future, it might be nice to list in-progress builds on these
pages, but that will require significantly more UI work to add
it to the filter bar.

Additionally, update the buildset page to show in-progress builds.
It currently doesn't because it assumes all non-final builds are
retry attemtps and therefore stores them under a secondary key.
That's no longer true, and additionally, completed retried builds
now have an explicit "RETRY" result which makes them easy for
users to distinguish.

It's more useful for a user to be able to see that a buildset is
still in progress and also the retried builds (now that we store
all of them), so this change returns all the builds of a buildset.

Change-Id: I83d89c2903e6fd0aaf67c66f61d106b2c5db3797
This commit is contained in:
James E. Blair 2021-07-16 15:54:41 -07:00
parent cb613a1da9
commit 43a8e34559
2 changed files with 2 additions and 7 deletions

View File

@ -233,7 +233,7 @@ function writeFiltersToUrl(filters, location, history) {
}
function buildQueryString(filters) {
let queryString = ''
let queryString = '&complete=true'
if (filters) {
Object.keys(filters).map((key) => {
filters[key].forEach((value) => {

View File

@ -1037,13 +1037,8 @@ class ZuulWebAPI(object):
}
if builds:
ret['builds'] = []
ret['retry_builds'] = []
for build in builds:
# Put all non-final (retry) builds under a different key
if not build.final:
ret['retry_builds'].append(self.buildToDict(build))
else:
ret['builds'].append(self.buildToDict(build))
ret['builds'].append(self.buildToDict(build))
return ret
@cherrypy.expose