Finagle v18.6.0 Release Notes

  • ⚙ Runtime Behavior Changes

    
    * 0️⃣ finagle-core: By default, the deterministic aperture load balancer doesn't expand
      based on the loadband. This is because the loadband is influenced by a degree of
      randomness, and this breaks the deterministic part of deterministic aperture and
      can lead to aggressive banding on backends. ``PHAB_ID=D180922``
    
    * finagle-http2: Unprocessed streams are retryable in case of GOAWAY.
      ``PHAB_ID=D174401``
    
    🆕 New Features
    ~~~~~~~~~~~~
    
    * finagle-core: Add `PropagateDeadlines` `Stack.Param` to `TimeoutFilter` for
      disabling propagation of deadlines to outbound requests.
      ``PHAB_ID=D168405``
    
    * finagle-core: Add `toString` implementations to `c.t.finagle.Service` and
      `c.t.finagle.Filter`. Update in `Filter#andThen` composition to expose a
      useful `toString` for composed Filters and a composed Service (a Filter chain
      with a terminal Service or ServiceFactory).
    
      The default implementation for `Filter` and `Service` is `getClass.getName`. When
      composing filters, the `andThen` composition method correctly tracks the composed
      parts to produce a useful `toString`, e.g.,
    
    .. code-block:: scala
    
      package com.foo
    
      import com.twitter.finagle.{Filter, Service}
      import com.twitter.util.Future
    
      class MyFilter1 extends Filter[Int, Int, Int, Int] {
         def apply(request: Int, service: Service[Int, Int]): Future[Int] = ???
      }
    
    .. code-block:: scala
    
      package com.foo
    
      import com.twitter.finagle.{Filter, Service}
      import com.twitter.util.Future
    
      class MyFilter2 extends Filter[Int, Int, Int, Int] {
        def apply(request: Int, service: Service[Int, Int]): Future[Int] = ???
      }
    
    .. code-block:: scala
    
      val filters = (new MyFilter1).andThen(new MyFilter2)
    
    `filters.toString` would emit the String "com.foo.MyFilter1.andThen(com.foo.MyFilter2)"
    
    If a Service (or ServiceFactory) were then added:
    
    .. code-block:: scala
    
      import com.twitter.finagle.{Filter, Service}
      import com.twitter.finagle.service.ConstantService
      import com.twitter.util.Future
    
      ...
    
      val svc: Service[Int, Int] = filters.andThen(new ConstantService[Int, Int](Future.value(2)))
    
    Then, `svc.toString` would thus return the String:
    "com.foo.MyFilter1.andThen(com.foo.MyFilter2).andThen(com.twitter.finagle.service.ConstantService(ConstFuture(2)))"
    
    Filter implementations are permitted to override their `toString` implementations which would
    0️⃣ replace the default of `getClass.getName`. ``PHAB_ID=D172526``
    
    * finagle-core: Make `Filter.TypeAgnostic` an abstract class for Java usability.
      ``PHAB_ID=D172716``
    
    * finagle-core: `c.t.f.filter.NackAdmissionFilter` is now public. ``PHAB_ID=D177322``
    
    * finagle-core: Extended `c.t.f.ssl.KeyCredentials` and `c.t.f.ssl.TrustCredentials` to work
      with `javax.net.ssl.KeyManagerFactory` and `javax.net.ssl.TrustManagerFactory` respectively.
      ``PHAB_ID=D177484``
    
    💥 Breaking API Changes
    ~~~~~~~~~~~~~~~~~~~~
    
    * finagle-core: Rename `DeadlineFilter.Param(maxRejectFraction)` to
      `DeadlineFilter.MaxRejectFraction(maxRejectFraction)` to reduce confusion
      when adding additional params.
      ``PHAB_ID=D172402``
    
    
    🐛 Bug Fixes
    ~~~~~~~~~
    
    * finagle-http2: `StreamTransportFactory` now marks itself as dead/closed when it runs out of
      HTTP/2 stream IDs instead of stalling. This allows the connection to be closed/reestablished in
      accordance with the spec ``PHAB_ID=D175898``
    
    * finagle-netty4: `SslServerSessionVerifier` is now supplied with the proper peer address
      rather than `Address.failing`. ``PHAB_ID=D168334``
    
    * 0️⃣ finagle-thrift/thriftmux: Disabled client side per-endpoint stats by default for client
      ServicePerEndpoint. It can be set via `c.t.f.thrift.RichClientParam` or a `with`-method
      as `Thrift{Mux}.client.withPerEndpointStats`. ``PHAB_ID=D169427``
    
    * finagle-netty4: Avoid NoClassDefFoundError if netty-transport-native-epoll is not available
      on the classpath.