aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/guix-build-coordinator-agent.in11
-rw-r--r--scripts/guix-build-coordinator.in23
2 files changed, 28 insertions, 6 deletions
diff --git a/scripts/guix-build-coordinator-agent.in b/scripts/guix-build-coordinator-agent.in
index 2f9e774..69ecf8a 100644
--- a/scripts/guix-build-coordinator-agent.in
+++ b/scripts/guix-build-coordinator-agent.in
@@ -126,6 +126,11 @@
(lambda (opt name arg result)
(alist-cons 'metrics-file
arg
+ result)))
+ (option '("timestamp-log-output") #t #f
+ (lambda (opt name arg result)
+ (alist-cons 'timestamp-log-output?
+ (string=? arg "true")
result)))))
(define %option-defaults
@@ -140,7 +145,8 @@
(* 3 (/ (total-processor-count) 4)))
1))
(dynamic-auth-token
- . ,(getenv "GUIX_BUILD_COORDINATOR_DYNAMIC_AUTH_TOKEN"))))
+ . ,(getenv "GUIX_BUILD_COORDINATOR_DYNAMIC_AUTH_TOKEN"))
+ (timestamp-log-output? . #t)))
(define (parse-options options defaults args)
(args-fold
@@ -207,4 +213,5 @@
(or (assq-ref opts 'non-derivation-substitute-urls)
(assq-ref opts 'substitute-urls))
(assq-ref opts 'metrics-file)
- (assq-ref opts 'max-1min-load-average)))))
+ (assq-ref opts 'max-1min-load-average)
+ (assq-ref opts 'timestamp-log-output?)))))
diff --git a/scripts/guix-build-coordinator.in b/scripts/guix-build-coordinator.in
index 86f604f..72aa8d4 100644
--- a/scripts/guix-build-coordinator.in
+++ b/scripts/guix-build-coordinator.in
@@ -414,7 +414,12 @@
"error: ~A is not a known allocation strategy\n"
arg)
(exit 1)))
- result))))
+ result)))
+ (option '("timestamp-log-output") #t #f
+ (lambda (opt name arg result)
+ (alist-cons 'timestamp-log-output?
+ (string=? arg "true")
+ result))))
(append-map
(lambda (hook)
(list
@@ -696,7 +701,14 @@ tags:
(assq-ref
opts 'ignore-if-build-required-by-another)))
#:times 6
- #:delay 5)))
+ #:delay 5
+ #:ignore
+ (lambda (exn)
+ (and (exception-with-message? exn)
+ (string=?
+ "build-already-canceled"
+ (assoc-ref (exception-message exn)
+ "error")))))))
(unless (string=? (assoc-ref result "result")
"build-canceled")
(simple-format #t "~A\n"
@@ -795,7 +807,8 @@ tags:
(let ((response
(send-submit-build-request
(assq-ref opts 'coordinator)
- derivation-file
+ ;; Whitespace like \r can creep in here, so strip it
+ (string-trim-both derivation-file)
(assq-ref opts 'derivation-substitute-urls)
#f ; TODO requested uuid
(assq-ref opts 'priority)
@@ -1084,7 +1097,9 @@ tags:
#:database-uri-string (assq-ref opts 'database)
#:hooks hooks-with-defaults
#:allocation-strategy
- (assq-ref opts 'allocation-strategy))))
+ (assq-ref opts 'allocation-strategy)
+ #:timestamp-log-output?
+ (assq-ref opts 'timestamp-log-output?))))
(parameterize ((%show-error-details
(assoc-ref opts 'show-error-details)))