Conversation
There was a problem hiding this comment.
Code Review
This pull request adds support for resumable upload methods in the GAPIC generator, wrapping responses in ResumableUploadSession or AsyncResumableUploadSession and ensuring these methods route over REST even when gRPC transport is initialized. It updates templates, transports, and unit tests to support this protocol. The reviewer identified a critical issue in grpc_asyncio.py.j2 where AsyncRestTransport is instantiated on every call, which is highly inefficient and causes resource leaks; they suggested caching the transport instance instead.
daniel-sanche
left a comment
There was a problem hiding this comment.
It seems like there could be some runtime issues here. Can you make sure we have full coverage?
b7f0140 to
5282533
Compare
No region tags are edited in this PR.This comment is generated by snippet-bot.
|
ce31648 to
2c60a8c
Compare
a33d1fe to
389dbfb
Compare
1ddea43 to
8e785c8
Compare
39c26aa to
f8fa453
Compare
daniel-sanche
left a comment
There was a problem hiding this comment.
I wanted to bring all my remaining comments into one place, although I know some of these are already being addressed
aee4eef to
e20d380
Compare
9425277 to
dd724d6
Compare
Add client, transport, and unit test template support for resumable upload RPCs.
Resumable upload methods accept an optional
ResumableUploadConfigon the client and returnResumableUploadSession/AsyncResumableUploadSessionfromgoogle.api_core.resumable_transfer. Since resumable uploads use HTTP, the gRPC and gRPC-async transports delegate resumable upload calls to the corresponding REST transport.