Skip to content

Commit 2bd408a

Browse files
committed
pin code-generator to runtime v0.1.0
Updates our go.mod reference to runtime v0.1.0 (adopted resource reconciler) and updates our runtime_test.go to implement the runtime v0.1.0 AWSResourceDescriptor interface.
1 parent b6d98fa commit 2bd408a

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
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.0.5
6+
github.com/aws-controllers-k8s/runtime v0.1.0
77
github.com/aws/aws-sdk-go v1.37.4
88
github.com/dlclark/regexp2 v1.4.0
99
// pin to v0.1.1 due to release problem with v0.1.2

go.sum

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,8 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV
6161
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
6262
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
6363
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
64-
github.com/aws-controllers-k8s/runtime v0.0.4 h1:FXKrez7/x88wprW8a68uM02vGGuz3VPzEJLQ7AZsaxE=
65-
github.com/aws-controllers-k8s/runtime v0.0.4/go.mod h1:xA2F18PJerBHaqrS4de1lpP7skeSMeStkmh+3x5sWvw=
66-
github.com/aws-controllers-k8s/runtime v0.0.5 h1:WdcnMNdgagF2MMPQRbDJ5OEzMMgHraCJqvvFj4Sx/5g=
67-
github.com/aws-controllers-k8s/runtime v0.0.5/go.mod h1:xA2F18PJerBHaqrS4de1lpP7skeSMeStkmh+3x5sWvw=
64+
github.com/aws-controllers-k8s/runtime v0.1.0 h1:XTBQf7hn0792yuCRy58IZpbZoGMrGCpSK2mZXkof5W4=
65+
github.com/aws-controllers-k8s/runtime v0.1.0/go.mod h1:xA2F18PJerBHaqrS4de1lpP7skeSMeStkmh+3x5sWvw=
6866
github.com/aws/aws-sdk-go v1.37.4 h1:tWxrpMK/oRSXVnjUzhGeCWLR00fW0WF4V4sycYPPrJ8=
6967
github.com/aws/aws-sdk-go v1.37.4/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
7068
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=

pkg/generate/ack/runtime_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ package ack
1515

1616
import (
1717
"testing"
18+
1819
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1920
k8srt "k8s.io/apimachinery/pkg/runtime"
2021

2122
"github.com/stretchr/testify/require"
2223

2324
ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1"
24-
acktypes "github.com/aws-controllers-k8s/runtime/pkg/types"
2525
ackcompare "github.com/aws-controllers-k8s/runtime/pkg/compare"
26+
acktypes "github.com/aws-controllers-k8s/runtime/pkg/types"
2627
)
2728

2829
type fakeIdentifiers struct{}
@@ -52,7 +53,7 @@ func (fd *fakeDescriptor) ResourceFromRuntimeObject(o k8srt.Object) acktypes.AWS
5253
}
5354

5455
func (fd *fakeDescriptor) Delta(a, b acktypes.AWSResource) *ackcompare.Delta {
55-
return nil
56+
return nil
5657
}
5758

5859
func (fd *fakeDescriptor) UpdateCRStatus(acktypes.AWSResource) (bool, error) {
@@ -69,6 +70,9 @@ func (fd *fakeDescriptor) MarkManaged(acktypes.AWSResource) {
6970
func (fd *fakeDescriptor) MarkUnmanaged(acktypes.AWSResource) {
7071
}
7172

73+
func (fd *fakeDescriptor) MarkAdopted(acktypes.AWSResource) {
74+
}
75+
7276
// This test is mostly just a hack to introduce a Go module dependency between
7377
// the ACK runtime library and the code generator. The code generator doesn't
7478
// actually depend on Go code in the ACK runtime, but it *produces* templated

0 commit comments

Comments
 (0)