[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: reproducible Archlinux ToDo: drop 8000 sql queries
Holger Levsen
gitlab at salsa.debian.org
Sat Sep 22 18:12:59 BST 2018
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
7c77b0d3 by Holger Levsen at 2018-09-22T16:36:32Z
reproducible Archlinux ToDo: drop 8000 sql queries
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
24be2ec5 by Holger Levsen at 2018-09-22T17:11:41Z
reproducible Archlinux scheduler: fixup
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
2 changed files:
- TODO
- bin/reproducible_archlinux_scheduler.sh
Changes:
=====================================
TODO
=====================================
@@ -332,7 +332,10 @@ See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian
* use db
** problem: we currently have more (detailed) stati in archlinux
** extend scheduler.sh:
+*** stop checking making 8000 queries instead of 1...
*** actually schedule old packages once queue is empty (except blacklisted packages)
+**** at first reschedule packages which never have been build (according to the db)
+**** once there are no more left, reschedule based on last build_date
*** also delete unknown packages from db: sources and schedule, later results as well
*** check/make sure that packages which are newer in trunk than repo are only scheduled once
** make build.sh read & write db
=====================================
bin/reproducible_archlinux_scheduler.sh
=====================================
@@ -80,12 +80,13 @@ update_archlinux_repositories() {
PKG=$pkgbase
SUITE="archlinux_$repo"
ARCH="x86_64"
+ # FIXME: doing the next line 8000 times is grossly inefficient and should be replaced by one single query
VERSION=$(query_db "SELECT version FROM sources WHERE name='$PKG' AND suite='$SUITE' AND architecture='$ARCH';" || query_db "SELECT version FROM sources WHERE name='$PKG' AND suite='$SUITE' AND architecture='$ARCH';")
if [ -z "$VERSION" ] ; then
# new package, add to db and schedule
echo "new package found: $repo/$pkgbase $version "
- echo " INSERT into sources (name, version, suite, architecture) VALUES ('$PKG', '$VERSION', '$SUITE', '$ARCH');"
- query_db "INSERT into sources (name, version, suite, architecture) VALUES ('$PKG', '$VERSION', '$SUITE', '$ARCH');"
+ echo " INSERT into sources (name, version, suite, architecture) VALUES ('$PKG', '$version', '$SUITE', '$ARCH');"
+ query_db "INSERT into sources (name, version, suite, architecture) VALUES ('$PKG', '$version', '$SUITE', '$ARCH');"
PKGID=$(query_db "SELECT id FROM sources WHERE name='$PKG' AND suite='$SUITE' AND architecture='$ARCH';")
query_db "INSERT INTO schedule (package_id, date_scheduled) VALUES ('$PKGID', '$DATE');"
elif [ "$VERSION" != "$version" ] ; then
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/3d46a8655142cd0b5421e77bbd264b81cd0e6d9f...24be2ec56226f9204b7fff1dfdfdbf4be7c08264
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/3d46a8655142cd0b5421e77bbd264b81cd0e6d9f...24be2ec56226f9204b7fff1dfdfdbf4be7c08264
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/20180922/90f8445d/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list