-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
xds: resubmit xds client pool changes from #7898 along with fix to set fallback bootstrap config from googledirectpath to xdsclient pool #8050
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8050 +/- ##
==========================================
- Coverage 82.23% 82.18% -0.06%
==========================================
Files 387 387
Lines 39015 39042 +27
==========================================
+ Hits 32085 32086 +1
- Misses 5591 5619 +28
+ Partials 1339 1337 -2
|
d3593b5
to
9913166
Compare
9913166
to
7e30b9b
Compare
…fig-to-xdslcient-pool
e2ff42a
to
0351f6e
Compare
0351f6e
to
6393911
Compare
Thanks. I have added back the xds client pool changes and resolved conflicts. Its ready for review. |
d49b7ea
to
0ce1d97
Compare
0ce1d97
to
d21f9ac
Compare
xds/internal/xdsclient/clientimpl.go
Outdated
xdsClientImplCreateHook = func(string) {} | ||
xdsClientImplCloseHook = func(string) {} | ||
|
||
defaultStreamBackoffFunc = backoff.DefaultExponential.Backoff |
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.
Nit: s/defaultStreamBackoffFunc/defaultExponentialBackoff
We are trying to following a style where we name the variable which stores the function being overridden with the same name as the latter. So, something like a rand.Shuffle
being overridden would have a name of randShuffle
or randShuffleFunc
so that in non-test code when you see the variable name, you kind of know what the actual function is.
@@ -144,6 +144,13 @@ func (p *Pool) SetFallbackBootstrapConfig(config *bootstrap.Config) { | |||
p.config = config |
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 don't run any tests of the same package in parallel. A grep for t.Parallel
returns no results in our repo.
easwars@minetop: grpc-go$ grep -r "t.Parallel" *
easwars@minetop: grpc-go$
Tests from different packages are automatically run in parallel by the go test
command though. So, if you are seeing problems with this, then some other tests also use the global default pool. Can you please check? Thanks.
…o set fallback bootstrap config from googledirectpath to xdsclient pool (grpc#8050)
Change #7898 introduced a pool of xDS clients that share the same configuration within the pool, instead of using a single global map of xDS clients.
After #7898 changes, production path of
xdsclient
will maintain a default pool populated with the bootstrap configuration duringinit()
using the internalbootstrap.GetConfiguration()
function. This function reads the configuration from environment variables. Currently,bootstrap.GetConfiguration()
also includes logic to read the fallback configuration set by thec2pResolver
(from the googledirectpath library) during itsBuild()
method. After change #7898, thisBuild()
method executes afterinit()
, so the fallback bootstrap configuration set by thec2pResolver
is not assigned toxdsclient.DefaultPool
.#7898 was reverted because c2p resolver was broken. This pull request resubmit changes from #7898 and modifies the
c2pResolver
to set the fallback bootstrap configuration on the assigned xDS client pool (defaulting toxdsclient.DefaultPool
) and removes the fallback bootstrap configuration logic frominternal/xds/bootstrap
.RELEASE NOTES: