GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(generator): wire transport stub delegation to resumable upload stubs by whowes · Pull Request #14322 · googleapis/google-cloud-java

Conversation

@whowes

@whowes whowes commented Sep 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Wires generated transport stubs (GrpcServiceStub, HttpJsonServiceStub) to delegate resumable upload methods to the internal HTTP upload stub, and excludes upload RPCs from the main stubs' method descriptors and callables.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gemini-code-assist[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction
@whowes
whowes added this pull request to stack #14327 September 9, 2026 06:35
gemini-code-assist[bot]

This comment was marked as outdated.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@whowes
whowes force-pushed the whowes/generator-transport-stub-delegation branch 2 times, most recently from e42be42 to 30a1067 Compare September 9, 2026 19:35
@whowes
whowes force-pushed the whowes/generator-transport-stub-delegation branch from 30a1067 to e1bb5fb Compare September 9, 2026 20:17
@whowes
whowes removed this pull request from stack #14327 September 9, 2026 23:45
@whowes
whowes added this pull request to stack #14343 September 9, 2026 23:47
@whowes
whowes force-pushed the whowes/generator-transport-stub-delegation branch 2 times, most recently from c910ed3 to 3fb2567 Compare September 10, 2026 00:19
@whowes
whowes force-pushed the whowes/generator-transport-stub-delegation branch from 3fb2567 to daaf68a Compare September 10, 2026 01:15
@whowes
whowes force-pushed the whowes/generator-transport-stub-delegation branch from daaf68a to 7ca783c Compare September 10, 2026 06:05
@whowes
whowes force-pushed the whowes/generator-transport-stub-delegation branch from 7ca783c to 9905b6e Compare September 11, 2026 17:24
@whowes
whowes removed this pull request from stack #14343 September 11, 2026 17:25
@whowes
whowes added this pull request to stack #14363 September 11, 2026 17:25
@whowes
whowes force-pushed the whowes/generator-transport-stub-delegation branch from 9905b6e to 66afa95 Compare September 11, 2026 18:30
@whowes
whowes force-pushed the whowes/generator-transport-stub-delegation branch from 66afa95 to 26d0fde Compare September 11, 2026 20:00
@whowes
whowes force-pushed the whowes/generator-transport-stub-delegation branch from 26d0fde to 136e9ce Compare September 11, 2026 21:14
@whowes
whowes force-pushed the whowes/generator-transport-stub-delegation branch from 136e9ce to 1ddd21b Compare September 11, 2026 21:39
@whowes
whowes force-pushed the whowes/generator-transport-stub-delegation branch from 1ddd21b to 08ecb13 Compare September 11, 2026 22:15
blakeli0
blakeli0 reviewed Sep 16, 2026
View reviewed changes
Comment thread ...a/com/google/api/generator/gapic/composer/grpc/goldens/GrpcResumableUploadServiceStub.golden Outdated
this.resumableUploadStub = null;
}

