From 666a1ff2d415941eec50b484bfe895166abfe993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Goinvic?= Date: Tue, 27 May 2025 16:47:48 +0200 Subject: [PATCH] marker: fix err messages --- matrix-tools/internal/pkg/marker/marker.go | 10 +++++----- tests/integration/test_synapse.py | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/matrix-tools/internal/pkg/marker/marker.go b/matrix-tools/internal/pkg/marker/marker.go index 129e8967..2508947d 100644 --- a/matrix-tools/internal/pkg/marker/marker.go +++ b/matrix-tools/internal/pkg/marker/marker.go @@ -24,22 +24,22 @@ func GenerateConfigMap(client kubernetes.Interface, labels map[string]string, na Namespace: namespace, Labels: labels, } - // Fetch the existing secret or initialize an empty one + // Fetch the existing configmap or initialize an empty one existingConfigMap, err := configMapsClient.Get(ctx, name, metav1.GetOptions{}) if err != nil { existingConfigMap, err = configMapsClient.Create(ctx, &corev1.ConfigMap{ ObjectMeta: configMapMeta, Data: nil}, metav1.CreateOptions{}, ) if err != nil { - return fmt.Errorf("failed to initialize secret: %w", err) + return fmt.Errorf("failed to initialize configmap: %w", err) } } else { if managedBy, ok := existingConfigMap.Labels["app.kubernetes.io/managed-by"]; ok { if managedBy != "matrix-tools-deployment-markers" { - return fmt.Errorf("secret %s/%s is not managed by this matrix-tools-deployment-markers", namespace, name) + return fmt.Errorf("configmap %s/%s is not managed by this matrix-tools-deployment-markers", namespace, name) } } else { - return fmt.Errorf("secret %s/%s is not managed by this matrix-tools-deployment-markers", namespace, name) + return fmt.Errorf("configmap %s/%s is not managed by this matrix-tools-deployment-markers", namespace, name) } // Make sure the labels are set correctly existingConfigMap.Labels = labels @@ -69,7 +69,7 @@ func GenerateConfigMap(client kubernetes.Interface, labels map[string]string, na } } case "post": - // During post-install, we update the secret with the new value as the upgrade succeeded + // During post-install, we update the configmap with the new value as the upgrade succeeded existingConfigMap.Data[key] = newValue default: return fmt.Errorf("unknown step: %s", step) diff --git a/tests/integration/test_synapse.py b/tests/integration/test_synapse.py index 018dfab4..588365df 100644 --- a/tests/integration/test_synapse.py +++ b/tests/integration/test_synapse.py @@ -3,7 +3,6 @@ # SPDX-License-Identifier: AGPL-3.0-only import hashlib -from base64 import b64decode from pathlib import Path import pyhelm3