Commit Graph

3122 Commits

Author SHA1 Message Date
Thomas Broyer 183e1f6735 all: update Error Prone to 2.3.2
This will allow enabling Error Prone on JDK 10+ (after
updating the net.ltgt.errorprone plugin), and is also a
prerequisite to that plugin update.

Also remove net.ltgt.apt plugin, as Gradle has native
support for annotationProcessor.
2018-10-19 13:08:36 -07:00
Kun Zhang 9aaf29c5e6
core: annotate Attributes key annotations as experimental API. (#4974)
Also annotate NameResolver.Listener as experimental because
annotations of an outer class don't show in the javadoc page of its
inner classes.
2018-10-19 13:04:32 -07:00
Carl Mastrangelo 93d9b32d12
core: ignore localhost and IP addresses for JNDI
This change is mainly to fix a test, but it also is an implementation of the proposal here: https://github.com/grpc/proposal/pull/79

In short:

* Do not do SRV or TXT lookups when the target name is `localhost`.  This can be overriden by a system property
* Do not do SRV or TXT lookups when the target name is an IPv6 or IPv4 address.  This _cannot_ be overriden.  The constructed domains for these queries would themselves not be valid.  (e.g. _grpclb._tcp.192.168.0.1)
* Speeds up initial connection when communicating over local host, since it is extremely uncommon that such a connection would need gRPCLB or SRV records

I expect to remove the system property after a release if no one asks about it.
2018-10-19 12:19:36 -07:00
zpencer a2ef4c0dbf
services: update v1alpha reflection.proto to match grpc-proto repo (#4973)
More info: https://github.com/grpc/grpc-proto/pull/38
2018-10-18 16:27:07 -07:00
Eric Anderson b7c3d276c9 core: Add maxInboundMetadataSize to builders
This is a rename of the pre-existing Netty builder method, so aliases
were added to the Netty builders.

Fixes #4050. This API was a minor rename to the pre-existing Netty API,
so has already undergone API review and thus is not ExperimentalApi.
2018-10-18 14:34:03 -07:00
Eric Anderson eaafb997e2 okhttp: Add maxInboundMetadataSize
Fixes #4567
2018-10-18 14:34:03 -07:00
Eric Anderson 0eefa5263b inprocess: Add maxInboundMetadataSize 2018-10-18 14:34:03 -07:00
Eric Anderson 0fbc1153bd testing: Add transport tests for maxInboundMetadataSize 2018-10-18 14:34:03 -07:00
Jihun Cho b7dc501bbe core: For Android, ignores DNS cache
There is a known issue that causes DNS lookup issue when network
siwtchover on android. This issue is tracked separately in #4962.
This change simply disables DNS cache to avoid the issue on Android.
2018-10-17 22:51:43 -07:00
Jihun Cho 0a7fa14042 core: Roll forward "core: DnsNameResolver caches refresh (#4812)"
This reverts commit 0e8cf58d1a.
2018-10-17 22:51:43 -07:00
Carl Mastrangelo 52d6a6e680
netty: fix local socket bind 2018-10-17 18:34:03 -07:00
creamsoup 7675ce2d47
okhttp: make flow control window size configurable (#4959)
Make flow control window size in OkHttp configurable.
2018-10-17 17:33:23 -07:00
Jiangtao Li e6e3eb8420
alts: update handshaker proto (#4966) 2018-10-17 16:41:01 -07:00
zpencer 9b5115d5a7
services: remove v1alpha binlog (#4963)
We should use v1 everywhere.
2018-10-17 14:46:56 -07:00
Eric Anderson 959323be97
Add build support for Java 11
It appears everything was already working on Java 11, except
build-specific and testing issues. Updating to Netty 4.1.30 (#4940)
probably fixed the last true Java 11 incompatibility.

Fixes #4933
2018-10-17 11:49:30 -07:00
Eric Anderson f7dec06fbc travis: Drop testing for Java 10
oracle10 is failing during setup with:
The command "bash install-jdk.sh -F 10 -L BCL --target $JAVA_HOME --workspace ${TRAVIS_HOME}/.cache/install-jdk" failed and exited with 8 during .

We should be adding support for Java 11 and dropping Java 9-10 anyway,
since Java 9-10 are unsupported.
2018-10-16 15:19:19 -07:00
Carl Mastrangelo c729a0f76b
core: enable SRV records lookup 2018-10-16 10:10:08 -07:00
Kun Zhang 6adc1797c9
core: finalize convenient overrides on LoadBalancer.Helper and Subchannel. (#4954)
Those overrides are kept for backward compatibility and convenience
for callers.  Documentation already says implementations should not
override them.  Making them final reduces confusion around which
override should be verified in tests and be overridden in forwarding
classes, thus prevents bugs caused by such confusion.
2018-10-16 09:43:58 -07:00
Carl Mastrangelo 60b02c0b9c
core: throw exception on resolution failure and no jndi resolver 2018-10-15 16:59:02 -07:00
Kun Zhang c528df8ae8
core: add internal Subchannel.asChannel() (#4950)
Returns a Channel that allows a LoadBalancer to make auxiliary RPCs on already-established application connections. We need this to implement client-side health-checking (#4932)

See comments on the API for its semantics.

Notable changes:

- Transports are modified to use InUseStateAggregator so that they can exclude RPCs made on Subchannel.asChannel() when reporting in-use state for idle mode.
- OobChannel shares the same Executor as Subchannel.asChannel(). Because the latter is not a ManagedChannel and doesn't have life-cycle, thus can't determine when to return the Executor to a pool, the Executor is now returned only when ManagedChannelImpl is terminated.
2018-10-15 15:39:21 -07:00
Kun Zhang ef8a84421d
core: promote CallCredentials API v2. (#4952)
This is Step 3 of #4901.  The old interface has been deprecated in the
latest release.  Now it's time to replace it with the new API.
2018-10-15 15:37:20 -07:00
Carl Mastrangelo 6b7c8694a9
core: make DnsNameResolver Error on empty addresses
This change does 3 main things (in 3 commits):

1.  Refactor the resolution runnable to be testable
2.  Add Finer level logging to aid in debugging
3.  Check that there are addresses before passing them to ManagedChannelImpl.
2018-10-12 18:11:45 -07:00
ZHANG Dapeng 595e5acfd1
core: temporarily disable census when enableRetry 2018-10-12 16:42:51 -07:00
Jihun Cho 1d52d8e62a netty: suppress linter warning about Ignoring returned Futures 2018-10-12 16:18:17 -07:00
Jihun Cho 2ce6ddfb5c core: removed unused expression 2018-10-12 16:18:03 -07:00
Jihun Cho 6332b076af cronet: remove unused import 2018-10-12 16:17:47 -07:00
Kun Zhang 11f9e8d5b4
services: implement Health.Watch (#4930) 2018-10-12 16:02:25 -07:00
Jihun Cho 0e8cf58d1a Revert "core: DnsNameResolver caches refresh (#4812)"
This reverts commit 189991012b.
2018-10-12 15:30:38 -07:00
Jihun Cho c24f2fd25b Revert "core: android use smaller(2s) DNS cache TTL (#4943)"
This reverts commit ecb206f277.
2018-10-12 15:30:38 -07:00
creamsoup ecb206f277
core: android use smaller(2s) DNS cache TTL (#4943)
android use smaller (2s) DNS cache TTL
2018-10-12 13:56:49 -07:00
Eric Anderson f2e34d772b testing: Wait for TIMEOUT_MS instead of 100ms
The transport test flakes at the timeout(100) about .05% of the time.
There's really no reason it should have a smaller timeout compared to
the other timeouts.

The timeout(250) wasn't flaking at all, but it should follow the
convention.
2018-10-12 12:18:04 -07:00
Eric Anderson 4c5dabf705 netty: Don't return null ServerTransportListener in tests
Null is never allowed, so will cause exceptions and not behave properly.
2018-10-11 17:17:42 -07:00
Eric Anderson fab303b26e Avoid interop build instructions when already built
This reduces the amount of logspam generated during interop testing.
Telling someone how to build when they have already obviously built
doesn't serve much purpose, now that everyone is used to it not
building automatically.
2018-10-11 17:17:13 -07:00
Carl Mastrangelo 5362017c5a
netty: update to 4.1.30 and tcn 2.0.17 2018-10-11 16:31:14 -07:00
Carl Mastrangelo d06c8e3bf7
core: include what name resolver was used when it fails 2018-10-11 13:39:20 -07:00
Eric Anderson 967cc64770 Start 1.17.0 development cycle 2018-10-11 09:29:23 -07:00
Kun Zhang 861f9147ed
core: add CallCredentials2 and deprecate CallCredentials' old interface (#4902)
This is the first step of smoothly changing the CallCredentials API.

Security level and authority are parameters required to be passed to
applyRequestMetadata(). This change wraps them, along with
MethodDescriptor and the transport attributes to RequestInfo, which is
more clear to the implementers.

ATTR_SECURITY_LEVEL is moved to the internal GrpcAttributes and
annotated as TransportAttr, because transports are required to set it,
but no user is actually reading them from
{Client,Server}Call.getAttributes().

ATTR_AUTHORITY is removed, because no transport is overriding it.

All involved interfaces are changed to abstract classes, as this will
make further API changes smoother.

The CallCredentials name is stabilized, thus we first introduce
CallCredentials2, ask CallCredentials implementations to migrate to
it, while GRPC accepting both at the same time, then replace
CallCredentials with CallCredentials2.
2018-10-10 21:45:56 -07:00
Grant Oakley 4ce9c0492d okhttp: Add SslGuard to list of allowed security providers. See internal issue b/116007005 for more details. 2018-10-10 11:39:10 -07:00
creamsoup c0a3c4ab75
okhttp: make AsyncFrameWriter log quietly when socket is already closed. also, default log level down to INFO(closed) which is same as NettyServerTransport. (#4927) 2018-10-09 17:11:56 -07:00
zpencer 308887a150
services: fix callbacks not being forwarded in binlog interceptors (#4918) 2018-10-09 10:45:25 -07:00
zpencer 5eb816b3b1
services: fix channelz javadoc lint for reference not found (#4920)
Referring to the public abstract class seems to be OK, but referring
to the package private impl trips the linter.
2018-10-09 09:23:16 -07:00
zpencer f10676c2b4
services: allow config str to be passed into binlog object (#4919)
Do not require binlog str to be defined by env var.

This allows --flag=value styled configuration, which is more common
internally.
2018-10-08 15:44:18 -07:00
Carl Mastrangelo fc908e2dcc
netty: expose setting a local socket address 2018-10-08 14:14:09 -07:00
Kun Zhang cc5e3c19df
core: ForwardingLoadBalancerHelper (#4911)
This will be used by LoadBalancer plugins that delegates to another,
which is what the new request routing (go/grpc-request-routing-design)
requires.  This will also be used to wrap LoadBalancers to add
client-side health-checking functionality.
2018-10-06 12:36:35 -07:00
Carl Mastrangelo 0b7043d31a
okhttp: remove internal mockito dep 2018-10-05 11:25:14 -07:00
Kun Zhang fbfc3a40d0
core: add Grpc.TRANSPORT_ATTR_LOCAL_ADDR (#4906)
Resolves #4135
2018-10-03 16:43:37 -07:00
Kun Zhang 31328652d4
services: sync health.proto from grpc-proto repo (#4904) 2018-10-03 16:24:09 -07:00
Carl Mastrangelo 6b7fa40378
core: name anonymous classes in ManagedChannel for clear stacktraces 2018-10-03 14:09:00 -07:00
Eric Anderson 2c9bdd1cda Update README to reference 1.15.1 2018-10-03 08:58:14 -07:00
Eric Anderson 99a2cac07a netty: Add ProtocolNegotiator.close
This notifies the negotiator when it will no longer be used, allowing it
to clean up any resources.
2018-10-03 08:48:35 -07:00