Commit Graph

4821 Commits

Author SHA1 Message Date
Esun Kim 2f60c0a66c Revert "Call Cipher APIs with non-direct ByteBuffers and perform copies in the ALTS code. (cl/308901367)"
This reverts commit a7bca23053.
2020-09-10 12:12:11 -05:00
ZHANG Dapeng 1411e6f61e
core: fix pending call not drained when shutdown
There was bug that new pending calls were not drained after channel is shutdown. The bug was worked around by #7354 .

Fixing by making sure new calls fail immediately if the channel is already shutdown.
2020-09-09 17:47:10 -07:00
sanjaypujare 7c7c4a7daa
xds: accept all forms of gkeClusterUrl and fix the 'x-goog-request-params' value (#7403) 2020-09-09 16:22:34 -07:00
Eric Anderson c919594962 netty-shaded: Fix publish regression for javadoc and sources
96ad6338 accidentally caused the javadoc and sources jars to no longer
be published for grpc-netty-shaded. It would appear to be due to the
jars being empty. This commit causes them to be published again.
2020-09-09 17:39:19 -05:00
Chengyuan Zhang 431df72d2b
xds: eliminate cluster name change logic in CDS LB policy and reimplement tests (roll forward #7356) (#7395)
Eliminated the logic in CDS LB policy that handles CDS config change (aka, cluster name change). A CDS LB policy should be used for a single cluster, the cluster should be effectively final. If the upstream LB policy needs to change routing cluster, it should create separate CDS LB policies, one for each cluster.

This change also reimplemented the unit tests for CDS LB policy.
2020-09-09 12:14:03 -07:00
Chengyuan Zhang c88feeffe8
xds: always generate xds_routing LB policy as the top-level LB policy in legacy xDS resolver (to be deprecated) (#7401)
Now that routing is enabled by default, we should always generate a load balancing config that uses xds_routing as the top-level LB policy. This change is made to the legacy xDS resolver, which will soon be replaced by XdsNameResolver2. But this change allows us to merge split codepath for CDS LB policy.
2020-09-08 18:25:28 -07:00
sanjaypujare b110cf32a0
xds: add server start semantics as per the server api design (#7371) 2020-09-08 17:23:57 -07:00
Sergii Tkachenko e610637440
okhttp: Keep ChannelBuilder.checkAuthority() for backward compatibility 2020-09-08 14:33:53 -04:00
sanjaypujare 5f9d000a61
xds: implement SslContextProviderSupplier to prevent creds leakage (#7364) 2020-09-08 10:12:55 -07:00
Sergii Tkachenko 88634ee0d5 okhttp: allow disable check authority via internal channel builder 2020-09-03 18:02:32 -04:00
Philipp Kern 07012421ad
core: add accessor for bare method name in MethodDescriptor (#7339)
Added getBareMethodName and extractBareMethodName for accessing the unqualified method name.
2020-09-03 14:27:18 -07:00
Sergii Tkachenko 3493347581 okhttp, testing: remove server builder accessor hacks 2020-09-03 16:26:04 -04:00
Sergii Tkachenko b03f148ed9 core, netty: server builders extend a public API class 2020-09-03 16:26:04 -04:00
Sergii Tkachenko 07b812b1f5 api, core: create ForwardingServerBuilder and ServerImplBuilder 2020-09-03 16:26:04 -04:00
Sergii Tkachenko 522e70d1d7 api: remove incomplete sentence in javadoc 2020-09-03 11:02:47 -04:00
Sergii Tkachenko c29ad76dae Explain test value for flow control window 2020-09-02 14:51:39 -04:00
Sergii Tkachenko e335cb3618 testing: remove channel setStatsEnabled accessor hack 2020-09-02 13:28:52 -04:00
Sergii Tkachenko 5d1304c33c okhttp: OkHttpChannelBuilder extends a public API class 2020-09-02 13:28:52 -04:00
Sergii Tkachenko c056979671 netty: NettyChannelBuilder extends a public API class 2020-09-02 13:28:52 -04:00
Sergii Tkachenko b0f0ed080e core: InProcessChannelBuilder extends a public API class 2020-09-02 13:28:52 -04:00
Sergii Tkachenko a429b9767c cronet: CronetChannelBuilder extends a public API class 2020-09-02 13:28:52 -04:00
Sergii Tkachenko c7f876d016 core: add default implementation of managed channel builder 2020-09-02 13:28:52 -04:00
Chengyuan Zhang fa103b9d7a
Revert "xds: eliminate cluster name change logic in CDS LB policy and reimplement tests (#7356)" (#7379)
This reverts commit 1260db3305.
2020-08-31 10:27:48 -07:00
Chengyuan Zhang 1260db3305
xds: eliminate cluster name change logic in CDS LB policy and reimplement tests (#7356)
Eliminated the logic in CDS LB policy that handles CDS config change (aka, cluster name change). A CDS LB policy should be used for a single cluster, the cluster should be effectively final. If the upstream LB policy needs to change routing cluster, it should create separate CDS LB policies, one for each cluster.

This change also reimplemented the unit tests for CDS LB policy.
2020-08-28 18:08:15 -07:00
ZHANG Dapeng 09367030ae
all: fix lint 2020-08-28 13:00:44 -07:00
ZHANG Dapeng eb6c3415d2
xds: fix bug for name resolution error propagation in prioirty_lb 2020-08-27 16:03:05 -07:00
Sergii Tkachenko 5cfbe1061a api: Fix a small typo in ForwardingChannelBuilderTest 2020-08-27 15:00:13 -04:00
Benjamin Reed 26cd69093b
benchmarks: Remove -javaagent in CreateStartScripts
The Jetty ALPN is not needed for benchmarks. This change removes the
-javaagent lines from the benchmarks/build.gradle file as suggested by
@ejona86.

The shell script references the Jetty ALPN agent stored in ~/.gradle which
is not available when just using the application artifacts. interop-testing
has a hack to make the agent work, but we don't really care about "plain"
Java performance for benchmarks so it is easier to just remove it.
2020-08-27 10:15:29 -07:00
ZHANG Dapeng 24a1095fd8
core: refactor to delete RetryPolicy.DEFAULT
We used `null` and `RetryPolicy.DEFAULT` for the value of `retryPolicy` in `RetriableStream` to distinguish the state between name resolution not being completed and name resolution being completed but no retry policy. After the change #7259 , name resolution is always completed when creating a `RetriableStream`, so the distinction will be gone. It will be cleaner to get rid of `RetryPolicy.DEFAULT` and simply use `null` for absence of RetryPolicy. `RetryPolicy.Provider` will be deleted in upcoming PR.
2020-08-26 22:22:25 -07:00
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