Commit Graph

3873 Commits

Author SHA1 Message Date
Chengyuan Zhang 1e475be64d
android: deleted unused code leftover in AndroidChannelBuilder test. (#6098) 2019-08-28 09:51:44 -07:00
Srini Polavarapu d507ea72a4
change from Inc. to LLC for Google and update the list (#6096) 2019-08-26 12:20:34 -07:00
Eric Anderson 9d6f5322c2 bazel: Add helper for maven_install's override_targets
This can be used to prevent duplicate classes in the classpath, one via
Maven and one via Bazel-native.

See census-instrumentation/opencensus-java#1963 and #5359
2019-08-22 07:40:32 -07:00
Chengyuan Zhang 493af030ab
android: delete deprecated API methods (#6088) 2019-08-21 16:31:36 -07:00
Chengyuan Zhang be226aa99c
cronet: add getter for retrieving grpc cronet annotations in calloptions. (#6086) 2019-08-21 09:55:48 -07:00
Eric Anderson 63661c7b70 netty: Add Bazel target similar to netty-shaded
See census-instrumentation/opencensus-java#1963
2019-08-21 09:48:20 -07:00
ST-DDT d5b63e9c68 docs, examples: Update the maven plugins version (#6065) 2019-08-20 14:35:03 -07:00
ZHANG Dapeng 92805713e4
doc: explicitly mention that Deadline might saturate 2019-08-20 14:28:45 -07:00
Chengyuan Zhang 3a9616fc25
android: clean up AndroidChannelBuilder APIs (#6083)
* Added missing Javadoc for public methods, deprecate fromBuilder and replace with usingBuilder.

* Removed unnecessary final keyword for static methods.

* call usingBuilder in deprecated fromBuilder

* Changed Javadoc description for usingBuilder method.
2019-08-19 17:21:43 -07:00
Chengyuan Zhang 1d04601313
xds: Implement an xDS NameResolver/Provider for xDS load balancing alpha release (#6052)
* Implemented an XdsNameResolver that always returns a hard-coded service config

* Implemented XdsNameResolverProvider

* Added unit tests for XdsNameResolver and XdsNameResolverProvider

* Added META-INF file for XdsNameReresolverProvider

* Removed balancer name field in hard-coded service config

* Changed URI scheme to xds-experimental.

* Deleted unnecessary executors for running name resolution in a separate thread.

* Fixed nits.

* Fixed usage of GrpcUtil.getDefaultProxyDetector() as it was deleted.

* Removed unnecessary shutdown implementation.

* Replaced return with AssertionError as it hard-coded service config should never have error.

* Removed unused name resolver args.

* Added tail blank line.
2019-08-19 16:39:36 -07:00
Srini Polavarapu 9fa2608430
Add MAINTAINERS.md (#6084) 2019-08-19 15:55:17 -07:00
ZHANG Dapeng 9dbbcf5a42
xds: move XdsLoadBalancer.XdsConfig to XdsLoadBalancerProvider
`XdsLoadBalancer` will be replaced by `XdsLoadBalancer2`, and `XdsConfig` is better fit in `XdsLoadBalancerProvider`.
2019-08-16 15:08:10 -07:00
Kun Zhang 2c0b2de862
grpclb: fix pick_first mode shutdown without subchannels. (#6072) 2019-08-16 10:21:25 -07:00
Chengyuan Zhang e68e4004e4
cronet: move call options APIs into an internal accessor class (#6073)
* cronet: move call options APIs into an internal accessor class

* Removed deprecated call option key.
2019-08-16 01:05:32 -07:00
Carl Mastrangelo 4c1e197fcd
okhttp: remove unused import 2019-08-15 16:00:02 -07:00
Chengyuan Zhang c521a31886
android: fix Javadoc symbol/class not found errors (#6063)
* android: fix Javadoc symbol/class not found errors

* Removed redundant join, files API can already handle list.

* Replace usage of javaCompile with javaCompileProvider

* Avoid afterEvaluate by filling javadocs.classpath in android configuration.

* Construct FileCollection via files(Closure), which delays the file resolution.
2019-08-15 12:47:14 -07:00
Carl Mastrangelo 21c34d7862
netty: check for null protocol negotiator in NettyChannelBuilder 2019-08-15 11:11:31 -07:00
Chengyuan Zhang ad47eee4d3
okhttp: add PerfMark tracing for okhttp transport (#6038)
* okhttp: add PerfMark tracing for okhttp transport

* change task for AsyncSink to give more accurate task description

* add final to field tag

* add PerfMark dependency in okhttp package bazel
2019-08-14 17:20:29 -07:00
Jannis Andrija Schnitzer 93898734c2 bazel: Fix java path separator bug on Windows (#6054) 2019-08-14 14:28:31 -07:00
Eric Anderson 6c7258b05e Upgrade gradle-errorprone-plugin to 0.8.1
This fixes the following warning when building grpc-android:
WARNING: API 'variant.getJavaCompiler()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getJavaCompiler(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.
2019-08-14 16:22:59 -05:00
Carl Mastrangelo 458f4533db
netty: migrate Server protocol negotiation to new style
* Revert "Revert "netty: change server to new protocol negotiator model" (#5798)"

This reverts commit 4e5e19f6fd.
2019-08-14 13:00:42 -07:00
ZHANG Dapeng ce53d0eac7
Update README etc to reference 1.23.0 2019-08-13 17:46:50 -07:00
Eric Anderson 9fcfb5b4f8
netty: Limit number of frames client can cause server to enqueue
Http2ControlFrameLimitEncoder is from Netty. It is copied here as a
temporary measure until we upgrade to the version of Netty that includes
the class.

See CVE-2019-9515
2019-08-13 12:24:15 -05:00
Dharmesh Jogadia 5790503d79 core,okhttp: removed GrpcUtil.IS_RESTRICTED_APPENGINE and dependent code (#6051) 2019-08-13 10:11:56 -07:00
ZHANG Dapeng 1949ebd7ef
grpclb: shuffle pick first index
Each new instance of GrpcLbBalancer will have a different pick first index.
2019-08-12 17:07:23 -07:00
Chengyuan Zhang d2307139c8
cronet: do not expose setTrafficStats* as public APIs (#6055) 2019-08-12 14:42:18 -07:00
Laurent Le Brun 503696aa9a bazel: Remove missing pattern from glob
There's no third_party directory.
This change makes the repository compatible with
Bazel change --incompatible_disallow_empty_glob.
2019-08-08 16:41:17 -07:00
Chengyuan Zhang 539f0400b6
core: handle removing partially-closed resources for throwing on close. Fixes #6002. (#6044) 2019-08-08 14:23:59 -07:00
Chengyuan Zhang c5317e4935
xds: do not add a new CallMetricRecorder instance to context if there is already one (#6042)
* xds: do not add a new CallMetricRecorder instance to context if there is already one

* save a local reference to CallMetricRecorder instance to allow ServerCall#close() being called in a different context

* added test coverage for having ServerInterceptor/ServerStreamTracerFactory both install CallMetricRecorder
2019-08-08 13:00:46 -07:00
Jihun Cho 4faad27078
netty: record ByteBuf access in Netty{Client,Server}Stream before calling MessageDeframer (#6027) 2019-08-02 16:25:08 -07:00
Kun Zhang 4e4d4d8ab5
core: allow setting custom Deadline.Ticker to InProcessServerBuilder (#6034)
ServerImpl uses that ticker to create incoming Deadlines. This feature is specifically restricted to in-process, as it can also customize ScheduledExecutorService, and them together can fake out the clock which is useful in tests. On the other hand, a fake Ticker won't work with Netty's ScheduledExecutorService.

Also improved mismatch detection, documentation and tests in Deadline.
2019-08-01 13:13:20 -07:00
Igor Bernstein 271cbff1b8 core: Migrate to new OpenCensus method & status tags (#5996)
Fixes #5593 and supersedes #5601

Now that https://github.com/census-instrumentation/opencensus-java/pull/1854 has been merged & released as 0.21.0. We can start using the method & status tags.

Background:
Opencensus introduced new tags for status and method (https://github.com/census-instrumentation/opencensus-java/pull/1115). The old views that used those tags were deprecated and new views were created that used the new tags. However grpc-java wasn't updated to use the new tags due to concern of breaking existing metrics. This resulted in the old views being deprecated while the new views were broken (goomics #50).

https://github.com/census-instrumentation/opencensus-java/pull/1854 added a compatibility layer to opencensus that would remap new tags to old tags for old views. This should unblock grpc to switching to the new tags while allowing old views to still be populated. That commit was released as part of opencensus 0.21, which grpc currently uses
2019-08-01 10:37:04 -07:00
Chengyuan Zhang b8933faae1
services: added even more (context-related) test cases for CallMetricRecorder (#6033) 2019-08-01 10:09:26 -07:00
Kun Zhang f9509694b9
context: allow creating Deadline with custom Ticker. (#6031)
This makes Deadline more test-friendly. Next step is to allow
ServerBuilder to take a custom Ticker and use it for creating
incoming Deadlines. With both changes in, application logic will be
able to verify the Deadlines they set.
2019-07-31 11:26:51 -07:00
ZHANG Dapeng e14f8de4ab
Start 1.24.0 development cycle 2019-07-31 11:03:13 -07:00
ZHANG Dapeng 79bc50c171
doc: fix version bug in documentation/android-channel-builder.md 2019-07-30 15:36:33 -07:00
Jean de Klerk 188b4d1e51 compiler: add note about where to download precompiled version of plugin (#6022) 2019-07-29 17:08:03 -07:00
Chengyuan Zhang 99993bee13
xds: implement a server interceptor for taking server application metrics and sending to client side in ORCA format (#6018)
* Added methods in CallMetricRecorder accessor for accessing context key and creating new CallMetricRecorder instance.

* Added impl for a server interceptor that records and sends custom metric values to client side.

* Added unit test for the server interceptor.

* Modified dependencies to have xds package depends on grpc-services (for CallMetricRecorder) and grpc-testing-proto (for testing proto).

* Changed usage of GrpcServerRule to GrpcCleanupRule.

* make constant fields static

* use GrpcCleanupRule to register InProcessChannel to avoid manual shutdown.

* Make class public and match the usage of grpclb's load reporting server tracer.

* added ExperimentalApi annotation
2019-07-29 14:46:24 -07:00
Chengyuan Zhang 50df56f949
xds: add a missing test case for CallMetricRecorder and polish test data. (#6019) 2019-07-29 14:43:42 -07:00
Carl Mastrangelo 57e7bd394e
all: update to proto 3.9.0 2019-07-26 13:53:05 -07:00
Jihun Cho 65109e6738
netty: Netty{Server,Channel}Builder requires all or none of ELG and ChannelType (#6014) 2019-07-26 09:25:02 -07:00
ZHANG Dapeng 4114433674
doc: Add hint to users who want an experimental API to be stabilized 2019-07-26 09:22:53 -07:00
Chengyuan Zhang f15a6bd363
services: implement a lb policy agnostic call metric recorder for backend applications (#6004)
* services: implement a lb policy agnostic call metric recorder for backend applications.

* Renamed snapshot() to finalizeAndDump() and make it package-private with an internal accessor class.

* Added Javadoc link for Context.

* Added ExperimentalApi annotation.

* Added since annotations.
2019-07-25 15:39:22 -07:00
Carl Mastrangelo 06e9b88147
netty: bump to 4.1.38
* netty: bump to 4.1.38
2019-07-24 14:29:26 -07:00
Jihun Cho 102f0f8ac8 core: fix linter error 2019-07-24 13:52:52 -07:00
liym 47b11ab7a1 compiler: Use 'SERVICE_NAME' instead of duplicated '$Package$$service… (#5943)
* compiler: Use 'SERVICE_NAME' instead of duplicated '$Package$$service_name$'

* compiler: Align indentation

* Fix typo

* Add modified golden files and all re-generated code to meet Travis CI and Windows build requirements

See PR #5943

* Polishing
2019-07-24 10:37:13 -07:00
ZHANG Dapeng d7b9438d39
util: a util to gracefully switch load balancer when lb policy changes
Following the section "Gracefully Switching LB Policies" in the spec go/grpc-client-channel-spec
2019-07-22 13:42:07 -07:00
Jihun Cho 1fbc61b280 alts: provide channel type to HandshakerServiceChannel to suppress warning 2019-07-22 09:50:03 -07:00
Ran f261af3445
java_grpc_library.bzl: Migrate from 'proto' to ProtoInfo syntax (#5994)
* Migrate the provider containing information about protocol buffers from the old-style 'dep.proto' pattern to the new-style 'dep[ProtoInfo]' one.
2019-07-19 16:06:47 -07:00
Carl Mastrangelo cc524f10d3
netty,interop-testing: increase timeouts on tests for TSAN 2019-07-19 15:24:19 -07:00