-
Notifications
You must be signed in to change notification settings - Fork 388
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(pubsub): add policy options; default common options #7335
Conversation
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
Codecov Report
@@ Coverage Diff @@
## main #7335 +/- ##
========================================
Coverage 93.66% 93.67%
========================================
Files 1352 1352
Lines 116986 117092 +106
========================================
+ Hits 109573 109682 +109
+ Misses 7413 7410 -3
Continue to review full report at Codecov.
|
auto emulator = internal::GetEnv("PUBSUB_EMULATOR_HOST"); | ||
if (emulator.has_value()) { | ||
opts.set<EndpointOption>(*emulator).set<GrpcCredentialOption>( | ||
grpc::InsecureChannelCredentials()); | ||
} |
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.
Perhaps move this next to the other setting for GrpcCredentialOption
?
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 EndpointOption
s are colocated 🤷♂️
Part of the work for #6306
This change may seem strange on its own, because the code it is "replacing" is not touched in this PR. I did this because the full change is too large, and I want the PR's to be manageable. A (somewhat accurate) draft of the bigger picture can be found here.
Here are the sources for the default values:
PUBSUB_EMULATOR_HOST
comes frominternal/emulator_overrides*
which will eventually be removed.GrpcOptionList
andCommonOptionList
come from: connection_options.cc, except forGrpcBackgroundThreadPoolSizeOption
which comes from here (publisher) and here(subscriber)PolicyOptionList
come from: here (publisher) and here (subscriber)** (Note the special retry policy for the subscriber)This change is