Commit Graph

4365 Commits

Author SHA1 Message Date
sanjaypujare 40b331e886
xds: increase the RPC timeout to 1-sec to avoid deadline exceeding locally at the client and request never reaching server (#7316) 2020-08-11 16:51:38 -07:00
Eric Anderson 676e5d2509 core: Remove unused mocks 2020-08-11 14:30:20 -07:00
Chengyuan Zhang f0a0e67e7b
xds: manage load stats for all clusters in XdsClient (#7299)
Move the creation of LoadStatsStore (aka, the stats object) into XdsClient. The XdsClient is responsible for managing the lifetime of stats objects. Creations of LoadStatsStores are reference counted so that multiple EDS policies can retrieve the same stats object for load recording. Counters for recording loads per locality also need to be reference counted, as each EDS policy for the same cluster will receive endpoints for the same group of localities, they will use the same load counters for recording each locality's loads.
2020-08-11 10:58:03 -07:00
sanjaypujare 77c3d21e39
xds: use a compile time constant to address an error (#7311) 2020-08-11 08:57:29 -07:00
sanjaypujare 93b1830838
xds: fix broken references to MeshCa proto objects (#7304) 2020-08-07 17:09:24 -07:00
sanjaypujare 65e7ffc788
xds: implement MeshCACertificateProvider (#7274) 2020-08-07 16:16:22 -07:00
Eric Anderson 0a99a20b70 netty: Provide an environment variable to toggle BDP monitoring
A user has reported a GOAWAY with too_many_pings when using BDP. We
aren't certain why it is happening, but want to provide a way to disable
BDP while we continue investigating. b/162162973
2020-08-07 17:34:09 -05:00
Eric Anderson 19d690b435 compiler: Use namespace aliases to reduce internal diff
Due to historical reasons, protobuf is in the proto2:: namespace
internally instead of google::protobuf. We have been maintaining diffs
that replace each occurence of one with the other. Instead we can simply
create a namespace alias and use that alias instead of the canonical
name. That greatly reduces the size of the diff and its likelihood to
break.

If the names ever align in the future, we can swap back to the canonical
names.
2020-08-07 14:58:32 -05:00
Eric Anderson 020fb36753 Fix lint warnings 2020-08-07 14:49:50 -05:00
Chengyuan Zhang 47301752b1
examples: add mavenCentral for android example's dependency repository (#7293) 2020-08-07 09:59:47 -07:00
sanjaypujare b749cb6210
xds: get the correct meshca.proto version that has the needed Java annotations (#7298) 2020-08-07 09:22:42 -07:00
Eric Anderson f59c9a9c6b compiler: Swap to ABSL_FALLTHROUGH_INTENDED
FALLTHROUGH_INTENDED was defined by Abseil, but is now getting an ABSL
prefix and the old name will be removed. Swapping to a new define name
to avoid redefining the existing-but-soon-to-be-deleted
FALLTHROUGH_INTENDED.
2020-08-06 11:24:12 -05:00
Eric Anderson 8c4088a9e9 benchmarks: Avoid implementing Future
It's a lot of code and there are classes in Guava are better. This was noticed
with a lint checker. This commit does change the error-handling behavior, as
previous the code wrongly cancelled the Future instead of setting it to have an
exception.
2020-08-06 10:56:48 -05:00
Eric Anderson e92b2275f9 Update to Error Prone 2.4
Most of the changes should be semi-clear why they were made. However, BadImport
may not be as obvious: https://errorprone.info/bugpattern/BadImport . That
impacted classes named Type, Entry, and Factory. Also
PublicContructorForAbstractClass:
https://errorprone.info/bugpattern/PublicConstructorForAbstractClass

The JdkObsolete issue is already resolved but is not yet in a release.
2020-08-06 10:56:16 -05:00
Eric Anderson 80d62bfce2 Upgrade to Mockito 3.3.3
verifyZeroInteractions has the same behavior as verifyNoMoreInteractions. It
was deprecated in Mockito 3.0.1 and replaced with verifyNoInteractions, which
does not change behavior depending on previous verify() calls. All instances
were replaced with verifyNoInteractions, except those in
ApplicationThreadDeframerTest which were replaced with verifyNoMoreInteractions
since there is a verify() call in `@Before`.
2020-08-06 10:49:23 -05:00
sanjaypujare d4166f0a02
xds: shade the meshCA proto generated code (#7290) 2020-08-05 14:30:48 -07:00
Patrice Chalin de6b747e92 examples/README: update links into grpc.io Java pages
- Update links into grpc.io
- A few copy edits
2020-08-05 11:33:29 -05:00
sanjaypujare 34513d7ed8
xds: add support for cert-providers to bootstrap file (#7285) 2020-08-04 22:32:26 -07:00
ZHANG Dapeng afcce8d3c0
core: Add DelayedClientCall
Adding `DelayedClientCall` in preparation of implementing `ConfigSelector` in core. 

`DelayedClientCall` is implemented exactly in the same way as `DelayedStream`. Only added logic to monitor initial DEADLINE. Note that `ClientCall.cancel()` is not thread-safe and will cause exceptions if trying to start call after it, which is different from in the stream where cancel() is thread-safe and wouldn't trigger any checkState()s. The initial DEADLINE monitor should not call `ClientCall.cancel()` directly.
2020-08-04 16:54:34 -07:00
sanjaypujare c116d6846b
xds: bring envoy and proto imports up to date for cert-provider-instance protos (#7280) 2020-08-03 09:49:57 -07:00
Chengyuan Zhang 9dc5eec4d7
xds: resolve conflicts by adding timeout field in parsed RouteAction for v2 tests (#7278) 2020-07-31 18:48:52 -07:00
ZHANG Dapeng 5bf68ff28c
xds: support v3 for XdsClient
Duplicated `XdsClientImptTest` for V3. `XdsClientImptTestV2` and all other tests are still using V2. Even for `XdsClientImptTest`, although the protocol is V3, the test xds server still sends V2 resources in its V3 response.
2020-07-31 14:14:10 -07:00
Chengyuan Zhang 14af76cab1
xds: parse timeout from RDS responses (#7257) 2020-07-31 12:12:00 -07:00
cindyxue 800ef216a8
xds: Added IncompleteData interface in mock CEL library (#7243)
* Added the IncompleteData interface in Java Cel library stub
2020-07-31 10:47:19 -07:00
Eric Anderson 026673cff5 gradle: Fix Gradle 6 warnings
Most of these are easy "replace X with Y."

The CreateStartScripts changes were because the scripts were being included in
the output zip/tar multiple times. The was because they were all using the same
output directory, and the entire output directory was being included for each.
The output directory tmp/ was particularly poor because other tasks were
dumping things into it, so our zip/tar was including those junk files as well.
2020-07-31 09:52:36 -05:00
Eric Anderson 96a5c5df57 buildscripts: Avoid signing sha256 and sha512 checksums
Starting in Gradle 6.0 maven-publish began including sha256 and sha512
checksums, in addition to the previous md5 and sha1 checksums. We don't want
.sha256.asc and .sha512.asc files, as they serve no purpose.
2020-07-31 09:52:36 -05:00
Eric Anderson 96ad633868 gradle: Use built-in javadoc and sources jars 2020-07-31 09:52:36 -05:00
ZHANG Dapeng 22b5480aed
xds: Add server features support to Bootstrapper
In preparation for xds-v3 support.
2020-07-30 18:00:37 -07:00
Chengyuan Zhang 1ed24feecd
xds: include a status for the result of ConfigSelector (#7260) 2020-07-30 15:21:38 -07:00
ZHANG Dapeng 2204beba2e
xds: refactor AdsStream to envoy-proto-and-version-agnostic AbstractAdsStream
In preparation of xds-v3 support.
2020-07-30 13:41:34 -07:00
Eric Gribkoff de36e42458
Update README etc to reference 1.31.0 (#7267) 2020-07-30 08:50:21 -07:00
Eric Gribkoff 9eb33838ad
Update minimum Android API in README (#7265) 2020-07-29 14:55:24 -07:00
sanjaypujare 06ca927a64
xds: first part of MeshCaCertificateProvider (#7247) 2020-07-29 09:10:02 -07:00
Menghan Li d2182fe197
interop-testing: add path_matching and header_matching (#7254) 2020-07-28 14:07:43 -07:00
Eric Gribkoff 4fbe6bef7d
interop-testing: add flags to xds test client 2020-07-28 12:43:00 -07:00
Chengyuan Zhang f444b7bcc0
android, cronet, android-interop-testing, example/drop support for android SDK versions older than 16 (#7253) 2020-07-28 12:40:55 -07:00
ZHANG Dapeng 784e804259
xds: refactor usage of Node in Bootstrap to EnvoyProtoData.Node
In preparation for xds-v3 support.
2020-07-28 08:56:41 -07:00
ZHANG Dapeng 7949f65e0f
xds: remove GRPC_XDS_EXPERIMENTAL_ROUTING flag 2020-07-28 08:03:46 -07:00
ZHANG Dapeng 6ec9387cbc
core: refactor ClientTransportProvider to ClientStreamProvider
Replace the two APIs of ClientCallImpl.ClientTransportProvider with a single API: newStream().
2020-07-24 09:40:53 -07:00
Eric Anderson 8a792c3367 buildscripts: Fix check for java-example-hostname:latest tagging
The previous 'git ls-remote' was returning the tag-referenced commits via
vF.O.O^{} which was confusing the version check (as v1.30.0 would not match
v1.30.0^{}). Passing --refs filters those ^{} tags.

There was also a missing 'v' in the version check. It was added explicitly to
generate the list but not to check the result.
2020-07-24 09:22:05 -05:00
Ran 61fd6d3ecd
xds: fix missing @RunWith annotation. (#7245) 2020-07-23 12:58:24 -07:00
sanjaypujare c60f5ff95b
xds: implement STS based OAuth 2.0 credentials exchange (#7232) 2020-07-22 16:36:38 -07:00
Chengyuan Zhang e4215b422d
xds: routing policy should immediately update a picker that selects base on updated config (#7233)
The routing LB policy should immediately the Channel's picker that delegates picking to the updated routes. Otherwise, new RPCs will keep being sent through old routes even if they are removed. This change also includes the fix for syncing state change for child balancers in deactivated state.
2020-07-22 01:16:51 -07:00
Chengyuan Zhang 9f49e48237
xds: support load reporting all clusters option and fix actual report interval measurement (#7209)
- Add support for send_all_clusters field in LRS response. When it is set to true, just send load reports for clusters that the client is currently tracking (aka, is sending load to).

- The actual load report interval (in each ClusterStats message, which contains the stats for each cluster:eds_service) should be tracked individually.
2020-07-21 18:03:36 -07:00
Chengyuan Zhang 1e238ee2a0
xds: add header matching special cases for hiding/exposing some gRPC headers (#7224)
Expose "content-type" header (hard-coded) at header matching, pretend it's already there.
2020-07-21 18:02:29 -07:00
susinmotion 24731102c6
grpclb: Make ATTR_LB_ADDRS public (#7230) 2020-07-21 12:45:47 -07:00
ZHANG Dapeng 4edbe245f1
xds: import v3 proto for ADS service 2020-07-20 13:42:57 -07:00
Chengyuan Zhang b9d067677c
xds: implement the top-level LB policy (#7203)
The top-level LB policy, which is an aggregator for CDS policies. It maintains the lifecycle of CDS LB policy instances. The pick argument taken from the Channel contains the information to determine which child CDS policy instance should the picking operation be delegated to.

The implementation is similar to the action part of what we currently have in the routing policy. The existing routing policy will be refactored to two parts, with the route match part moved into ConfigSelector and action part being this top-level LB policy.
2020-07-20 12:12:59 -07:00
ZhenLian e7cd2299c4
xds: change package name for CEL lib (#7235) 2020-07-17 19:46:51 -07:00
ZHANG Dapeng 9f56b8cea2
api: change ConfigSelector.Result to use callback instead of interceptor
We found that the interceptor approach for `ConfigSelector` would be adding a layer of indirection for no gain: The API Result selectConfig(LoadBalancer.PickSubchannelArgs args) consumes headers among other inputs, because route matching might need to match the headers; and the API produces ClientInterceptor among other outputs. But the headers is not available until clientCall.start(listner, headers), whereas the interceptor need be applied to the call before clientCall.start(). So the input is not available until the output is applied. That means we will need to delay calling the downstream newCall() (which will either be RealChannel or the interceptor) until start() is called.

So we want to change to the other approach similar to what c-core is taking: Have `Result(Object config, CallOptions, Runnable committedCallback)`, where CallOption is the selector modified CallOption, and committedCallback is used to monitor the call lifecycle.
2020-07-17 13:33:44 -07:00