Skip to content

PoC: Raise error for Gitaly streamed responses w/o blocks

Oswaldo Ferreira requested to merge osw-check-stream-rpc into master

What does this MR do?

That's a PoC for #30334 (closed).

The idea is raising an error when GitalyClient.call is used to call an RPC that returns a streamed response without a block. In my point of view we could make GitalyClient.call require a block being given when we know the response is streamed, so that we consume it accordingly inside the block (without affecting timings).

If we go into this path, GitalyClient.streaming_call could be removed and GitalyClient.call remains as the SSoT.

My concern with GitalyClient.streaming_call is that devs will need to think about which method to use, which is error prone if we don't raise any errors indicating what should be used.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Merge request reports