Commit Graph

2771 Commits

Author SHA1 Message Date
ZHANG Dapeng bf4a00c6de
context/core/netty: Add @CheckReturnValue to Context
By adding inner class annotations without introducing external dependencies.
2018-05-15 13:14:30 -07:00
ZHANG Dapeng 561583be14
core,services: Add ChannelTracing data object
Added `ChannelTrace` as an inner class of `Channelz`.

This is in preparation for the implementation of [Channel Tracing](https://github.com/grpc/proposal/blob/master/A3-channel-tracing.md)
2018-05-15 11:33:44 -07:00
zpencer 04a90bcad2
core: stabilize custom CallOptions API (#4457)
Deprecate `of()` in favor of `create()` and
`createWithDefault()`. Emphasize that the name string is only for
debug purposes.

Fixes #1869
2018-05-15 10:03:46 -07:00
zpencer 73fdb8716d
services: allow binlog env str to be empty or null (#4447)
Binary log objects are explicitly passed into channel and server
builders, but the configuration is something that's from the
environment variables. An unset or empty GRPC_BINARY_LOG_CONFIG
should be allowed to disable logging.

Previously, the SPI just reported itself as not available when the
conf str was not something valid.
2018-05-15 09:57:39 -07:00
ZHANG Dapeng 701c127f4c
examples: use GrpcCleanupRule for test examples 2018-05-14 11:30:38 -07:00
zpencer 21b73bbdc1
core: partially stabilize Attributes API (#4458)
Deprecate static builder method, Keys.of(), add a notice of plans to
remove keys(), emphasize that the name is only a debug label.
The `@ExperimentalAPI` is left on the class because there are still
issues around hashCode/equals.
2018-05-14 11:30:06 -07:00
Stephane Maarek 277c33c37f SECURITY.md: updated netty from 2.0.6 to 2.0.7
Master currently is for grpc >= 0.11 so it doesn't make sense that the SECURITY.md instructs to use the 2.0.6 (which triggers an error) - see https://github.com/grpc/grpc-java/issues/3989
2018-05-14 10:48:34 -07:00
zpencer 902baa0cde
core: do not use internal accessors in BinaryLogProvider (#4454)
Now that this class is in `io.grpc` the accessor is not needed.
2018-05-09 12:21:05 -07:00
zpencer 8a0ee979d0
RELEASING.md: add links to auto release documentation (#4444)
The steps are still valid, and should be considered the source of
truth. However, these steps have been automated as a kokoro job. Add a
link to the documentation for the kokoro job.
2018-05-07 16:29:09 -07:00
zpencer b9df27b86f
buildscripts: add basic sanity check for android aar (#4448)
Just a very basic sanity check that the android artifact is not missing.
2018-05-07 15:43:08 -07:00
zpencer 247a76ed93
core,netty,okhttp: make toString more consistent for channelz (#4434)
Use MoreObjects.toStringHelper and use only the log id's long value,
because the class name is already present in the toStringHelper.
2018-05-07 11:38:16 -07:00
Eric Gribkoff b83312fb7b buildscripts: generate android artifact 2018-05-07 11:31:56 -07:00
Eric Gribkoff 59c2223d6e android: including signing configuration 2018-05-07 11:31:56 -07:00
zpencer c51a7749b1
buildscripts: assume artifacts are coalesced in upload_artifacts (#4439)
The `find` was unnecessary. Update the sanity check to reflect this
assumption.
2018-05-07 11:18:42 -07:00
zpencer 6f29b60dcf
core, services: make BinaryLog an explicit object that is passed into channels/servers (#4431)
remove SPI, io.grpc.BinaryLog is a public API that is passed into builders and must be
explicitly closed.
2018-05-07 07:41:42 -07:00
ZHANG Dapeng 46079fff8a
services: complete ChannelTrace in channelz.proto 2018-05-04 16:59:33 -07:00
Grant Oakley dbf9bd2158 stub: add @CheckReturnValue to AbstractStub 2018-05-04 15:46:34 -07:00
zpencer 2404b25101
buildscripts: automate the release process (#4406)
These scripts set up the jobs needed to do one click releases.

List of changes:

Do not put files in mvn-artifacts/$ARCH. This makes the view uniform
across unix and windows and is easier to sign and upload.

A working curl is needed to build protobuf from source, so run yum
update.

run_in_docker.sh: use chmod to fix permisisons, do not set up user

linux_artifact builds 32 and 64 artifacts using unix.sh

add upload_artifacts cfg and script
2018-05-03 19:48:14 -07:00
Eric Gribkoff 275ebc4e90
android: add artifact build (#4433) 2018-05-03 16:38:54 -07:00
Carl Mastrangelo 60a0b0c471
all: normalize copyright header 2018-05-03 14:55:21 -07:00
Eric Anderson 894c815832
core: Document Metadata ownership passes to the Call{,Listener}
This was already clearly documented in ServerCall.Listener and
ClientCall.
2018-05-03 07:08:27 -07:00
zpencer 722acb151a
services: BinaryLog is an overused term, rename to BinlogHelper (#4429)
This class really is an internal helper class for the implementation.
2018-05-02 18:11:21 -07:00
Carl Mastrangelo 9817281dc3
service: include go package in channelz.proto 2018-05-02 17:15:00 -07:00
Grant Oakley 6bf8e0c084 core: add @CheckReturnValue to CallOptions 2018-05-02 15:56:52 -07:00
Carl Mastrangelo aeb61db278
services: update channelz proto package 2018-05-02 15:16:29 -07:00
ZHANG Dapeng e19e8f7d40
core: populate effective deadline to ClientStream
Added `ClientStream.setDeadline(Deadline deadline)` method, which will set the timeout header.

Resolves #4412
2018-05-02 13:31:03 -07:00
ZHANG Dapeng d50c191aca
core/stub: fix lint warnings 2018-05-02 10:37:32 -07:00
Eric Anderson 3a11a1f8b2 services: BinaryLogProviderImpl is experimental (#4420)
This class is not stable API.
2018-05-02 08:21:37 -07:00
Grant Oakley fcb48ff216 core,stub: Add toString() to ClientCallImpl and GrpcFuture 2018-05-01 16:49:56 -07:00
zpencer f8424f7b7b
examples: add kotlin and kotlin android examples (#4037)
Add kotlin version of HelloWorldClient and HelloWorldServer.
Add kotlin version of android example.
2018-05-01 14:54:34 -07:00
Carl Mastrangelo 3e43757efc
protobuf-nano: use specific package in test proto 2018-05-01 10:23:47 -07:00
Carl Mastrangelo 8be87de9b0
compiler: make testing service used by compiler not conflict with interop-testing proto
This change puts the compiler test.proto file in a directory that matches it's path.  The current proto package has a namespace collision with the grpc.testing proto in interop-testing.  Thus, this PR:

* change the package of test.proto to be grpc.testing.compiler
* moves the test.proto into the matching grpc/testing/compiler/test.proto path
* updates the generated code.
2018-05-01 10:13:18 -07:00
Carl Mastrangelo d35e77869e
services: move health.proto to correct directory 2018-04-30 18:32:02 -07:00
ZHANG Dapeng 02c4fa01c6
testing: GrpcCleanupRule
This will ease a lot of test scenarios that we want to automatically shut down servers and channels, with much more flexibility than `GrpcServerRule`. Resolves #3624

**ManagedChannel/Server cleanup details:**
- If the test has already failed, call `shutdownNow()` for each of the resources registered. Throw (an exception including) the original failure. End.
- If the test is successful, call `shutdown()` for each of the resources registered.
- Call `awaitTermination()` with `timeout = deadline - current time` and assert termination for each resource.  If any error occurs, break immediately and call `shutdownNow()` for the current resource and all the rest resources.
-  Throw the first exception encountered if any.
2018-04-30 17:15:52 -07:00
Carl Mastrangelo 045c566b88
netty: bump to 4.1.24-Final 2018-04-30 16:55:52 -07:00
ZHANG Dapeng b58e0f4059
core: stickiness for RoundRobinLoadBalancer
Add weak stickiness support for Round Robin lb.
2018-04-30 16:46:35 -07:00
Carl Mastrangelo 2b6edfc79d
grpclb: move load balancer proto to package-matching directory 2018-04-30 16:14:32 -07:00
Jorg Heymans 48f103c1ed examples: remove deprecated usage of usePlainText(boolean) (#4396)
Update examples (including android) to use non deprecated version of method.
2018-04-30 16:12:41 -07:00
Carl Mastrangelo 6bd5582175
services: update channelz with docs from upstream 2018-04-30 15:26:36 -07:00
Carl Mastrangelo b0333c6588
benchmarks: move proto to matching package structure 2018-04-30 14:12:53 -07:00
Carl Mastrangelo 017399027e
android-interop-testing: normalize integration proto directories 2018-04-30 11:31:10 -07:00
Carl Mastrangelo 26581562f0
interop-testing: normalize integration proto directories 2018-04-30 11:30:49 -07:00
Eric Gribkoff 785ac4772e
README.md: clarify that Android is for client-side use (#4408) 2018-04-30 10:28:41 -07:00
Eric Gribkoff 1ad11c1008
android: avoid static init of robolectric shadows (#4402) 2018-04-28 07:22:59 -07:00
Carl Mastrangelo f4f4302b85
services: remove monitoring file 2018-04-27 21:34:43 -07:00
zpencer acfb3b9851
services,core: simplify CallId generation (#4365)
BinaryLog.java is the class that is responsible for intercepting
client and server calls. It now requires a CallId to be passed
in. The BinaryLogProviderImpl is responsible for generating a
CallId and passing it in.
2018-04-27 18:32:36 -07:00
zpencer 9ada30b25d
(low priority) core,netty,interop-testing: stabilize maxInboundMessageSize API (#4399)
On server side, `maxMessageSize` is deprecated for
`maxInboundMessageSize` to match the channel builder.

Update usages to use new setter.
2018-04-27 16:01:16 -07:00
zpencer 1d80febbc0
buildscripts: make unix.sh and make_dependencies.sh arch aware (#4384)
ARCH can be '32' or '64'. If it is not set then default to '64'.

make_dependencies.sh should do the symlinking
2018-04-27 15:59:16 -07:00
Carl Mastrangelo 6046831e58
alts: make imported files have imports below package, and set licence 2018-04-26 14:48:11 -07:00
David Ostrovsky 23fcedfb6f Bazel: Fix compilation in Java 9
Fixes: #3633.

Test Plan:

On most recent Bazel version run:

  $ bazel --host_javabase=/usr/lib64/jvm/java-9-openjdk \
    build --javacopt='--release 9' \
    --java_toolchain=@bazel_tools//tools/jdk:toolchain_jdk9 \
    examples:helloworld_java_grpc
2018-04-26 14:37:57 -07:00