aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-06-22 22:46:30 +0100
committerChristopher Baines <mail@cbaines.net>2024-06-22 22:46:30 +0100
commitf6a4aae1c481a84cc8bd7f8c16b3a50ef5ac0686 (patch)
treec5e5d20c0fc0b470e182dc6684ccdf7f1aea0caf /guix-build-coordinator
parentad69efb87b6df3775116598c66a52e84634614ae (diff)
downloadbuild-coordinator-f6a4aae1c481a84cc8bd7f8c16b3a50ef5ac0686.tar
build-coordinator-f6a4aae1c481a84cc8bd7f8c16b3a50ef5ac0686.tar.gz
Return copies of the list from the allocation plan fiber
To avoid the authoritative data structures from being modified.
Diffstat (limited to 'guix-build-coordinator')
-rw-r--r--guix-build-coordinator/coordinator.scm10
1 files changed, 8 insertions, 2 deletions
diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm
index b51c791..8af826f 100644
--- a/guix-build-coordinator/coordinator.scm
+++ b/guix-build-coordinator/coordinator.scm
@@ -1168,9 +1168,15 @@
(('fetch-agent-plan agent-id reply)
(put-message
reply
- (or (assoc-ref allocation-plan agent-id) '())))
+ (or (list-copy (assoc-ref allocation-plan agent-id))
+ '())))
(('fetch-plan reply)
- (put-message reply allocation-plan))
+ (put-message reply
+ (map (match-lambda
+ ((agent-id . builds)
+ (cons agent-id
+ (list-copy builds))))
+ allocation-plan)))
(('remove-build uuid reply)
(set!
allocation-plan