Skip to content

feat: generate client, transport, and unit test templates for resumable uploads - #18495

Open
parthea wants to merge 44 commits into
mainfrom
add-support-for-resumable-uploads-2
Open

parthea wants to merge 44 commits into
mainfrom
add-support-for-resumable-uploads-2

Conversation

@parthea

@parthea parthea commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor
  • Add client, transport, and unit test template support for resumable upload RPCs.

  • Resumable upload methods accept an optional ResumableUploadConfig on the client and return ResumableUploadSession / AsyncResumableUploadSession from google.api_core.resumable_transfer. Since resumable uploads use HTTP, the gRPC and gRPC-async transports delegate resumable upload calls to the corresponding REST transport.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@parthea parthea changed the title feat: add support for resumable uploads feat: generate client, transport, and unit test templates for resumable uploads Sep 29, 2026
@parthea
parthea marked this pull request as ready for review September 29, 2026 18:43
@parthea
parthea requested a review from a team as a code owner September 29, 2026 18:43
@parthea
parthea added this pull request to stack #18500 September 29, 2026 19:13

@daniel-sanche daniel-sanche left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like there could be some runtime issues here. Can you make sure we have full coverage?

@parthea
parthea force-pushed the add-support-for-resumable-uploads-2 branch from b7f0140 to 5282533 Compare September 30, 2026 15:03
@snippet-bot

snippet-bot Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

No region tags are edited in this PR.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@parthea
parthea force-pushed the add-support-for-resumable-uploads-2 branch from ce31648 to 2c60a8c Compare September 30, 2026 18:06
@parthea
parthea removed this pull request from stack #18500 September 30, 2026 18:15
@parthea
parthea changed the base branch from main to remove-compliance-proto September 30, 2026 18:16
@parthea
parthea added this pull request to stack #18517 September 30, 2026 19:16
@parthea
parthea force-pushed the add-support-for-resumable-uploads-2 branch from a33d1fe to 389dbfb Compare September 30, 2026 20:23
Base automatically changed from remove-compliance-proto to main September 30, 2026 20:30
@parthea
parthea force-pushed the add-support-for-resumable-uploads-2 branch from 1ddea43 to 8e785c8 Compare September 30, 2026 20:30
Comment thread packages/gapic-generator/noxfile.py Outdated
@parthea
parthea force-pushed the add-support-for-resumable-uploads-2 branch from 39c26aa to f8fa453 Compare October 1, 2026 20:54

@daniel-sanche daniel-sanche left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to bring all my remaining comments into one place, although I know some of these are already being addressed

Comment thread packages/gapic-generator/gapic/templates/setup.py.j2 Outdated
@parthea
parthea force-pushed the add-support-for-resumable-uploads-2 branch 4 times, most recently from aee4eef to e20d380 Compare October 3, 2026 00:53
@parthea
parthea force-pushed the add-support-for-resumable-uploads-2 branch from 9425277 to dd724d6 Compare October 5, 2026 17:41
@parthea
parthea requested a review from daniel-sanche October 5, 2026 18:05
@parthea parthea assigned daniel-sanche and unassigned parthea Oct 5, 2026

@daniel-sanche daniel-sanche left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@parthea parthea closed this Oct 5, 2026
@parthea parthea reopened this Oct 5, 2026
@parthea parthea closed this Oct 5, 2026
@parthea parthea reopened this Oct 5, 2026
@parthea parthea closed this Oct 5, 2026
@parthea parthea reopened this Oct 5, 2026
@parthea parthea closed this Oct 5, 2026
@parthea parthea reopened this Oct 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants