Commit Graph

1875 Commits

Author SHA1 Message Date
Eric Anderson 437fafab1b Address review comments 2017-02-28 09:23:04 -08:00
Eric Anderson 2eeb5e3e9e all: Downgrade to Guava 19
Guava 20 introduced some overloading optimizations for Preconditions
that require using Guava 20+ at runtime. Unfortunately, Guava 20 removes
some things that is causing incompatibilities with other libraries, like
Cassandra. While the incompatibility did trigger some of those libraries
to improve compatibility for newer Guavas, we'd like to give the
community more time to work through it. See #2688

At this commit, we appear to be compatible with Guava 18+. It's not
clear if we want to actually "support" 18, but it did compile. Guava 17
doesn't have at least MoreObjects, directExecutor, and firstNotNull.
Guava 21 compiles without warnings, so it should be compatible with
Guava 22 when it is released.

One test method will fail with the upcoming Guava 22, but this won't
impact applications. I made MoreThrowables to avoid using any
known-deprecated Guava methods in our JARs, to reduce pain for those
stuck with old versions of gRPC in the future (July 2018).

In the stand-alone Android apps I removed unnecessary explicit deps
instead of syncing the version used.
2017-02-28 09:23:04 -08:00
Eric Anderson e67b6027af interop-testing: Remove useless tcnative configuration
It doesn't do anything, since tcnative has been specified as a normal
dependency for a while.
2017-02-27 17:12:07 -08:00
Lukasz Strzalkowski 2131dfe6f4 doc: there's no type param anymore 2017-02-27 10:25:00 -08:00
Lukasz Strzalkowski f995c6c9d4 doc: fix @link to cancel in java doc 2017-02-27 09:48:34 -08:00
Lukasz Strzalkowski efe261ea43 core: remove SingleTransportChannel, not used 2017-02-27 08:35:51 -08:00
Eric Anderson c415dc8d40 netty: Use tcnative in tests instead of Jetty ALPN
I'm quite confused how we went this long using Jetty ALPN for the Netty
tests. Anyway, we strongly prefer tcnative, so we should be using it in
the tests.
2017-02-24 17:04:35 -08:00
Kun Zhang a9bd94781c core: promote LBv2 classes. 2017-02-24 16:48:44 -08:00
Kun Zhang a6b1d8981a core: delete the old channel impl and LoadBalancer. 2017-02-24 16:48:44 -08:00
Eric Anderson 675080b208 all: Enable ErrorProne during compilation
ErrorProne provides static analysis for common issues, including
misused variables GuardedBy locks.

This increases build time by 60% for parallel builds and 30% for
non-parallel, so I've provided a way to disable the check. It is on by
default though and will be run in our CI environments.
2017-02-24 14:53:23 -08:00
Eric Anderson a2f15ae61c android-interop-testing: Fix checkstyle violations (imports) 2017-02-24 10:04:34 -08:00
Eric Anderson 5ca4ea7272 examples: Split thrift from the multi-project build
grpc-thrift isn't published yet, which causes build breakage for people
trying to do the protobuf example.

