Skip to content

BidiRpc missing timeout and retry arguments #262

@tswast

Description

@tswast

Is your feature request related to a problem? Please describe.

Most (all?) generated methods contain the following arguments:

retry: google.api_core.retry.Retry = google.api_core.gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),

I'd like to be able to pass these through from the method I'm wrapping. Currently, this is possible with metadata. See:

call = self._start_rpc(iter(request_generator), metadata=self._rpc_metadata)

But it does not appear to be possible with other arguments such as timeout and retry.

Describe the solution you'd like

Add retry and timeout as optional arguments to BidiRpc.

Perhaps if retry and timeout aren't available in older generated clients, some additional logic will be required to prevent breaking them? I recall they've been around for quite some time, though.

Describe alternatives you've considered

Perhaps an arbitrary **kwargs dictionary for extra arguments to pass to the _start_rpc method?

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions