diff options
author | Christopher Baines <mail@cbaines.net> | 2020-05-01 19:53:20 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-05-01 19:53:20 +0100 |
commit | 37f9d50b50f1ca97137ca85486b5b77f7e7fccc4 (patch) | |
tree | a08285ff1bb18efe601d878f12b79580d03dd20c /scripts | |
parent | 5b6bf2ff8157a104dc144935d8fe0e68edc8288d (diff) | |
download | build-coordinator-37f9d50b50f1ca97137ca85486b5b77f7e7fccc4.tar build-coordinator-37f9d50b50f1ca97137ca85486b5b77f7e7fccc4.tar.gz |
Add guix-build-coordinator build show ...
A way of getting information out about a build.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/guix-build-coordinator.in | 41 |
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) |