Skip to content

Commit 2e58e5c

Browse files
committed
Return a terminal error when sdkUpdate is not implemented
Currently the generated sdk code throws a simple error when `sdkUpdate` is not implemented. This is only observable in the controller logs and users are not able to read this information from their resource's status/conditions. This patch forces `sdkUpdate` to return a terminal error instead of a normal error. Fixes aws-controllers-k8s/community#1521 Signed-off-by: Amine Hilaly <hilalyamine@gmail.com>
1 parent c6651c2 commit 2e58e5c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

templates/pkg/resource/sdk_update_not_implemented.go.tpl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ func (rm *resourceManager) sdkUpdate(
55
latest *resource,
66
delta *ackcompare.Delta,
77
) (*resource, error) {
8-
// TODO(jaypipes): Figure this out...
9-
return nil, ackerr.NotImplemented
8+
return nil, ackerr.NewTerminalError(ackerr.NotImplemented)
109
}
1110
{{- end -}}

0 commit comments

Comments
 (0)