Fix the successful builds outputs query where there are no revisions
As it was erroring before.
This commit is contained in:
parent
e359cfea2b
commit
801ebdfa9e
1 changed files with 12 additions and 5 deletions
|
|
@ -285,7 +285,8 @@ ORDER BY COUNT(*) DESC")
|
||||||
build-server-id
|
build-server-id
|
||||||
guix-revision-commits)
|
guix-revision-commits)
|
||||||
(define query
|
(define query
|
||||||
(string-append "
|
(string-append
|
||||||
|
"
|
||||||
SELECT DISTINCT derivation_output_details.path
|
SELECT DISTINCT derivation_output_details.path
|
||||||
FROM derivations
|
FROM derivations
|
||||||
INNER JOIN derivation_outputs
|
INNER JOIN derivation_outputs
|
||||||
|
|
@ -304,6 +305,11 @@ WHERE derivation_output_details.path NOT IN (
|
||||||
WHERE narinfo_fetch_records.build_server_id = $1
|
WHERE narinfo_fetch_records.build_server_id = $1
|
||||||
)
|
)
|
||||||
AND derivations.system = 'x86_64-linux'
|
AND derivations.system = 'x86_64-linux'
|
||||||
|
"
|
||||||
|
(if (null? guix-revision-commits)
|
||||||
|
""
|
||||||
|
(string-append
|
||||||
|
"
|
||||||
AND derivations.id IN (
|
AND derivations.id IN (
|
||||||
SELECT derivation_id
|
SELECT derivation_id
|
||||||
FROM package_derivations
|
FROM package_derivations
|
||||||
|
|
@ -312,10 +318,11 @@ WHERE derivation_output_details.path NOT IN (
|
||||||
INNER JOIN guix_revisions
|
INNER JOIN guix_revisions
|
||||||
ON guix_revisions.id = guix_revision_package_derivations.revision_id
|
ON guix_revisions.id = guix_revision_package_derivations.revision_id
|
||||||
WHERE guix_revisions.commit IN ("
|
WHERE guix_revisions.commit IN ("
|
||||||
(string-join (map quote-string guix-revision-commits)
|
(string-join (map quote-string guix-revision-commits)
|
||||||
",")
|
",")
|
||||||
")
|
")
|
||||||
)
|
)"))
|
||||||
|
"
|
||||||
LIMIT 10000"))
|
LIMIT 10000"))
|
||||||
|
|
||||||
(map car (exec-query conn query (list (number->string build-server-id)))))
|
(map car (exec-query conn query (list (number->string build-server-id)))))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue