Back to Dapr

Dapr 1.17.10

docs/release_notes/v1.17.10.md

1.18.02.2 KB
Original Source

Dapr 1.17.10

This update contains the following bug fix:

Resiliency retry matching is ignored on the pubsub publish path

Problem

A resiliency retry policy that configures matching (httpStatusCodes / gRPCStatusCodes) on a pubsub component's outbound policy has no effect on publish. Every Publish / BulkPublish error is retried up to maxRetries regardless of the configured codes, so non-retriable (terminal) errors are retried wastefully and the configured matching is silently ignored.

Impact

Any deployment with a Resiliency configuration that sets matching on a retry policy targeting a pubsub component's outbound retry is affected.

Visible symptoms include:

  • A clearly terminal publish error (for example an invalid topic or an unauthorized request) is retried up to maxRetries instead of failing fast.
  • The status codes listed in matching.httpStatusCodes / matching.gRPCStatusCodes have no effect on which publish errors are retried.

Root Cause

The retry runner in pkg/resiliency/policy.go only consults the configured codes when the operation error is a resiliency.CodeError. Every other policy runner — service invocation, the gRPC proxy, output bindings, and inbound subscriber delivery — constructs a CodeError before handing the error to the runner, but the component-outbound publish path returned the broker's plain error verbatim. As a result the publish error was never recognized as a CodeError, the configured codes were never consulted, and it fell through to the runner as an ordinary retryable error.

Solution

The Publish and BulkPublish paths now wrap the component error in a resiliency.CodeError when it carries a gRPC status (via status.FromError), mirroring the other policy runners. Errors that do not carry a status are returned unchanged and keep retrying exactly as before, so behavior is unchanged unless retry matching is configured.

This is the runtime half of the fix; pubsub components in components-contrib emit gRPC status codes on publish errors so the runtime can classify them as retriable or terminal.