[Git][qa/jenkins.debian.net][master] rdn stats: Only analyze latest rebuild

Holger Levsen (@holger) gitlab at salsa.debian.org
Wed Sep 17 16:26:21 BST 2025



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
02909e09 by Jochen Sprickerhof at 2025-09-17T17:26:12+02:00
rdn stats: Only analyze latest rebuild

The old SQL code filtered by build status first resulting in outdated
entries. Now we filter by rebuild id before filtering by status.

(cherry picked from commit 30ac162b2704c07e6ec504f2e77f6ded80e2a6e0)
Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/rebuilderd_stats.py


Changes:

=====================================
bin/rebuilderd_stats.py
=====================================
@@ -161,7 +161,8 @@ def main() -> None:
             " JOIN build_inputs i ON r.build_input_id = i.id"
             " JOIN source_packages s ON i.source_package_id = s.id"
             f" WHERE (a.status = 'BAD' OR r.status = 'FAIL') AND s.seen_in_last_sync = True AND s.release = '{args.release}'"
-            " GROUP BY a.name, s.name HAVING r.id = MAX(r.id) ORDER BY r.built_at"
+            " AND r.id IN (SELECT r.id FROM rebuilds r JOIN build_inputs i ON r.build_input_id = i.id GROUP BY i.source_package_id HAVING r.id = MAX(r.id))"
+            " ORDER BY r.built_at"
         )
         api = "../api/v1"
     else:



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/02909e09352660af7678be047ed3aa1478315b25

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/02909e09352660af7678be047ed3aa1478315b25
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20250917/3e66b713/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list