Skip to content

Commit

Permalink
Merge pull request #11031 from k8s-infra-cherrypick-robot/cherry-pick…
Browse files Browse the repository at this point in the history
…-11028-to-release-1.8

[release-1.8] 🌱 Log error when calling a Runtime Extension gets an error that is ignored because of failure policy
  • Loading branch information
k8s-ci-robot authored Aug 8, 2024
2 parents 021876b + e2440a5 commit b374053
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/runtime/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ func (c *client) CallExtension(ctx context.Context, hook runtimecatalog.Hook, fo
ignore := *registration.FailurePolicy == runtimev1.FailurePolicyIgnore
if _, ok := err.(errCallingExtensionHandler); ok && ignore {
// Update the response to a default success response and return.
log.Info(fmt.Sprintf("ignoring error calling extension handler because of FailurePolicy %q", *registration.FailurePolicy))
log.Error(err, fmt.Sprintf("ignoring error calling extension handler because of FailurePolicy %q", *registration.FailurePolicy))
response.SetStatus(runtimehooksv1.ResponseStatusSuccess)
response.SetMessage("")
return nil
Expand Down

0 comments on commit b374053

Please sign in to comment.