Moses Nakamura


Posted December 18, 2018

December 2018 Release Notes - Version 18.12.0 🧤

It’s hot chocolate season in the big apple. That means mittens, ice-skating, and curling up by the radiator. Grab your puffer, it’s the most beautiful time of the year.


New Features

  • finagle-redis: Add support for the new stream API released in Redis 5.0. ba578c14

  • finagle-core: Add Java compatibility for c.t.f.Filter.TypeAgnostic.Identity via c.t.f.Filter.typeAgnosticIdentity(). cff9aedd

  • finagle-core: Add Java compatibility for c.t.f.Name through Names. 30a8000c

  • finagle-core: Introduce a StackServer.withStack overload that makes modifying the existing Stack easier when using method chaining. f1a980cf

  • finagle-stats: Split the implementation and ServiceLoading into separate modules. The implementation is in finagle-stats-core. This is backwards compatible for existing users of finagle-stats while allowing new usages built on top. b9fe5c8d

  • finagle-thrift: Add c.t.finagle.thrift.MethodMetadata which provides a LocalContext Key for setting information about the current Thrift method and an accessor for retrieving the currently set value. 7b22e4ef

  • finagle-thrift: Update c.t.finagle.thrift.MethodMetadata to provide an asCurrent method to set the current c.t.finagle.thrift.MethodMetadata in the LocalContext. f46e1f77

Breaking API Changes

  • finagle-core: The c.t.u.Closable trait has been removed from c.t.f.t.TransportContext, as well as the close and onclose methods. Uses of these methods within TransportContext should be changed to use the corresponding methods on c.t.f.t.Transport instead. b8b850bb

  • finagle-core: The deprecated c.t.f.t.Transport.peerCertificate method on the Transport class (not the Transport.peerCertificate Finagle context) has been removed. Uses of this method should be changed to use c.t.f.t.TransportContext.peerCertificate instead. ab0432b4

  • finagle-core: The deprecated c.t.f.t.TransportContext.status method has been removed from TransportContext. Uses of this method should be changed to use c.t.f.t.Transport.status instead. fd97536f

  • finagle-mysql: c.t.f.m.Charset has been renamed to c.t.f.m.MysqlCharset to resolve any ambiguity between it and the Charset Stack parameter. 05354cd5

  • finagle-mysql: All Stack params (Charset, Credentials, Database, FoundRows, MaxConcurrentPrepareStatements, UnsignedColumns) have been moved to the com.twitter.finagle.mysql.param namespace. d30c5549

  • finagle-mysql: The deprecated c.t.f.m.Client.apply(factory, statsReceiver) method has been removed. 17747e1a

  • finagle-mysql: The c.t.f.m.Handshake class and companion object have been made private. 20c8d50f

  • finagle-http: Rename the toggle ‘c.t.f.h.UseH2CClients’ to ‘c.t.f.h.UseH2CClients2’. 43c0b69c

Runtime Behavior Changes

  • finagle: Upgrade to Netty 4.1.31.Final and netty-tcnative 2.0.19.Final. 8e0f4b86

  • finagle-base-http: The DefaultHeaderMap will replace obs-fold ( CRLF 1*(SP/HTAB) ) in inserted header values. 51c4f789




  • finatra-thrift: Instead of failing (potentially silently) c.t.finatra.thrift.routing.ThriftWarmup now explicitly checks that it is using a properly configured c.t.finatra.thrift.routing.Router e2dc8b30

  • finatra-thrift: c.t.finatra.thrift.Controller is now an abstract class rather than a trait. 09c9bbb1

  • finatra-thrift: c.t.finatra.thrift.internal.ThriftMethodService is now private. 53dc0501

  • finatra-thrift: c.t.finatra.thrift.exceptions.FinatraThriftExceptionMapper and c.t.finatra.thrift.exceptions.FinatraJavaThriftExceptionMapper now extend ExceptionManager[Throwable, Nothing] since the return type was never used. They are now also final. dc894547

  • finatra-thrift: Remove c.t.finatra.thrift.routing.JavaThriftRouter#beforeFilter. This method adds too much confusion to the Router API and users are encouraged to instead apply their TypeAgnostic Filters directly to the resultant Service[-R, +R] by overriding the c.t.finatra.thrift.AbstractThriftServer#configureService method instead. b0cb8eaf

  • finatra-thrift: c.t.finagle.Filter.TypeAgnostic filters are now the standard type of filter that can be added by configuring a ThriftRouter. c.t.finatra.thrift.ThriftFilter has been deprecated. 6e93b9cc

  • finatra-thrift: c.t.finatra.thrift.ThriftRequest has been deprecated. All of the information contained in a ThriftRequest can be found in other ways: methodName -> traceId -> clientId -> ClientId.current 6e93b9cc


  • finatra-http: Validate headers to prevent header injection vulnerability. 8a925000



  • scrooge-generator: Set a LocalContext value with the current Thrift method in the generated Java and Scala code such that the application Service[-R, +R] being executed has access to information about the current Thrift method being invoked. 09da3397

Twitter Server

No Changes


New Features

  • util-core: Provide a way to listen for stream termination to c.t.util.Reader, Reader#onClose which is satisfied when the stream is discarded or read until the end. 3b1434e2

  • util-core: Conversions in c.t.conversions have new implementations that follow a naming scheme of SomethingOps. Where possible the implementations are AnyVal based avoiding allocations for the common usage pattern. ee56e5f2

    • percent is now PercentOps
    • storage is now StorageUnitOps
    • string is now StringOps
    • thread is now ThreadOps
    • time is now DurationOps
    • u64 is now U64Ops

Bug Fixes

  • util-core: Fixed a bug where tail would sometimes return Some empty AsyncStream instead of None. 1dc614bc


  • util-core: Conversions in c.t.conversions have been deprecated in favor of SomethingOps versions. Where possible the implementations are AnyVal based and use implicit classes instead of implicit conversions. ee56e5f2

    • percent is now PercentOps
    • storage is now StorageUnitOps
    • string is now StringOps
    • thread is now ThreadOps
    • time is now DurationOps
    • u64 is now U64Ops

Breaking API Changes

  • util-core: Experimental utilities were removed. d9c5e4a3

  • util-core: Deleted, which was incompatible with Reader#onClose semantics.[Nothing] is a drop-in replacement. 3b1434e2

  • util-core: Removed c.t.util.U64 bits. Use c.t.converters.u64._ instead. 8034e557