Commit Graph

2889 Commits

Author SHA1 Message Date
ZHANG Dapeng e1865b565d
core: channel tracing log only when number of backends changed between zeor and nonzero
This is to implement one of changes made in the spec
https://github.com/grpc/proposal/pull/89/files
2018-07-23 14:30:38 -07:00
Eric Gribkoff 877b1a198f
core: enterIdleMode() exits idle if still in use (#4630) 2018-07-23 09:45:06 -07:00
Eric Anderson c30e509621 Downgrade to Truth 0.41 for Java 7 support
gae-jdk7 in particular is failing with the 0.42 Truth because it depends
on org.checkerframework:checker-qual 2.5.3 instead of 2.0.0.
2018-07-20 22:30:40 -07:00
Carl Mastrangelo 64d272ae7c
core: make service config errors recoverable 2018-07-20 17:47:03 -07:00
ZHANG Dapeng 8be92a1e0a
interop-testing: Fix clientStreaming interop test does not fail on missing trailers
If the server sends all response message but does not send the trailers, client throws
StatusRuntimeException: INTERNAL: Received unexpected EOS on DATA frame from server
2018-07-20 16:54:33 -07:00
Carl Mastrangelo 7d455964f6
all: update to netty 4.1.27 and tcnative 2.0.12 2018-07-20 16:36:00 -07:00
Eric Anderson 6d7c7dc583 context: Avoid deprecated Truth API
This helps an internal cleanup removing the old failWithRawMessage API.
2018-07-20 14:48:44 -07:00
Eric Anderson 4e276a52f3 buildscripts: Remove set -x from run_in_docker.sh
Printing the commands is pretty ugly output and not particularly
helpful, unless debugging the logic. If needing to debug, just add the
-x locally.
2018-07-20 14:08:07 -07:00
Eric Anderson 15a5ba2698 Remove DoNotMock annotation in favor of JavaDoc
DoNotMock was removed from error_prone_annotations in 2.1.3, because
there was no enforcement mechanism (which is in google/error-prone#572).
Guava and Trust also depend on error_prone_annotations and are beginning
to use newer versions, so our usage of DoNotMock is causing diamond
dependency problems. This allows us to update to 2.2.0.

The annotations were useful internally; we're solving that in cl/205294089.
2018-07-20 14:03:55 -07:00
zpencer 37e6f5f775
Fix jdk10 support in travis (#4653)
For jdk10: disable errorprone and fix javadoc warnings
2018-07-19 13:35:27 -07:00
Jiangtao Li 499f95d3ec
alts: add call credential security level attribute (#4657) 2018-07-19 10:55:22 -07:00
zpencer 603d858186
buildscript: fix jdk-switcher bug always always setting jdk8 (#4652)
This fixes a bug that always hard codes jdk8.

Fixing this revealed an issue for jdk10, so let's remove jdk10
for now and revisit it in a separate PR.
2018-07-18 11:04:31 -07:00
zpencer 4335445d98
Start 1.15.0 development cycle (#4650) 2018-07-18 10:48:04 -07:00
zpencer f013771bd1
services: binlog status code, msg, details (#4551)
Log these additional bits of info in RPC binary logging
2018-07-17 11:29:45 -07:00
Carl Mastrangelo 146b6006b3
compiler,stub: update RpcMethod docs and usage 2018-07-12 17:01:47 -07:00
zpencer 9925049dce
services: double submit cookie interceptor for channelz (#4628)
Add this form of XSRF protection to channelz. Non web browser clients
calling channelz must also include the cookie header and metadata
key.
2018-07-12 16:45:17 -07:00
Eric Anderson 818d7246c3 RELEASING.md: Remove manual artifact documentation
This greatly reduces the amount of content. The removed content was
already deteriorating. For example, it references grpc-java-deploy which
is no longer present nor necessary. It also didn't suggest using
build_docker.sh for building protoc-artifacts.

While the docs could have been updated, without actually running them
they are unlikely to be functional. Removing the docs seems better than
spending effort of maintaining them, especially since they add confusion
to the process and are a scary amount of content for new devs.
2018-07-12 14:18:11 -07:00
zpencer 3181fbcf03
services: add javadocs for binlog constructors (#4637) 2018-07-12 12:57:10 -07:00
Eric Anderson 7bb88de264 buildscripts: remove grpc-java-releasing docker container
The buildscript was updated to pull in a fix to protoc-artifacts to
support TLS 1.2 (google/protobuf#4879), which was the only remaining
reason to have our own container.

Docker container building was split out into a separate build_docker.sh
so that people can call it blindly and get the container necessary for
run_in_docker.sh.
2018-07-11 13:04:30 -07:00
Eric Anderson 1887b93afd buildscripts: Hard-code PROTOBUF_VERSION in make_dependencies.sh
We always want to use a consistent version of protobuf; avoid the need
for the caller (which may be a person running the script) to specify the
version.
2018-07-11 10:13:09 -07:00
Eric Anderson 4879d6f6a8 buildscripts: Use "all" protobuf download to avoid ./autogen.sh
This cuts ~20 seconds from the build time and avoids the need to have
autoconf and libtool installed. This is the "normal" way to build
protobuf.
2018-07-11 10:12:33 -07:00
jbingham-google ffcb3b964b compiler, stub: Rename inputType and outputType in @RpcMethod 2018-07-10 13:24:50 -07:00
Eric Anderson 32d50eb3b3 netty: Fix regression in Java 9 ALPN support
Enable testing on Java 9+ in TlsTest, to prevent future regressions.

Fixes #4620
2018-07-10 09:14:49 -07:00
Eric Anderson 9222dc5d01 core: Add missing @Nullable annotations to ClientTransportOptions
Convert the checkNotNull into our more standard line while I'm cleaning
it up.
2018-07-09 17:21:51 -07:00
Eric Anderson b92ea68647 netty: Propagate EAG attributes to ProtocolNegotiator
This lets the NameResolver/LB coordinate with the negotiator, like is
necessary with ALTS on GCP.
2018-07-09 13:00:17 -07:00
Eric Anderson 9d6241eedc Propagate EquivalentAddressGroup attributes to transports
Most of the changes are changing the signature of newClientTransport.
Since this is annoying, I choose to introduce a ClientTransportOptions
object to avoid the churn in the future.

With ClientTransportOptions in place, there's only a few lines necessary
of plumbing for the Attributes: add the field to ClientTransportOptions
and populate it in InternalSubchannel. There are no consumers of the
field in this commit.
2018-07-09 13:00:17 -07:00
Eric Anderson 2b48210b73 grpclb: Plumb attributes for OOB and backend channels
These attributes can be used by ALTS-specific code to determine whether
ALTS or TLS should be used.
2018-07-09 11:25:49 -07:00
jbingham-google 9229e30287 compiler, stub: Add @RpcMethod annotation
This annotation will enable Java APT to generate code.

Addresses part of #3173.
2018-07-06 17:02:01 -07:00
Eric Anderson dd57b667cc
Fix unused variables
Unused variables in tests were deleted. The unused variable in Netty
was a future that needed completing; that was a bug.
2018-07-04 07:32:57 -07:00
Yang Song 02ad99e1f5 core: Avoid compare default TagContext in thread local with empty. (#4613) 2018-07-03 15:28:05 -07:00
Eric Gribkoff b61968c61a
android-interop-testing: migrate to androidx test libs (#4611) 2018-07-03 08:52:23 -07:00
ZHANG Dapeng 6dad047126
core: add jndi timeout and dirContext.close 2018-07-02 17:36:05 -07:00
Eric Anderson e3ff1ade07
core: Add support for List<EAG> in Subchannels
This avoids the needs to flatten to EAGs for cases like PickFirst,
making the Attributes in EAGs able to be used in communication with
core. See #4302 for some discussion on the topic.
2018-07-02 14:00:05 -07:00
Eric Gribkoff 5b59c696fc
documentation: update version in android-channel-builder.md (#4605) 2018-06-30 09:46:35 -07:00
Eric Gribkoff 27a1c900a9
android: initialize listener with isConnected=false (#4606) 2018-06-30 09:24:47 -07:00
Eric Gribkoff 8c52e138ee
services: delete unused proto (#4604) 2018-06-29 15:03:08 -07:00
Carl Mastrangelo 39d2dd0eaa
core: make InternalHandlerRegistry a HandlerRegistry 2018-06-29 13:01:25 -07:00
Nick Hill b2dd6ae7f0 util: Improve RoundRobinLoadBalancer scalability with stickiness
- Rework stickiness picker logic to be non-blocking
- Stash `Subchannel` ref in an attribute rather than dedicated map
2018-06-29 09:49:23 -07:00
Marco Ferrer ac55604527 fixed typo in round robin factory name const
Fixes: #4598
2018-06-29 09:16:30 -07:00
Eric Anderson 3e67a5be75 core: Avoid unnecessary unchecked cast in DnsNameResolver 2018-06-28 15:47:06 -07:00
ZHANG Dapeng b244988572
netty,okhttp: make rpc followed by racy GOAWAY transparent-retry-able
A new RPC starts with the following steps:

1. Pick a READY transport
2. the READY transport calls `transport.newStream()`
3. the new stream calls `stream.start()`
4. `stream.start()` invokes or enqueus `writeHeaders()` (or for GET request, noop)

A racy GOAWAY could happen between 3 and 4, and by the retry spec, the RPC should be transparent-retry-able in this case. For Netty and OkHttp transport implementation, before step 4, (even if step 1, 2, and 3 excluding 4 are made atomic,) the http2-stream for the RPC is not created, so the current transparent retry logic does not apply and need fix.

Of course, if step 1, 2, and 3 including 4 are made atomic, and not with GET, there will be no such problem.
2018-06-28 12:52:17 -07:00
sullis b88cf81a78 all: add 'oraclejdk10' to travis build matrix 2018-06-27 15:55:42 -07:00
zpencer 5a8b790a3c
services: binlog method name should include leading / char (#4588)
The APIs of the other implementations all begin method names with `/`,
since the binlog is language agnostic we should be aligned.
2018-06-27 11:22:51 -07:00
Carl Mastrangelo a74bb350b7
core: always do SRV record lookup in DnsNameResolver
Instead of failing after a a missing A/AAAA record, this change
makes the resolver keep going and try out SRV records too.  This
is needed for use with ALTS, and is part of the gRPCLB spec.

This change also moved the JNDI code to a separate, reflectively
loaded file.  This makes it easy to exclude the file and not worry
about the missing class references on Android.  Additionally, if
javax.naming might be available on Android, this allows it to be
loaded.  A key side effect of this is that DnsNameResolver is
smaller, and more cleanly tested.
2018-06-26 16:15:52 -07:00
Carl Mastrangelo 7edb41a4ef
stub: clarify StreamObservers interaction 2018-06-26 15:43:13 -07:00
Carl Mastrangelo 81da3eb95b
core: make Auto config load balancer not depend on service config
Also, add some tests
2018-06-26 13:36:02 -07:00
Juanli Shen 7e68a0b524 grpclb: sync LB proto with grpc-proto 2018-06-22 17:14:06 -07:00
Doug Lawrie ffd0f9feca inprocess: add a toString for InProcessSocketAddress
The motivation here is in some cases we log the remote-addr that is set in the gRPC call attributes, and have to special case this type to support inprocess servers.
2018-06-22 10:32:42 -07:00
ZHANG Dapeng e59aac7178
Update README to reference 1.13.1 (#4580) 2018-06-21 09:28:30 -07:00
Shohei Kamimori a20f4812d6 alts: de-flake AltsHandshakerStubTest
Intended to resolve #4291.
Previously AltsHandshakerStubTest.closeEarlyTest is flaky because it is async.
De-flake the test by removing executors.
2018-06-20 18:03:45 -07:00