All Versions
Latest Version
Avg Release Cycle
29 days
Latest Release

Changelog History
Page 7

  • v2.12.0 Changes

    โž• Added

    * ๐Ÿ‘  finatra-jackson: Add support for injecting a snake case
       FinatraObjectMapper by annotating
       parameters with a new @SnakeCaseMapper binding annotation.
    ๐Ÿ”„ Changed
    • finatra-http: Add close hook when constructing a StreamingResponse to allow for resource release without consuming an entire AsyncStream. PHAB_ID=D64013

    • finatra-http: Unmarshalling JSON no longer consumes the body of a HTTP Request. PHAB_ID=D74519

    • ๐Ÿšš finatra-inject: RetryUtil.retry has been removed because it used a blocking call to Thread.sleep. Blocking Finagle threads results in poor performance and RetryUtil.retryFuture should be used instead. PHAB_ID=D73949

    ๐Ÿ›  Fixed

  • v2.11.0 Changes

    โž• Added

    ๐Ÿ”„ Changed

    ๐Ÿ›  Fixed

    *  finatra-jackson: Fix JSON deserialization of scala.util.Either type
       in FinatraObjectMapper
       for Scala 2.12. ``RB_ID=917699``
  • v2.10.0 Changes

    โž• Added

    ๐Ÿ”„ Changed
    • finatra-http: Increase composability and flexibility of RouteDSL. RB_ID=912095

    • inject-app: Run installed modules postInjectorStartup before server function. This makes reasoning about the server lifecycle a bit more straight-forward and simplifies things like the exception manager logic for adding and overridding mappers. RB_ID=911965

    • โšก๏ธ finatra-jackson: Update framework tests to FunSuite ScalaTest testing style. RB_ID=911745

    • ๐Ÿšš finatra: Move finatra/benchmarks and finatra/utils framework tests to FunSuite ScalaTest testing style. RB_ID=910680

    ๐Ÿ›  Fixed

    * ๐Ÿ‘€ finatra-http: Correctly return a JsonParseException when the
      incoming JSON is not parsable
      as an expected custom case class request object. ``RB_ID=912529``
    * finatra-http: Ensure underlying members are injected for
      AbstractControllers. ``RB_ID=911635``
    * ๐Ÿ‘ finatra-jackson: Patch ``FinatraDatetimeDeserializer`` to support
      parsing of Long value passed
      as String, e.g., when parsing a query parameter.\ ``RB_ID=911162``
    * finatra: Close embedded server clients on embedded server close.
  • v2.9.0 Changes

    โž• Added

    ๐Ÿ”„ Changed
    • inject-core: (BREAKING API CHANGE) Allow for binding of higher-kinded types when testing. Deprecated @Bind mechanism for replacing bound types in an object graph. Now instead of using @Bind like this:


      class DarkTrafficCanonicalResourceHeaderTest
        extends FeatureTest
        with Mockito {
        val darkTrafficService: Option[Service[Request, Response]] =
          Some(smartMock[Service[Request, Response]])
        /* mock request */
        override val server = new EmbeddedHttpServer(
          twitterServer = new DarkTrafficTestServer)
        test("DarkTrafficServer#has Canonical-Resource header correctly set") {

    Users can instead do:


      class DarkTrafficCanonicalResourceHeaderTest
      extends FeatureTest
      with Mockito {
       val darkTrafficService: Option[Service[Request, Response]] =
         Some(smartMock[Service[Request, Response]])
       /* mock request */
       override val server = new EmbeddedHttpServer(
         twitterServer = new DarkTrafficTestServer)
         .bind[Option[Service[Request, Response]], DarkTrafficService](darkTrafficService)
       test("DarkTrafficServer#has Canonical-Resource header correctly set") {

    This allows for more flexibility (as the binding is now per object graph, rather than per test files) and is less susceptible to errors due to incorrect usage.

    The breaking API change is due to adding this support in the TestInjector, it is now required that users call the TestInjector#create method in order to build the injector and that this is done after calls to TestInjector#bind. Previously, an Injector was directly returned from TestInjector#apply which is no longer true, thus it may look like your IntegrationTests are broken as you now need to add a call to TestInjector#create.

    Additionally, this change updates all of the framework tests in the inject modules to the FunSuite testing style from the deprecated WordSpec testing style. RB_ID=910011

    • โšก๏ธ finatra-thrift: Update framework tests to FunSuite ScalaTest testing style. RB_ID=910262

    • ๐Ÿšš inject-core: Move Logging from grizzled-slf4j to util/util-slf4j-api. c.t.inject.Logger is now deprecated in favor of c.t.util.logging.Logger in util. PHAB_ID=D29713

    • โšก๏ธ finatra-httpclient: Update framework tests to FunSuite ScalaTest testing style. RB_ID=909526

    • โšก๏ธ finatra-http: Update framework tests to FunSuite ScalaTest testing style. RB_ID=909349

    • finatra: Bump guava to 19.0. RB_ID=907807

    • inject-thrift-client: Various APIs have changed to work with ThriftMethod.SuccessType instead of ThriftMethod.Result. See ThriftClientFilterChain, Controller, ThriftWarmup, PossiblyRetryable. RB_ID=908846

    ๐Ÿ›  Fixed

    * ๐Ÿ‘ finatra-http: Correctly support adding Java AbstractController by
      instance. ``RB_ID=910502``
  • v2.8.0 Changes

    โž• Added

    * ๐Ÿ‘ finatra-http: Add Java support for declaring admin routes.
    * finatra-http: Add AbstractExceptionMapper for ExceptionMapper usage
      from Java.
      Also update the HttpRouter to allow for registration of
    * ๐Ÿ‘ finatra-http: Support for JSON Patch
      ( Utilities are
      located in package ``com.twitter.finatra.http.jsonpatch``.
    * finatra: Created companion trait mixins for
    * ๐Ÿ‘ finatra-http: Support for optional trailing slashes in HTTP routes.
      Routes can
      now specify that they allow an optional trailing slash by ending
      the route URI
      in the Controller with "/?". ``RB_ID=893167``
    * ๐Ÿ›  finatra-http: Support for Controller route prefixes. This allows
      users to define a
      common prefix for a set of routes declaratively inside a
      controller. ``RB_ID=894695``
    ๐Ÿ”„ Changed
    • โœ… inject-core: Add back JUNitRUnner to c.t.inject.Test and c.t.inject.WordSpecTest so that tests can be run when building with maven. RB_ID=909789

    • finatra-http: Allow routes which begin with "/admin" to be exposed on the external interface and routes which DO NOT begin with "/admin" to be exposed on the admin interface. NOTE: routes which begin with "/admin/finatra" will continue to be on the admin interface only. Routes which begin with "/admin" that should be served from the admin interface MUST set the flag "admin = true" on the route in the Controller. RB_ID=905225

    • ๐Ÿšš finatra: Move conversions and retry utilities from finatra/utils to finatra/inject/inject-utils. RB_ID=905109

    • โœ… finatra: (BREAKING API CHANGE) Rename the existing test helper classes to include their current opinionated testing style, "WordSpec". These are functionally equivalent as this is just a name change. We also introduce new versions of the test helpers which mix in the recommended FunSuite. Thus it will look like your tests are broken as you will need to update to change to use the new "WordSpec" classes or changed your testing style to the recommended FunSuite style. PHAB_ID=D19822

    • ๐Ÿšš inject-core: Remove JUnitRunner from c.t.inject.Test. This was only necessary for internal building with pants and is no longer required. The sbt build uses the ScalaTest runner and is thus not affected. Additionally, update specs2 to 2.4.17 and to depend on just the specs2-mock dependency where needed. PHAB_ID=D18011

    ๐Ÿ›  Fixed

    * finatra-http: Fix issue where added admin routes did not have their
      HTTP method
      correctly specified leading to all routes being defaulted to 'GET'.
    * finatra-http: Fix for custom request case class collection-type
      fields which are
      annotated with either ``@RouteParam``, ``@QueryParam``, or
      ``@FormParam`` to correctly
      use a specified default value when a value is not sent in the
      request. ``RB_ID=903697``
    * โœ… inject-app: Fix TestInjector to properly parse flags. The
      TestInjector didn't
      properly handle defaulted boolean flags when defined in Modules.
      Updated the
      TestInjector logic to properly parse flags. Fixes `Issue
      #373 <>`__
    * โœ… finatra: Correctly filter published tests-javadocs and
      tests-sources jars for
      projects. We are incorrectly publishing tests in the sources and
      javadocs jars
      for projects which publish a test-jar dependency (http, httpclient,
      thrift, util, inject-app, inject-core, inject-modules, and
  • v2.7.0 Changes

    โž• Added

    * ๐Ÿ‘ finatra-http: Add built-in support for Scala
      ``scala.concurrent.Future``. The
      CallbackConverter now supports a return type of Scala
      by using a bijection to convert to a Twitter ``c.t.util.Future``.
    * ๐Ÿ‘ finatra-http: Support for request forwarding. Requests can be
      forwarded from
      one route to another. Forwarded requests will not go through the
      defined filter chain again but will pass through any Controller
      defined filters
      on the "forwarded to" route. ``RB_ID=883224``
    ๐Ÿ”„ Changed

    ๐Ÿ›  Fixed

  • v2.6.0 Changes

    โž• Added

    * ๐Ÿ“š  finatra: Move the OSS documentation to internal code repository to be
       co-located with
       source code. ``RB_ID=881112``
    ๐Ÿ”„ Changed
    • finatra-http: Decompose the ThrowableExceptionMapper to allow users to more easily replace the portions they care about. Users can now just replace the functionality per exception type rather than needing to replace the entire ThrowableExceptionMapper. `RB_ID=891666``

    • finatra-http: The 'cookie' method of c.t.finatra.http.response.ResponseBuilder#EnrichedResponse that takes a Netty 3 cookie instance has been deprecated. Please use the method which takes a Finagle HTTP cookie instead. RB_ID=888683

    • โšก๏ธ finatra-http: Update adding routes to the TwitterServer HTTP Admin Interface to use c.t.finagle.http.RouteIndex and remove the c.t.finatra.http.routing.AdminIndexInfo. Also relaxed the rules for what routes can be added to the index to include constant /POST routes. Additionally, no longer fail if you define conflicting admin routes -- we will now only warn. It is up to the user to not shoot themselves in the foot. RB_ID=889792

    • finatra-http: Request in request case classes no longer requires Inject annotation. RB_ID=888197

    • ๐Ÿ—„ inject-utils: Deprecated RootMonitor since finagle DefaultMonitor is implicitly installed and handles all exceptions caught in stack. We provide a monitor method by default is a NullMonitor in c.t.finatra.thrift.modules.DarkTrafficFilterModule and c.t.inject.thrift.modules.FilteredThriftClientModule, users can handle other exceptions (unhandled by DefaultMonitor) by overriding the monitor method RB_ID=886773

    • finatra: We now depend on a fork of libthrift hosted in the Central Repository. The new package lives in the 'com.twitter' organization. This removes the necessity of depending on This also means that eviction will not be automatic and using a newer libthrift library requires manual eviction if artifacts are being pulled in transitively. RB_ID=885879

    • โšก๏ธ inject-thrift-client: (BREAKING API CHANGE) Update filter building API with FilteredThriftClientModule. The c.t.inject.thrift.filters.ThriftClientFilterChain builder API has changed along with the underlying mechanisms to support enforcement of a "correct" filter order when using the helper methods. Methods have been renamed to a 'with'-syntax to be more inline with other builders and the confusing "globalFilter" method to the more verbose but more accurate "withAgnosticFilter". RB_ID=878260

    • ๐Ÿ“ฆ inject-thrift-client: Remove deprecated package aliases. We'd like people to move the correct packages.\ RB_ID=879330

    • โšก๏ธ finatra-http: (BREAKING API CHANGE) Update StreamingResponse to avoid keeping a reference to the head of the AsyncStream. This resolves the memory leak when streaming an infinite stream. The constructor is now private; use the StreamingResponse object methods that take an AsyncStream by-name instead. ``RB_ID=890205''

    ๐Ÿ›  Fixed

    *  finatra-http: Allow 0,1,t,f as valid boolean values for QueryParam
       case class requests.
  • v2.5.0 Changes

    โž• Added

    *  finatra-http: Add DarkTrafficFilterModule symmetric with
       thrift/DarkTrafficFilterModule. Add DarkTrafficService annotation in
       finatra-utils and a filter function used for requests annotated with
       Annotation Type in order to add DarkTrafficFilter. ``RB_ID=878079``
    ๐Ÿ”„ Changed
    • finatra: No longer need to add an additional resolver that points to RB_ID=878967
    • inject-thrift-client: Stop counting response failures in the c.t.inject.thrift.ThriftClientFilterChain as these are now counted in the c.t.finagle.thrift.ThriftServiceIface. RB_ID=879075
    • finatra-jackson: Fix issue around JsonProperty annotation empty value. In CaseClassField.jsonNameForField, if the @JsonProperty annotation is used without a value, the property name is interpreted as "". It now follows the default Jackson behavior of using the name field name as the property name when the annotation is empty. RB_ID=877060
    • finatra: Correct instances of misspelled word "converter". There are several instances where the word "converter" is misspelled as "convertor". Specifically, TwitterModule.addTypeConvertor has been changed to TwitterModule.addTypeConverter. Other internal renamings are TwitterDurationTypeConverter, JodatimeDurationTypeConverter, and JacksonToGuiceTypeConverter. RB_ID=877736
    • ๐Ÿšš finatra: Move installation of the SLF4JBridgeHandler to the constructor of c.t.inject.server.TwitterServer. The c.t.finatra.logging.modules.Slf4jBridgeModule has been removed as there is now little reason to use it unless you are building an application directly from since the functionality is now provided by default in the constructor of c.t.inject.server.TwitterServer. If using, then users can use the c.t.inject.logging.modules.LoggerModule. The main advantage is that slf4j bridges are now installed earlier in the application or server lifecycle and thus more of the initialization logging is bridged to the slf4j-api. RB_ID=870913

    ๐Ÿ›  Fixed

    * โœ…  finatra-jackson: Test jar is missing files. Classes in the test
       ``c.t.finatra.validation`` package were not properly marked for
       inclusion in the finatra-jackson tests jar. They've now been added.
  • v2.4.0 Changes

    โž• Added

    * ๐Ÿ‘  finatra-thrift: Enhanced support for Java Thrift services.
    * ๐Ÿ’ป  finatra-examples: Add web/UI application example. ``RB_ID=868027``
    * โœ…  inject-server: Allow for the ability to disable test logging via
       property. ``RB_ID=867344``
    ๐Ÿ”„ Changed
    • ๐Ÿ”ง finatra-http: Simplify ExceptionMapper configuration and usage. We are dropping the need for a specialized DefaultExceptionMapper (which was simply an ExceptionMapper[Throwable]). Instead we now allow the configuration of mappers in the ExceptionManager to be much more flexible. Previously, the framework tried to prevent a user from registering a mapper over a given exception type multiple times and specialized a "default" ExceptionMapper to invoke on an exception type of Throwable. The ExceptionManager will now accept any mapper. If a mapper is added over a type already added, the previous mapper will be overwritten.

    ๐Ÿ‘ป The last registered mapper for an exception type wins.

    0๏ธโƒฃ | The framework adds three mappers to the manager by default. If a user wants 0๏ธโƒฃ | to swap out any of these defaults they simply need add their own mapper to 0๏ธโƒฃ | the manager for the exception type to map. E.g., by default the framework | will add: | Throwable -> | com.twitter.finatra.http.internal.exceptions.ThrowableExceptionMapper ๐Ÿ‘€ | JsonParseException -> ๐Ÿ‘€ | com.twitter.finatra.http.internal.exceptions.json.JsonParseExceptionMapper | CaseClassMappingException -> | com.twitter.finatra.http.internal.exceptions.json.CaseClassExceptionMapper

    ๐Ÿ‘ป | The manager walks the exception type hierarchy starting at the given | exceptiontype and moving up the inheritence chain until it finds mapper ๐Ÿ”ง | configured for the type. In this manner an ExceptionMapper[Throwable] will 0๏ธโƒฃ | be the last mapper invoked and performs as the "default".

    0๏ธโƒฃ | Thus, to change the "default" mapper, simply adding a new mapper over the | Throwable type will suffice, i.e., ExceptionMapper[Throwable] to the | ExceptionManager. There are multiple ways to add a mapper. Either through | the HttpRouter:


    override def configureHttp(router: HttpRouter): Unit = {

    Or in a module which is then added to the Server, e.g.,


    object MyExceptionMapperModule extends TwitterModule {
      override def singletonStartup(injector: Injector): Unit = {
        val manager = injector.instance[ExceptionManager]
    override val modules = Seq(

    | This also means we can simplify the HttpServer as we no longer need to expose 0๏ธโƒฃ | any "framework" module for overridding the default ExceptionMappers. So the ๐Ÿšš | "def exceptionMapperModule" has also been removed.\ RB_ID=868614

    • finatra-http: Specify HTTP Java API consistently. RB_ID=868264
    • ๐Ÿšš inject-core: Clean up inject.Logging trait. Remove dead code from Logging. RB_ID=868261
    • ๐Ÿ“ฆ finatra-http: Move integration tests to a package under com.twitter.finatra.http. RB_ID=866487

    ๐Ÿ›  Fixed

    * finatra-http: Fix issue with unimplemented methods in
      NonValidatingHttpHeadersResponse. ``RB_ID=868480``
  • v2.3.0 Changes

    โž• Added

    * finatra-thrift: Add non-guice method to add controller to
      ThriftRouter ``RB_ID=863977``
    * ๐Ÿ‘ finatra-thrift: Add support for a "dark" traffic filter in thrift
      routing. Add a Finatra implementation
      of the Finagle AbstractDarkTrafficFilter which sub-classes
      ThriftFilter and will work in the Finatra
      filter chain. This will allow users to play incoming requests to a
      configured "dark" service. ``RB_ID=852338``
    ๐Ÿ”„ Changed
    • ๐ŸŽ finatra-http: Performance improvements from latest micro-benchmarking run.
    • ๐Ÿ’ฅ BREAKING API CHANGE: Removed HttpHeaders#setDate, HttpHeaders#set and HttpHeaders#GMT. RB_ID=865247
    • finatra-thrift: Provide access to statsReceiver argument in ThriftClientFilterBuilder. RB_ID=857286

    ๐Ÿ›  Fixed

    * finatra-http: Add content headers for EmbeddedHttpServer #httpDelete
      and #httpPatch methods. ``RB_ID=862200``