From 3c983ac5e0d23b03d6196648112d7889776ad2a6 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 1 May 2026 14:40:34 +0000 Subject: [PATCH] admin api: properly eliminate irrelevant role deletions (fix #1427) (#1431) Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1431 --- src/api/admin/layout.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/admin/layout.rs b/src/api/admin/layout.rs index 1979c11a..998b61a2 100644 --- a/src/api/admin/layout.rs +++ b/src/api/admin/layout.rs @@ -53,7 +53,7 @@ fn format_cluster_layout(layout: &layout::LayoutHistory) -> GetClusterLayoutResp .roles .items() .iter() - .filter(|(k, _, v)| current.roles.get(k) != Some(v)) + .filter(|(k, _, v)| current.roles.get(k).and_then(|vv| vv.0.as_ref()) != v.0.as_ref()) .map(|(k, _, v)| match &v.0 { None => NodeRoleChange { id: hex::encode(k),