From ab1ab05ac3f31c5702c85bdff83b3d9e3edbf3df Mon Sep 17 00:00:00 2001 From: Sebastian Widmer Date: Tue, 4 Jun 2024 13:51:13 +0200 Subject: [PATCH] Don't override `compileMeta` in cluster patch requests --- pkg/api/utils.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg/api/utils.go b/pkg/api/utils.go index 7dd9098..5ad18a8 100644 --- a/pkg/api/utils.go +++ b/pkg/api/utils.go @@ -382,11 +382,13 @@ func SyncCRDFromAPICluster(source ClusterProperties, target *synv1alpha1.Cluster } } - clcm, err := apiCompileMetaToCRDCompileMeta(source.CompileMeta) - if err != nil { - return fmt.Errorf("failed to convert compile meta: %w", err) + if source.CompileMeta != nil { + clcm, err := apiCompileMetaToCRDCompileMeta(source.CompileMeta) + if err != nil { + return fmt.Errorf("failed to convert compile meta: %w", err) + } + target.Status.CompileMeta = clcm } - target.Status.CompileMeta = clcm return nil }