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 use HeaderMap.apply or HeaderMap.newHeaderMap to construct a new HeaderMap 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 the apply method on com.twitter.finagle.client.Transporter to the newTransporter method of com.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 the Balancers 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 in Transport has been replaced by two parameters:
        • ClientSsl in Transport, which is used for configuring a client Engine's hostname, key credentials, trust credentials, cipher suites, protocols, and application protocols.
        • SslClientEngineFactory in SslClientEngineFactory, which determines how the Engine is created based off of an Address and an SslClientConfiguration.
      • The TLSHostname param in Transporter has been removed. Hostnames should be set as part of the SslClientConfiguration now.
      • The TLSServerEngine param in Transport has been replaced by two parameters:
        • ServerSsl in Transport, which is used for configuring a server Engine's key credentials, trust credentials, cipher suites, protocols, application protocols, and whether the server supports or requires client authentication.
        • SslServerEngineFactory in SslServerEngineFactory, which determines how the Engine is created based off of an SslServerConfiguration.
      • 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 using Netty4ServerEngineFactory.
      • 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 own SslServerEngineFactory which can explicitly handle those type of keys.
      • Note: By default, Finagle on Netty 3 will use the JdkClientEngineFactory and JdkServerEngineFactory respectively.

      RB_ID=907923

    • ๐Ÿšš 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 and ClientBuilder.expSocksProxy are removed. Use $Protocol.withTransport.httpProxyTo instead (requires Netty 4 transport). RB_ID=909739

    • ๐Ÿšš finagle-kestrel: Remove the deprecated codec method on c.t.f.kestrel.MultiReaderMemcache. Use .stack(Kestrel.client) on the configured c.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, use c.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 the com.twitter.finagle.stats.includeEmptyHistograms flag to false to retain the behavior. RB_ID=907186

    • ๐Ÿ”จ finagle-thrift: ThriftServiceIface was refactored to be in terms of ThriftMethod.Args to ThriftMethod.SuccessType instead of ThriftMethod.Args to ThriftMethod.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``