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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for new setAllowHardBoundTokens field. #3467
base: main
Are you sure you want to change the base?
Add support for new setAllowHardBoundTokens field. #3467
Changes from 5 commits
09eb2b2
db51f4e
fd1015e
960084d
ddb3b79
60dafd0
e193cc9
0e40f22
6a27af6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Do we expect customers to set this? Or only internal teams like Spanner/Storage to set it? If it is the latter, can we mark this method as
@InternalApi
?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.
Right we don't want external customers to set it.
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.
We only expect internal teams to set this field, marked as
@InternalApi
in e193cc9There 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 think this field is going to be only used by gRPC transport per the internal doc? And the teams that would use it are all handwritten libraries? If that's the case, I think they are likely going to initialize an
InstantiatingGrpcChannelProvider
in their repo directly and pass it to Gax, so can we only add this toInstantiatingGrpcChannelProvider
?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.
That is correct, hard bound tokens is only for gRPC.
I think this will work since I believe the libraries separate their logic for HTTP and gRPC, so they don't end up using the interface
TransportChannelProvider
. Looking at GCS for example, this is the case@rockspore can you confirm that the places you want to use this setting are using the
InstantiatingGrpcChannelProvider
directly, not the interfaceTransportChannelProvider
?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.
For Cloud Spanner, I found this so it seems to be the case too, although I don't see where it gets called by default.
So yeah it should be good if we only do this in
InstantiatingGrpcChannelProvider
, as long as we have a way to set these default values eventually to all auto-generated clients.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.
@rockspore The link you referred to is a generated default instance of
InstantiatingGrpcChannelProvider
, which I believe will be overridden later in their handwritten code.Either way, they are using
InstantiatingGrpcChannelProvider
directly not the interface. And since it is used withinInstantiatingGrpcChannelProvider
only, we don't need to expose a getter for it either. Hence it should be fine if we only add it toInstantiatingGrpcChannelProvider
.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.
Thanks for the details! It makes perfect sense.
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.
Thanks all for the discussion! Done in 60dafd0