-
Notifications
You must be signed in to change notification settings - Fork 382
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
feat(bigtable): configure *Client
s with EndpointOption
#9082
feat(bigtable): configure *Client
s with EndpointOption
#9082
Conversation
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
c4953b3
to
d973532
Compare
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
Codecov Report
@@ Coverage Diff @@
## main #9082 +/- ##
=======================================
Coverage 94.43% 94.43%
=======================================
Files 1430 1430
Lines 127051 127084 +33
=======================================
+ Hits 119978 120015 +37
+ Misses 7073 7069 -4
Continue to review full report at Codecov.
|
@@ -79,6 +79,13 @@ int DefaultConnectionPoolSize() { | |||
Options DefaultOptions(Options opts) { | |||
using ::google::cloud::internal::GetEnv; | |||
|
|||
if (opts.has<EndpointOption>()) { | |||
auto const& ep = opts.get<EndpointOption>(); | |||
opts.set<DataEndpointOption>(ep); |
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.
What if the application already provided DataEndpointOption
for some reason?
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.
Seems to me this is a breaking change. The behavior is now different.
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.
The behavior is only different if you were setting both EndpointOption
and *EndpointOption
(to different values). That's possible, but it would be really strange. The only case I can think of is reusing one set of options for the Data API and for the generated Admin APIs.
I'll change this PR so that *EndpointOption
takes precedence over EndpointOption
. It feels weird because I want to do away with the *EndpointOption
s. But that's ok.
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.
Fixed. PTAL
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
Fixes #9027 and does a tiny bit of the work for #9081
This change:
EndpointOption
withDataClient
,AdminClient
, andInstanceAdminClient
DataEndpointOption
,AdminEndpointOption
, andInstanceAdminEndpointOption
to configure the above classes in documentation only.Note that our
Default*Options()
functions expectDefaultOptions()
to provide input via*EndpointOption
. (for example here). I will clean this stuff up as part of #9081.This change is