Finagle v6.34.0 Release Notes
-
โ Runtime Behavior Changes
* finagle-core: GenSerialClientDispatcher fails pending and subsequent requests when its underlying transport closes. ``RB_ID=807590`` ๐ New Features ~~~~~~~~~~~~ * finagle-core: Include upstream/downstream addresses/client ids and request trace id in exceptions that extend `c.t.f.HasRemoteInfo` (including `c.t.f.SourcedException`), accessible via the `remoteInfo` value. ``RB_ID=797082`` * finagle-core: Introduce `c.t.f.service.ResponseClassifier` for HTTP servers, which allows developers to give Finagle the additional application specific knowledge necessary in order to properly classify responses.``RB_ID=800179`` * ๐ฐ finagle: Export two new histograms: `request_payload_bytes` and `response_payload_bytes` for the following protocols: HTTP (non-chunked), Mux, ThriftMux and Thrift. ``RB_ID=797821`` * finagle-core: Define `c.t.f.Address` to represent an endpoint's physical location. Resolvers and namers may attach metadata such as weight to individual endpoint addresses. ``RB_ID=792209`` * finagle-http: Introduce convenience extractors to pattern match `c.t.f.http.Response.status` against the different categories. ``RB_ID=802953`` * ๐ finagle-http: Add `toBoolean` method in `StringUtil` to parse strings to boolean consistently. ``RB_ID=804056`` * finagle-http: Servers now actually decompress requests when decompression is turned on. ``RB_ID=810629`` * ๐ finagle-redis: Add support for SENTINEL commands. ``RB_ID=810663`` * ๐ finagle-redis: Support for Pub/Sub. ``RB_ID=810610`` ๐ฅ Breaking API Changes ~~~~~~~~~~~~~~~~~~~~ * finagle-core: `c.t.f.Codec.prepareConnFactory(ServiceFactory)` is marked `final`, override `c.t.f.Codec.prepareConnFactory(ServiceFactory, Stack.Params)` instead. ``RB_ID=797821`` * finagle-core: `c.t.f.Codec.newClientDispatcher(Transport)` is marked `final`, override `c.t.f.Codec.newClientDispatcher(Transport, Stack.Params)` instead. ``RB_ID=797821`` * ๐ finagle-core: Removed deprecations: ``RB_ID=800974`` - Removed `c.t.f.Service.release`, replace usage with `Service.close()`. - Removed `c.t.f.ServiceFactory.make`, replace usage with `ServiceFactory.apply`. - Removed `c.t.f.ProxyServiceFactory`, replace usage with `ServiceFactoryProxy`. - Removed deprecated `c.t.f.service.FailureAccrualFactory` constructor. - Removed `c.t.f.netty3.ChannelBufferBuf.apply`, replace usage with `ChannelBufferBuf.Owned.apply`. - Removed `c.t.f.util.InetAddressUtil.Loopback`, replace usage with `java.net.InetAddress.getLoopbackAddress`. - Removed `c.t.f.tracing.TracingFilter`, replace usage with `TraceInitializationFilter` and `(Client|Server)TracingFilter`. * finagle-core: `c.t.f.Addr.Bound.addr` type changed from `Set[SocketAddress]` to `Set[c.t.f.Address]`. We provide a migration guide below for the most common cases. Callers of `c.t.f.Addr.Bound.addr` must handle `Set[c.t.f.Address]` instead of `Set[SocketAddresses]`. If you do something with the `SocketAddress` and expect the underlying type to be `InetSocketAddress`, use `c.t.f.Address.Inet.addr` to get the underlying `InetSocketAddress`. `c.t.f.Addr` constructors and `c.t.f.Name.bound` method now accept `c.t.f.Address` instead of `SocketAddress`. For most cases, wrapping the `InetSocketAddress` in an `Address.Inet` will fix the compile error. Any other `SocketAddress` subclass is currently incompatible with `c.t.f.Address`. Instead, you should encode any additional information in the metadata field of `c.t.f.Address.Inet` or `c.t.f.exp.Address.ServiceFactory`. ``RB_ID=792209`` * finagle-core: Delete `c.t.f.ServiceFactorySocketAddress` and replace usages with `c.t.f.exp.Address.ServiceFactory`. ``RB_ID=792209`` * finagle-core: Delete `c.t.f.WeightedSocketAddress` and instead use `c.t.f.addr.WeightedAddress` to represent address weights. ``RB_ID=792209`` * ๐ finagle-core: `c.t.f.builder.ClientBuilder.hosts` takes a Seq of `InetSocketAddress` instead of `SocketAddress`. If you get a compile error, change the static type to `InetSocketAddress` if you can. Otherwise, cast it at runtime to `InetSocketAddress`. ``RB_ID=792209`` * finagle-core: `c.t.f.client.Transporter.EndpointAddr` takes a `c.t.f.Address` as its parameter instead of `SocketAddress`. ``RB_ID=792209`` * ๐ finagle-core: `c.t.f.service.FauilureAccrualFactory.Param(FailureAccrualPolicy)` is removed - it's not safe to configure Failure Accrual with a shareable instance of the policy, use `() => FailureAccrualPolicy` instead. ``RB_ID=802953`` * ๐ finagle-core: `$Client.withSessionQualifier.failureAccrualPolicy` has been removed from the API since it enables an experimental feature (use Stack's `.configured` API instead). ``RB_ID=802953`` * ๐ finagle-core: `c.t.f.service.exp.FailureAccrualPolicies` (Java-friendly API) has been removed - use `c.t.f.service.exp.FailureAccrualPolicy` instead. * ๐ finagle-core: DefaultServer is removed. Protocol implementors should use StackServer instead. ``RB_ID=811918`` * finagle-memcached: `c.t.f.memcached.protocol.text.Memcached` no longer takes a `StatsReceiver`, pass it to a `(Client/Server)Builder` instead. ``RB_ID=797821`` * finagle-redis: `c.t.f.redis.Redis` no longer takes a `StatsReceiver`, pass it to a `(Client/Server)Builder` instead. ``RB_ID=797821`` * finagle-core: `c.t.f.http.MapHeaderMap` no longer takes a `mutable.Map[String, Seq[String]]` as a constructor parameter. `apply` method provides a similar functionality. ๐ Bug Fixes ~~~~~~~~~ * ๐ finagle-core: Fixed `getAll` method on `c.t.f.http.MapHeaderMap`, now it is case insensitive. `apply` method was altering the provided header names. This is fixed it is now possible to iterate on the original header names.