From d5331fcc52a0261dd00834427d1efe05ddf3b73b Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 26 Feb 2024 09:42:00 +0000 Subject: Ignore build-already-processed errors when canceling builds --- guix-qa-frontpage/manage-builds.scm | 18 +++++++++++++++--- 1 file 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) -- cgit v1.2.3