diff options
author | Christopher Baines <mail@cbaines.net> | 2024-01-12 14:55:30 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-01-12 14:55:30 +0000 |
commit | d6edfc8f8f474ccb1c200f2135384646f11c8fb5 (patch) | |
tree | 77b2ab1247ce0b346f3fcb799096c70cce14a1b0 /scripts | |
parent | f2d4f61b0b36f3a0c23e6eeef60085e7e27a543f (diff) | |
download | build-coordinator-d6edfc8f8f474ccb1c200f2135384646f11c8fb5.tar build-coordinator-d6edfc8f8f474ccb1c200f2135384646f11c8fb5.tar.gz |
Add more options when updating build priorities
Computing new derived priorities is slow, so these options allow skipping that
if you know what you're doing. For example, if you're updating a batch of
related builds and you want them all to have the same priorities and derived
priorities, you can now do that much quicker.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/guix-build-coordinator.in | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/scripts/guix-build-coordinator.in b/scripts/guix-build-coordinator.in index 4ceace0..23a356f 100644 --- a/scripts/guix-build-coordinator.in +++ b/scripts/guix-build-coordinator.in @@ -40,6 +40,7 @@ (srfi srfi-71) (ice-9 match) (ice-9 streams) + (ice-9 exceptions) (ice-9 suspendable-ports) (web uri) (fibers) @@ -313,6 +314,16 @@ (alist-cons 'new-priority (string->number arg) (alist-delete 'new-priority result)))) + (option '("override-derived-priority") #t #f + (lambda (opt name arg result) + (alist-cons 'override-derived-priority + (string->number arg) + (alist-delete 'override-derived-priority result)))) + (option '("skip-updating-derived-priorities") #f #f + (lambda (opt name _ result) + (alist-cons 'skip-updating-derived-priorities + #t + result))) %common-build-filtering-options)) (define %build-update-priority-option-defaults @@ -725,10 +736,20 @@ tags: (send-update-build-priority-request (assq-ref opts 'coordinator) id - (assq-ref opts 'new-priority)) + (assq-ref opts 'new-priority) + #:skip-updating-derived-priorities? + (assq-ref opts 'skip-updating-derived-priorities) + #:override-derived-priority + (assq-ref opts 'override-derived-priority)) (report)) #:times 6 - #:delay 5)) + #:delay 5 + #:ignore + (lambda (exn) + (member (assoc-ref (exception-message exn) + "error") + '("build-already-canceled" + "build-already-processed"))))) matching-builds))))) ((build-id) (send-update-build-priority-request (assq-ref opts 'coordinator) |