aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-12-15 11:05:14 +0000
committerChristopher Baines <mail@cbaines.net>2019-12-15 11:05:14 +0000
commitf0c5aba95ec3e1a32b9d88f6e2763da53a234a19 (patch)
tree1b401fcf01d3db675180db83ff9760022505a146
parentdf56ccafe3e3c7e756a57ab3d77bf71b3298464c (diff)
downloaddata-service-f0c5aba95ec3e1a32b9d88f6e2763da53a234a19.tar
data-service-f0c5aba95ec3e1a32b9d88f6e2763da53a234a19.tar.gz
Show the possible failure reasons on the build page
When the build status is "Failed (dependency)".
-rw-r--r--guix-data-service/web/build-server/controller.scm13
-rw-r--r--guix-data-service/web/build-server/html.scm25
2 files changed, 34 insertions, 4 deletions
diff --git a/guix-data-service/web/build-server/controller.scm b/guix-data-service/web/build-server/controller.scm
index accadd2..e0b416e 100644
--- a/guix-data-service/web/build-server/controller.scm
+++ b/guix-data-service/web/build-server/controller.scm
@@ -52,11 +52,20 @@
(select-build-by-build-server-and-derivation-file-name
conn
build-server-id
- derivation-file-name)))
+ derivation-file-name))
+ (latest-build-status
+ (assoc-ref (last (vector->list (second build)))
+ "status")))
(render-html
#:sxml
(view-build query-parameters
- build)))))
+ build
+ (if (string=? latest-build-status "failed-dependency")
+ (select-required-builds-that-failed
+ conn
+ build-server-id
+ derivation-file-name)
+ #f))))))
(define (handle-build-event-submission parsed-query-parameters
build-server-id-string
diff --git a/guix-data-service/web/build-server/html.scm b/guix-data-service/web/build-server/html.scm
index 7a94315..224c75d 100644
--- a/guix-data-service/web/build-server/html.scm
+++ b/guix-data-service/web/build-server/html.scm
@@ -23,7 +23,8 @@
view-signing-key))
(define (view-build query-parameters
- build)
+ build
+ required-failed-builds)
(define derivation
(assq-ref query-parameters 'derivation_file_name))
@@ -66,7 +67,27 @@
(td ,(assoc-ref status "timestamp"))
(td ,(build-status-span
(assoc-ref status "status")))))
- (vector->list statuses)))))))))))))
+ (vector->list statuses)))))))))
+ ,@(if required-failed-builds
+ `((div
+ (@ (class "row"))
+ (div
+ (@ (class "col-sm-6"))
+ (h3 "Required failed builds")
+ (table
+ (@ (class "table"))
+ (thead
+ (tr
+ (th "Derivation")
+ (th "Status")))
+ (tbody
+ ,@(map (match-lambda
+ ((derivation status)
+ `(tr
+ (td ,(display-possible-store-item derivation))
+ (td ,(build-status-span status)))))
+ required-failed-builds))))))
+ '())))))
(define (view-signing-key sexp)
(layout