Commit Graph

3227 Commits

Author SHA1 Message Date
Ignacio del Valle Alles 3a38e59bae core: Allow specifying a ProxyDetector per ManagedChannel 2019-01-23 16:57:40 -08:00
Carl Mastrangelo 3d2e375aa1
core: drop VisibleForTesting on ServiceConfigUtil 2019-01-23 15:10:50 -08:00
ZHANG Dapeng 66c3c2911c
grpclb: a minor code cleanup 2019-01-23 13:22:43 -08:00
Carl Mastrangelo d7659411eb
interop-testing: deflake MoreInProcessTest 2019-01-22 18:00:14 -08:00
Jihun Cho 0e32152229 okhttp: throws correct exception in AsyncSink when write/flush happened before
connected. This change will suppress NPE logs when the transport encountered
any error during connection phrase.
2019-01-22 17:03:58 -08:00
Kun Zhang abdae25c8d
services: log an error to java logger when health-check disabled. (#5261)
This is required by the spec:
https://github.com/grpc/proposal/blob/master/A17-client-side-health-checking.md
2019-01-22 15:17:56 -08:00
Carl Mastrangelo 985bf0aa74
netty: handle racy stream cancellation on already failed transports 2019-01-22 15:15:35 -08:00
ZHANG Dapeng f0fc57878d
build: fix javadoc failure for java 11 2019-01-22 10:35:19 -08:00
Carl Mastrangelo 6f83bfc393
netty: handle reentrant exception in WBAEH 2019-01-18 15:18:31 -08:00
Eric Anderson 5dbe53c050 core: Remove incorrect usages of VisibleForTesting
The visibility is (correctly) used in non-testing scenarios.
2019-01-15 18:58:43 -08:00
ZHANG Dapeng b1fbbb675a
xds: do not upload archives for xds for now 2019-01-15 16:42:51 -08:00
Eric Anderson e06b941eb7 alts,services: Sync proto sources from grpc-proto
This syncs to grpc/grpc-proto@f9af5e19f7
2019-01-15 16:15:22 -08:00
Carl Mastrangelo 3e6d8dc456
netty: handle unexpected handlerRemoved in WBAEH 2019-01-15 14:28:41 -08:00
ZHANG Dapeng f17a7c0faf
Update README to reference 1.18.0 2019-01-15 10:54:22 -08:00
Eric Anderson ca41aeaac9 core: Use Truth's isEmpty/hasSize
It produces clearer result error messages where there are failures.
2019-01-14 17:00:16 -08:00
ZHANG Dapeng 788cdbd511
buildscripts: Show bazel version in CI 2019-01-14 16:54:51 -08:00
Carl Mastrangelo 659b78b06c
netty: move buffering logic from ProtocolNegotiators
This is part 1 of a larger change to simplify channel initialization.  Part two will be to let Protocol negotiators install themselves in a deterministic manner and delegate error handling to the exception handler.

Changes:

1.  Copied most of AbstractBufferingHandler to WriteBufferingAndExceptionHandler. WBAEH does not handle adding more than one handler.  Eventually, pipeline initialization will happen in the protocol negotiator rather than in each handler.
2.  Added tests for error handling.
3.  The WBAEH is always added to the NettyClientTransport.  This means for a brief period, there will be double buffering on the pipeline.  The buffering should go away after part 2.
2019-01-11 18:42:12 -08:00
Eric Anderson bcd2372280 core: disable SRV records lookup
SRV has not yet been enabled in a release. Since work is rapidly
underway to replace GRPC-LB with a service config+XDS-based solution,
there's now thoughts that we won't ever enable grpclb by default (but
may allow it to be automatically enabled when using GoogleDefaultChannel
or similar). Since things are being worked out, disable it.

This effectively reverts c729a0f.
2019-01-11 15:13:33 -08:00
Jiangtao Li 4d90b37a0a
ALTS: release handshaker channel if no longer needed (#5210)
* ALTS: release handshaker channel if no longer needed
2019-01-11 14:57:08 -08:00
ZHANG Dapeng 7a547276da
xds: import from envoy and add ads.proto and lrs.proto 2019-01-11 14:46:04 -08:00
Eric Anderson c8817cf284
kokoro: Reduce gradle workers on Mac to reduce flakes
We've had a long run of test timeout failures on Mac with timeouts in
the seconds. Multiple of these haven't seemed like races, but simply
that the Mac machines were too slow. The most recent case for this is a
set of timeouts for
OkHttpTransportTest.earlyServerClose_serverFailure_withClientCancelOnListenerClosed
where it took over a second for a server stream to be created ("Timed
out waiting for server stream").

This commit reduces the number of workers to reduce the overall load,
hoping this lets tests complete within a reasonable amount of time.
2019-01-11 08:56:45 -08:00
ZHANG Dapeng 97218a6edd
examples: Not to promise a supported Bazel version
It's not maintainable.
2019-01-11 08:56:08 -08:00
Kun Zhang 1ed196c585
core: promote the new API in CallCredentials2 (#5216)
This is the 3rd step of #4901

- The deprecated `CC.applyRequestMetadata(... Attributes ...)` is now **replaced** by the new API `CC.applyRequestMetadata(... CC.MetadataApplier ...)` transformed from `CC2.applyRequestMetadata(... CC2.MetadataApplier ...)`.
- The Attributes keys in `CallCredentials` were deprecated, and now deleted.
- The deprecated interface `CC.MetadataApplier` is **replaced** by an equivalent abstract class.
- `CallCredentials2` is now marked as deprecated, while keeping its interface intact so that it won't break current implementations that are still on `CallCredentials2`.
- From this point on, implementations should do a one-line change from `extends CallCredentials2` to `extends CallCredentials`
- `GoogleAuthLibraryCallCredentials` is kept as `CallCredentials2` for now, as there is an internal consumer that expects it to be `CallCredentials2`.
2019-01-10 15:16:18 -08:00
Kun Zhang 7475b7f110
core: fix a channel panic bug caused by calling NameResolver.refresh() when it's not started (#5223)
Resolves #5222
2019-01-10 11:28:58 -08:00
Jihun Cho 08218810fd Remove @VisibleForTesting, because NettyServerTransport is referencing it 2019-01-08 17:27:29 -08:00
Eric Anderson 4adcf24363
Downgrade to Guava 25.1
This is temporary for the 1.18 release to give users a bit more time to
get past the breaking changes to Beta APIs in Guava 26.

Fixes #5166
2019-01-08 16:22:48 -08:00
Eric Anderson e74576b85b Remove old BetaApi failure suppressions
We've been on newer versions of Guava for a while now; these no longer
do anything.

Reworded the comment for Stopwatch.createUnstarted(), because it is not
safe (it doesn't matter if the method isn't marked Beta; you have to use
Ticker), except for the fact it is only used in our tests.
2019-01-08 16:07:40 -08:00
Jihun Cho 08efd978d7
all: remove duplicated dependency (#5207) 2019-01-03 10:50:44 -08:00
ZHANG Dapeng 4337da6d7d
Start 1.19.0 development cycle 2019-01-02 15:31:01 -08:00
Carl Mastrangelo b6af40e510 examples,netty: fix lint errors 2019-01-02 15:30:31 -08:00
ZHANG Dapeng df21e40285
all: fix lint 2019-01-02 15:28:44 -08:00
ZHANG Dapeng 56e980cb29
okhttp: fix MockitoAnyIncorrectPrimitiveType error in test 2019-01-02 11:41:41 -08:00
ZHANG Dapeng 49475c6759
alts: Fix ambiguous assertThat() in TsiFrameHandlerTest 2019-01-02 11:41:00 -08:00
ZHANG Dapeng 26a7fe1396
doc: Update RELEASE.md VERSION_FILES 2019-01-02 10:51:20 -08:00
Jihun Cho 40398479ae
examples: update url of project (#5198) 2019-01-02 09:56:22 -08:00
Jihun Cho 6bf0936f8e
okhttp: move async mechanism from FrameWriter to sink (AsyncSink) (#4916)
Optimize OkHttp transport's memory use by getting rid of queuing writes in
AsyncFrameWriter. If any write is pending due to connection issue or by flow
control, AsyncFrameWriter can use at least 8K per each task (task includes
buffer) even if the actual payload is very small. To merge pending writes,
Async mechanism is moved from AsyncFrameWriter to AsyncSink (AsyncSink 
is used by okio's FrameWriter). AsyncSink is still relying on okio's buffer to
decide merging writes or not.

Resolves #4860
2018-12-28 17:20:03 -08:00
Carl Mastrangelo a4859c1e93
core: revert stream tracer order change to fix internal test 2018-12-20 18:45:38 -08:00
Eric Anderson 186409f868
buildscripts: Add script to sync .protos from grpc-proto
Currently only protos in alts, grpclb, and services are synced. Once
some java_package options are "upstreamed", benchmarks and
interop-testing could also be synced.
2018-12-20 16:47:16 -07:00
Jihun Cho 9eeceab597
alts: TsiFrameHandler doesn't throw exception when flush after closed (#5180)
also, error / log messages will contain state of FrameHandler
2018-12-20 10:12:37 -08:00
David Hoover 87cf40437c core: Mark CallOptions' deadline/executor as @Nullable
They are, but weren't consistently marked like the other members
2018-12-19 15:47:54 -08:00
Brendan Linn d736dc31c4 repositories.bzl: correct re2j sha.
the fundamental issue is that the sha-1 sums for the github and maven
jars for re2j are different. (see
https://github.com/google/re2j/issues/83 for discussion.) the sha used
at grpc-java head corresponds to the github jar, but the target itself
refers to the maven jar.

the reason no one has noticed is that @com_google_re2j//jar is not
actually used as a dependency in any bazel target in this repo. this
will change once the services/ directory becomes a bazel package. (the
source files in services/ do depend on re2j.)
2018-12-19 13:01:33 -08:00
Eric Anderson f1f3dbcbd6 alts: Fix SHARED_HANDSHAKER_CHANNEL after first close
Since the Resource shared the executor service between invocations, but
didn't null it out on shutdown, it could bring up a new channel with a
terminated event loop. The channel would then proceed to panic on usage.

I noticed this problem while looking into what was necessary for #4755.
2018-12-19 09:59:01 -07:00
sanjaypujare 847eae8d37
Example: Google Auth example with PubSub API ListTopics for a project ID (#5162)
* Working Google Auth example with PubSub API ListTopics for a project ID
Added another MD file for GOOGLE_AUTH_EXAMPLE
2018-12-18 16:47:42 -08:00
Eric Anderson 64000135cb bazel: ignore examples/ from root WORKSPACE
"bazel build ..." from the root will no longer build examples/. But
"cd examples; bazel build ..." still does.
2018-12-18 14:54:57 -07:00
ZHANG Dapeng 52c0789eb7
doc: fix bazel-bin pointer in example-tls README 2018-12-18 12:19:59 -08:00
Carl Mastrangelo 6779a5aa75
core,netty: refactor server builder
* makes Census tracing factories at the end of the user added ones
* makes more vars in AbstractServerImplBuilder package private
* annotates methods in ASIB to be clearer
* simplifies several of the setters to be single line
* Makes the generics on the Tracer factories proper
2018-12-17 17:22:33 -08:00
Carl Mastrangelo 1bf8476cd7
core: standardize logid format and add details for channelz 2018-12-17 17:22:11 -08:00
ZHANG Dapeng 94fefdda12
xds: import xds service protos
All files other than the following are generated by `import.sh`.
```
settings.gradle
xds/build.gradle
xds/third_party/envoy/import.sh
xds/third_party/protoc-gen-validate/import.sh
```
2018-12-17 10:50:54 -08:00
Eric Anderson 330f45a2cd interop-testing: Disable flaky ProxyTest.smallLatency
Fixing the flakiness is tracked in #2951. The current flakiness is ~3/8
fail.
2018-12-14 16:01:39 -08:00
sanjaypujare ac52e27b2a
Examples: Add a JWT authentication example (#5154) 2018-12-13 12:26:39 -08:00