aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/guix-build-coordinator.in41
1 files changed, 41 insertions, 0 deletions
diff --git a/scripts/guix-build-coordinator.in b/scripts/guix-build-coordinator.in
index 04c52e2..1774fa3 100644
--- a/scripts/guix-build-coordinator.in
+++ b/scripts/guix-build-coordinator.in
@@ -165,6 +165,47 @@
(setvbuf (current-error-port) 'line)
(match (cdr (program-arguments))
+ (("build" "show" rest ...)
+ (let ((opts (parse-options %base-options
+ %base-option-defaults
+ rest)))
+ (let ((datastore (database-uri->datastore
+ (assq-ref opts 'database))))
+ (match (assq-ref opts 'arguments)
+ ((build-id)
+
+ (let ((build-details (datastore-find-build datastore build-id)))
+ (simple-format #t "derivation name: ~A
+priority: ~A
+processed?: ~A
+"
+ (assq-ref build-details 'derivation-name)
+ (assq-ref build-details 'priority)
+ (assq-ref build-details 'processed))
+
+ (let ((setup-failures
+ (datastore-list-setup-failures-for-build datastore build-id)))
+ (unless (null? setup-failures)
+ (display "\nsetup failures:\n")
+ (for-each
+ (lambda (setup-failure)
+ (simple-format #t " - agent: ~A
+ failure reason: ~A
+"
+ (assq-ref setup-failure 'agent-id)
+ (assq-ref setup-failure 'failure-reason))
+ (when (string=? (assq-ref setup-failure 'failure-reason)
+ "missing_inputs")
+ (simple-format #t " missing inputs:\n")
+ (for-each (lambda (missing-input)
+ (simple-format #t
+ " - ~A\n"
+ missing-input))
+ (datastore-list-setup-failure-missing-inputs
+ datastore
+ (assq-ref setup-failure 'id)))
+ (newline)))
+ setup-failures)))))))))
(("build" rest ...)
(let ((opts (parse-options (append %build-options
%base-options)