aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/model/derivation.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-01-04 21:20:32 +0000
committerChristopher Baines <mail@cbaines.net>2020-01-04 21:20:32 +0000
commite5aca1f3174b0a1ef7283de1a2fb6485f5171500 (patch)
tree9fa5290cac38f4207d0986f33987e16583062364 /guix-data-service/model/derivation.scm
parent04ab01725bb6e4ec04bb51c81234b4372a6beaa4 (diff)
downloaddata-service-e5aca1f3174b0a1ef7283de1a2fb6485f5171500.tar
data-service-e5aca1f3174b0a1ef7283de1a2fb6485f5171500.tar.gz
Remove the outputs from the query behind the revision derivations
As that data is now unused.
Diffstat (limited to 'guix-data-service/model/derivation.scm')
-rw-r--r--guix-data-service/model/derivation.scm41
1 files changed, 3 insertions, 38 deletions
diff --git a/guix-data-service/model/derivation.scm b/guix-data-service/model/derivation.scm
index 8ee1dd4..a1770c9 100644
--- a/guix-data-service/model/derivation.scm
+++ b/guix-data-service/model/derivation.scm
@@ -252,39 +252,7 @@ SELECT derivations.file_name,
ON builds.id = latest_build_status.build_id
WHERE builds.derivation_output_details_set_id =
derivations_by_output_details_set.derivation_output_details_set_id
- ) AS builds,
- (
- SELECT
- JSON_AGG(
- json_build_object(
- 'output_name', derivation_outputs.name,
- 'output_path', derivation_output_details.path,
- 'nars',
- (
- SELECT JSON_AGG(
- json_build_object(
- 'build_server_id', narinfo_fetch_records.build_server_id,
- 'hash_algorithm', nars.hash_algorithm,
- 'hash', nars.hash,
- 'size', nars.size
- )
- )
- FROM nars
- INNER JOIN narinfo_signatures
- ON nars.id = narinfo_signatures.nar_id
- INNER JOIN narinfo_signature_data
- ON narinfo_signature_data.id = narinfo_signatures.narinfo_signature_data_id
- INNER JOIN narinfo_fetch_records
- ON narinfo_signature_data.id = narinfo_fetch_records.narinfo_signature_data_id
- WHERE nars.store_path = derivation_output_details.path
- )
- )
- )
- FROM derivation_output_details
- INNER JOIN derivation_outputs
- ON derivation_output_details.id = derivation_outputs.derivation_output_details_id
- WHERE derivation_outputs.derivation_id = derivations.id
- ) AS outputs
+ ) AS builds
FROM derivations
INNER JOIN derivations_by_output_details_set
ON derivations.id = derivations_by_output_details_set.derivation_id
@@ -313,16 +281,13 @@ ORDER BY derivations.file_name
"")))
(map (match-lambda
- ((file_name system target builds outputs)
+ ((file_name system target builds)
(list file_name
system
target
(if (string-null? builds)
#()
- (json-string->scm builds))
- (if (string-null? outputs)
- #()
- (json-string->scm outputs)))))
+ (json-string->scm builds)))))
(exec-query conn
query
`(,commit-hash