Commit Graph

3160 Commits

Author SHA1 Message Date
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
Eric Anderson 09737fea7a netty: Remove TransportCreationParamsFilterFactory
Now there is a clear lifetime of ProtocolNegotiator.
2018-10-03 08:48:35 -07:00
Kun Zhang ebbf8005be
doc: organize Attributes with annotations. (#4892)
* doc: organize Attributes Keys with annotations.

Keys are annotated with the following annotations:

1. Grpc.TransportAttr: transport attributes returned by
{Client,Server}Call.getAttributes().

2. NameResolver.ResolutionResultAttr: attributes passed as the
argument of NameResolver.Listener.onAddresses() and
LoadBalancer.handleResolvedAddressGroups()

3. EquivalentAddressGroup.Attr: attributes from
EquivalentAddressGroups.

* Expand the usage of annotations to Attributes variables.
2018-10-01 10:11:01 -07:00
Carl Mastrangelo 93ead9d666
protobuf: make extension registry method experimental 2018-09-28 17:18:28 -07:00
zpencer 2fae9a3a97
core: permanently store authority at channel creation (#4886)
Getting the authority must not rely on the name resolver being
non-null, because that can trivially happen if the channel is shut
down.
2018-09-28 16:10:14 -07:00
Jesse Wilson 8b16899bc1 Upgrade to Guava 26.0-android and jsr305 3.0.2 2018-09-28 13:23:55 -07:00
Eric Anderson 1f006959b0 github/lock.yml: Lock GitHub issues after 90 days
The earlier year was just for testing. Things are working as we'd hope.
Choosing 90 days for now. If an issue is closed at the beginning of a
release cycle, that gives release cycle + 6 weeks to upgrade, which
seems plenty. Worst-case, is users open a new issue referencing the old
one they found.
2018-09-28 09:48:13 -07:00
Jiangtao Li 8e72351a65
alts: plumb authority to ALTS protocol negotiator (#4880)
alts: plumb authority to ALTS protocol negotiator
2018-09-27 19:27:45 -07:00
zpencer da87ffb329
core,services: v1 binlog (#4846)
Log using new proto definition

- Remove io.grpc.BinaryLog.CallId because a call ID is now an AtomicLong
- Add the concept of "always included" and "never included" metadata
  keys. This is needed because grpc-status-details-bin is already
  logged in the binlog msg, and we will log grpc-trace-bin for the
  census info.
- unit tests are effectively rewritten
2018-09-27 13:19:24 -07:00
Eric Anderson 69bb8a37f8 RELEASING.md: Add missing TestDeprecatedService replacements 2018-09-25 12:32:10 -07:00
Carl Mastrangelo 32bb5ba156
protobuf: expose ExtensionRegistry setter 2018-09-25 10:49:43 -07:00
Carl Mastrangelo 5e4d9a591e
okhttp: include better ALPN error message and fine log some exceptions 2018-09-24 18:36:07 -07:00
Eric Anderson 693779dba7
alts: Remove usage of TransportCreationParamsFilterFactory
Provide a ProtocolNegotiatorFactory instead.
TransportCreationParamsFilterFactory is being removed.
2018-09-24 17:32:04 -07:00