Skip to content

Commit

Permalink
Fix Automated Tests table rows for absent and error results
Browse files Browse the repository at this point in the history
This fixes my own oversight from
#5480 . In changing
the signature of make_row there, I did not remember to update
all these other calls to it. This means make_row goes a bit
crazy trying to treat 'FAILED' or 'ABSENT' as a subject and
an error string or empty string as the outcome, and winds up
rendering what looks to the user like an empty row. This should
fix it so we actually get rows with sensible content again when
a result is absent or there's some kind of remote rule error.
Thanks to @decathorpe for finding this.

Signed-off-by: Adam Williamson <[email protected]>
(cherry picked from commit 960945f)
  • Loading branch information
AdamWill authored and mergify[bot] committed Jan 9, 2024
1 parent 790be5e commit 137c402
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions bodhi-server/bodhi/server/templates/update.html
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,17 @@ <h3 class="modal-title" id="waiveModalLabel">Trigger Tests</h3>
// show missing tests and remote rule yaml problems first
if (buildname in missing_tests) {
$.each(missing_tests[buildname], function(i, result) {
// note the data structure is a bit different for
// test-result-missing than the other cases we handle at
// the end, so getting scenario and subject is a bit
// different. why? ask greenwave
var scenario = 'no_scenario';
if (result.scenario) {
scenario = result.scenario;
}
table.append(make_row(
result.item[0],
scenario,
'ABSENT',
result.testcase,
'',
Expand All @@ -1076,6 +1086,8 @@ <h3 class="modal-title" id="waiveModalLabel">Trigger Tests</h3>
}
$.each(invalid_gating_repos, function (i, repo) {
table.append(make_row(
'Remote policy errors',
'no_scenario',
'FAILED',
repo,
'remote policy gating.yaml parsing failed',
Expand All @@ -1085,6 +1097,8 @@ <h3 class="modal-title" id="waiveModalLabel">Trigger Tests</h3>
});
$.each(missing_gating_repos, function (i, repo) {
table.append(make_row(
'Remote policy errors',
'no_scenario',
'FAILED',
repo,
'remote policy gating.yaml missing',
Expand All @@ -1094,6 +1108,8 @@ <h3 class="modal-title" id="waiveModalLabel">Trigger Tests</h3>
});
$.each(failed_fetch_gating_repos, function (i, repo) {
table.append(make_row(
'Remote policy errors',
'no_scenario',
'FAILED',
repo,
'remote policy gating.yaml retrieval failed',
Expand Down
1 change: 1 addition & 0 deletions news/PR5581.bug
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed Automated Tests table in the web UI not showing missing results or remote rule errors correctly

0 comments on commit 137c402

Please sign in to comment.