Skip to content

Releases: grpc/grpc-java

v1.10.0

16 Feb 00:10

Choose a tag to compare

Dependencies

  • Update opencensus to 0.11.0 (#3993)

Bug fixes

  • bazel: fix protobuf sha256 (#3924)
  • core: fix regression in v1.9.0 where the user-agent would be like "grpc-java-netty1.9.0" instead of "grpc-java-netty/1.9.0" (#3974)
  • netty: workaround Netty regression in v1.9.0 (netty/netty#7639) which caused TLS failures to fail with "UNAVAILABLE: Channel closed while performing protocol negotiation" instead of useful failure information (#3997, #4030)
  • netty: avoid NullPointerException in NettyServerHandler.newStreamException (#3932)
  • core: MethodDescriptor.toBuilder() now copies the schemaDescriptor (#3941)
  • core: change @Internal and @ExperimentalApi retention policies to CLASS, to enable the upcoming grpc/grpc-java-api-checker to access these annotations (#3994)
  • compiler: avoid invoking experimental method in generated code, to clean up the output of the upcoming grpc/grpc-java-api-checker (#4055)

API changes

  • core: delete outboundMessage() and inboundMessage() on StreamTracer. (#4014)
  • core: deprecate passing ServerCall to StatsTraceContext (#3912)

Features:

  • netty: Use Java 9 ALPN if available (#3555). We still want to improve testing with Java 9 ALPN, but it has been reported to work.
  • cronet: add build support (#3965)
  • bazel: use same version libraries which gradle uses (#3911) (This upgrades Bazel to netty 4.1.17)

v1.9.1

12 Feb 18:57

Choose a tag to compare

Bug fixes

  • bazel: fix protobuf sha256 (#3924)
  • core: fix regression in v1.9.0 where the user-agent would be like "grpc-java-netty1.9.0" instead of "grpc-java-netty/1.9.0" (#3974)
  • netty: workaround Netty regression in v1.9.0 (netty/netty#7639) which caused TLS failures to fail with "UNAVAILABLE: Channel closed while performing protocol negotiation" instead of useful failure information (#4033)
  • netty: fix regression in v1.9.0 where using GRPC_PROXY_EXP with the Netty transport would cause an UnresolvedAddressException (#4027). ProxySelector (including the default one that processes -Dhttps.proxyHost) is still known-broken for Netty; this is being tracked in #4029

v1.9.0

11 Jan 19:29

Choose a tag to compare

Features

  • core: record RPC upstarts to Census. Combined with the number of RPC completions, users can derive count of active RPCs. (#3708)
  • core,okhttp: handle unresolved proxy addresses (#3789)
  • core: user-agent is now supported in InProcess (#3853)
  • netty: server sockets now configurable (#3755)
  • netty: grpc-netty-shaded is now available as an alternative to grpc-netty. It shades grpc-netty and netty, so that users can safely depend on a different version of netty. It is safe to have both grpc-netty and grpc-netty-shaded as dependencies (#2485)
  • cronet: allow multiple annotation objects attached to stream (#3695)
  • compiler: the code-generator is now buildable on aarch64 (#3785)
  • core/grpclb: resolve TXT records in DNS name resolver and include balancer addresses. This is part of larger work that’s still in progress, so is disabled by default. It can be enabled via -Dio.grpc.internal.DnsNameResolverProvider.enable_jndi=true (#3852)

API changes

Stabilized

  • HandlerRegistry (#3760)
  • ManagedChannelBuilder.overrideAuthority() (#3761)

New

  • Add useTransportSecurity() in ManagedChannelBuilder. This can be used to reverse the effects of usePlaintext() (#3561)

Deleted

  • noopMethodDescriptor, NoopClientCall, NoopServerCall, various APIs from TestUtils. These were previously marked deprecated (#3790)
  • DeadlineSubject removed from the testing package to avoid requiring newer Guava versions brought in by the Truth dependency. We anticipate few users will be impacted; if this impacts you please open an issue (#3786)

Behavior changes

  • auth: Treat IOExceptions as UNAVAILABLE. Previously they were UNAUTHENTICATED. This only applies when retrieving credentials, like OAuth tokens (#3757)
  • core: Increase server handshake timeout to 120s (#3799)
  • grpclb: switch to fallback mode if all connections are lost (#3744)

Performance improvements

  • auth: Use async version of getRequestMetadata() and avoid using DelayedStream and a thread hop when the credentials are known immediately. (#3758)

Dependencies

  • Switch from com.google.instrumentation to io.opencensus 0.10.0 for stats reporting. (#3647)
  • proto-google-common-protos upgraded to 1.0.0 (#3765)
  • netty: netty upgraded to 4.1.17-Final (#3770). Users will need to upgrade to netty-tcnative 2.0.7.Final.
  • okhttp: okio upgraded to 1.13.0 (#3806)
  • Protobuf upgraded to 3.5.1 (protoc to 3.5.1-1) (#3921)

Bug fixes

  • core: no ProxyDetector for GAE+JDK7 (#3677, fixes #3676)
  • netty: fix server keepalive unexpected ping ack (#3730, fixes #3684)
  • netty: fix unknown content type handling on server (#3735, fixes #3370)
  • core: workaround for Atomic*FieldUpdater bug on some Samsung Android 5.0.x devices (#3754)
  • core: fixed Attributes value equality (#3859, fixes #3857)

v1.7.1

05 Dec 14:06

Choose a tag to compare

  • core: Added handshake timeout for all server transports. The default is 120 seconds, which matches the client-side timeout. The default can be overridden by ServerBuilder.handshakeTimeout()
  • netty: Fixed broken server keepalive when using TLS. If using Netty server, server keepalives, and TLS, you were impacted. Plaintext did not exhibit the bug. This could trigger grpc-java clients to log "WARNING: Received unexpected ping ack. No ping outstanding."

v1.8.0

22 Nov 16:48

Choose a tag to compare

Dependencies

  • core: Now using io.opencensus:opencensus-api and io.opencensus:opencensus-contrib-grpc-metrics instead of com.google.instrumentation:instrumentation-api for stats and tagging. The gRPC Monitoring Service continues to use instrumentation-api.
  • examples: In Android example, bump minSdkVersion to 14. Google Play Services, which is used for TLS, bumped their minimum supported version

API Changes

  • core: Removed deprecated load balancer and name resolver APIs. This includes LoadBalancer.handleResolvedAddresses(), LoadBalancer.Helper.updatePicker(), NameResolver.Listener.onUpdate(), ResolvedServerInfo, and ResolvedServerInfoGroup
  • stub: Added @DoNotMock annotations to AbstractStub, CallStreamObserver, ClientCallStreamObserver, ServerCallStreamObserver. The normal gRPC implementations of these classes should be used in tests
  • codegen: Removed enable_deprecated protoc plugin option (#3541). These deprecated APIs pre-date 1.0 and were off by default
  • codegen: Added methods for accessing generated method descriptors. This replaces the METHOD_FOO constants with static getFooMethod() methods. The constants are deprecated and will be removed in a future release. Once the constants are removed, this change will allow the descriptors (and the messages they reference) to be lazily created which can dramatically decrease class initialization time and allows unused RPC messages to be removed by Proguard.
  • testing: TestMethodDescriptors.noopMethod() is deprecated in favor voidMethod() or test services. The simple service in grpc-testing-proto should work in most cases where voidMethod() is insufficient
  • testing: Marked DeadlineSubject experimental. It is planned for removal to ease future Guava dependency issues with Truth. It could be moved into its own artifact, but best as we can tell nobody is using it. If you're using it, please file an issue so we can be made aware
  • testing: Deprecated StreamRecorder. It will be removed in a future release. The class is very old (since the beginning in OSS) and was used in internal tests before there were blocking stubs. Most users should use blocking stubs instead. To use properly, you must know the class's implementation; if you liked it, copy the code to your own codebase
  • testing: Deprecated TestUtils.recordServerCallInterceptor(). It will be removed in a future release. It has no known use cases for normal users
  • The (unreleased) Thrift support has been removed from this repository. It can be found at https://github.com/grpc-ecosystem/grift instead

New Features

  • The Cronet transport is open-sourced. Cronet is Chrome's network stack made into a library for mobile. We do not provide a build file nor are we making binaries, but if you're interested it shouldn't be too hard to build manually
  • context: CancellableContext now implements Closeable (#3607). close() is an alias for cancel(null). This should make it more clear that the context needs to be cancelled/closed, while also enabling try-with-resources
  • core: Attributes.Builder.build() may now be called multiple times
  • core: Added first-class drop support for load balancers via PickResult.withDrop(Status). This is necessary if the LB wants to fail waitForReady RPCs to shed load
  • core: Added MethodDescriptor.getSampledToLocalTracing()/Builder.setSampledToLocalTracing to permit per-method stats keeping memory overhead (#3627). The option is to prevent unbounded memory overhead when dynamically-created MethodDescriptors are used and is enabled in the generated code.
  • core: Added resetConnectBackoff() method to ManagedChannel. This can be used when the OS notifies your application that the network has become available
  • stub: Added stub.withExecutor(Executor). This was already available on CallOptions and can be used to specify a call-specific executor to use for callbacks
  • testing: Added TlsTesting.loadCert as an alternative to deprecated TestUtils.loadCert. The TlsTesting version returns an InputStream instead of a File which avoids creating temporary files

Behavior changes

  • core: Added handshake timeout for all server transports. The default is 20 seconds (which is a bug; should be 120 seconds to match client-side). The default can be overridden by ServerBuilder.handshakeTimeout()
  • core: LoadBalancer callbacks will no longer be called after shut down (#3573). This changes the behavior to match that documented in LoadBalancer.shutdown()
  • core: Refresh name resolution when an OOB connection is closed (#3588). This has already been happening for Subchannels.
  • netty,okhttp: Now detecting proxy via ProxySelector. This enables observation of the Java-standard proxy options -Dhttps.proxyHost=host -Dhttps.proxyPort=port. Authenticator is consulted for along with auth. Users of the GRPC_PROXY_EXP environment variable should migrate; the environment variable will be removed in a future release.
  • netty: Connection log info has been moved to a separate logger: io.grpc.netty.NettyServerTransport.connections (#3591).
  • auth: Treat IOExceptions as UNAVAILABLE instead of UNAUTHENTICATED (#3267). This allows retrying RPCs if the OAuth token failed to be retrieved

Bug fixes

  • core: Fixed ManagedChannel docs since it supports the getState/notifyWhenStateChanged API (#3762)
  • core: When Context cancellation cancels an RPC, and the Context cancellation cause is null, we now include a description in the Status to help expose what happened
  • netty: Fixed broken server keepalive when using TLS. If using Netty server, server keepalives, and TLS, you were impacted. Plaintext did not exhibit the bug. This could trigger grpc-java clients to log "WARNING: Received unexpected ping ack. No ping outstanding."
  • netty: Improved ALPN error message to be less misleading and link to troubleshooting procedures
  • netty: Fixed clearing of SSLParameters. This may fix ALPN with JDK9, but full support for ALPN with JDK9 is still later work and not supporting it yet. Fixes #3532
  • netty: When a RST_STREAM kills an RPC, we now include the HTTP/2 error code in the Status
  • netty: Fixed Netty server poorly handling unknown content type. It previously would refuse the stream; now it responds with a normal grpc status and HTTP error code
  • bazel: java_grpc_library: Fixed remote protos that are 'src's. Fixes #3650
  • examples: Replaced IntelliJ IDEA-specific sourceDirs with sourceSets. This helps Eclipse and other IDE users

Documentation

  • SECURITY.md now includes a table showing the preferred Netty and netty-tcnative version for each grpc-java release
  • SECURITY.md clarify that the Dynamic Security Provider must be installed before OkHttp channel creation

1.7.0 Release

12 Oct 01:08

Choose a tag to compare

Important Changes:

  • Update protobuf to 3.4.0
  • Update netty to 4.1.16. Users will need to use netty-tcnative 2.0.6 or later.

Features:

  • Provide demos for manual flow-control and back-pressure
  • Beginning of support for full-stream compression (as an alternative to per-message compression). Currently only client-side decompression is implemented. This work is experimental
  • io.grpc.Context now emits a SEVERE warning if it detects the length is abnormally long
  • Record individual message sizes with Census/Tracing
  • Allow to fallback to ServiceLoader.load without Classloader to make gRPC more OSGi friendly
  • Minor memory reductions
  • ManagedChannels log a warning when not properly shutdown

Bug Fixes:

  • Fix GET support in OkHttp client to actually use HTTP GET. This is still considered experimental.
  • Fix Bazel naming mixup with gson and opencensus. This only matters if you were passing omit_com_google_code_gson=True or omit_io_opencensus_api=True to grpc_java_repositories() (#3379)
  • Fix Bazel java_grpc_library() rule when depending on protos in external repos (#3483)
  • Fix transport improperly notifying Channel of its use in certain cases. This could cause spurious disconnections when idleTimeout() is configured on the Channel (#3374)
  • We now wait until all streams are closed before gracefully terminating a Netty connection. There was previously a five second timeout (#3386)

Incompatible Changes:

  • Metadata entries for reserved headers are stripped (“user-agent”, “content-type”, “te”)
  • InprocessChannelBuilder and InprocessServerBuilder now throw an exception when using the static constructor inherited from their base class. These didn't do what users expected, as they were actually just calling the ManagedChannelBuilder/ServerBuilder methods.

v1.6.1 Release

31 Aug 22:02

Choose a tag to compare

v1.6.0 was mistagged and has been deleted. The binaries of v1.6.0 are effectively the same as v1.6.1.

Important Changes

  • Android users should no longer need -keeps in their ProGuard configuration (#2633)
  • gRPC is no longer using the current Thread’s “context ClassLoader” when searching for transport Providers (#2375). Instead it is using the current class’s ClassLoader. This should not break existing users and work out-of-the-box in a larger number of environments
  • Fix support for Google AppEngine Java 8 (#3296)
  • Log netty connection errors at FINE instead of SEVERE (#1768)
  • Update netty to 4.1.14 and tcnative to 2.0.5 (#3307)
  • Channel state API is now implemented via ManagedChannel.getState/notifyWhenStateChanged. This requires LoadBalancer support; custom LoadBalancers should be updated to call updateBalancingState() instead of updatePicker()
  • Referencing CallCredentials is now stable API (#3289). Implementing or consuming CallCredentials is still ExperimentalApi
  • New method ClientCallStreamObserver.cancel() allows clients to cancel RPCs without requiring using an interceptor or Context (#3115)

Features

  • Census trace tags propagation is now enabled by default, but only if the Census Impl is available in the classpath (#3294)
  • Update google-auth-library-oauth2-http to 0.7.0 (#3188)
  • Update io.opencensus:opencensus-api to 0.5.1 (#3204)
  • CallOptions now passed to ClientStreamTracer.newClientStreamTracer (#3276)
  • Allow custom hostname verifiers for OkHttp via OkHttpChannelBuilder.hostnameVerifier() (#3205)

Bug Fixes

  • Calls should no longer fail with the message “Channel requested transport to shut down” when Channel.shutdown() was not called. The calls may still fail, but will have a more accurate message (#3351)
  • Clean up Context class initialization to avoid circular class loading issues (#3203, #3191)
  • Fix keepalive bug that sent too many pings (#3274)
  • Fixed “onStreamAllocated was not called, but it seems the stream is active” warning (#3007)

Incompatible Changes

  • Pseudo headers (headers that begin with “:”) can no longer be set or retrieved (#3114). This has been the documented API, but now is being enforced
  • The object returned by Context.attach() must be the one passed into detach() (#3292)
  • When NameResolver returns >= 1 balancer GRPCLB policy will be forced (grpc/grpc#10258)

1.5.0 Release

18 Jul 18:29

Choose a tag to compare

Major

  • Licence changes from BSD to Apache 2.0
  • Bazel is now supported

API Changes:

  • ServerInterceptor can be installed server-wide (#3118)

Minor

  • Calls that exceed their deadline include how long they waited in the Status
  • Updated to Netty TCNative. This should make it possible to use Apache Tomcat with gRPC
  • SSL configuration errors are reported sooner
  • Server side cancellations can take place even if the application is blocking the inbound thread (#2963)
  • Servers always return Status.UNKNOWN for internal errors. Added an optional interceptor to bring back the old behavior (#3064)
  • MethodDescriptor.create is now deprecated

Bug Fixes

  • Reduce logspam by using FINE instead of INFO for deadline narrowing events
  • Netty throughput speed increased 2x for very high throughput (#3038)
  • OverrideAuthorityNameResolverFactory now correctly forwards refresh() (#3062)

v1.3.1 Release

06 Jul 16:06

Choose a tag to compare

Backports from 1.4.0:

  • OkHttp now ignores unknown SETTINGS (#3032). This resolves an important incompatibility with C-wrapped language instances of gRPC
  • Fixed dependency specification to avoid wildcards, which are not universally supported (#2961)
  • Fixed server keepalive not initialized bug (#2982)

1.4.0 Release

07 Jun 01:21

Choose a tag to compare

API Changes

  • LoadBalancers can now update addresses for a channel in-place, allowing the channel to re-use existing connections
  • The previously deprecated affinity API is now deleted. (#3026)

Bug fixes

  • Overly large messages now return RESOURCE_EXHAUSTED (#2906)
  • Netty-tcnative load failures may now be detected earlier and cause an exception during build() instead of creating a hung channel (#2599)
  • OkHttp now ignores unknown SETTINGS (#3032). This resolves an important incompatibility with C-wrapped language instances of gRPC
  • Fixed dependency specification to avoid wildcards, which are not universally supported (#2961)
  • Channel.authority() should return the value of overrideAuthority (#2682)

Other

  • gRPC now does TXT record lookups for implementing service config. Android users will need to add proguard configs to ignore javax.naming.** classes (#2912)
  • Protobuf bumped to 3.3.0
  • Disconnect messages have been silenced as non errors (#2960)
  • Netty has been upgraded to 4.1.11 and Netty TC Native 2.0.1
  • More work to support HTTP GET method. This work is considered experimental and known to have future incompatible wire changes
  • Fixed support for the AppEngine development sandbox