Skip to content

Commit fd06571

Browse files
authored
Return a terminal error when sdkUpdate is not implemented (#372)
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 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 5204077 commit fd06571

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)