Commit Graph

4357 Commits

Author SHA1 Message Date
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
sanjaypujare 8ab2c75150
xds: fix DistributorWatcher to send last updates to newly added watchers (#7220) 2020-07-17 11:58:30 -07:00
Trustin Lee 1d443e0389
interop-testing: fix flakiness of deadlineExceeded test (#7202)
Increase the deadline amount to avoid the false positive of deadline exceeded due to the call is scheduled to start after the deadline.
2020-07-17 10:40:15 -07:00
ZHANG Dapeng d342b111f9
api: add InternalConfigSelector abstract class 2020-07-16 13:52:03 -07:00
Eric Anderson 44db31d147 benchmarks: Use correct classpath for scripts
'runtime' is the old classpath, pre-java-library plugin. We could swap to
'runtimeClasspath', but it is cleaner to just use startScript's defaults. We
already use that approach in interop-testing.

Fixes #7218
2020-07-16 13:00:01 -05:00
Chengyuan Zhang 92f4842f0f
xds: perform header matching on concatenated values (#7215)
Combine values of header fields with the same key to a comma-separated string before performing header matching.
2020-07-15 14:06:02 -07:00
Eric Gribkoff 7d97443cd7
Start 1.32.0 development cycle (#7214) 2020-07-15 13:51:06 -07:00
sanjaypujare 7047209ba3
xds: add meshca.proto from Istio repo (#7213) 2020-07-15 10:46:14 -07:00
ZHANG Dapeng bacd12ee0a
xds: delete deprecated xds-experimental scheme 2020-07-14 16:46:58 -07:00