if (resumableUploadStub != null) {

@blakeli0 blakeli0 Sep 16, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

resumableUploadStub is only generated if resumable upload methods exist, so I don't think we need this null check.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@whowes whowes Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I reworked this to look a bit less awkward - but the stub can also be null if the user initialized the client with a gRPC channel and credentials can't be extracted (so that init succeeds but calls to the resumable upload stub fail fast).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@blakeli0 blakeli0 Sep 17, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

It is a possible scenario but I'm not sure how we can detect that actually. Customers can pass a FixedChannelProvider with their custom gRPC channel and credentials. In this case, we would still create a resumable upload stub with a default credential provider, but it would not work. I think we may have to let it fail during runtime.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@whowes whowes Sep 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Hmmm, yeah I see that the current check is insufficient. I don't think we can just let calls fail at runtime though; we have a requirement that "when a gRPC client surface for a resumable upload API is initialized with a pre-constructed gRPC Channel, the Client Libraries must raise a detailed (actionable) error if a resumable method is called". So we need to be able to distinguish between this case and other failures.

WDYT about switching the check to be if (settings.getTransportChannelProvider() instanceof InstantiatingGrpcChannelProvider), is that sufficient to detect the custom channel or are there gotchas about that way too?

It also wouldn't necessarily have to be here at the top level; it could get pushed into HttpJson<Service>ResumableUploadStub.create(...) and set the callable there to throw with the actionable error. Then the specialized stub could be always non-null for services that need resumable uploads.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@blakeli0 blakeli0 Sep 18, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

WDYT about switching the check to be if (settings.getTransportChannelProvider() instanceof InstantiatingGrpcChannelProvider), is that sufficient to detect the custom channel or are there gotchas about that way too?

The default grpc channel is also InstantiatingGrpcChannelProvider.

we have a requirement that "when a gRPC client surface for a resumable upload API is initialized with a pre-constructed gRPC Channel, the Client Libraries must raise a detailed (actionable) error if a resumable method is called"

The way I interpreted it is that we should be good as long as we surface the runtime error (likely an auth error) to the customer. It does not have to be an error before making the call.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@whowes whowes Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

DIscussed offline - we will pause on detecting the custom gRPC channel and unconditionally create the specialized stub (so now it's always non-null). This PR is now in that state.

We clarified that it is still a requirement to provide a more actionable error than bubbling up whatever may happen to fail when a resumable upload method is called if the client library was initialized with a gRPC channel, but we will defer adding that functionality for now.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...a/com/google/api/generator/gapic/composer/grpc/goldens/GrpcResumableUploadServiceStub.golden Outdated

if (clientContext.getCredentials() != null) {
this.resumableUploadStub =
HttpJsonResumableUploadServiceResumableUploadStub.create(clientContext, settings);

@blakeli0 blakeli0 Sep 16, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

As I mentioned in another comment, we might be able to just pass the settings to HttpJsonResumableUploadServiceResumableUploadStub.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@whowes whowes Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Responded in more detail on that thread - I'm not sure what the best tradeoff there is

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@whowes whowes Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This is now using the settings directly

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@whowes
whowes force-pushed the whowes/generator-transport-stub-delegation branch from db79f9b to 627610b Compare September 16, 2026 05:47
@whowes
whowes force-pushed the whowes/generator-transport-stub-delegation branch from 627610b to 6341e4e Compare September 17, 2026 18:11
@whowes
whowes force-pushed the whowes/generator-transport-stub-delegation branch 2 times, most recently from 378b601 to 0416f83 Compare September 18, 2026 04:30
@whowes
whowes force-pushed the whowes/generator-transport-stub-delegation branch from 0416f83 to 1b3fd06 Compare September 18, 2026 15:03
@whowes
whowes marked this pull request as ready for review September 18, 2026 15:10
@whowes
whowes requested review from a team as code owners September 18, 2026 15:10
@whowes
whowes requested a review from blakeli0 September 18, 2026 15:10
@whowes
whowes force-pushed the whowes/generator-transport-stub-delegation branch from 1b3fd06 to ba9463b Compare September 18, 2026 18:17
Base automatically changed from whowes/generator-resumable-upload-stub-composer to main September 18, 2026 22:20
@whowes
whowes force-pushed the whowes/generator-transport-stub-delegation branch 2 times, most recently from 443d75f to 2ffa0af Compare September 18, 2026 23:08
@whowes
whowes removed this pull request from stack #14390 September 18, 2026 23:50
@whowes
feat(generator): wire transport stub delegation to resumable upload s…
c08a674
…tubs

Wires the generated transport stubs (GrpcServiceStub and HttpJsonServiceStub) to delegate resumable upload methods to the internal HTTP upload stub. In GrpcServiceStub, credentials, headers, and clocks are forwarded to the underlying HTTP client context. Clients initialize successfully without credentials; an exception results only if use of the HTTP upload stub is attempted.

Also declares the stub-side contract that the transports implement:

- In AbstractServiceStubClassComposer: emit public
  ResumableUploadCallable<RequestT, ResponseT> [method]Callable() throwing
  UnsupportedOperationException.
@whowes
whowes force-pushed the whowes/generator-transport-stub-delegation branch from 2ffa0af to c08a674 Compare September 19, 2026 00:07
@whowes
whowes added this pull request to stack #14442 September 19, 2026 00:11
@sonarqubecloud

sonarqubecloud Bot commented Sep 19, 2026

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed for 'gapic-generator-java-root'

Issues
3 New issues
0 Accepted issues

Measures
0 Security Hotspots
96.3% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sonarqubecloud

sonarqubecloud Bot commented Sep 19, 2026

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed for 'gapic-generator-java-root'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

blakeli0
blakeli0 approved these changes Sep 21, 2026
View reviewed changes
@whowes
whowes merged commit cc4b980 into main Sep 21, 2026
312 of 313 checks passed

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Sep 22, 2026
chore(main): release 1.92.0 #14480
Closed
chore(main): release 1.92.0 #14487
Closed
chore(main): release 1.92.0 #14491
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@blakeli0 blakeli0 blakeli0 approved these changes
+1 more reviewer
@gemini-code-assist gemini-code-assist[bot] gemini-code-assist[bot] left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@whowes @blakeli0
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.