This is an automated email from the git hooks/post-receive script.
mothacehe pushed a commit to branch master
in repository guix-cuirass.
The following commit(s) were added to refs/heads/master by this push:
new 59c9741 http: Handle wrong build number on log route.
59c9741 is described below
commit 59c974134f569e476c4b4b17c1b8bce74746c546
Author: Mathieu Othacehe <[email protected]>
AuthorDate: Sun Aug 2 18:34:19 2020 +0200
http: Handle wrong build number on log route.
* src/cuirass/http.scm (url-handler): Handle erroneous id -> number
conversion
on "/build/id/log/raw" route.
---
src/cuirass/http.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm
index 4c1d954..6f9eca5 100644
--- a/src/cuirass/http.scm
+++ b/src/cuirass/http.scm
@@ -374,7 +374,8 @@ Hydra format."
(#:link . ,(string-append "/jobset/" (assq-ref build
#:specification)))))))
(respond-build-not-found build-id))))
(('GET "build" build-id "log" "raw")
- (let ((build (db-get-build (string->number build-id))))
+ (let* ((id (string->number build-id))
+ (build (and id (db-get-build id))))
(if build
(match (assq-ref build #:outputs)
(((_ (#:path . (? string? output))) _ ...)