From 66939e6545c5406f2318319189a7d338e413cbb0 Mon Sep 17 00:00:00 2001 From: Marco Nenciarini Date: Thu, 9 Apr 2026 14:28:10 +0200 Subject: [PATCH] chore: simplify maintenance skip condition Signed-off-by: Marco Nenciarini --- internal/cnpgi/instance/retention.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cnpgi/instance/retention.go b/internal/cnpgi/instance/retention.go index 4cc6457..4176956 100644 --- a/internal/cnpgi/instance/retention.go +++ b/internal/cnpgi/instance/retention.go @@ -91,8 +91,8 @@ func (c *CatalogMaintenanceRunnable) cycle(ctx context.Context) (time.Duration, } enabledPlugins := cnpgv1.GetPluginConfigurationEnabledPluginNames(cluster.Spec.Plugins) - if enabledForBackups := slices.Contains(enabledPlugins, metadata.PluginName); !enabledForBackups { - contextLogger.Debug("Skipping maintenance cycle: plugin is configured for restore only") + if !slices.Contains(enabledPlugins, metadata.PluginName) { + contextLogger.Debug("Skipping maintenance cycle: plugin is not enabled for backups") return 0, nil }