Skip to content

Commit b914d0c

Browse files
authored
Show a CI timeout as a failure (#46)
If things take too long, then CFBot will mark the build as timed out. Such builds would not have that "timeout" status reflected correctly, and would be displayed as running forever. Fixes #39
1 parent eec451f commit b914d0c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pgcommitfest/commitfest/templates/commitfest.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ <h3>{{p.is_open|yesno:"Active patches,Closed patches"}}</h3>
101101
<a href="https://github.com/postgresql-cfbot/postgresql/compare/cf/{{p.id}}~1...cf/{{p.id}}" title="View last patch set on GitHub"><img class="github-logo" src="/media/commitfest/github-mark.svg"/></a>
102102
<a href="https://cirrus-ci.com/github/postgresql-cfbot/postgresql/cf%2F{{p.id}}"
103103
title="View CI history{%if p.cfbot_results.failed_task_names %}. Failed jobs: {{p.cfbot_results.failed_task_names}}{%endif%}">
104-
{%if p.cfbot_results.failed > 0 %}
104+
{%if p.cfbot_results.failed > 0 or p.cfbot_results.branch_status == 'failed' or p.cfbot_results.branch_status == 'timeout' %}
105105
<img src="/media/commitfest/new_failure.svg"/>
106106
{%elif p.cfbot_results.completed < p.cfbot_results.total %}
107107
<img src="/media/commitfest/running.svg"/>

pgcommitfest/commitfest/views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ def commitfest(request, cfid):
304304
count(*) total,
305305
string_agg(task.task_name, ', ') FILTER (WHERE task.status in ('ABORTED', 'ERRORED', 'FAILED')) as failed_task_names,
306306
branch.commit_id IS NULL as needs_rebase,
307+
branch.status as branch_status,
307308
branch.apply_url,
308309
branch.patch_count,
309310
branch.first_additions,

0 commit comments

Comments
 (0)