Skip to content

Align Stream Retry and Termination Behavior With Canonical API Retry Policies; Surface Fatal Errors Immediately #1415

Closed
@abbrowne126

Description

@abbrowne126

Currently, the streaming pull manager is not aligned with proper API retry behavior.

It should retry on:

  • Aborted
  • Cancelled
  • DeadlineExceeded
  • GatewayTimeout
  • InternalServerError
  • ResourceExhausted
  • ServiceUnavailable
  • Unknown

And should terminate on:

  • InvalidArgument
  • NotFound
  • PermissionDenied
  • Unauthenticated
  • Unauthorized
  • Any non-API exception (Python is a dynamic language; TypeError, ValueError, generic exception, etc. shouldn't be retried)

Additionally, fatal error should immediately resolve the streaming pull future to the error state so that the caller is informed of the issue.

I will be submitting a fix for this.

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the googleapis/python-pubsub API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions