From 452e290af2373424f0360f5617904d5b3c09b646 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:24:01 +0000 Subject: [PATCH 1/2] Initial plan From d870892e0fb9e7b15c60b021fcfd73b895f34e86 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:41:16 +0000 Subject: [PATCH 2/2] Call shutdown() on error paths to ensure consistent cleanup Co-authored-by: sfroment <7238385+sfroment@users.noreply.github.com> --- crates/coordination/src/k8s.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/coordination/src/k8s.rs b/crates/coordination/src/k8s.rs index 3881880..f2579fd 100644 --- a/crates/coordination/src/k8s.rs +++ b/crates/coordination/src/k8s.rs @@ -102,6 +102,7 @@ where } Err(err) => { error!("Error while k8s leader election: {err:?}"); + shutdown(epoch, am_i_leader, lease_lock).await; return Err(Box::new(err)); } } @@ -148,6 +149,7 @@ where } Err(err) => { error!("Error while k8s leader election: {err:?}"); + shutdown(epoch, am_i_leader, lease_lock).await; return Err(Box::new(err)); } }