[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: hydra: bayfront: Alter the build coordinator hooks.
From: |
Christopher Baines |
Subject: |
02/02: hydra: bayfront: Alter the build coordinator hooks. |
Date: |
Fri, 19 Jan 2024 12:00:44 -0500 (EST) |
cbaines pushed a commit to branch master
in repository maintenance.
commit d78ca0ffdd45529c90126e57064c59324417dd07
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Fri Jan 19 16:59:22 2024 +0000
hydra: bayfront: Alter the build coordinator hooks.
* hydra/bayfront.scm (%guix-build-coordinator-configuration): Change
the submit outputs hook to make a http request to the nar-herder,
rather than checking a directory for narinfos (as the narinfos are now
deleted from the filesystem).
---
hydra/bayfront.scm | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/hydra/bayfront.scm b/hydra/bayfront.scm
index 6540551..af35a95 100644
--- a/hydra/bayfront.scm
+++ b/hydra/bayfront.scm
@@ -1098,18 +1098,27 @@ proxy_set_header Via $via;"
. ,#~(begin
(use-modules (srfi srfi-1)
(guix-build-coordinator coordinator)
- (guix-build-coordinator datastore))
+ (guix-build-coordinator datastore)
+ (web client)
+ (web uri)
+ (web response))
(lambda (build-coordinator uuid)
(any (lambda (output)
- (let* ((output-hash
+ (let ((output-hash
(string-take
(string-drop (assq-ref output 'output) 11)
- 32))
- (narinfo
- (string-append #$publish-directory "/"
- output-hash ".narinfo")))
- (not (file-exists? narinfo))))
+ 32)))
+ (not (eq? 200
+ ;; There's some kind of weird
+ ;; syntax transformer issue with
+ ;; response-code
+ ((@ (web response) response-code)
+ (http-get
+ (string->uri
+ (string-append
+ "http://localhost:8734/"
+ output-hash ".narinfo"))))))))
(datastore-list-build-outputs
(build-coordinator-datastore build-coordinator)
uuid)))))))
(extra-environment-variables