Skip to content

Commit 3556666

Browse files
authored
Merge pull request #81 from jbw976/bump-sdk
2 parents 09d3659 + e9da8c8 commit 3556666

File tree

6 files changed

+167
-182
lines changed

6 files changed

+167
-182
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ on:
1414

1515
env:
1616
# Common versions
17-
GO_VERSION: '1.21.3'
18-
GOLANGCI_VERSION: 'v1.54.2'
17+
GO_VERSION: '1.23.1'
18+
GOLANGCI_VERSION: 'v1.61.0'
1919
DOCKER_BUILDX_VERSION: 'v0.11.2'
2020

2121
# These environment variables are important to the Crossplane CLI install.sh

fn.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ import (
55

66
"github.com/crossplane/crossplane-runtime/pkg/errors"
77
"github.com/crossplane/crossplane-runtime/pkg/logging"
8-
fnv1beta1 "github.com/crossplane/function-sdk-go/proto/v1beta1"
8+
fnv1 "github.com/crossplane/function-sdk-go/proto/v1"
99
"github.com/crossplane/function-sdk-go/request"
1010
"github.com/crossplane/function-sdk-go/response"
1111
"github.com/crossplane/function-template-go/input/v1beta1"
1212
)
1313

1414
// Function returns whatever response you ask it to.
1515
type Function struct {
16-
fnv1beta1.UnimplementedFunctionRunnerServiceServer
16+
fnv1.UnimplementedFunctionRunnerServiceServer
1717

1818
log logging.Logger
1919
}
2020

