Guard against build being missing from the output response
This commit is contained in:
parent
cc370fae56
commit
6f97cec962
1 changed files with 22 additions and 20 deletions
|
|
@ -234,26 +234,28 @@ initial connection on which HTTP requests are sent."
|
||||||
(if data
|
(if data
|
||||||
(catch #t
|
(catch #t
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let* ((derivation
|
(when (assoc-ref data "build")
|
||||||
(assoc-ref data "derivation"))
|
;; The build can be #f
|
||||||
(build-id
|
(let* ((derivation
|
||||||
(ensure-build-exists
|
(assoc-ref data "derivation"))
|
||||||
conn
|
(build-id
|
||||||
build-server-id
|
(ensure-build-exists
|
||||||
derivation
|
conn
|
||||||
#:derivation-output-details-set-id
|
build-server-id
|
||||||
(cdr
|
derivation
|
||||||
(vhash-assoc output
|
#:derivation-output-details-set-id
|
||||||
derivation-output-paths-and-details-sets-ids)))))
|
(cdr
|
||||||
(insert-build-statuses-from-data
|
(vhash-assoc output
|
||||||
conn
|
derivation-output-paths-and-details-sets-ids)))))
|
||||||
build-server-id
|
(insert-build-statuses-from-data
|
||||||
build-id
|
conn
|
||||||
(assoc-ref data "build"))
|
build-server-id
|
||||||
(if (verbose-output?)
|
build-id
|
||||||
(simple-format #t "found build for: ~A (~A)\n"
|
(assoc-ref data "build"))
|
||||||
output derivation)
|
(if (verbose-output?)
|
||||||
(display "-"))))
|
(simple-format #t "found build for: ~A (~A)\n"
|
||||||
|
output derivation)
|
||||||
|
(display "-")))))
|
||||||
(lambda (key . args)
|
(lambda (key . args)
|
||||||
(simple-format
|
(simple-format
|
||||||
(current-error-port)
|
(current-error-port)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue