From b668cc62944dc3eac225dc4c4ff01f2b3743c9da Mon Sep 17 00:00:00 2001 From: Johanna Date: Mon, 4 Mar 2024 18:32:27 +0100 Subject: [PATCH] Fix: KeyError on Building Scheduler Name in Replica Count Decrease (#872) --- dask_kubernetes/operator/controller/controller.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dask_kubernetes/operator/controller/controller.py b/dask_kubernetes/operator/controller/controller.py index 7bb70a09..efbd3887 100644 --- a/dask_kubernetes/operator/controller/controller.py +++ b/dask_kubernetes/operator/controller/controller.py @@ -609,7 +609,9 @@ async def daskworkergroup_replica_update( if workers_needed < 0: worker_ids = await retire_workers( n_workers=-workers_needed, - scheduler_service_name=SCHEDULER_NAME_TEMPLATE.format(cluster_name), + scheduler_service_name=SCHEDULER_NAME_TEMPLATE.format( + cluster_name=cluster_name + ), worker_group_name=name, namespace=namespace, logger=logger,