Commit Graph

2537 Commits

Author SHA1 Message Date
Kun Zhang ca9a41a46e
core: record RPC upstarts to Census. (#3708)
RPC upstarts are counted into metrics
RPC_{CLIENT,SERVER}_STARTED_COUNT. In addition, RPC completions are
counted into metrics RPC_{CLIENT,SERVER}_FINISHED_COUNT.  From these
metrics, users will be able to derive count of RPCs that are currently
active.
2017-11-10 17:22:22 -08:00
Eric Anderson bd32d6f599 bazel: Add dep on opencensus-contrib-grpc-metrics
This fixes the Bazel build after ef2ec949
2017-11-10 16:41:36 -08:00
zpencer d0a84ae5b8
core,netty: wire TransportTracer to netty client (#3705) 2017-11-10 15:55:21 -08:00
Eric Anderson 30fb844790 gae-interop-testing: Pin appengine library version
While using + is convenient, it prevents builds from being
deterministic which makes it hard/impossible to reproduce a historic
build or execution results.
2017-11-10 15:28:22 -08:00
Eric Anderson 5a87a6fff6 stub: Improve threading expectation docs
This mainly copies documentation from other places, like StreamObserver
and ClientCall, but does fix some missing important threading notes.

Fixes #3413
2017-11-10 13:10:17 -08:00
Eric Anderson b026ea544c netty: Avoid clearing SSLParameters
Since Netty may have set some parameters already, we should modify the
existing SSLParameters instead of starting from scratch.

This may fix ALPN with JDK9, but full support for ALPN with JDK9 is
still later work and we're not supporting it yet.

Fixes #3532
2017-11-10 13:08:58 -08:00
Eric Anderson 9ecb4c3da7 releasing: Build interop container image 2017-11-10 13:08:38 -08:00
ramaraochavali 17e1ad9bb2 core: Add useTransportSecurity to ManagedChannelBuilder
This allows the consumer of a builder to swap back from plaintext.
2017-11-10 10:57:05 -08:00
Eric Anderson 93e89ba704 netty: Move server transportReady after client preface receipt
This mirrors the behavior of client-side.
2017-11-10 10:42:29 -08:00
Eric Anderson ddae5ddaa5 core: Add negotation timeout for all server transports
Negotation is the period between transport creation and ready.
2017-11-10 10:42:29 -08:00
zpencer 9ae5f116b5
netty: TransportTracer test for local window update (#3710) 2017-11-09 17:13:04 -08:00
zpencer 970785d82b
gae-interop-testing: create new instance per test for okhttp (#3698)
Without this, the test is flakey for some test methods. The flakiness
is probably caused by AbstractInteropTest and not due to gRPC itself.
2017-11-09 16:07:58 -08:00
Eric Gribkoff 1a42a4c921
cronet: allow multiple annotation objects attached to stream 2017-11-09 15:15:48 -08:00
zpencer 18fb4d9c1b
core: ShardedAtomicLongCounter -> AtomicLongCounter (#3704) 2017-11-09 13:06:39 -08:00
zpencer af4cd2ebfd
netty: bump correct value of outbound msg counter (#3667)
No need for SendFrameGrpcCommand to know about the message count.
2017-11-09 11:32:19 -08:00
Eric Anderson bbb98feb75 Fix broken method names in tests that include leading '/'
The method name passed to MethodDescriptor does not include the leading
'/'. If it does, on the wire it will actually cause two slashes. This
has been this way for a _long_ time, but in tests that ignore the method
name or use the same MethodDescriptor no client and server the extra /
"works fine." But it's misleading, so let's remove it.
2017-11-08 15:24:50 -08:00
Eric Gribkoff e7fe224489
cronet: add tests 2017-11-08 15:06:06 -08:00
zpencer f2968f518f
core,netty: correctly count streams that ended due to client cancel (#3683)
Only bump the counter from AbstractServerStream.TransportState, and hole punch
from AbstractServerStream to TransportState when the application calls close.
2017-11-08 13:18:12 -08:00
ZHANG Dapeng 8af643d0f5
Delete CHANGES.md
Release notes are available at the [releases](https://github.com/grpc/grpc-java/releases) tab at [grpc-java](https://github.com/grpc/grpc-java) page. This file is also way out of date.
2017-11-08 11:04:39 -08:00
zpencer a3c44fa7ca
core,netty,okhttp: add TransportTracer param to ClientStream and Http2ClientStreamTransportState (#3668)
This diff does not actually change any behaviors yet, that will come
in the next diff along with unit tests for those new behaviors. This
diff's goal is only to change the method signatures so future diffs
are cleaner.
2017-11-07 16:08:55 -08:00
zpencer 2d212646bc
gae-interop-testing: use ManagedChannelBuilder, abort if devserver (#3680)
Turns out the ManagedChannelBuilder was misbehaving because the
devserver launcher ignores the app's jdk7 configuration and uses
whatever jdk is in JAVA_HOME. This is the reason
GrpcUtil.IS_RESTRICTED_APPENGINE was wrong.

Changing JAVA_HOME to point to jdk7 reveals that devservers lack
conscrypt. Adding an explicit check to make sure the jdk7 test is not
running in a dev server.
2017-11-07 15:01:03 -08:00
zpencer 6827f53785
gae-interop-testing: concrete channel builders (#3678)
Do not rely on ManagedChannelBuilder to select the correct concrete
type; directly instantiate the required type.
2017-11-07 12:59:13 -08:00
zpencer 2999d24bc7
gae-interop-testing: disable serverInProcess tests (#3679)
Tests that require serverInProcess() will not work because the server
is remote.
2017-11-07 12:58:49 -08:00
sebright ef2ec94911 core: use new OpenCensus stats/tagging API. (#3647)
This commit updates gRPC core to use io.opencensus:opencensus-api and
io.opencensus:opencensus-contrib-grpc-metrics instead of
com.google.instrumentation:instrumentation-api for stats and tagging. The gRPC
Monitoring Service continues to use instrumentation-api.

The main changes affecting gRPC:

- The StatsContextFactory is replaced by three objects, StatsRecorder, Tagger,
  and TagContextBinarySerializer.

- The StatsRecorder, Tagger, and TagContextBinarySerializer are never null,
  but the objects are no-ops when the OpenCensus implementation is not
  available.

This commit includes changes written by @songy23 and @sebright.
2017-11-07 12:25:03 -08:00
zpencer a7300150de
core: no ProxyDetector for GAE+JDK7 (#3677) 2017-11-07 09:51:22 -08:00
Carl Mastrangelo ae37d21587
all: bump to 1.9.0-SNAPSHOT 2017-11-06 17:39:26 -08:00
Eric Anderson 3936557e72 java_grpc_library: fix remote protos that are 'src's
'includes' were already handled, but not 'src's. This allows you to
depend on things like :any_proto from the protobuf repo.

Fixes #3650
2017-11-06 17:29:12 -08:00
Eric Anderson f792efe82f bazel: Update opencensus to 0.8
This fixes the Bazel build after d87ef740
2017-11-06 17:25:09 -08:00
zpencer a2e9a7f6dd
core,ntety,okhttp: Add getTransportStats method to ClientTransport (#3662)
This merely adds the method but does not do anything yet.
2017-11-06 13:24:20 -08:00
zpencer 9fac15d4f8
core,netty,okhttp: move transport tracer outbound counters to transport thread (#3661)
Counters are bumped when a message is completely written. If a
part of a message is still buffered and not yet flushed, we will
not increment the stats.
2017-11-06 12:46:17 -08:00
Carl Mastrangelo 1bc7d76d3a
interop-testing: make max size tests more deterministic
This change removes some of the non deterministic size outputs for
proto.  Instead of serializing the message and measuring the size,
measure before serialization.  As long as the remote always returns
using the same encoder, this should be stable.
2017-11-06 12:34:10 -08:00
Eric Gribkoff 213d2f5c71
android-interop-testing,examples: bump minSdkVersion to 14 2017-11-06 11:03:52 -08:00
zpencer f86dc6cd83
core: add reflection based LongAdder (#3659) 2017-11-06 10:40:42 -08:00
Eric Anderson 03bdb7609e RELEASING.md: Check issues in release milestone 2017-11-03 15:02:58 -07:00
Eric Gribkoff b31db3cc9b
core: add resetConnectBackoff() method to ManagedChannel 2017-11-03 13:59:50 -07:00
ZHANG Dapeng 34555e497a
testing: add TlsTesting.loadCert 2017-11-02 16:40:49 -07:00
zpencer 2162cd07d5
netty,core: add a TransportTracer class (#3454) 2017-11-02 15:44:21 -07:00
zpencer 4c96ebd6d4
protobuf-lite: add javalite generated sources to intellij path (#3653) 2017-11-02 15:43:47 -07:00
Carl Mastrangelo de408e0a86
stub: update ServerCalls to include status messages
Additionally:

* Prefer RuntimeException from status
* remove redundant "static" on interfaces
* use checkState to shorten code
2017-11-02 14:03:17 -07:00
Eric Anderson f9f603570d Allow tests to run on IPv6-less machines
Our Travis-CI builds are failing with "Protocol family unavailable" due
to the usage of ::1. Although it's 2017 and we'd expect to have ipv6
_loopback_ anywhere that mattered, apparently that's not the case.

The tests now work equally well on IPv4-only and IPv6-only machines.
2017-11-02 13:32:34 -07:00
Carl Mastrangelo 37a67bf041
stub: clean up call cancellation 2017-11-01 17:15:37 -07:00
Eric Anderson 2e99214548 core: Add description for Status mapped from error-less Context
The message isn't great, but _much_ better than no message.
2017-11-01 17:10:09 -07:00
Kun Zhang d87ef74082
core: set sampled for local span per MethodDescriptor. (#3627)
This moves away from the global String-based Span name registry which
is not as flexible as we desire.

Also renamed the option name to be more accurate.  This is not
API-breaking because the origianl addition to MethodDescriptor and
code-gen didn't make it into the 1.7.0 release.
2017-11-01 16:46:05 -07:00
Carl Mastrangelo 253a01461b
examples: remove deprecated stub field references 2017-11-01 14:57:24 -07:00
Ray Tsang 80a8c8f3d7 netty: Updated ALPN error message and added troubleshooting procedures 2017-11-01 13:01:43 -07:00
ZHANG Dapeng 8a9660c700
testing: move TestUtils.recordServerCallInterceptor internal 2017-11-01 09:37:42 -07:00
ZHANG Dapeng d6ff4c259f
testing: move io.grpc.testing.StreamRecorder to internal 2017-11-01 09:37:22 -07:00
ZHANG Dapeng 27ae09522d
testing: mark io.grpc.testing.DeadlineSubject experimental 2017-11-01 09:37:00 -07:00
ZHANG Dapeng 9a06c4eb0e
testing: favor voidMethod and deprecate noopMethod 2017-11-01 09:36:24 -07:00
Eric Gribkoff e1fd615df8
SECURITY.md: provider must be installed before channel creation 2017-10-31 16:22:07 -07:00