diff options
author | Christopher Baines <mail@cbaines.net> | 2022-07-07 23:20:36 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2022-07-07 23:20:36 +0100 |
commit | c7494248038d8436a8905d782226de6be08d043b (patch) | |
tree | 8736dd3bde29d4fd28c2e95aca146b8b7b821737 | |
parent | 3175ac21c2eea043297e9a47e374635baad03c79 (diff) | |
download | build-coordinator-c7494248038d8436a8905d782226de6be08d043b.tar build-coordinator-c7494248038d8436a8905d782226de6be08d043b.tar.gz |
Fix bug when handling missing output details
-rw-r--r-- | guix-build-coordinator/hooks.scm | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/guix-build-coordinator/hooks.scm b/guix-build-coordinator/hooks.scm index 277094f..5163a5d 100644 --- a/guix-build-coordinator/hooks.scm +++ b/guix-build-coordinator/hooks.scm @@ -472,26 +472,27 @@ (event . scheduled) (build_id . ,build-id) (derivation . ,(assq-ref build-details 'derivation-name)) - ,@(let ((output-details - (datastore-find-derivation-output-details - datastore - (assq-ref build-details 'derivation-name)))) - (if (null? output-details) - '() - `((derivation_outputs - . ,(list->vector - (map - (lambda (output-details) - `((output . ,(assq-ref output-details 'output)) - (name . ,(assq-ref output-details 'name)) - ,@(if (assq-ref output-details 'hash) - `((hash_algorithm . ,(assq-ref output-details - 'hash-algorithm)) - (hash . ,(assq-ref output-details - 'hash))) - '()) - (recursive . ,(assq-ref output-details 'recursive?)))) - output-details)))))) + ,@(or + (and=> + (datastore-find-derivation-output-details + datastore + (assq-ref build-details 'derivation-name)) + (lambda (output-details) + `((derivation_outputs + . ,(list->vector + (map + (lambda (output-details) + `((output . ,(assq-ref output-details 'output)) + (name . ,(assq-ref output-details 'name)) + ,@(if (assq-ref output-details 'hash) + `((hash_algorithm . ,(assq-ref output-details + 'hash-algorithm)) + (hash . ,(assq-ref output-details + 'hash))) + '()) + (recursive . ,(assq-ref output-details 'recursive?)))) + output-details)))))) + '()) ,@(let ((created-at (assq-ref build-details 'created-at))) (if created-at `((timestamp . ,(string->number |