2121
// RunFunction runs the Function.
22-
func (f *Function) RunFunction(_ context.Context, req *fnv1beta1.RunFunctionRequest) (*fnv1beta1.RunFunctionResponse, error) {
22+
func (f *Function) RunFunction(_ context.Context, req *fnv1.RunFunctionRequest) (*fnv1.RunFunctionResponse, error) {
2323
f.log.Info("Running function", "tag", req.GetMeta().GetTag())
2424

2525
rsp := response.To(req, response.DefaultTTL)

fn_test.go

+13-13
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"google.golang.org/protobuf/types/known/durationpb"
1111

1212
"github.com/crossplane/crossplane-runtime/pkg/logging"
13-
fnv1beta1 "github.com/crossplane/function-sdk-go/proto/v1beta1"
13+
fnv1 "github.com/crossplane/function-sdk-go/proto/v1"
1414
"github.com/crossplane/function-sdk-go/resource"
1515
"github.com/crossplane/function-sdk-go/response"
1616
)
@@ -19,10 +19,10 @@ func TestRunFunction(t *testing.T) {
1919

2020
type args struct {
2121
ctx context.Context
22-
req *fnv1beta1.RunFunctionRequest
22+
req *fnv1.RunFunctionRequest
2323
}
2424
type want struct {
25-
rsp *fnv1beta1.RunFunctionResponse
25+
rsp *fnv1.RunFunctionResponse
2626
err error
2727
}
2828

@@ -34,8 +34,8 @@ func TestRunFunction(t *testing.T) {
3434
"ResponseIsReturned": {
3535
reason: "The Function should return a fatal result if no input was specified",
3636
args: args{
37-
req: &fnv1beta1.RunFunctionRequest{
38-
Meta: &fnv1beta1.RequestMeta{Tag: "hello"},
37+
req: &fnv1.RunFunctionRequest{
38+
Meta: &fnv1.RequestMeta{Tag: "hello"},
3939
Input: resource.MustStructJSON(`{
4040
"apiVersion": "template.fn.crossplane.io/v1beta1",
4141
"kind": "Input",
@@ -44,21 +44,21 @@ func TestRunFunction(t *testing.T) {
4444
},
4545
},
4646
want: want{
47-
rsp: &fnv1beta1.RunFunctionResponse{
48-
Meta: &fnv1beta1.ResponseMeta{Tag: "hello", Ttl: durationpb.New(response.DefaultTTL)},
49-
Results: []*fnv1beta1.Result{
47+
rsp: &fnv1.RunFunctionResponse{
48+
Meta: &fnv1.ResponseMeta{Tag: "hello", Ttl: durationpb.New(response.DefaultTTL)},
49+
Results: []*fnv1.Result{
5050
{
51-
Severity: fnv1beta1.Severity_SEVERITY_NORMAL,
51+
Severity: fnv1.Severity_SEVERITY_NORMAL,
5252
Message: "I was run with input \"Hello, world\"!",
53-
Target: fnv1beta1.Target_TARGET_COMPOSITE.Enum(),
53+
Target: fnv1.Target_TARGET_COMPOSITE.Enum(),
5454
},
5555
},
56-
Conditions: []*fnv1beta1.Condition{
56+
Conditions: []*fnv1.Condition{
5757
{
5858
Type: "FunctionSuccess",
59-
Status: fnv1beta1.Status_STATUS_CONDITION_TRUE,
59+
Status: fnv1.Status_STATUS_CONDITION_TRUE,
6060
Reason: "Success",
61-
Target: fnv1beta1.Target_TARGET_COMPOSITE_AND_CLAIM.Enum(),
61+
Target: fnv1.Target_TARGET_COMPOSITE_AND_CLAIM.Enum(),
6262
},
6363
},
6464
},

go.mod

+30-30
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
module github.com/crossplane/function-template-go
22

3-
go 1.21
3+
go 1.23
44

5-
toolchain go1.22.3
5+
toolchain go1.23.1
66

77
require (
88
github.com/alecthomas/kong v0.9.0
9-
github.com/crossplane/crossplane-runtime v1.16.0
10-
github.com/crossplane/function-sdk-go v0.3.0-rc.0.0.20240816202013-2da86c5eb7d1
9+
github.com/crossplane/crossplane-runtime v1.17.0
10+
github.com/crossplane/function-sdk-go v0.3.0
1111
github.com/google/go-cmp v0.6.0
12-
google.golang.org/protobuf v1.34.1
13-
k8s.io/apimachinery v0.29.3
12+
google.golang.org/protobuf v1.34.3-0.20240816073751-94ecbc261689
13+
k8s.io/apimachinery v0.30.0
1414
sigs.k8s.io/controller-tools v0.14.0
1515
)
1616

1717
require (
1818
dario.cat/mergo v1.0.0 // indirect
19-
github.com/davecgh/go-spew v1.1.1 // indirect
19+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
2020
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
21-
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
22-
github.com/fatih/color v1.16.0 // indirect
23-
github.com/go-json-experiment/json v0.0.0-20231102232822-2e55bd4e08b0 // indirect
24-
github.com/go-logr/logr v1.4.1 // indirect
21+
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
22+
github.com/fatih/color v1.17.0 // indirect
23+
github.com/go-json-experiment/json v0.0.0-20240815175050-ebd3a8989ca1 // indirect
24+
github.com/go-logr/logr v1.4.2 // indirect
2525
github.com/go-logr/zapr v1.3.0 // indirect
2626
github.com/go-openapi/jsonpointer v0.19.6 // indirect
2727
github.com/go-openapi/jsonreference v0.20.2 // indirect
28-
github.com/go-openapi/swag v0.22.3 // indirect
28+
github.com/go-openapi/swag v0.22.4 // indirect
2929
github.com/gobuffalo/flect v1.0.2 // indirect
3030
github.com/gogo/protobuf v1.3.2 // indirect
3131
github.com/golang/protobuf v1.5.4 // indirect
@@ -43,31 +43,31 @@ require (
4343
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
4444
github.com/pkg/errors v0.9.1 // indirect
4545
github.com/spf13/afero v1.11.0 // indirect
46-
github.com/spf13/cobra v1.8.0 // indirect
46+
github.com/spf13/cobra v1.8.1 // indirect
4747
github.com/spf13/pflag v1.0.5 // indirect
4848
go.uber.org/multierr v1.11.0 // indirect
4949
go.uber.org/zap v1.27.0 // indirect
50-
golang.org/x/mod v0.16.0 // indirect
51-
golang.org/x/net v0.23.0 // indirect
52-
golang.org/x/oauth2 v0.16.0 // indirect
53-
golang.org/x/sys v0.18.0 // indirect
54-
golang.org/x/term v0.18.0 // indirect
55-
golang.org/x/text v0.14.0 // indirect
50+
golang.org/x/mod v0.21.0 // indirect
51+
golang.org/x/net v0.29.0 // indirect
52+
golang.org/x/oauth2 v0.21.0 // indirect
53+
golang.org/x/sync v0.8.0 // indirect
54+
golang.org/x/sys v0.25.0 // indirect
55+
golang.org/x/term v0.24.0 // indirect
56+
golang.org/x/text v0.18.0 // indirect
5657
golang.org/x/time v0.5.0 // indirect
57-
golang.org/x/tools v0.19.0 // indirect
58-
google.golang.org/appengine v1.6.8 // indirect
59-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240304212257-790db918fca8 // indirect
60-
google.golang.org/grpc v1.62.0 // indirect
58+
golang.org/x/tools v0.25.0 // indirect
59+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
60+
google.golang.org/grpc v1.66.2 // indirect
6161
gopkg.in/inf.v0 v0.9.1 // indirect
6262
gopkg.in/yaml.v2 v2.4.0 // indirect
6363
gopkg.in/yaml.v3 v3.0.1 // indirect
64-
k8s.io/api v0.29.1 // indirect
65-
k8s.io/apiextensions-apiserver v0.29.1 // indirect
66-
k8s.io/client-go v0.29.1 // indirect
67-
k8s.io/klog/v2 v2.110.1 // indirect
68-
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
69-
k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect
70-
sigs.k8s.io/controller-runtime v0.17.0 // indirect
64+
k8s.io/api v0.30.0 // indirect
65+
k8s.io/apiextensions-apiserver v0.30.0 // indirect
66+
k8s.io/client-go v0.30.0 // indirect
67+
k8s.io/klog/v2 v2.130.1 // indirect
68+
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
69+
k8s.io/utils v0.0.0-20240902221715-702e33fdd3c3 // indirect
70+
sigs.k8s.io/controller-runtime v0.18.2 // indirect
7171
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
7272
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
7373
sigs.k8s.io/yaml v1.4.0 // indirect

0 commit comments

Comments
 (0)