Skip to content

Commit

Permalink
Only show non-passing taskotron results when more than 16 builds.
Browse files Browse the repository at this point in the history
Taskotron recently began to return a large number of test results
per-package. For updates with many packages, this was causing
browsers to use a whole lot of memory rendering all the results.
This commit adjusts the logic so that only non-passing results are
displayed on updates with more than 16 builds.

re #951
  • Loading branch information
bowlofeggs committed Sep 27, 2016
1 parent 9cb2c11 commit 6b0f449
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions bodhi/server/templates/update.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,19 @@
// Then, once we have pruned, build a bunch of cells and render each
// result in the table
$.each(data, function(i, result) {
$('#resultsdb table').append(make_row(
result.outcome,
result.testcase.name,
result.result_data.item,
result.result_data.arch,
result.submit_time,
result.log_url
));
// When there are many builds in an update, the large number of taskotron results can be a
// problem for browsers. Only show the non-passing results in this case.
// See https://github.com/fedora-infra/bodhi/issues/951
if (builds.length < 16 || result.outcome != "PASSED") {
$('#resultsdb table').append(make_row(
result.outcome,
result.testcase.name,
result.result_data.item,
result.result_data.arch,
result.submit_time,
result.log_url
));
}
});

finish();
Expand Down Expand Up @@ -228,6 +233,9 @@

}

if (builds.length > 16) {
$("<h4>Large update detected: passing test results filtered.</h4>").insertBefore('#resultsdb table');
}
// Kick off a few chains of paginated queries. One for each of the
// possible testcases.
gather_testcases(base_url + 'testcases');
Expand Down

0 comments on commit 6b0f449

Please sign in to comment.