[Git][qa/jenkins.debian.net][master] reproducible Debian: speed up query to get json output for all packages, thanks to Myon! <3

Holger Levsen (@holger) gitlab at salsa.debian.org
Mon Jul 10 23:00:41 BST 2023



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


Commits:
4153d0d0 by Holger Levsen at 2023-07-11T00:00:23+02:00
reproducible Debian: speed up query to get json output for all packages, thanks to Myon! <3

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


2 changed files:

- bin/reproducible_html_indexes.py
- bin/reproducible_json.py


Changes:

=====================================
bin/reproducible_html_indexes.py
=====================================
@@ -76,7 +76,7 @@ results = db_table('results')
 sources = db_table('sources')
 notes = db_table('notes')
 
-# filtered_issues is defined in reproducible_common.py and
+# filtered_issues is defined in bin/rblib/const.py and
 # can be used to excludes some FTBFS issues
 filter_issues_list = []
 for issue in filtered_issues:


=====================================
bin/reproducible_json.py
=====================================
@@ -2,7 +2,7 @@
 # -*- coding: utf-8 -*-
 #
 # Copyright © 2015-2018 Mattia Rizzolo <mattia at mapreri.org>
-# Copyright © 2015-2017 Holger Levsen <holger at layer-acht.org>
+# Copyright © 2015-2023 Holger Levsen <holger at layer-acht.org>
 # Based on reproducible_json.sh © 2014 Holger Levsen <holger at layer-acht.org>
 # Licensed under GPL-2
 #
@@ -35,11 +35,11 @@ log.info('Creating json dump of current reproducible status for %s', DISTRO)
 
 distro_id = get_distribution_id(DISTRO)
 
-# filter_query is defined in reproducible_common.py and excludes some FTBFS issues
+# filter_query is defined in bin/rblib/const.py and excludes some FTBFS issues
 query = text("SELECT s.name, r.version, s.suite, s.architecture, r.status, r.build_date " + \
         "FROM results AS r JOIN sources AS s ON r.package_id = s.id "+ \
         "WHERE status != '' AND s.distribution = :distro AND (( status != 'FTBFS' ) OR " \
-        " ( status = 'FTBFS' and r.package_id NOT IN (SELECT n.package_id FROM NOTES AS n WHERE " + filter_query + " )))")
+        " ( status = 'FTBFS' and NOT exists (SELECT FROM NOTES AS n WHERE n.package_id = r.package_id AND ( " + filter_query + " ))))")
 
 result = sorted(query_db(query, distro=distro_id))
 log.info('\tprocessing ' + str(len(result)))



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

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/4153d0d0c4577e2fe4cfd0c97d486cba56580b6e
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/20230710/64294f46/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list