From a6ccbd113de22ddf606440c05a4134fb28a0d380 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Mon, 13 Jan 2020 20:07:00 +0100 Subject: fetch and display bugs Retrieve bugs from udd-mirror by tags/usertags and display relevant bug numbers in the webapp. --- webapp.py | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 2 deletions(-) (limited to 'webapp.py') diff --git a/webapp.py b/webapp.py index 6d1ad76..8acf92f 100644 --- a/webapp.py +++ b/webapp.py @@ -38,6 +38,7 @@ index_template = """ architecture started result log + bugs @@ -57,6 +58,13 @@ index_template = """ log xz + + {%- if build.buglvl == 2 -%} + patch reported + {%- elif build.buglvl == 1 -%} + bug reported + {%- endif -%} + {%- endfor -%} @@ -73,7 +81,19 @@ index_template = """ """ -src_template = """ +src_template = """ +{%- macro render_bug(bugobj) -%} + #{{ bugobj.bugnum }} + {%- if bugobj.patched %} + [+] + {%- endif -%}: + {% if bugobj.package != "src:" + bugobj.affects and + not bugobj.title.startswith(bugobj.affects + ":") -%} + {{- bugobj.package|e }}: + {% endif -%} + {{- bugobj.title|e -}} +{%- endmacro -%} + {{ sourcepackage|e }} - Debian cross build @@ -121,8 +141,30 @@ footer { + {%- if bugs.ftbfs -%} +
+

Reported FTBFS bugs

+ +
+ {%- endif -%}

Cross build dependency satisfiability

+ {%- if bugs.bdsat -%} +
Reported satisfiability problems
+ + {%- endif -%} @@ -162,6 +204,16 @@ footer {

Cross builds

+ {%- if bugs.ftcbfs -%} +
Reported cross build failures
+
    + {%- for bug in bugs.ftcbfs|sort(attribute="bugnum") -%} +
  • + {{- render_bug(bug) -}} +
  • + {%- endfor -%} +
+ {%- endif -%} {%- if builds -%}
@@ -285,7 +337,10 @@ def collect_depstate(conn, source): def show_index(): with db.engine.connect() as conn: builds = list(conn.execute(""" - SELECT source, version, architecture, starttime, filename + SELECT source, version, architecture, starttime, filename, + ifnull((SELECT max(patched + 1) FROM bugs + WHERE affects = source), + 0) AS buglvl FROM builds WHERE success = 0 ORDER BY starttime @@ -304,6 +359,12 @@ def show_source(source): SELECT version, architecture, success, starttime, filename FROM builds WHERE source = :source;""") context["builds"] = list(conn.execute(query, source=source)) + query = sqlalchemy.text(""" + SELECT bugnum, kind, title, package, patched, affects + FROM bugs WHERE affects = :affects;""") + context["bugs"] = {} + for bug in conn.execute(query, affects=source): + context["bugs"].setdefault(bug.kind, []).append(bug) context["show_bootstrapdn"] = \ any(reason and not reason.startswith("skew ") for reason in context["depresult"].keys()) -- cgit v1.2.3