Finagle v6.42.0 Release Notes

  • ๐Ÿ†• New Features

    
    * finagle-commons-stats: Provide a TwitterServer exporter for commons stats.
      This simplifies migration for folks who don't want to switch to
      commons metrics and TwitterServer in one go.  It will export stats on the
      /vars.json endpoint.  ``RB_ID=902921``
    
    * finagle-http: Introduce `HeaderMap.getOrNull(header)`, a Java-friendly variant of
      `HeaderMap.get(header).orNull`.  ``RB_ID=904093``
    
    ๐Ÿ’ฅ Breaking API Changes
    
    • ๐Ÿšš finagle: finagle-http-compat has been removed as part of migration off Netty 3. Use finagle-http types/APIs directly. RB_ID=903647

    • ๐Ÿšš finagle: finagle-spdy has been removed as part of the migration off Netty 3. Please use finagle-http2 as a replacement. RB_ID=906033

    • finagle-base-http: Message.write(ChannelBuffer) has been replaced with a method that receives a Buf. The semantics of calling the write method on chunked messages has changed from potentially throwing an exception based on the state of the Writer to always throwing an IllegalStateException. Existing users of the write(..) methods on chunked messages should use the Writer directly. RB_ID=900091

    • fingle-base-http: HeaderMap.getAll(key) now returns a Seq[String] as opposed to a Iterable[String]. RB_ID=905019

    • finagle-core: The ChannelTransport implementations which transforms a Netty pipeline into a finagle Transport[Req, Rep] have been specialized to Transport[Any, Any] to avoid the illusion of a runtime checked cast. Transport.cast has been changed to receive either a Class[T] or an implicit Manifest[T] in order to check the inbound cast at runtime. For users of the ChannelTransport types, use the Transport.cast method to get a Transport of the right type. RB_ID=902053

    • ๐Ÿšš finagle-memcached: Remove deprecated methods on c.t.f.memcached.Client:

      • apply(group: Group[SocketAddress])
      • apply(cluster: Cluster[SocketAddress])

    Use c.t.f.Memcached.client to create a Memcached client. RB_ID=899331

    • finagle-toggle: ToggleMap Toggles now rehash the inputs to apply and isDefinedAt in order to promote a relatively even distribution even when the inputs do not have a good distribution. This allows users to get away with using a poor hashing function such as String.hashCode. RB_ID=899195

    ๐Ÿ—„ Deprecations

    
    * ๐Ÿ—„ finagle-base-http: Deprecate `c.t.f.http.MapHeaderMap` as it will
      soon be private. Use `c.t.f.http.HeaderMap.apply(..)` to get a HeaderMap
      instance. ``RB_ID=906497``
    
    * ๐Ÿ—„ finagle-base-http: Deprecate `c.t.f.http.HeaderMap += (String, Date)`.
      Use `c.t.f.http.HeaderMap.set(String, Date)` instead. ``RB_ID=906497``
    
    * ๐Ÿ—„ finagle-base-http: Deprecate `c.t.f.http.Message.ContentTypeWwwFrom`.
      Use `c.t.f.http.Message.ContentTypeWwwForm` instead. ``RB_ID=901041``
    
    * ๐Ÿ—„ finagle-base-http: Deprecate `c.t.f.http.Message.headers()`. Use
      `c.t.f.http.Message.headerMap` instead. ``RB_ID=905019``
    
    * ๐Ÿ—„ finagle-base-http: Deprecate the lazy `response: Response` field on the Request type.
      This field is potentially hazardous as it's not necessarily the Response that will
      be returned by a Service but it is often used as such. Construct a Response using
      the static constructor methods. ``RB_ID=899983``
    
    * finagle-base-http: Numerous protected[finagle] methods on `http.Request` and
      `http.Response` that deal in Netty 3 types have been deprecated as part of the
      migration to Netty 4. ``RB_ID=905761``
    
    * ๐Ÿ—„ finagle-http: Deprecate ValidateRequestFilter which now has limited utility.
      See entry in Runtime Behavior Changes. If this is still needed, copy the remaining
      behavior into a new filter. ``RB_ID=899895``
    
    * ๐Ÿ—„ finagle-memcached: Deprecate methods on `c.t.f.memcached.Client`:
        - `apply(name: Name)`
        - `apply(host: String)`
    
      Use `c.t.f.Memcached.client` to create a Memcached client. `RB_ID=899331``
    
    * ๐Ÿ—„ finagle-memcached: Deprecate `c.t.f.memcached.protocol.text.Memcached` object.
      Use `c.t.f.Memcached.client` to create Memcached clients. ``RB_ID=899009``
    
    * ๐Ÿ—„ finagle-memcached: Deprecations on `c.t.f.memcached.util.ParserUtils`:
        - For `isDigits(ChannelBuffer)` use `ParserUtils.isDigits(Buf)` instead.
        - `DIGITS`
        - `DigitsPattern`
    
      ``RB_ID=905253``
    
    โš™ Runtime Behavior Changes
    
    • finagle-http: The HTTP client will no longer emit a Netty 3/4 TooLongFrameException when a response exceeds the specified MaxResponseSize parameter, and instead emits a Finagle specific TooLongMessageException which wraps the Netty exception. RB_ID=905567

    • finagle-http: ValidateRequestFilter doesn't look for the uri "/bad-http-request" which had been indicative of the netty3 http codec giving up on decoding a http request. These events are caught lower in the pipeline and should not bubble up to the level of this filter. RB_ID=899895

    • finagle-netty4: DirectToHeapHandler is now aware of ByteBufHolder types hence can copy them on to heap. RB_ID=906602

    • finagle-redis: Transport implementation is now based on Netty 4 (instead of Netty 3). RB_ID=895728

    ๐Ÿ› Bug Fixes

    
    * finagle-core: Properly compute length when converting a `Buf.ByteArray`
      to a Netty 4 `ByteBuf`. ``RB_ID=901605``
    
    * ๐Ÿ”’ finagle-memcached: AtomicMap change lock function to synchronize on map
      object. ``DIFF_ID=D18735``
    
    * ๐Ÿ”ง finagle-netty4: Fixed connection stall in Finagle clients configured with
      both HTTP proxy (`Transporter.HttpProxyTo`) and TLS/SSL enabled. ``RB_ID=904831``
    
    * ๐Ÿ”ง finagle-netty4: Fixed connection stall in Finagle clients configured with
      both HTTP proxy (`Transporter.HttpProxy`) and TLS/SSL enabled. ``RB_ID=904803``