Commit Graph

4392 Commits

Author SHA1 Message Date
Eric Anderson eca8bf8e62 Start 1.33.0 development cycle 2020-08-26 16:13:21 -07:00
Chengyuan Zhang c30505df04
core, alts, cronet: fix ByteBuffer covariant method usages (#7349)
Java 9 introduces overridden methods with covariant return types for the following methods in java.nio.ByteBuffer:

- position​(int newPosition)
- limit​(int newLimit)
- flip​()
- clear​()
- mark​()
- reset​()
- rewind​()

In Java 9 they all now return ByteBuffer, whereas the methods they override return Buffer, resulting in exceptions like this when executing on Java 8 and lower:

java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer

This is because the generated byte code includes the static return type of the method, which is not found on Java 8 and lower because the overloaded methods with covariant return types don't exist (the issue appears even with source and target 8 or lower in compilation parameters).
The solution is to cast ByteBuffer instances to Buffer before calling the method.
2020-08-25 17:21:34 -07:00
Eric Anderson 720df64fd2 Upgrade to Netty 4.1.51 and tcnative 2.0.31 2020-08-25 14:52:21 -07:00
Chengyuan Zhang 292f3b954a
xds: implement routing in xDS resolver with config selector API (#7275)
Name resolver implementation for performing xDS request routing before the call is made: the resolver emits a config selector to the Channel to let calls make routing decision before delegating to the corresponding cluster load balancer's picker.

This is a branched xDS name resolver implementation. It will replace the existing xDS resolver once the Channel's integration for using config selector is done.
2020-08-24 15:42:18 -07:00
Eric Anderson 03f83bbac2 api: Fix NameResolver.ConfigOrError javadoc
It appears getAttributes() javadoc was accidentally copied when
ConfigOrError was moved in commit 0244418d2. This restores the
documentation from before the move.
2020-08-24 10:24:23 -07:00
ZHANG Dapeng f36f0e9046
core: disable usage of PendingCall due to a bug
#7259 failed internally and there seems to be a bug. Temporarily disable PendingCall.
2020-08-24 10:13:14 -07:00
sanjaypujare e6ab167334
xds: Add CertProviderSslContextProviders to Client&Server SslContextProviderFactories (#7338) 2020-08-21 14:08:39 -07:00
sanjaypujare 80480e69ef
xds: implement cert-provider bootstrap config as per design (#7333) 2020-08-21 12:52:51 -07:00
ZHANG Dapeng 50d8be70b0
core: use DelayedClientCall for awaiting configSelector in ManangedChannelImpl
ManagedChannelImpl.newCall() will return a DelayedClientCall until the name resolver updates the configSelector reference.

The configSelector follows the same service config error handling rules.

Made the following assumption:
If there is no service config in resolution result, then there must be no config selector in the resolution result. Actually we ignore any config selector in the resolution result if there is no service config.
2020-08-21 12:44:14 -07:00
ZHANG Dapeng b8fe968c88
xds: not to use insecure DSA crypto
Although DSA is only used in tests so it's totally no security concern, it's annoying we need some workaround for internal checks to import. So removing the usage.
2020-08-21 11:19:08 -07:00
sanjaypujare f8bd84c755
xds: replace mock(ScheduledFuture) with a TestScheduledFuture implementation (#7346) 2020-08-20 21:19:17 -07:00
ZHANG Dapeng 39450766dd
xds: refactor XdsClientImplTest to use v3 proto only 2020-08-20 13:25:17 -07:00
ZHANG Dapeng 00fee4d141
xds: have LoadReportClient support LRS v3
As noted in the design doc "The LRS protocol has a transport version, just like the xDS protocol itself does. Initially, we will use the server feature in the bootstrap file to determine the version of the LRS transport protocol. This means that there will not be any way to use a different transport protocol for LRS than for xDS."
2020-08-20 10:45:41 -07:00
ZHANG Dapeng c67dcb3b08
xds: refactor LoadReportClient for supporting LRS v3 2020-08-19 20:01:29 -07:00
ZHANG Dapeng a91acec2d4
core: fix a bug for hedging with throttling (#7337)
Resolves #7222: If a hedging substream fails triggering throttling threshold, the call should be committed.

Refactored RetryPlan to two separate classes RetryPlan and HedgingPlan.
2020-08-18 23:12:25 -07:00
ZHANG Dapeng cb07b0fb45
xds: add data type for ClusterStats (#7335)
In preparation of LRS v3 support.
2020-08-18 12:30:05 -07:00
sanjaypujare ee9109eced
xds: add CertProviderServerSslContextProvider support (#7331) 2020-08-17 17:06:29 -07:00
sanjaypujare 39c49b0408
xds: add CertProviderSslContextProvider support (#7309) 2020-08-17 09:45:13 -07:00
ZHANG Dapeng 1c269e4289
xds: import LRS v3 proto 2020-08-14 08:49:29 -07:00
cindyxue cd0cc95553
xds: Added a CEL-based Authorization Engine (#7191)
* xds: add a CEL-based authorization engine that uses the mock CEL library
2020-08-13 16:08:35 -07:00
Eric Anderson 6593fc8d35 RELEASING.md: Add missing repo+branch for gh-pages git pull 2020-08-13 11:09:42 -07:00
Eric Anderson 4185081fd6 Update README etc to reference 1.31.1 2020-08-13 10:01:52 -07:00
Eric Anderson 0773c1aa05 interop-testing: Remove comparison of proto field to null
Proto fields aren't null. The getter will return an empty string instead
of null.

cl/326415191
2020-08-13 10:01:07 -07:00
wanyingd1996 6eced95a54
api: removed deprecated method blockingExecutor (#7242) 2020-08-12 15:29:30 -07:00
Patrice Chalin e19bdf33b1 README: link to v1.31.0 example directories
Followup to #7267. The rest of the README page refers to v1.31.0, so it would seem reasonable to link to the example folders of v1.31.0 too -- rather than v1.30.0.

@ejona86
2020-08-12 10:15:06 -07:00
Chengyuan Zhang 7bcfb59ff4
xds: replace verifyNoMoreInteractions with verifyNoInteractions (#7320) 2020-08-12 09:51:50 -07:00
Chengyuan Zhang eb6110cefc
rls, xds: fix parameter comments that do not match the formal parameter name (#7319) 2020-08-12 09:50:54 -07:00
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