aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-08-07 14:43:48 +0100
committerChristopher Baines <mail@cbaines.net>2021-08-07 14:43:48 +0100
commit0eb708c8117db8ca849348c3cfc4981948944800 (patch)
tree7f18ad6823cd2f4a1d5d23c413c616de3669b174
parent3f6a65aeb833b937ca3da9a3270cc7bfa1627b5e (diff)
downloadbuild-coordinator-0eb708c8117db8ca849348c3cfc4981948944800.tar
build-coordinator-0eb708c8117db8ca849348c3cfc4981948944800.tar.gz
Move retrying uploads out of the with-upload-slot region
Such that the retry happens with a fresh slot (and the associated tracking information).
-rw-r--r--guix-build-coordinator/agent-messaging/http.scm22
-rw-r--r--guix-build-coordinator/agent.scm28
2 files changed, 25 insertions, 25 deletions
diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm
index 5e753eb..5ae2929 100644
--- a/guix-build-coordinator/agent-messaging/http.scm
+++ b/guix-build-coordinator/agent-messaging/http.scm
@@ -266,19 +266,15 @@
(with-store store
(query-path-info store file)))
- (retry-on-error
- (lambda ()
- (call-with-streaming-http-request
- uri
- (lambda (port)
- (call-with-lzip-output-port port
- (lambda (port)
- (write-file file port))
- #:level 9))
- #:headers `((Authorization . ,auth-value))
- #:report-bytes-sent report-bytes-sent))
- #:times 48
- #:delay (random 15)))
+ (call-with-streaming-http-request
+ uri
+ (lambda (port)
+ (call-with-lzip-output-port port
+ (lambda (port)
+ (write-file file port))
+ #:level 9))
+ #:headers `((Authorization . ,auth-value))
+ #:report-bytes-sent report-bytes-sent))
args))
(define-method (submit-log-file
diff --git a/guix-build-coordinator/agent.scm b/guix-build-coordinator/agent.scm
index d2611b7..b75fdca 100644
--- a/guix-build-coordinator/agent.scm
+++ b/guix-build-coordinator/agent.scm
@@ -838,18 +838,22 @@ but the guix-daemon claims it's unavailable"
#:unwind? #t))
(define (submit-one-output output-name output)
- (with-upload-slot
- lgr
- (derivation-output-path output)
- (lambda (report-bytes-sent)
- (log-msg lgr 'INFO
- build-id ": submitting output "
- (derivation-output-path output))
- (submit-output coordinator-interface
- build-id output-name
- (derivation-output-path output)
- #:log (build-log-procedure lgr build-id)
- #:report-bytes-sent report-bytes-sent))))
+ (retry-on-error
+ (lambda ()
+ (with-upload-slot
+ lgr
+ (derivation-output-path output)
+ (lambda (report-bytes-sent)
+ (log-msg lgr 'INFO
+ build-id ": submitting output "
+ (derivation-output-path output))
+ (submit-output coordinator-interface
+ build-id output-name
+ (derivation-output-path output)
+ #:log (build-log-procedure lgr build-id)
+ #:report-bytes-sent report-bytes-sent))))
+ #:times 48
+ #:delay (random 15)))
(if submit-outputs?
(begin