Fixes #2681 (ONCE AND FOR ALL!)
2017-02-24 10:04:02 -08:00
Carl Mastrangelo 218bc03aeb all: recommend the latest gRPC version on master 2017-02-23 16:09:42 -08:00
Eric Gribkoff 58720655c8 compiler: update path to protoc plugin in README 2017-02-23 12:55:55 -08:00
Łukasz Strzałkowski 70b482afad core: clean up code deprecated in 1.1 (#2678) 2017-02-21 14:20:26 -08:00
Łukasz Strzałkowski 63a77658fb Fix link to class in java doc (#2739)
doc: fix link to class in java doc
2017-02-21 09:48:25 -08:00
Kun Zhang 6ff5f2149b core: report error count metrics. (#2734) 2017-02-17 14:07:37 -08:00
Eric Anderson 9283b2b13f interop-testing: Remove useless Threads in test 2017-02-17 11:21:30 -08:00
Lukasz Strzalkowski d116cc9875 netty: Fix NPE in NettyClientTransport
Fixes NPE when keepalive is enabled.

* Move creation of keepAliveManager to the bottom of start()
* Enable keepAlive in NettyClientTransportTest
* Add test cases checking if keepalive is enabled/disabled, specifically.

Fixes #2726
2017-02-16 10:29:52 -08:00
Eric Anderson 72923dca87 all: prepare for ErrorProne's FutureReturnValueIgnored
Futures almost universally should be handled in some way when being
returned, either to receive the value or to cancel scheduled tasks to
prevent leaks.

Netty is a bit of a special case though, since it constantly returns
futures that you ignore (even adding a listener returns the "this"
future). So we want to suppress the warning for code using Netty instead
of trying to fix it. When we enable ErrorProne in the build, we should
start passing -Xep:FutureReturnValueIgnored:OFF in the compilerArgs.
2017-02-16 07:22:56 -08:00
Eric Anderson 9fc4fa18aa releasing: Add docs for creating new Jenkins job 2017-02-14 13:51:07 -08:00
Eric Anderson ae68718881 netty: remove unused code in a test 2017-02-13 16:56:10 -08:00
Łukasz Strzałkowski 26913bb82e netty: include SETTINGS_MAX_HEADER_LIST_SIZE in SETTINGS
Closes #2350
2017-02-13 07:37:54 -08:00
Ryan Michela 4029b3f0c2 Implement missing authority API for HandlerRegistry 2017-02-10 17:19:20 -08:00
ZHANG Dapeng 9c78b466b6 core: DelayedStream getAttributes to throw IllegalStateExeption if not passThrough 2017-02-10 11:13:10 -08:00
Carl Mastrangelo 700abb32af compiler: add some missing final modifiers on generated code 2017-02-10 10:16:43 -08:00
Eric Anderson cc000be12d netty: Fix CheckReturnValue failure in test 2017-02-09 17:16:19 -08:00
Eric Anderson 7e1fd4f370 core: Tweak getAttributes() JavaDoc
It now provides more guarantees and should be more obvious when it is
safe to use.
2017-02-08 12:49:00 -08:00
Kun Zhang 9a81cad952 core: switch to LBv2 as the default. (#2707) 2017-02-07 17:45:28 -08:00
Eric Gribkoff 48e1430909 interop-testing: fix flakes in Http2Client 2017-02-07 16:14:39 -08:00
Eric Anderson 42aa64c647 all: swap to newer animalsniffer plugin
The new plugin uses a newer version of animalsniffer, allows overriding
the animalsniffer version used, and has up-to-date handling. The
up-to-date handling cuts fully incremental parallel build times in half,
from 5.5s to 2.7s.

The previous plugin was supposed to be verifying tests. However, either
it wasn't verifying them or its verification was broken.
2017-02-07 12:49:01 -08:00
Carl Mastrangelo b0323ac22c all: update to protobuf 3.2.0 2017-02-07 09:47:15 -08:00
Carl Mastrangelo 50a4278671 all: drop thrift from grpc-all deps 2017-02-07 08:08:48 -08:00
Carl Mastrangelo dfe61e4ed3 netty: fix race in server channel startup and shutdown 2017-02-06 15:44:03 -08:00
Carl Mastrangelo 1928dc7779 netty: add return value errorprone annotations 2017-02-06 14:53:29 -08:00
Kun Zhang 45642096c3 core: un-abstract the LBv2 setter in ManagedChannelBuilder. (#2697)
The LBv2 setter was added in #2658 as an abstract method, which breaks
anyone who implements ManagedChannelBuilder.  Here we add a default
implementation that throws.
2017-02-06 13:26:47 -08:00
Kun Zhang 7ab5e0e810 core: record server_elapsed_time on client (#2673)
It is defined as the time between the client sends out the headers, and the RPC finishes.
2017-02-03 13:29:06 -08:00
kpayson64 6fbe140959 interop-testing: Replace Mockito with StreamObserver for several tests (#2639) 2017-02-02 10:21:41 -08:00
ZHANG Dapeng b1aee9fcc0 netty: call transportReady in handleProtocolNegotiationCompleted
implements the comments mentioned in #2619
2017-02-01 14:55:55 -08:00
Eric Anderson a7b4dfd345 docs: Remove annoying diff section heading
The section heading in unified diff is optional. In this case the
heading is pretty useless and causes problems.
2017-02-01 13:10:34 -08:00
Eric Anderson 57b9105c7f interop-testing: overrideAuthority breaks JWT
Commit 65e4d9f4 broke the jwt_token_creds. It is believed to be because
the JWT does not see the authority passed to overrideAuthority. So the
changes to interop-testing client are temporarily reverted here. Note
that this breaks GRPC_PROXY_EXP testing, so the incompatibility needs to
be resolved.

Solving #2682 will allow reverting this change.

Fixes grpc/grpc#9497
Fixes #2680
2017-02-01 08:38:53 -08:00
Carl Mastrangelo e8aef5b4bb Start 1.2.0 development cycle 2017-01-30 16:40:12 -08:00
Carl Mastrangelo fdeade4ee2 netty: work around netty bug when RPCs may be reset early
For netty/netty#6296
2017-01-30 16:09:19 -08:00
Carl Mastrangelo 237a65ebfc core: make ServiceDescriptor use the Builder pattern 2017-01-30 15:22:40 -08:00
Eric Gribkoff e08034cde0 documentation: new server reflection tutorial 2017-01-30 12:57:48 -08:00
Carl Mastrangelo 0c0ce37bbd all: upgrade to netty 4.1.8 and tcnative Fork26 2017-01-30 12:40:46 -08:00
Carl Mastrangelo cbe0ecd5e2 all: fix linter found on import 2017-01-27 15:47:53 -08:00
Carl Mastrangelo 566d0e9400 testing: change names of noopMarshaller to void marshaller
This is needed because in interceptor tests, often the types cannot
be changed.  The void methods stay for users who are writing tests
where they actually don't care about types.  The noop methods
require types to be specified.  This is for users who don't care
about the implementation.  These represent different levels of
commitment.

This eases the transition of code Mocking MethodDescriptor, which
breaks in this release.
2017-01-27 14:41:38 -08:00
Kun Zhang 9983a7b9e4 docs: security requirement of NameResolver.getServiceAuthority() (#2665)
In response to #2662
2017-01-27 09:27:47 -08:00
Eric Anderson 65e4d9f47a all: avoid DNS with GRPC_PROXY_EXP
In some environments DNS is not available and is performed by the
CONNECT proxy. Nothing "special" should need to be done for these
environments, but the previous support took shortcuts which knowingly
would not support such environments.

This change should fix both OkHttp and Netty. Netty's
Bootstrap.connect() resolved the name immediately whereas using
ChannelPipeline.connect() waits until the address reaches the end of the
pipeline. Netty uses NetUtil.toSocketAddressString() to get the name of
the address, which uses InetSocketAddress.getHostString() when
available.

OkHttp is still using InetSocketAddress.getHostName() which may issue
reverse DNS lookups. However, if the reverse DNS lookup fails, it should
convert the IP to a textual string like getHostString(). So as long as
the reverse DNS maps to the same machine as the IP, there should only be
performance concerns, not correctness issues. Since the DnsNameResolver
is creating unresolved addresses, the reverse DNS lookups shouldn't
occur in the common case.
2017-01-27 09:27:07 -08:00