File tree 4 files changed +12
-10
lines changed
4 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ GO111MODULE=on
6
6
AWS_SERVICE =$(shell echo $(SERVICE ) | tr '[:upper:]' '[:lower:]')
7
7
8
8
# Build ldflags
9
- VERSION ?= "v0.4 .0"
9
+ VERSION ?= "v0.5 .0"
10
10
GITCOMMIT =$(shell git rev-parse HEAD)
11
11
BUILDDATE =$(shell date -u +'% Y-% m-% dT% H:% M:% SZ')
12
12
IMPORT_PATH =github.com/aws-controllers-k8s/code-generator
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/aws-controllers-k8s/code-generator
3
3
go 1.14
4
4
5
5
require (
6
- github.com/aws-controllers-k8s/runtime v0.4 .0
6
+ github.com/aws-controllers-k8s/runtime v0.5 .0
7
7
github.com/aws/aws-sdk-go v1.37.4
8
8
github.com/dlclark/regexp2 v1.4.0
9
9
// pin to v0.1.1 due to release problem with v0.1.2
Original file line number Diff line number Diff line change @@ -129,11 +129,12 @@ func (rm *resourceManager) Update(
129
129
}
130
130
131
131
// Delete attempts to destroy the supplied AWSResource in the backend AWS
132
- // service API.
132
+ // service API, returning an AWSResource representing the
133
+ // resource being deleted (if delete is asynchronous and takes time)
133
134
func (rm *resourceManager) Delete(
134
135
ctx context.Context,
135
136
res acktypes.AWSResource,
136
- ) error {
137
+ ) (acktypes.AWSResource, error) {
137
138
r := rm.concreteResource(res)
138
139
if r.ko == nil {
139
140
// Should never happen... if it does, it's buggy code.
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ func (rm *resourceManager) newCreateRequestPayload(
125
125
func (rm *resourceManager) sdkDelete(
126
126
ctx context.Context,
127
127
r *resource,
128
- ) (err error) {
128
+ ) (latest *resource, err error) {
129
129
rlog := ackrtlog.FromContext(ctx)
130
130
exit := rlog.Trace(" rm.sdkDelete" )
131
131
defer exit(err)
@@ -136,25 +136,26 @@ func (rm *resourceManager) sdkDelete(
136
136
{ {- end } }
137
137
{ {- if $customMethod := .CRD.GetCustomImplementation .CRD.Ops.Delete } }
138
138
if err = rm.{ { $customMethod } }(ctx, r); err != nil {
139
- return err
139
+ return nil, err
140
140
}
141
141
{ {- end } }
142
142
input, err := rm.newDeleteRequestPayload(r)
143
143
if err != nil {
144
- return err
144
+ return nil, err
145
145
}
146
146
{ {- if $hookCode := Hook .CRD " sdk_delete_post_build_request" } }
147
147
{ { $hookCode } }
148
148
{ {- end } }
149
- _, err = rm.sdkapi.{ { .CRD.Ops.Delete.Name } }WithContext(ctx, input)
149
+ var resp { { .CRD.GetOutputShapeGoType .CRD.Ops.Delete } }; _ = resp;
150
+ resp, err = rm.sdkapi.{ { .CRD.Ops.Delete.Name } }WithContext(ctx, input)
150
151
rm.metrics.RecordAPICall("DELETE", "{ { .CRD.Ops.Delete.Name } }", err)
151
152
{ {- if $hookCode := Hook .CRD " sdk_delete_post_request" } }
152
153
{ { $hookCode } }
153
154
{ {- end } }
154
- return err
155
+ return nil, err
155
156
{ {- else } }
156
157
// TODO(jaypipes): Figure this out...
157
- return nil
158
+ return nil, nil
158
159
{ { end } }
159
160
}
160
161
You can’t perform that action at this time.
0 commit comments