Skip to content

Commit

Permalink
Merge pull request #148 from crossplane-contrib/renovate/github.com-c…
Browse files Browse the repository at this point in the history
…rossplane-function-sdk-go-0.x

fix(deps): update module github.com/crossplane/function-sdk-go to v0.4.0
  • Loading branch information
jbw976 authored Dec 17, 2024
2 parents b63ed73 + 4defdd2 commit 888fe26
Show file tree
Hide file tree
Showing 6 changed files with 601 additions and 510 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ on:

env:
# Common versions
GO_VERSION: '1.22.9'
GOLANGCI_VERSION: 'v1.54.2'
GO_VERSION: '1.23.4'
GOLANGCI_VERSION: 'v1.62.2'
DOCKER_BUILDX_VERSION: 'v0.11.2'

# These environment variables are important to the Crossplane CLI install.sh
Expand Down
8 changes: 4 additions & 4 deletions fn.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/crossplane/crossplane-runtime/pkg/reconciler/managed"

fncontext "github.com/crossplane/function-sdk-go/context"
fnv1beta1 "github.com/crossplane/function-sdk-go/proto/v1beta1"
fnv1 "github.com/crossplane/function-sdk-go/proto/v1"
"github.com/crossplane/function-sdk-go/request"
"github.com/crossplane/function-sdk-go/resource"
"github.com/crossplane/function-sdk-go/resource/composed"
Expand All @@ -24,13 +24,13 @@ import (

// Function performs patch-and-transform style Composition.
type Function struct {
fnv1beta1.UnimplementedFunctionRunnerServiceServer
fnv1.UnimplementedFunctionRunnerServiceServer

log logging.Logger
}

// RunFunction runs the Function.
func (f *Function) RunFunction(ctx context.Context, req *fnv1beta1.RunFunctionRequest) (*fnv1beta1.RunFunctionResponse, error) { //nolint:gocyclo // See below.
func (f *Function) RunFunction(ctx context.Context, req *fnv1.RunFunctionRequest) (*fnv1.RunFunctionResponse, error) { //nolint:gocyclo // See below.
// This loop is fairly complex, but more readable with less abstraction.

log := f.log.WithValues("tag", req.GetMeta().GetTag())
Expand Down Expand Up @@ -274,7 +274,7 @@ func (f *Function) RunFunction(ctx context.Context, req *fnv1beta1.RunFunctionRe
}

if skipped > 0 {
rsp.GetDesired().GetComposite().Ready = fnv1beta1.Ready_READY_FALSE
rsp.GetDesired().GetComposite().Ready = fnv1.Ready_READY_FALSE
}

if err := response.SetDesiredComposedResources(rsp, desired); err != nil {
Expand Down
Loading

0 comments on commit 888fe26

Please sign in to comment.