aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-02-26 09:42:00 +0000
committerChristopher Baines <mail@cbaines.net>2024-02-26 09:42:00 +0000
commitd5331fcc52a0261dd00834427d1efe05ddf3b73b (patch)
tree217358b4a30c54ef3821437419bbf092a28cf86f
parentf6cf019f5d3e5fcee1f74e73d44a1ff1d25478ba (diff)
downloadqa-frontpage-d5331fcc52a0261dd00834427d1efe05ddf3b73b.tar
qa-frontpage-d5331fcc52a0261dd00834427d1efe05ddf3b73b.tar.gz
Ignore build-already-processed errors when canceling builds
-rw-r--r--guix-qa-frontpage/manage-builds.scm18
1 files changed, 15 insertions, 3 deletions
diff --git a/guix-qa-frontpage/manage-builds.scm b/guix-qa-frontpage/manage-builds.scm
index 8f83ffe..173e72c 100644
--- a/guix-qa-frontpage/manage-builds.scm
+++ b/guix-qa-frontpage/manage-builds.scm
@@ -5,6 +5,7 @@
#:use-module (ice-9 match)
#:use-module (ice-9 streams)
#:use-module (ice-9 threads)
+ #:use-module (ice-9 exceptions)
#:use-module (fibers)
#:use-module (prometheus)
#:use-module (guix sets)
@@ -527,7 +528,13 @@
#f
#t)))
#:times 6
- #:delay 15)
+ #:delay 15
+ #:ignore (lambda (exn)
+ ;; TODO Improve the coordinator exceptions
+ (and (exception-with-message? exn)
+ (string=?
+ (assoc-ref (exception-message exn) "error")
+ "build-already-processed"))))
(simple-format (current-error-port)
"canceled ~A\n" uuid))
uuids-batch)
@@ -581,12 +588,17 @@
(lambda (uuid)
(retry-on-error
(lambda ()
- ;; TODO Ignore error" . "build-already-processed
(send-cancel-build-request build-coordinator
uuid
#:skip-updating-derived-priorities? #t))
#:times 6
- #:delay 15)
+ #:delay 15
+ #:ignore (lambda (exn)
+ ;; TODO Improve the coordinator exceptions
+ (and (exception-with-message? exn)
+ (string=?
+ (assoc-ref (exception-message exn) "error")
+ "build-already-processed"))))
(simple-format (current-error-port)
"canceled ~A\n" uuid))
builds-to-cancel)