[Git][qa/jenkins.debian.net][master] 3 commits: rdn stats: fix variable name

Holger Levsen (@holger) gitlab at salsa.debian.org
Tue Jul 1 15:37:45 BST 2025



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


Commits:
57d0fca7 by Jochen Sprickerhof at 2025-07-01T16:37:31+02:00
rdn stats: fix variable name

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

- - - - -
b9016210 by Jochen Sprickerhof at 2025-07-01T16:37:35+02:00
rdn stats: ignore cache write errors

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

- - - - -
3f8d857f by Jochen Sprickerhof at 2025-07-01T16:37:38+02:00
rdn stats: change output to directory

* Hardcode output filenames.
* Drop temporary file logic as the output is fast enough now.

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

- - - - -


2 changed files:

- bin/rebuilderd_stats.py
- hosts/osuosl5-amd64/etc/cron.d/rebuilderd


Changes:

=====================================
bin/rebuilderd_stats.py
=====================================
@@ -7,7 +7,7 @@
 #
 # Licensed under GPL-2
 
-from argparse import ArgumentParser, FileType
+from argparse import ArgumentParser
 from datetime import datetime
 from hashlib import file_digest
 from os import path
@@ -40,14 +40,9 @@ def main() -> None:
         help="Cache file (will be ignored when this script changes).",
     )
     parser.add_argument(
-        "datefile",
+        "output_dir",
         type=Path,
-        help="Output HTML sorted by build date",
-    )
-    parser.add_argument(
-        "sizefile",
-        type=Path,
-        help="Output HTML sorted by diffoscope size",
+        help="Output path (it will create a index.html and index_size.html there)",
     )
     args = parser.parse_args()
     cx = connect(args.db)
@@ -152,8 +147,8 @@ def main() -> None:
 
         if build_id in cache:
             cache_new[build_id] = cache[build_id]
-            message, diffsize = cache[build_id]
-            messages_packages[message].append({"name": name, "src": src_name, "id": build_id, "diff": diff_size})
+            message, difflen = cache[build_id]
+            messages_packages[message].append({"name": name, "src": src_name, "id": build_id, "diff": difflen})
             continue
 
         build_log = unzstd.stream_reader(build_log).read().decode("utf-8")
@@ -172,13 +167,16 @@ def main() -> None:
     messages_packages = {k: v for k, v in messages_packages.items() if v}  # Remove empty categories
 
     if args.cache.name:
-        with open(args.cache, "wb") as fb:
-            dump((hash_key, cache_new), fb)
+        try:
+            with open(args.cache, "wb") as fb:
+                dump((hash_key, cache_new), fb)
+        except OSError:
+            pass
 
     db_size = path.getsize(args.db)
-    with args.datefile.open("w") as outfile:
+    with (args.output_dir / "index.html").open("w") as outfile:
         output(outfile, args.arch, db_size, total, messages_packages, False)
-    with args.sizefile.open("w") as outfile:
+    with (args.output_dir / "index_size.html").open("w") as outfile:
         output(outfile, args.arch, db_size, total, messages_packages, True)
 
 


=====================================
hosts/osuosl5-amd64/etc/cron.d/rebuilderd
=====================================
@@ -1,4 +1,4 @@
 MAILTO=root
-42 */3 * * * rebuilderd for arch in all amd64 arm64 armel armhf i386 ppc64el riscv64 ; do mkdir -p /srv/rebuilderd/$arch/stats/ && /srv/jenkins/bin/rebuilderd_stats.py $arch /srv/rebuilderd/$arch/rebuilderd.db --cache /srv/rebuilderd/$arch/stats/cache.pickle /srv/rebuilderd/$arch/stats/index.html.tmp /srv/rebuilderd/$arch/stats/index_date.html.tmp && mv /srv/rebuilderd/$arch/stats/index.html.tmp /srv/rebuilderd/$arch/stats/index.html && mv /srv/rebuilderd/$arch/stats/index_date.html.tmp /srv/rebuilderd/$arch/stats/index_date.html ; done
+42 */3 * * * rebuilderd for arch in all amd64 arm64 armel armhf i386 ppc64el riscv64 ; do mkdir -p /srv/rebuilderd/$arch/stats/ && /srv/jenkins/bin/rebuilderd_stats.py $arch /srv/rebuilderd/$arch/rebuilderd.db --cache /srv/rebuilderd/$arch/stats/cache.pickle /srv/rebuilderd/$arch/stats/ ; done
 23 0,6,12,18 * * * rebuilderd for arch in all amd64 arm64 armel armhf i386 ppc64el riscv64 ; do /srv/jenkins/bin/rebuilderd_graph.sh $arch ; done
 



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/c8b1bac248ab940328e7a45e85fd0d38bd99f81c...3f8d857ff184053f010d789ab142fb615ed7707a

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/c8b1bac248ab940328e7a45e85fd0d38bd99f81c...3f8d857ff184053f010d789ab142fb615ed7707a
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/20250701/71b96776/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list