Skip to content

Commit

Permalink
Merge pull request #52 from empath-nirvana/main
Browse files Browse the repository at this point in the history
Fix: ocds should be observed resources, not desired
  • Loading branch information
Peefy authored Mar 22, 2024
2 parents 9af3247 + 97162a8 commit 0d4a82c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fn.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

"github.com/crossplane-contrib/function-kcl/input/v1beta1"
pkgresource "github.com/crossplane-contrib/function-kcl/pkg/resource"

"sigs.k8s.io/yaml"
)

Expand Down Expand Up @@ -98,7 +98,7 @@ func (f *Function) RunFunction(_ context.Context, req *fnv1beta1.RunFunctionRequ
return rsp, nil
}
log.Debug(fmt.Sprintf("ObservedComposed resources: %d", len(observed)))
in.Spec.Params["ocds"], err = pkgresource.ObjToRawExtension(desired)
in.Spec.Params["ocds"], err = pkgresource.ObjToRawExtension(observed)
if err != nil {
response.Fatal(rsp, err)
return rsp, nil
Expand Down

0 comments on commit 0d4a82c

Please sign in to comment.