[projects/pld-builder.new] queue.html: the last good build time beside the duration
arekm
arekm at pld-linux.org
Fri Nov 13 11:33:48 CET 2026
commit f2c3b423320ae9eb4d7762331b6d555f1e2b22a8
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri Nov 13 11:31:22 2026 +0100
queue.html: the last good build time beside the duration
"OK (2m 12s, last OK time: 2m 05s, log)", and the same while building,
instead of only in the tooltip.
PLD_Builder/queue_html.py | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/PLD_Builder/queue_html.py b/PLD_Builder/queue_html.py
index b1425c7..fdc2da4 100644
--- a/PLD_Builder/queue_html.py
+++ b/PLD_Builder/queue_html.py
@@ -233,15 +233,19 @@ def builder_html(batch, name, request_id, history):
before = start or (time.time() if status == "?" else batch.builders_status_time[name])
last = next(((s, e) for batch_id, s, e in history.get((batch.spec, name), [])
if batch_id != batch.b_id and e <= before), None)
+ last_ok = ""
if last:
about = "\n".join(filter(None, [about, f"last OK build: {duration(last[1] - last[0])}, {exact(last[0])}"]))
data += f" data-last={int(last[1] - last[0])}"
+ # beside a build that ran, to tell how long this one goes on
+ if took:
+ last_ok = f"last OK time: {duration(last[1] - last[0])}"
# a skipped batch was not built, so it has no log
if is_final(status) and not status.startswith("SKIP"):
log = f'<a class=log href="{escape(build_log(batch, name, status, request_id))}">log</a>'
- # right after the status: "OK (2m 12s, log)"
- more = ", ".join(([f"<b class=took{data}>{took}</b>"] if took else []) + ([log] if log else []))
+ # right after the status: "OK (2m 12s, last OK time: 2m 05s, log)"
+ more = ", ".join(([f"<b class=took{data}>{took}</b>"] if took else []) + ([last_ok] if last_ok else []) + ([log] if log else []))
more = f" ({more})" if more else ""
title = f' title="{escape(about)}"' if about else ""
# each bin builder in its own column, empty in rows not sent to it; the src builder goes elsewhere
@@ -269,10 +273,10 @@ LEGEND = """<h2>How to read a request</h2>
<div class=batch>
<div class=what><b>package-version-release</b> spec and branch with their git log, build options</div>
<div class=builders>
-<div class=builder><span class=who>builder</span><span class=state><b class="s ok">OK</b> (<b class=took>took</b>, <a class=log>log</a>)</span>
+<div class=builder><span class=who>builder</span><span class=state><b class="s ok">OK</b> (<b class=took>took</b>, last OK time, <a class=log>log</a>)</span>
<span class=span>start → end</span>
<p>Built, and its rpms have reached ftp. log: the build log.</p></div>
-<div class=builder><span class=who>builder</span><span class=state><b class="s fail">FAIL_<wbr>BUILD</b> (<b class=took>took</b>, <a class=log>log</a>)</span>
+<div class=builder><span class=who>builder</span><span class=state><b class="s fail">FAIL_<wbr>BUILD</b> (<b class=took>took</b>, last OK time, <a class=log>log</a>)</span>
<span class=span>start → end</span>
<p>Failed, here in %build of the spec.</p></div>
<div class=builder><span class=who>builder</span><span class=state><b class="s skip">SKIP</b></span><span class=span>time</span>
@@ -284,18 +288,18 @@ LEGEND = """<h2>How to read a request</h2>
<div class=builders>
<div class="builder wait"><span class=who>builder</span><span class=state><b class="s wait">waiting</b></span><span class=span></span>
<p>Not started yet.</p></div>
-<div class="builder run"><span class=who>builder</span><span class=state><b class="s run">building</b> (<b class=took>so far</b>)</span>
+<div class="builder run"><span class=who>builder</span><span class=state><b class="s run">building</b> (<b class=took>so far</b>, last OK time)</span>
<span class=span>start → …</span>
<p>Being built right now.</p></div>
-<div class="builder up"><span class=who>builder</span><span class=state><b class="s up">uploading</b> (<b class=took>took</b>)</span>
+<div class="builder up"><span class=who>builder</span><span class=state><b class="s up">uploading</b> (<b class=took>took</b>, last OK time)</span>
<span class=span>start → end</span>
<p>Built; its rpms are on the way to ftp. The times are of the build.</p></div>
</div>
</div>
<p class=note>Start and end: from the builder taking the package (fetching the src.rpm, installing
-BuildRequires, rpmbuild) to its result; sending the rpms to ftp is not counted. A tooltip gives them to the second,
-with the last good build of the package on that builder. A duration <b class="took slow">on orange</b> is a fifth longer than on the
-other builders (or than that last good build, while none of them is done), <b class="took slower">on dark orange</b>
+BuildRequires, rpmbuild) to its result; sending the rpms to ftp is not counted. A tooltip gives them to the second.
+Last OK time: how long the package last built well on that builder, whatever this build ends with. A duration <b class="took slow">on orange</b> is a fifth
+longer than on the other builders (or than the last OK one, while none of them is done), <b class="took slower">on dark orange</b>
twice as long, and at least a minute either way. The stripe on the left is red when anything failed, yellow while something waits or builds, green when
all is done. Times are in {zone}.</p>
</section>
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/pld-builder.new.git/commitdiff/f2c3b423320ae9eb4d7762331b6d555f1e2b22a8
More information about the pld-cvs-commit
mailing list