Finagle v6.43.0 Release Notes
-
๐ New Features
* finagle-base-http: `c.t.f.http.Message` now has a Java friendly method to set the HTTP version: `Message.version(Version)`. ``RB_ID=906946`` * finagle-base-http: Added Java friendly methods to the HTTP model including `c.t.f.http.Message.contentLength(Long)`, `c.t.f.http.Message.contentLengthOrElse(Long): Long`, and `c.t.f.http.Request.method(Method)`. ``RB_ID=907501`` * finagle-base-http: `c.t.f.http.HeaderMap` now has a method, `HeaderMap.newHeaderMap` for creating new empty `HeaderMap` instances. ``RB_ID=907397`` * ๐ง finagle-core: SSL/TLS client and server configurations and engine factories have been added for finer grained control when using TLS with Finagle. ``RB_ID=907191`` * finagle-netty4: Introducing a new toggle `com.twitter.finagle.netty4.UsePooling` that enables byte buffers pooling in Netty 4 pipelines. ``RB_ID=912789`` ๐ฅ Breaking API Changes
finagle-base-http:
c.t.f.http.MapHeaderMap
has been made private. Please useHeaderMap.apply
orHeaderMap.newHeaderMap
to construct a newHeaderMap
instance.RB_ID=907397
finagle-base-http:
c.t.f.http.Version
is no longer represented by case objects and has been replaced by val instances of a case class.RB_ID=906946
finagle-base-http: The common HTTP methods are no longer modeled by case objects but as instances of a single c.t.f.http.Method class. The string representation of the HTTP method is now available via the
Method.name
method.RB_ID=906697
๐ finagle-core: Move the
java.net.SocketAddress
argument from theapply
method oncom.twitter.finagle.client.Transporter
to thenewTransporter
method ofcom.twitter.finagle.client.StackClient
.RB_ID=907544
finagle-core: Load Balancer implementations no longer mix-in the OnReady trait and OnReady was removed.
RB_ID=908863
finagle-core: HeapBalancer, ApertureLoadBalancer, and RoundRobinBalancer classes were made package private. To construct load balancers for use within a Finagle client, use the
com.twitter.finagle.loadbalancer.Balancers
object.RB_ID=909245
finagle-core: The
aperture
constructor on theBalancers
object no longer takes a Timer since it was unused.RB_ID=909245
finagle-core: The load balancer algorithm is now further scoped under "algorithm".
RB_ID=909309
๐ finagle-core: Remove
Ring
from Finagle core's util since it is unused internally.RB_ID=909718
finagle-core: SSL/TLS stack params for Finagle running Netty 3 have changed.
- The
TLSClientEngine
param inTransport
has been replaced by two parameters:ClientSsl
inTransport
, which is used for configuring a clientEngine
's hostname, key credentials, trust credentials, cipher suites, protocols, and application protocols.SslClientEngineFactory
inSslClientEngineFactory
, which determines how theEngine
is created based off of anAddress
and anSslClientConfiguration
.
- The
TLSHostname
param inTransporter
has been removed. Hostnames should be set as part of theSslClientConfiguration
now. - The
TLSServerEngine
param inTransport
has been replaced by two parameters:ServerSsl
inTransport
, which is used for configuring a serverEngine
's key credentials, trust credentials, cipher suites, protocols, application protocols, and whether the server supports or requires client authentication.SslServerEngineFactory
inSslServerEngineFactory
, which determines how theEngine
is created based off of anSslServerConfiguration
.
- Note: Not all client and server configurations work with all engine factories. Each engine factory should document what is not supported by that specific engine factory.
- Note: Users using Finagle-Native should in the short term use
LegacyServerEngineFactory
and in the long term move to usingNetty4ServerEngineFactory
. - Note: With this change, private keys are expected to explicitly be PKCS#8 PEM-encoded keys.
Users using PKCS#1 keys should in the short term use
LegacyKeyServerEngineFactory
and in the longer term switch to using PKCS#8 keys, or use your ownSslServerEngineFactory
which can explicitly handle those type of keys. - Note: By default, Finagle on Netty 3 will use the
JdkClientEngineFactory
andJdkServerEngineFactory
respectively.
RB_ID=907923
- The
๐ finagle-core:
withLoadBalancer.connectionsPerEndpoint
was removed and moved into finagle-memcached, which was the only client that uses the feature.RB_ID=908354
๐ finagle-core:
ClientBuilder.expHttpProxy
andClientBuilder.expSocksProxy
are removed. Use$Protocol.withTransport.httpProxyTo
instead (requires Netty 4 transport).RB_ID=909739
๐ finagle-kestrel: Remove the deprecated
codec
method onc.t.f.kestrel.MultiReaderMemcache
. Use.stack(Kestrel.client)
on the configuredc.t.f.builder.ClientBuilder
instead.RB_ID=907184
๐ finagle-kestrel: Removed
c.t.f.kestrel.Server
. A local Kestrel server is preferred for testing.RB_ID=907334
๐ finagle-kestrel: Removed deprecated
c.t.f.kestrel.protocol.Kestrel
. To create a Finagle Kestrel client, usec.t.f.Kestrel.client
.RB_ID=907422
๐ finagle-serversets: Removed the unapply method and modified the signature of fromAddrMetadata method in
c.t.f.serverset2.addr.ZkMetadata
. Instead of pattern matching use the modified fromAddrMetadata method.RB_ID=908186
๐ finagle-stats: Remove the
com.twitter.finagle.stats.exportEmptyHistograms
toggle which has defaulted to 0.0 for quite some time. Change the default value of thecom.twitter.finagle.stats.includeEmptyHistograms
flag to false to retain the behavior.RB_ID=907186
๐จ finagle-thrift:
ThriftServiceIface
was refactored to be in terms ofThriftMethod.Args
toThriftMethod.SuccessType
instead ofThriftMethod.Args
toThriftMethod.Result
.RB_ID=908846
๐ finagle-redis: Remove pendingCommands from
c.t.f.finagle.redis.SentinelClient.Node
and add linkPendingCommands for compatibility with redis 3.2 and newer.RB_ID=913516
โ Runtime Behavior Changes
* finagle-http: Responses with a server error status code (500s) are now classified as a failure. This effects success rate metrics and failure accrual. See the `com.twitter.finagle.http.serverErrorsAsFailuresV2` toggle for opting out of this behavior. ``RB_ID=909315`` * finagle-netty4: Servers no longer set SO_LINGER=0 on sockets. ``RB_ID=907325`` ๐ Deprecations ~~~~~~~~~~~~ * finagle-base-http: The `c.t.f.http.Response` methods `getStatusCode()` and `setStatusCode()` have been deprecated. Use the methods `statusCode` and `statusCode(Int)` instead. ``RB_ID=908409`` * ๐ finagle-core: `c.t.f.builder.ClientBuilder.group` and `c.t.f.builder.ClientBuilder.cluster` have been deprecated. Use `c.t.f.builder.ClientBuilder.dest` with a `c.t.f.Name` instead. ``RB_ID=914879`` * finagle-http: Now that `c.t.f.http.Method` and `c.t.f.http.Version` are represented by instances and thus easier to use from Java, the Java helpers `c.t.f.http.Versions`, `c.t.f.http.Statuses`, and `c.t.f.http.Methods` have been deprecated. ``RB_ID=907680`` * ๐ finagle-memcached: `c.t.f.memcached.replication.ReplicationClient` is now deprecated. Use `c.t.f.memcached.replication.BaseReplicationClient` with clients created using `c.t.f.Memcached.client`. ``RB_ID=907384`` * finagle-thrift: As part of the Netty 4 migration, all `c.t.f.Codec` and `c.t.f.CodecFactory` types in finagle-thrift are now deprecated. Use the `c.t.f.Thrift` object to make clients and servers. ``RB_ID=907626`` ๐ Bug Fixes ~~~~~~~~~ * finagle-core: Fix `ConcurrentModificationException` thrown by calling `close()` on `c.t.f.factory.ServiceFactoryCache`. ``RB_ID=910407`` * finagle-http: The HTTP/1.x Client will no longer force-close the socket after receiving a response that lacks content-length and transfer-encoding headers but is required per RFC 7230 to not have a body. ``RB_ID=908593`` * finagle-redis: The HSCAN and SCAN commands take an optional argument for pattern matching. This argument has been fixed to use the correct name of 'MATCH' instead of the incorrect 'PATTERN'. ``RB_ID=908817`` * finagle-thrift: Properly locate sub-classed MethodIface services to instantiate for serving BaseServiceIface implemented thrift services. ``RB_ID=907608`` * finagle-redis: The SentinelClient will no longer throw an NoSuchElementException when initializing connections to a redis 3.2 or greater sentinel server. ``RB_ID=913516`` Dependencies ~~~~~~~~~~~~ * finagle: Bump guava to 19.0. ``RB_ID=907807``