Commit Graph

2801 Commits

Author SHA1 Message Date
Paul Jensen 2fc2270011 cronet: add API to apply TrafficStats tag and UID to Cronet GRPC channels (#4208) 2018-03-12 10:05:25 -07:00
zpencer f56ac76b35
core,services: add ChannelzService class (#4205)
This implements the methods to expose the stats as a gRPC
service. GetServerSockets is still unimplemented and will require a
follow up change.
2018-03-10 14:58:34 -08:00
zpencer 0678499965
core: express children of channels as WithLogId for channelz (#4201)
For channelz ref objects, we need the id as well as the name. By
returning a `WithLogId`, we can return the original object so that we
may call `toString` on it.
2018-03-09 15:49:15 -08:00
zpencer f017a0657c
services: update channelz.proto to refer to sockets as socket_ref (#4203)
This is more consistent with the other fields.
2018-03-09 14:50:37 -08:00
zpencer c3c8bc7ab6
core: keep root channels separate from subchannels in channelz (#4200)
It is a channelz requirement that subchannels and channels are
separate, and we can not retrieve a root channel by asking for a
subchannel and vice versa.
2018-03-09 14:44:41 -08:00
Eric Anderson 1fb72ef6c1 Ignore proto-generated code for ErrorProne
Previously if protobuf-generated code triggered ErrorProne we'd have to disable
the failing check for all code in that task. With -XepExcludedPaths we can
disable the ErrorProne-checking just for protobuf. Note that we continue using
ErrorProne on our generated code. Also note this only applies to ErrorProne
checks; JDK checks still require task-level disabling.
2018-03-09 11:19:20 -08:00
Eric Gribkoff 7fd22080e9
buildscripts: avoid unbound variable error (#4197) 2018-03-09 09:18:58 -08:00
Eric Gribkoff 4369e8cd9a
buildscripts: add Kokoro-based CI for Android APK stats (#3984) 2018-03-08 18:41:39 -08:00
zpencer 921b668ad5
core,netty,okhttp,testing: separate local vs remote stream start times for channelz (#4194)
The channelz spec states that the two must be separate.
2018-03-08 16:57:12 -08:00
zpencer f0eb6d2102
core,netty,okhttp,testing: nest TransportStats inside SocketStats for channelz (#4190)
Transport ststistics should really be a child member of SocketStats.
While we're at it, let's add the local and remote SocketAddress to
SocketStats, with a test.
2018-03-08 14:56:04 -08:00
zpencer 86fe318dea
services: add channelz protos (#4191)
This adds the proto and generated output.

These options are used:
option java_multiple_files = true;
option java_package = "io.grpc.channelz.v1";
option java_outer_classname = "ChannelzProto";
2018-03-08 14:53:54 -08:00
Eric Anderson c59ddc52a1 core: Internal is not necessary for LoadBalancers
With the advent of LoadBalancer2 (now just LoadBalancer) the need to use
internal APIs was removed; there's now first-class APIs exposed for
LoadBalancer use.

The old LoadBalancer API interacted with io.grpc.internal.ClientTransport
directly.
2018-03-08 13:31:31 -08:00
Jiangtao Li c7e15356d3
alts: minor update to ALTS handshaker proto (#4187) 2018-03-08 13:23:01 -08:00
Eric Anderson 19cd32fb66 core: Remove redundancy in JSON parser 2018-03-08 09:20:34 -08:00
Carl Mastrangelo 8b9d179798
core: split JSON parsing into its own file 2018-03-07 17:57:48 -08:00
Eric Gribkoff eef9add54c
core: rename prepareToLoseNetwork() to enterIdle() (#4179) 2018-03-07 15:51:13 -08:00
Eric Anderson cb2f62bbbf SECURITY.md: Update "known combinations" table for Netty bump 2018-03-07 13:39:47 -08:00
Eric Anderson ca7b3dad11
interop-testing: Improve failure messages for ping_ping
Timeouts and Status returns can be common, and previously those cases
weren't that clear. For example, if there was a StatusRuntimeException
it would just print the status code and message, but not the causal
chain.
2018-03-07 13:28:41 -08:00
Eric Gribkoff ae1fb9467c
core: use exponential backoff for name resolution (#4105) 2018-03-05 21:46:02 -08:00
Jiangtao Li d45e1abd8d
alts: refactoring into alts and alts.internal packages (#4169) 2018-03-02 14:02:42 -08:00
Eric Anderson 26719bdc5c Partially revert "core: change serverimpl,servercallimpl's internalclose to cancel stream (#4038)"
This partially reverts commit 48ca4527c1.
It leaves the changes to ServerCallImpl and test.

This also partially reverts "Lint fixes" commit
3002a23a0f which removed unused variables
which are now necessary again.

This is reverted for the combined result of two issues:
* Some users are testing that they get UNKNOWN when the service throws.
  That's not unreasonable given the behavior was well-publicised when it
  changed in v1.5. We should probably keep the UNKNOWN in some common
  cases (like the service threw immediately, before sending anything).
* The client could see CANCELLED instead of INTERNAL as had been
  intended. It's unclear as to why (I didn't investigate heavily). This
  behavior is visible in MoreInProcessTest and was overlooked during
  review.
2018-03-02 13:35:06 -08:00
Eric Anderson f865b31f5f core: Disable ManagedChannelImpl orphan check
Some internal tests are broken and noticing the warning logs. They need
to be fixed before this is enabled.
2018-03-02 12:29:33 -08:00
Eric Anderson e392af1efd Partially revert "core: Tracking NameResolverProvider being experimental"
This partially reverts commit c07ad68cbd.

The PARAMS_DEFAULT_PORT in NameResorverProvider is the preferred name.
The hope is still to kill NameResolver.Factory.
2018-03-02 12:29:08 -08:00
Eric Gribkoff 3268082f01
core: prefer getHostString() to getHostName() in ProxyDetectorImpl (#4165) 2018-03-02 12:11:54 -08:00
zpencer 066ad3ceac
buildscripts,travis: fetch from mvn with retries (#4140)
A band aid for #3284, to make its symptoms less noticeable.
2018-03-01 19:11:24 -08:00
ZHANG Dapeng c07ad68cbd
core: Tracking NameResolverProvider being experimental 2018-03-01 14:20:49 -08:00
ZHANG Dapeng 3334a8a554
core: allow application to provide all threads - okhttp channel 2018-03-01 10:55:44 -08:00
zpencer fcc8ea5950
core: load binarylog class using serviceprovider util (#4161)
Use the common util rather than rolling our own here.
2018-03-01 10:15:15 -08:00
Carl Mastrangelo 1e9bd9a84e
protobuf: expose Status specific Unwrapper 2018-02-28 16:49:37 -08:00
Carl Mastrangelo 9747994ac6
protobuf: add since tags to StatusProto javadocs 2018-02-28 16:43:35 -08:00
Eric Anderson 3002a23a0f Lint fixes 2018-02-28 10:20:08 -08:00
Carl Mastrangelo 7af2373a03
core,netty,okhttp,alts,inprocess: deprecate usePlaintext(boolean) 2018-02-28 08:53:14 -08:00
Eric Anderson 1b5aadf068 core: Disable panic mode
It is now discovering legitimate errors in some tests that need to be
resolved first. Follow progress at #3293.
2018-02-27 14:03:34 -08:00
zpencer 09d305c3fc
core: add server transports to channelz (#4149)
A previous PR added client transports, this PR adds server
transports.
2018-02-27 10:02:44 -08:00
zpencer 4dc1b50e1a
core: add ServerImpl to channelz (#4147)
This allows servers to be identified by ids.
2018-02-27 08:22:25 -08:00
ZHANG Dapeng 39decadaf6
core: allow application to provide all threads - inprocess channel 2018-02-26 17:12:04 -08:00
zpencer 00d1805f78
core: register client transports to channelz (#4146)
This makes client side transports visible to channelz when created,
and removed when terminated.
2018-02-26 16:41:09 -08:00
Eric Anderson 25f851bf5a alts: Remove Java 8 library usages (#4143) 2018-02-26 15:11:13 -08:00
Eric Anderson ce84c2b227 core: Add missing @RunWith test annotation (#4142)
For ManagedChannelOrphanWrapperTest
2018-02-26 14:06:43 -08:00
zpencer b71b1084de
core: register channels, subchannels, oobchannels with channelz (#4035)
Channels, subchannels and oobchannels are added at creation and
removed at termination. Same goes for subchannels and
oobchannels. Everything is registered as a hard reference. This means
channels that are not properly cleaned up using `awaitTermination`
will remain visible in channelz.
2018-02-26 09:45:19 -08:00
ZHANG Dapeng 4bac7d7084
core: add InProcessServerBuilder.generateName() 2018-02-23 16:44:10 -08:00
Jiangtao Li af2ae2a1e0
alts: re-order dependencies in ALTS bazel build (#4133) 2018-02-23 15:59:54 -08:00
Eric Anderson 9f677a991a buildscripts: Hard-code use of TLSv1.2 for github download
GitHub is now requiring TLS v1.2:
https://githubengineering.com/crypto-removal-notice/

Without this configuration, we see:
iwr : The request was aborted: Could not create SSL/TLS secure channel.
At line:1 char:5
+ & { iwr https://github.com/google/protobuf/archive/v3.5.1.zip -OutFile
protobuf. ...
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:Htt
  pWebRequest) [Invoke-WebRequest], WebException
   + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShe
  ll.Commands.InvokeWebRequestCommand

Fixes #4120
2018-02-23 13:34:12 -08:00
Jiangtao Li d8630f2521 alts: add ALTS to interop tests 2018-02-23 12:44:18 -08:00
Shohei Kamimori 21541243f8 alts: change visibility of `NettyServerBuilder` (#4088) 2018-02-22 14:32:46 -08:00
Carmi Grushko 2db5e0dc35 all: rename Bazel workspace to io_grpc_grpc_java
Fixes #4095
2018-02-22 13:59:45 -08:00
Carl Mastrangelo 713ac0a886
all: update to latest alpn agent 2018-02-22 13:32:05 -08:00
Carl Mastrangelo 6d51cb4aef
netty: bump to 4.1.22-Final 2018-02-22 13:10:04 -08:00
ZHANG Dapeng e31851a0eb
core: remove runDunTasks with filter
In `FakeClock` we have `runDueTasks()` (without filter), `numPendingTasks(filter)`, and `getPendingTasks(filter)` which are useful. The `runDueTasks(filter)` method seems not a right way to test.
2018-02-22 12:46:24 -08:00
Eric Gribkoff d4b11e5659
examples: include correct version in Android caching example (#4114) 2018-02-22 12:16:19 -08:00