2
0
Fork 0
mirror of git://git.savannah.gnu.org/guix/guix-cuirass.git synced 2023-12-14 06:03:04 +01:00

database: Fix "db-update-build-status!".

* src/cuirass/database.scm (db-update-build-status): Only consider evaluations
that happened before the current one. This is useful when updating the build
status of old evaluations.
This commit is contained in:
Mathieu Othacehe 2021-02-01 12:30:38 +01:00
parent 7697735fce
commit 54244e6e97
No known key found for this signature in database
GPG key ID: 8354763531769CA6

View file

@ -797,14 +797,16 @@ log file for DRV."
UPDATE Builds SET stoptime =" now
", status =" status
", last_status =
(SELECT Builds.status FROM (SELECT job_name, specification FROM Builds
(SELECT Builds.status FROM
(SELECT evaluation, job_name, specification FROM Builds
INNER JOIN Evaluations ON Builds.evaluation = Evaluations.id WHERE
derivation = " drv ") AS cur, Builds INNER JOIN
Evaluations ON Builds.evaluation = Evaluations.id
WHERE cur.job_name = Builds.job_name AND
cur.specification = Evaluations.specification AND
Builds.evaluation < cur.evaluation AND
Builds.status >= 0
ORDER BY evaluation DESC LIMIT 1)
ORDER BY Builds.evaluation DESC LIMIT 1)
WHERE derivation =" drv
" AND status != " status ";")))
(when (positive? rows)