Commit Graph

1085 Commits

Author SHA1 Message Date
zpencer ca40d55e00
core: extract provider class out of ServiceProvidersTest (#4042) 2018-02-05 15:17:57 -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
ZHANG Dapeng dc95465f6a
core: retry part 5, add RetryPolicy data object 2018-01-31 11:25:50 -08:00
zpencer 141a1d23ee
core: install the binary logging client interceptor (#3937) 2018-01-31 09:33:12 -08:00
Eric Gribkoff 2f05c23063
Start 1.11.0 development cycle 2018-01-30 15:13:55 -08:00
Eric Anderson d792a72ea1 Revert "core: make ManagedChannel honor Service config LB "
This reverts commit 98aa69af72.

The GSON dependency is noticable on Android for no benefit (currently).
Reverting until we figure out what we want to do.
2018-01-30 13:38:45 -08:00
Eric Anderson fbdc217b46 Revert "core: handle long dns txt records properly, parse service config, and add tests"
This reverts commit b01609572a.

The GSON dependency is noticable on Android for no benefit (currently).
Reverting until we figure out what we want to do.
2018-01-30 13:38:45 -08:00
zpencer 47019325db
core: PartialForwardingServerCall should forward getAuthority (#4009) 2018-01-29 14:02:21 -08:00
zpencer a85b0e1047
core: remove spy() usage in ServerImplTest (#4010) 2018-01-29 14:02:00 -08:00
Kun Zhang df65bef881
core: delete outboundMessage() and inboundMessage() on StreamTracer. (#4014)
They were deprecated in 1.7.0.
2018-01-29 13:42:14 -08:00
zpencer 0465bb5aeb
core,testing: deprecate passing ServerCall to StatsTraceContext (#3912)
Instead, pass a ServerCallInfo object containing the interesting bits
of info. This lets us modify the call handler for binary logging, but
still provide the original info to the StatsTraceContext API.
2018-01-26 16:51:45 -08:00
Bogdan Drutu af936919f3 Update opencensus to 0.11.0 and remove extra dependencies. 2018-01-26 13:04:26 -08:00
Shohei Kamimori 0c21032221 core: change retention policies to CLASS
`@Internal` and `@ExperimentalApi` annotations are not visible at compile time
of application (not grpc-java) because their retention policies are `SOURCE`.
So, change retention policies to `CLASS`.
2018-01-26 13:01:55 -08:00
zpencer 199a5203c5
core: move ChannelStats and TransportStats to io.grpc.internal.Channelz (#4008) 2018-01-25 23:24:49 -08:00
zpencer b109595ad3
core: move Instrumented, LogId, WithLogId to io.grpc.internal as public (#3995) 2018-01-25 17:19:00 -08:00
zpencer 2a93e6b92f
core: NameResolverProvider should use ServiceProviders util (#4005) 2018-01-25 17:18:42 -08:00
zpencer 2996207c20
core: generifiy ServiceProvider class (#3886)
Moving all the common code among different service provider
classes to one place.
2018-01-25 14:12:09 -08:00
zpencer 36670c1fcd
core: disable jndi in gae jdk7 (#4000) 2018-01-25 11:32:19 -08:00
ZHANG Dapeng cd3c9e245b
core: retry part 4, retry attempt header 2018-01-23 17:28:52 -08:00
ZHANG Dapeng 671834fd9e
core: retry part 3: use call executor and sceduled executor service
Use call executor and scheduled executor service to schedule and run `retry()`.

Backoff amount computation from retry policy and testcases during backoff will be added in future PRs.
2018-01-23 10:56:19 -08:00
ZHANG Dapeng cf4a38ed45
core: retry part 2, buffer size limit
Implement buffer size counting with ClientStreamTracer and buffer size limit following the spce https://github.com/grpc/proposal/blob/master/A6-client-retries.md#memory-management-buffering
2018-01-23 10:35:59 -08:00
Carl Mastrangelo b01609572a
core: handle long dns txt records properly, parse service config, and add tests 2018-01-22 16:16:52 -08:00
Eric Anderson a54ff9cb54 core: Remove unused ServiceConfiguration
It was going to be used, but then the design changed. It's now
unnecessary.
2018-01-18 10:56:52 -08:00
zpencer c51b9271fb
core: rename io.grpc.internal.ChannelTracer to CallTracer (#3973)
This class will be reused to count ServerCall stats.
2018-01-17 14:04:09 -08:00
ZHANG Dapeng 358ea0c15d
core: retry part I followup, refactor commit()
It's more reasonable and convenient to return a `Runnable` for `commit()` method because we want to execute part of the commit under a lock and run part of it out of the lock.
2018-01-17 09:12:56 -08:00
Eric Anderson efcbef58e3 core: add missing separator in user-agent
The separator was accidentally removed in 1bbe126b4
2018-01-17 08:17:36 -08:00
zpencer 32ad2311ad
core: channel tracer should report target name and ConnectivityState (#3969)
This addresses regular channels and oob channels.
2018-01-16 10:05:30 -08:00
Carl Mastrangelo 98aa69af72
core: make ManagedChannel honor Service config LB
I think the idle state transitions are correct. I have looked at them and tried tracing a few paths through. This doesn't go full idle because the name resolver doesn't need to be restarted. Also, the LB transition happens inside of a NR callback, so it would be odd to have the NR terminate itself upon successful resolution. (Might this cause recursion? I think it may).
2018-01-12 16:56:54 -08:00
Eric Anderson bd7080337b core: Mention limitations of connectivity state API
These limitations are by design, but may be non-obvious.
2018-01-12 12:21:50 -08:00
Eric Anderson ba8063e7b0 all: Prefer mock+delegatesTo() over Mockito.spy()
Spies are really magical and easily produce unexpected results. Using them in
tests can easily yield tests that don't do what you think they do. Delegation
is much safer when possible.

Delegation doesn't work when methods `return true`, final methods, and with
restricted visibility, though. So CensusModulesTest and
MaxConnectionIdleManagerTest are left as-is.
2018-01-11 09:32:54 -08:00
Eric Anderson af0283477d Update ErrorProne to 2.2.0 and fix failures 2018-01-10 14:14:27 -08:00
zpencer 16cec947c5
core: MethodDescriptor.toBuilder() should copy schemaDescriptor (#3941) 2018-01-10 13:15:25 -08:00
Eric Anderson 4bc0c95d0b Update ErrorProne to 2.1.3 and fix failures
The fixes could have subtle side-effects, but I did take care when making them.
2018-01-09 12:40:55 -08:00
Eric Anderson 35a6bf863d Enable the Guava Beta Checker 2018-01-08 14:52:51 -08:00
Spencer Fang 3809f676ee core: make TransportStats package-private
Limited access will be granted via InternalTransportStats.
2018-01-04 15:35:04 -08:00
ZHANG Dapeng 450a983552
core: rm unused variable and method 2018-01-02 10:06:10 -08:00
ZHANG Dapeng 66119463ad
core: fix java ErrorProne 2017-12-28 13:06:58 -08:00
zpencer e7b2089c85
core: ManagedChannel should not depend on internal (#3898) 2017-12-28 11:04:11 -08:00
ZHANG Dapeng 40453c744f
core: fix unimplemented API in ManageChannel
Two APIs were added to ManageChannel. This would be API breaking if they are still abstract.
2017-12-27 13:30:12 -08:00
Shohei Kamimori b1d62b70c4 core: remove unused variables 2017-12-20 10:27:16 -08:00
ZHANG Dapeng 2fe8ce23b2
core: retry support part 1 followup, channel.shutdown should not fail retry in backoff
As delayedTransport `shutdown` will make retry attempts that are in backoff unable to create new stream. So wrap delayedTransport with `retriableTransport`, which will keep uncommitted retriable streams alive when `shutdown`.
2017-12-20 10:24:28 -08:00
Carl Mastrangelo 172b2d36be
core: add a service config file 2017-12-19 12:33:27 -08:00
Carl Mastrangelo 6eaae5d081
core/grpclb: resolve TXT records in DNS name resolver and include balancer addresses 2017-12-19 10:01:53 -08:00
Kun Zhang 04420dfdf7
Start 1.10.0 development cycle (#3877) 2017-12-18 10:28:02 -08:00
zpencer 9358fc7233
core: BinaryLogProvider should not use ManagedChannelImpl class loader (#3874) 2017-12-18 10:26:26 -08:00
zpencer 39c266cbe7
core: introduce io.grpc.internal.BinaryLogProvider (#3872) 2017-12-17 16:47:33 -08:00
Eric Anderson 1bbe126b44 core: Use hard-coded string for version
Using META-INF for loading the version is broken on Android and
frequently broken when gRPC is shaded. Having hard-coded strings be
replaced on version bumps has been working well.

Fixes #2098
2017-12-15 15:31:26 -08:00
zpencer 7e655beb88
core: ManagedChannel should implement InternalInstrumented 2017-12-14 18:09:46 -08:00
zpencer 02f56b0218
core,services: move BinaryLog class to grpc-services (#3867) 2017-12-14 14:20:30 -08:00
zpencer f1151f91b9
core: InternalInstrumented<T> for instrumented classes (#3817)
Entities that report stats to channelz will implement this interface.
2017-12-13 12:56:25 -08:00