Skip to content

Commit 4d0db1b

Browse files
Update to ACK Runtime v0.9.2 (#152)
Update the dependent version of ACK runtime to `v0.9.2` and update the `code-generator` version. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 5ae9850 commit 4d0db1b

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ GO111MODULE=on
66
AWS_SERVICE=$(shell echo $(SERVICE) | tr '[:upper:]' '[:lower:]')
77

88
# Build ldflags
9-
VERSION ?= "v0.9.0"
9+
VERSION ?= "v0.9.2"
1010
GITCOMMIT=$(shell git rev-parse HEAD)
1111
BUILDDATE=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
1212
IMPORT_PATH=github.com/aws-controllers-k8s/code-generator

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/aws-controllers-k8s/code-generator
33
go 1.14
44

55
require (
6-
github.com/aws-controllers-k8s/runtime v0.9.0
6+
github.com/aws-controllers-k8s/runtime v0.9.2
77
github.com/aws/aws-sdk-go v1.37.10
88
github.com/dlclark/regexp2 v1.4.0
99
// pin to v0.1.1 due to release problem with v0.1.2

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd
6767
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
6868
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
6969
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
70-
github.com/aws-controllers-k8s/runtime v0.9.0 h1:7Af+PDcxVcx/xrm0nVQJxUm/qM5Of2nhtLIz/QZoshk=
71-
github.com/aws-controllers-k8s/runtime v0.9.0/go.mod h1:kG2WM4JAmLgf67cgZV9IZUkY2DsrUzsaNbmhFMfb05c=
70+
github.com/aws-controllers-k8s/runtime v0.9.2 h1:53ahm38Cn6DTfQdHNrTgbXmUbCjuKntvhkuWGHkAQ18=
71+
github.com/aws-controllers-k8s/runtime v0.9.2/go.mod h1:kG2WM4JAmLgf67cgZV9IZUkY2DsrUzsaNbmhFMfb05c=
7272
github.com/aws/aws-sdk-go v1.37.10 h1:LRwl+97B4D69Z7tz+eRUxJ1C7baBaIYhgrn5eLtua+Q=
7373
github.com/aws/aws-sdk-go v1.37.10/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
7474
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=

pkg/generate/ack/runtime_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ func (fd *fakeDescriptor) Delta(a, b acktypes.AWSResource) *ackcompare.Delta {
6464
return nil
6565
}
6666

67-
func (fd *fakeDescriptor) UpdateCRStatus(acktypes.AWSResource) (bool, error) {
68-
return false, nil
69-
}
70-
7167
func (fd *fakeDescriptor) IsManaged(acktypes.AWSResource) bool {
7268
return false
7369
}
@@ -163,8 +159,12 @@ func TestRuntimeDependency(t *testing.T) {
163159

164160
// ACK runtime 0.8.0 removed the unused UpdateCRStatus method from
165161
// AWSResourceDescriptor
166-
rd := new(acktypes.AWSResourceDescriptor)
167-
rdType := reflect.TypeOf(rd)
162+
rdType := reflect.TypeOf((*acktypes.AWSResourceDescriptor)(nil)).Elem()
168163
_, found := rdType.MethodByName("UpdateCRStatus")
169164
require.False(found)
165+
166+
// ACK runtime 0.9.2 introduced the SetStatus method into AWSResource
167+
resType := reflect.TypeOf((*acktypes.AWSResource)(nil)).Elem()
168+
_, found = resType.MethodByName("SetStatus")
169+
require.True(found)
170170
}

0 commit comments

Comments
 (0)