Commit Graph

2546 Commits

Author SHA1 Message Date
ZHANG Dapeng 38c84ed9ef
core: temporarily disable retry when stats or tracing is enabled
To avoid breakage, temporarily disable retry when stats or tracing is enabled.

This still agrees with the description of the javadoc of `ManagedChannelBuilder.enableRetry()`

```java
/**
   * Enables the retry mechanism provided by the gRPC library.
   *
   * <p>This method may not work as expected for the current release because retry is not fully
   * implemented yet.
   *
   * @return this
   * @since 1.11.0
   */
  @ExperimentalApi("https://github.com/grpc/grpc-java/issues/3982")
  public T enableRetry()
```
2018-02-21 15:04:36 -08:00
Eric Anderson b78c5cfcf2 core: Improve status descriptions in MessageDeframer
This removes the debug string added in 5a4794f2c because the issue was resolved
and the debug string is confusing for Netty, producing results like:
io.grpc.netty.NettyClientTransport$3: Frame size 216695976 exceeds maximum: 4194304

This makes it seem like it's a HTTP/2 frame problem and not a gRPC message
problem. Although it is clearer once you see the maximum is 4 MB, this already
bit me in #4086.

In general, we should talk about "messages" instead of "frames" when possible
as that's what is most comprehensible to the consumer of the description. I
also make sure to mention "gRPC" messages/frames because otherwise the message
is ambiguous.
2018-02-21 14:20:12 -08:00
zpencer 7d47ac0c12
core: Clarify ownership of InputStreams wrt Marshaller and Stream (#3419)
It is the responsibility of the caller to close the `InputStream`
returned by `Marshaller`.

`Stream` takes ownership of any `InputStream`s passed in.

`DelayedStream` and the streams of `InProcessTransport` already
handle ownership transfer, but `AbstractStream` needs to call
`close`.
2018-02-20 09:57:57 -08:00
zpencer 5f7b64a250
core,services: lock down visibility of BinaryLogSink (#4100)
- This class should not be a part of the public API
- Update ServiceProvidersTest to verify package private services can be
  loaded with the utility.
2018-02-20 09:54:40 -08:00
zpencer bde2ba2444
services: introduce BinaryLogSinkProvider (#3917)
The `BinaryLog` will write `GrpcLogEntry`s to the sink, which is
intended as a pluggable interface. It is the sink's
responsibility to send the binlog protos to disk, to a remote
logging service, etc.
2018-02-16 13:47:31 -08:00
Eric Gribkoff 0c27e719ae
Update README to reference 1.10.0 (#4090) 2018-02-15 18:54:38 -08:00
Carl Mastrangelo a414b91a59
context: remove context profiling 2018-02-15 18:08:19 -08:00
ZHANG Dapeng df4048d98d
core: retry part 5 continued, throttle policy 2018-02-15 13:15:04 -08:00
Jiangtao Li e7f2f1dedd alts: add gRPC ALTS 2018-02-15 09:28:00 -08:00
zpencer a45d07bcb5
build: run unit tests on osx, ensure proto output included (#4081)
This adds back functionality that was accidentally dropped when
porting from travis:
- make sure generating protos will not lead to any uncomitted changes
- actually run the unit tests
2018-02-14 16:44:02 -08:00
Eric Anderson 8c51683af1 SECURITY.md: Mention netty-handler instead of codec-http2
netty-handler has SslHandler which is really the piece that needs to
agree with netty-tcnative. But as I mention, all of netty should be a
consistent version, otherwise it may randomly break due to internal API
changes.
2018-02-14 14:52:04 -08:00
Eric Gribkoff 79bf7de927
examples: match applicationId to AndroidManifest.xml package (#4075) 2018-02-14 14:43:16 -08:00
Carl Mastrangelo 2f2881756f
core: remove lint warning 2018-02-14 13:10:55 -08:00
zpencer fbc079d631
buildscripts: build macos artifacts in kokoro (#4066) 2018-02-14 12:53:11 -08:00
zpencer 8925921805
buildscripts: avoid remote repo vars in uploadArchives for local (#4076) 2018-02-13 11:17:53 -08:00
Eric Anderson 3480a08e70 core: ConnectivityStateManager is always enabled
There have been no callers of disable() since commit 1c7421be7.
2018-02-13 08:56:43 -08:00
Carl Mastrangelo 35665af72c
netty: upgrade to 4.1.21 2018-02-12 17:42:11 -08:00
Eric Anderson a888d46b93 netty: Include more details for closure of unknown reason
Some users have reported "Channel closed but for unknown reason".
Adding this information doesn't tell us where the bug is, but may help
us narrow down why getShutdownStatus() is null.
2018-02-12 16:49:22 -08:00
zpencer 890da706bb
Revert "core: tests for forwarding {Server,Client}{Call, CallListener} (#4058)" (#4070)
This reverts commit 77397b9dd0.
2018-02-12 12:21:24 -08:00
Carl Mastrangelo 6c437b2998
netty: upstream unit conversion 2018-02-12 11:11:11 -08:00
Eric Anderson f48a5097ef kokoro: Avoid getting cmake if it's installed
Kokoro already has cmake installed, so it's not necessary in that
environment. We still keep the old code around because it's helpful for
setting up new Windows environments in general.
2018-02-12 07:22:36 -08:00
Carl Mastrangelo 6ea8fffa2b
context: add basic context profiling 2018-02-09 19:45:19 -08:00
Eric Gribkoff 6ee6eae5a0
core: add prepareToLoseNetwork() method to ManagedChannel 2018-02-09 11:05:09 -08:00
zpencer 77397b9dd0
core: tests for forwarding {Server,Client}{Call, CallListener} (#4058) 2018-02-09 10:56:39 -08:00
zpencer 5d5e8c6ad5
core: Install the ServerInterceptor from BinaryLogProvider (#3879) 2018-02-09 10:56:04 -08:00
zpencer 011c7629fd
core: split binlog tests into two in ManagedChannelImplTest (#4049) 2018-02-09 10:52:07 -08:00
zpencer 35f0d15291
core: add subchannel stats (#3967) 2018-02-09 10:50:11 -08:00
zpencer d2c7e33f3e
core: pull out reusable forwarding test, refactoring forwarding tests (#3480) 2018-02-08 16:31:23 -08:00
ZHANG Dapeng bc3e4e9a85
core: Remove incorrect `@GuardedBy` annotations
This change is being made in preparation for fixing a bug in the enforcement
of `@guardedby`.

Non-static inner classes can refer to locks declared by their enclosing
instances. Static member types (static classes, interfaces) cannot.
2018-02-08 14:29:59 -08:00
Eric Gribkoff 6f9b4e87e1
compiler: avoid invoking experimental method in generated code 2018-02-08 11:25:38 -08:00
zpencer f8c7f963ef
core,netty,okhttp: use ServiceProviders for ManagedChannelProvider, ServerProvider (#4047) 2018-02-08 08:57:52 -08:00
ZHANG Dapeng c735bb3385
core: retry part 6, client options - maxAttempts 2018-02-07 18:00:56 -08:00
ZHANG Dapeng e33d39cf93
core: retry part 6, client options - disable retry 2018-02-07 18:00:36 -08:00
ZHANG Dapeng ad62cc2775
core: retry part 5 continued, logic on retry policy
Implement logic for making retry decision using RetryPolicy.
2018-02-07 18:00:04 -08:00
Kun Zhang f44fc50310
grpclb: enter fallback mode immediately when balancer and all backend… (#4007)
grpclb: enter fallback mode immediately when balancer and all backend connections are lost

Changed according to updated spec.
2018-02-07 14:42:00 -08:00
Eric Gribkoff de54a4cb49
core: remove @Internal annotation on @Internal and @ExperimentalApi 2018-02-07 14:40:25 -08:00
Ryan Michela 48fb9ff55f core: Add toString() for MethodDescriptor and ServiceDescriptor (#4013) 2018-02-07 10:30:54 -08:00
zpencer 71cc0e37a8
core: remove unused test resouce files from NameResolverProviderTest (#4048) 2018-02-06 17:37:42 -08:00
Nicholas DiPiazza 14ed692974 examples: Add a "hello-world" with TLS configured 2018-02-06 17:33:32 -08:00
Eric Gribkoff 512e55444e
cronet,examples: remove unused imports 2018-02-05 15:45:52 -08:00
zpencer ca40d55e00
core: extract provider class out of ServiceProvidersTest (#4042) 2018-02-05 15:17:57 -08:00
Eric Anderson 850143f4a3 kokoro: Include kokoro image version in build logs
Otherwise there's no way to determine which version of the image was
used for the build.
2018-02-05 11:11:03 -08:00
Eric Anderson 5a31dff283 kokoro: Use --include-build in cronet
This avoids needing to build all of grpc as well as avoids having to
manually track which dependencies are necessary.

This cuts 1.5 minutes off the Cronet build time (to 3.5 minutes). But it
also reduces the amount being downloaded which should help with #3284.
2018-02-01 17:17:28 -08:00
Snow Pettersen 2c8bc71fb7 core: Resolve address of GRPC_PROXY_EXP hostname
Since this address is never resolved gRPC fails to connect with an
UnresolvedAddressException when the env variable is specified. This
should resolve the address before we attempt to proxy to it.
2018-02-01 15:08:42 -08:00
Eric Anderson f1bc4493b8 netty: Add test to verify error for TLS failure
This is to notice regressions like in #4016
2018-02-01 12:30:18 -08:00
Eric Anderson c56114ff79 netty/shaded: Bump shadow plugin version to 2.0.2
This fixes the gradle warning:
The SimpleWorkResult type has been deprecated and is scheduled to be
removed in Gradle 5.0. Please use WorkResults.didWork() instead.
2018-02-01 09:58:23 -08:00
ZHANG Dapeng dc95465f6a
core: retry part 5, add RetryPolicy data object 2018-01-31 11:25:50 -08:00
Eric Gribkoff 722d6f0bea
okhttp: support Conscrypt security provider 2018-01-31 10:45:27 -08:00
zpencer 141a1d23ee
core: install the binary logging client interceptor (#3937) 2018-01-31 09:33:12 -08:00
Eric Gribkoff 2601d544bf
RELEASING.md: include golden files in branching instructions 2018-01-30 15:14:51 -08:00