From f6a4aae1c481a84cc8bd7f8c16b3a50ef5ac0686 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 22 Jun 2024 22:46:30 +0100 Subject: Return copies of the list from the allocation plan fiber To avoid the authoritative data structures from being modified. --- guix-build-coordinator/coordinator.scm | 10 ++++++++-- 1 file 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 -- cgit v1.2.3