Commit Graph

2254 Commits

Author SHA1 Message Date
dapengzhang0 21be70dbe3 Update README to reference 1.7.0 2017-10-11 21:31:49 -07:00
Kun Zhang eae4569e16 core: do not call LoadBalancer callbacks after it's shut down. (#3573)
This behavior is documented in the javadoc of LoadBalancer.shutdown().
2017-10-11 16:46:36 -07:00
Eric Gribkoff d63711e8bc cronet: make CronetChannelBuilder final 2017-10-11 15:52:01 -07:00
Kun Zhang 18ba417241 core: add drop to hashCode() and equals() for PickResult (#3570) 2017-10-11 13:54:16 -07:00
Kun Zhang 1e02b65c08 Fix interop_test client. 2017-10-10 13:46:51 -07:00
Kun Zhang 61d5baa5f2 core: fix build in CensusStatsModule. 2017-10-09 15:47:57 -07:00
Kun Zhang 8edead0851 core: make in-process transport support StreamTracer
This is needed for both completeness and stats/tracing contexts propagation.

Stats recording with Census is intentionally disabled (#2284), while the rest of the Census-related logic work the same as on the other transports.
2017-10-09 10:14:36 -07:00
Carl Mastrangelo 95a2723ea5 core,grpclb: use denser atomics for census 2017-10-06 17:02:36 -07:00
Kun Zhang 72f6d9bc08 core: add first-class drop support in LoadBalancer.
Resolves #3355

GrpclbLoadBalancer should use PickResult.withDrop() instead of PickResult.withError() when dropping RPCs.
2017-10-06 16:23:10 -07:00
Carl Mastrangelo 291f17059e core: allow attributes to be built multiple times 2017-10-06 16:16:01 -07:00
Eric Anderson 401066ada3 RELEASING.md: Split out release branch; tweak 2017-10-06 14:02:29 -07:00
Eric Anderson ac63eabe60 gae-interop-testing: Remove gradle wrappers
Since the projects are placed in the root settings.gradle, they are subprojects
and don't need their own gradlew. In addition, the gradle version used here is
a different version than elsewhere, which is asking for confusion.
2017-10-06 14:01:38 -07:00
Eric Gribkoff 4d67c3d63f cronet: open-source experimental Cronet transport code 2017-10-06 11:18:03 -07:00
zpencer b07c70a09f gae-interop-testing: add GAE interop tests (#3535)
See `gae-interop-testing/README.md` for details on how to run the tests.
2017-10-06 10:44:58 -07:00
ZHANG Dapeng 80ac407c6c interop-testing: fix ErrorProne and Unused 2017-10-05 14:15:43 -07:00
ZHANG Dapeng dba2323585 compiler: Remove enable_depreated option (#3541) 2017-10-05 14:14:57 -07:00
Carl Mastrangelo 5e36a8deb5 all: upgrade to JUnit 4.12 2017-10-05 11:24:15 -07:00
Carl Mastrangelo 765a40c7e6 stub: avoid mocking stub classes 2017-10-05 11:01:57 -07:00
Carl Mastrangelo f56be5423e core: sort bazel file 2017-10-04 17:39:33 -07:00
Devin Smith f5026cd334 core: remove unused, non-public INTEGER_MARSHALLER (#3530) 2017-10-03 10:42:52 -07:00
zpencer 0d5943614e Make AbstractInteropTest runnable in GAE+jdk7 (#3533)
Avoid mocking and detect when a N/A test should be skipped.
2017-10-02 18:28:24 -07:00
Eric Gribkoff b02645b49f auth: remove use of JDK7 ReflectiveOperationException 2017-10-02 12:35:13 -07:00
Carl Mastrangelo 02466744bb core: move census registration into internal
also preserve tracing bit when rebuilding a MethodDescriptor
2017-09-29 18:20:37 -07:00
ZHANG Dapeng cbcab9b498 examples: fix Bazel build
Refactor the proto file `helloworld_streaming.proto` because Bazel and Gradle have incompatible base directory for proto imports. Bazel's proto import is relative to WORKSPACE, whereas Gradle proto plugin's is relative to `${sourceSet}/proto/`. In `helloworld_streaming.proto` file, `import helloworld.proto` does not work for Bazel. If `import src/main/proto/helloworld.proto`, that works for Bazel, but Gradle and Maven would fail. Some workarounds are very hacky, so use independent proto without imports instead to avoid this issue.
2017-09-29 13:14:19 -07:00
ZHANG Dapeng 0d52e68a86 core: fix Bazel build
Resolves #3503
2017-09-29 09:59:55 -07:00
ZHANG Dapeng 7c97aa95a1 thrift: Delete thrift
Thrift support is moved to https://github.com/grpc-ecosystem/grift
2017-09-28 09:31:32 -07:00
Eric Anderson 55621a3e8c Start 1.8.0 development cycle 2017-09-27 12:37:50 -07:00
zpencer 78bf8388d1 services: add proto generated classes to intellij path (#3510) 2017-09-27 12:14:07 -07:00
Eric Anderson e92b72588d Promote keepalive to ManagedChannelBuilder; stabilize
Fixes #3493
2017-09-27 11:59:04 -07:00
zpencer a62108a2f7 gradle: add japicmp plugin (#3500)
This adds an API compatibility check that can be run with:
./gradlew japicmp --continue

The --continue makes it so that we test all subprojects even if
some of them fail the check.
2017-09-27 08:31:43 -07:00
Carl Mastrangelo de1630bc26 services: delete deprecated Proto reflection service 2017-09-26 15:50:06 -07:00
Ryan Michela 589da070f2 Manual flow-control and back-pressure demo 2017-09-26 10:01:42 -07:00
Eric Gribkoff 63c660b29c core: make enableFullStreamDecompression non-abstract 2017-09-26 10:00:43 -07:00
Carl Mastrangelo 80334d5b2f netty: update to 4.1.16 2017-09-25 18:18:17 -07:00
Eric Gribkoff a8db154702 testing: reduce mocks in AbstractTransportTest to eliminate flakes 2017-09-25 17:58:05 -07:00
Kun Zhang a6653bb135 core/compiler: register Span names for code-generated methods (take 2)
This is a more favorable approach than #3467. Doing the registration
in MethodDescriptor should allow us to deregister in case the
generated stub and its MethodDescriptors are garbage-collected
routinely, e.g., if they are loaded by a separate ClassLoader.
2017-09-25 15:38:48 -07:00
Eric Gribkoff 5ac9ad0c1f core: client supports inbound gzipped streams (#3403) 2017-09-25 09:01:53 -07:00
Eric Gribkoff a34ea3592c core: add gzip inflater for compressed streams (#3395) 2017-09-22 09:09:37 -07:00
ZHANG Dapeng 20c910f809 core: nonnull pendingStreams in DelayedClientTransport
Make `pendingStreams` in `DelayedClientTransport` non-null.
2017-09-22 09:04:58 -07:00
Brendan Linn 131a0ff39a java_grpc_library.bzl: fix path-manipulation bug.
_path_ignoring_repository munges bazel filesystem paths into proto
import paths, in order to pass to protoc -I. Currently, the function
assumes that the include's path begins with the bazel workspace root,
which can therefore be sheared off the front of the path.

This assumption is incorrect. For an include living in an external
repository (say, `@com_google_protobuf//:timestamp_proto`),
the filesystem path is something like
`bazel-out/darwin_x86_64-fastbuild/genfiles/external/com_google_protobuf/google/protobuf/timestamp.proto`.
(See also:
http://docs.bazel.build/versions/master/skylark/lib/Label.html#workspace_root.)
This commit changes _path_ignoring_repository to handle this case correctly.
2017-09-21 13:23:17 -07:00
Eric Anderson 5bf4f5b7a6 context: Use .class literal instead of Class.forName
Found via ErrorProne
2017-09-20 09:43:50 -07:00
Eric Anderson bd28b92850 Avoid catching AssertionError in tests
Found via ErrorProne
2017-09-20 09:43:50 -07:00
pieterjanpintens 6bb1755357 core: allow to fallback to ServiceLoader.load withouth classloader to
make GRCP more OSGi friendly.
2017-09-20 08:42:16 -07:00
Kun Zhang 0ba4ab8b85 core: remove reference to Guava collect
It was added by mistake in commit 2b1363d586
2017-09-19 16:26:29 -07:00
Kun Zhang 7e534ed704 core: record individual messages with sizes to Census/tracing (#3461)
Two methods, outboundMessageSent() and inboundMessageRead() are added to StreamTracer in order to associate individual messages with sizes. Both types of sizes are optional, as allowed by Census tracing.

Both methods accept a sequence number as the type ID as required by Census. The original outboundMesage() and inboundMessage() are also replaced by overrides that take the sequence number, to better match the new methods. The deprecation of the old overrides are tracked by #3460
2017-09-19 09:22:11 -07:00
Eric Anderson a3ff9cd784 all: Keep artifacts dependencyConvergence-clean
Maven Enforcer's dependencyConvergence is commonly used in Spring
projects, as it is inherited by all starter projects[1]. While I find
that option to be crazy and harmful (and would instead support
requireUpperBoundDeps), it does bother people.

1. https://github.com/spring-projects/spring-boot/blob/v1.5.6.RELEASE/spring-boot-starters/pom.xml#L94
2017-09-18 16:20:18 -07:00
Kun Zhang a9941a8bcf okhttp/test: add missing annotation. (#3476) 2017-09-18 15:35:18 -07:00
Carl Mastrangelo 2924e30e45 android-interop-testing: use Java Style enums
This makes it easier to convert over to Proto lite, which will be
replacing nano in the near future.

This CL is a port originally from @arielbackenroth
2017-09-15 11:49:31 -07:00
Kun Zhang 8ee9fb5183 core: add internal API to disable stats and/or tracing. (#3464) 2017-09-15 10:00:12 -07:00
Carl Mastrangelo abea73c0af core: add finalizer checks for ManagedChannels (#3452)
* core: add finalizer checks for ManagedChannels

Cleaning up channels is something users should do.  To promote this
behavior, add a log message to indicate that the channel has not
been properly cleaned.

This change users WeakReferences to avoid keeping the channel
alive and retaining too much memory.  Only the id and the target
are kept.  Additionally, the lost references are only checked at
JVM shutdown and on new channel creation.  This is done to avoid
Object finalizers.

The test added checks to see that the message is logged.  Since
java does not allow forcing of a GC cycle, this code is best
effort, giving up after about a second.  A custom log filter is
added to hook the log messages and check to see if the correct
one is present.  Handlers are not used because they are
hierarchical, and would be annoying to restore their state after
the test.

The other tests in the file contribute a lot of bad channels.  This
is reasonable, because they aren't real channels.  However, it does
mean that less than half of them are being cleaned up properly.
After trying to fix a few, it is too hard to do.  It would only
serve to massively complicate the tests.

Instead, this code just keeps track of how many it wasn't able to
clean up, and ignores them for the test.  They are still logged,
because really they should be closed.
2017-09-14 21:19:22 -07:00