From 52803fbabcb928ef337d3d60c62a0248d9eb0964 Mon Sep 17 00:00:00 2001 From: Matt Boersma Date: Mon, 2 Dec 2024 13:24:24 -0700 Subject: [PATCH] squash --- azure/services/aso/aso.go | 3 ++- azure/services/aso/aso_test.go | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/azure/services/aso/aso.go b/azure/services/aso/aso.go index 1de78207897..56cb356c2e2 100644 --- a/azure/services/aso/aso.go +++ b/azure/services/aso/aso.go @@ -378,7 +378,8 @@ func isOwnedBy(resource client.Object, owner client.Object, scheme *runtime.Sche } func hasLegacyOwnedByLabel(labels map[string]string, clusterName string) bool { - return labels[infrav1.OwnedByClusterLabelKey] == clusterName //nolint:staticcheck + //nolint:staticcheck // Referencing this deprecated value is required for backwards compatibility. + return labels[infrav1.OwnedByClusterLabelKey] == clusterName } // PauseResource pauses an ASO resource by updating its `reconcile-policy` to `skip`. diff --git a/azure/services/aso/aso_test.go b/azure/services/aso/aso_test.go index 52f175f7193..5f6e56f44b4 100644 --- a/azure/services/aso/aso_test.go +++ b/azure/services/aso/aso_test.go @@ -565,8 +565,9 @@ func TestCreateOrUpdateResource(t *testing.T) { Name: "name", Namespace: "namespace", Labels: map[string]string{ - clusterv1.ClusterNameLabel: clusterName, - infrav1.OwnedByClusterLabelKey: clusterName, //nolint:staticcheck + clusterv1.ClusterNameLabel: clusterName, + //nolint:staticcheck // Referencing this deprecated value is required for backwards compatibility. + infrav1.OwnedByClusterLabelKey: clusterName, }, Annotations: map[string]string{ asoannotations.ReconcilePolicy: string(asoannotations.ReconcilePolicySkip),