From 3cff6bbc029f5690cb232c331c80013ed1e0b514 Mon Sep 17 00:00:00 2001 From: ezmcdja Date: Thu, 12 Dec 2024 16:09:44 +0000 Subject: [PATCH] Issue #615 - fixed readiness-gate Git conflicts - previous solution broke existing functionality to copy comments between Kptfile objects - resulting in failing unit tests - fix for that brought back the Git conflicts caused by indentation, field order etc. - re-refactored conversion of Kptfiles to YAML - KubeObject-related conversion methods (KubeObject/YAML and YAML/KubeObject) now live out in the util package as they aren't Kptfile-specific any more https://github.com/nephio-project/nephio/issues/615 --- pkg/task/generictaskhandler.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/pkg/task/generictaskhandler.go b/pkg/task/generictaskhandler.go index 287d1576..3454882b 100644 --- a/pkg/task/generictaskhandler.go +++ b/pkg/task/generictaskhandler.go @@ -18,7 +18,6 @@ import ( "context" "fmt" - sdkfn "github.com/GoogleContainerTools/kpt-functions-sdk/go/fn" api "github.com/nephio-project/porch/api/porch/v1alpha1" configapi "github.com/nephio-project/porch/api/porchconfig/v1alpha1" "github.com/nephio-project/porch/internal/kpt/builtins" @@ -528,17 +527,6 @@ func healConfig(old, new map[string]string) (map[string]string, error) { healed := out.output.Contents - var kptfileKubeObject *sdkfn.KubeObject - if kptfileKubeObject, err = sdkfn.ParseKubeObject([]byte(healed[kptfile.KptFileName])); err != nil { - return nil, err - } - - kptfileYaml, err := kptfile.ToYamlString(kptfileKubeObject) - if err != nil { - return nil, err - } - healed[kptfile.KptFileName] = kptfileYaml - for k, v := range extra { healed[k] = v }