Skip to content

Commit

Permalink
Merge pull request #222 from projectsyn/dont-override-compile-meta-cl…
Browse files Browse the repository at this point in the history
…uster-patch

Don't override `compileMeta` in cluster patch requests if not in request
  • Loading branch information
bastjan authored Jun 4, 2024
2 parents 2dde25c + ab1ab05 commit e50e999
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/api/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e50e999

Please sign in to comment.