Skip to content

feat(generator): surface actionable error on unsupported resumable upload transport configs - #14653

Draft
whowes wants to merge 1 commit into
whowes/resumable-upload-transport-detectfrom
whowes/resumable-upload-transport-gen
Draft

whowes wants to merge 1 commit into
whowes/resumable-upload-transport-detectfrom
whowes/resumable-upload-transport-gen

Conversation

@whowes

@whowes whowes commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Updates generated HttpJson[Service]ResumableUploadStub.create() to detect customized gRPC transport configurations via HttpJsonCallableFactory.isResumableUploadSupported(). When one is detected, the stub wires upload methods to HttpJsonCallableFactory.createFailingResumableUploadCallable() so client initialization and standard gRPC RPCs still succeed while upload calls fail with an informative IllegalStateException.

@whowes
whowes added this pull request to stack #14654 October 13, 2026 23:24

@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 updates the resumable upload stub generation and implementation to check if resumable upload is supported, returning a failing callable if it is not. It refactors the stub constructors to accept the callables and background resources directly rather than instantiating them internally, and updates the generator class HttpJsonServiceResumableUploadStubClassComposer accordingly. Feedback on the generator suggests passing resumableUploadMethods to createConstructorMethods and iterating over them to ensure the generated constructor parameter order deterministically matches the argument order in createStaticCreatorMethods, rather than relying on the iteration order of callableClassMembers.values().

@whowes
whowes force-pushed the whowes/resumable-upload-transport-gen branch from 4e04be2 to 653c982 Compare October 13, 2026 23:33
@whowes
whowes force-pushed the whowes/resumable-upload-transport-gen branch from 653c982 to fb386f8 Compare October 14, 2026 00:03
@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'gapic-generator-java-root'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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.

1 participant