Finatra v19.12.0 Release Notes

Release Date: 2019-12-13 // over 4 years ago
  • ๐Ÿ”„ Changed

    โฌ†๏ธ finatra: Upgrade to jackson 2.9.10 and jackson-databind 2.9.10.1 14fc3714

    finatra: Correctly track Ignorable Exceptions in per-method StatsFilter. Responses
    marked as Ignorable are tracked in the global requests and exceptions metrics but
    were not counted under the per-method metrics. There are now counts of ignored
    ๐Ÿ‘ป and total requests as well as ignored requests by Exception for each method. E.g.

    per_method_stats/foo/ignored 1
    per_method_stats/foo/ignored/java.lang.Exception 1
    per_method_stats/foo/requests 1

    80946f4d

    ๐Ÿšš finatra-http|jackson (BREAKING API CHANGE): Move parsing of message body contents
    ๐Ÿ“œ from finatra/jackson via the FinatraObjectMapper #parseMessageBody, #parseRequestBody,
    ๐Ÿ“œ and #parseResponseBody methods to finatra/http with functionality replicated via an
    โšก๏ธ implicit which enhances a given FinatraObjectMapper. Additionally we have updated
    finatra-http the MessageBodyComponent API to use c.t.finagle.http.Message instead
    of c.t.finagle.http.Request and c.t.finagle.http.Response. This means that users can use the
    MessageBodyComponent API to read the body of Finagle HTTP requests or responses and all HTTP
    concerns are co-located in finatra-http instead of being partially implemented in finatra-jackson.

    โšก๏ธ In updating the MessageBodyComponent API we have removed support for polymorphic MessageBodyReader
    ๐Ÿ“œ types, that is we have simplified the MessageBodyReader API to no longer express the #parse
    ๐Ÿ“œ method parameterized to a subtype of the class type. This API allowed parsing a message body
    into a subtype solely through the presence of a given type parameter but the resulting API has
    proven to be extremely clunky. We feel that the same behavior is achievable in other ways (such
    ๐Ÿ“œ as adapting the type after parsing) and the improvement and simplification of the
    MessageBodyReader API to be worth removing the awkward method signature.

    ๐Ÿ›  Lastly, we have fixed the returned charset encoding on response content-type header to be
    applicable only where appropriate instead of always being added when the
    http.response.charset.enabled flag is set to true. 4c6283b2

    ๐Ÿšš finatra: (BREAKING API CHANGE) move DarkTrafficFilter and related modules
    from finatra/thrift to inject/inject-thrift-client. The modules now extend
    ๐Ÿ”ง from c.t.inject.thrift.modules.ThriftClientModuleTrait for more uniform configuration.
    The following changes were made:

    • c.t.finatra.thrift.filters.DarkTrafficFilter ->
      c.t.inject.thrift.filters.DarkTrafficFilter
    • c.t.finatra.thrift.modules.DarkTrafficFilterModule ->
      c.t.inject.thrift.modules.DarkTrafficFilterModule
    • c.t.finatra.thrift.modules.ReqRepDarkTrafficFilterModule ->
      c.t.inject.thrift.modules.ReqRepDarkTrafficFilterModule
    • c.t.finatra.thrift.modules.JavaDarkTrafficFilterModule ->
      c.t.inject.thrift.modules.JavaDarkTrafficFilterModule

    a8e54f34

    โšก๏ธ finatra: Update Google Guice version to 4.1.0, update ScalaTest to 3.0.8, and ScalaCheck
    to 1.14.0. 1bc3e889

    ๐Ÿšš finatra-http: Remove deprecated c.t.finatra.http.HttpHeaders. Users should use
    com.twitter.finagle.http.Fields instead. e9e5d4e2

    ๐Ÿšš finatra-http: Remove deprecated DocRootModule. 6163e7f7

    ๐Ÿšš finatra-http: (BREAKING CHANGE) Remove automatic handling of Mustache rendering from
    ๐Ÿ‘ finatra/http and break Mustache support into two separate libraries: finatra/mustache
    and finatra/http-mustache.

    HTTP services that want the framework to automatically negotiate Mustache template rendering
    via the Finatra HTTP MessageBodyComponents framework must now bring this concern into their
    HTTP services via the finatra/http-mustache c.t.finatra.http.modules.MustacheModule as the
    ๐Ÿšš HTTP framework support for specifying a MustacheModule in the HttpServer has been removed.
    I.e., add this module to the server's list of modules.

    โž• Additionally, it is also now possible to use Mustache templating completely independent of
    Finatra HTTP concerns by consuming and using only the finatra/mustache library which will
    render Strings via defined Mustache templates. e6aaa19f

    ๐Ÿ›  Fixed

    • 0๏ธโƒฃ finatra-http: Fixed issue in the DefaultMessageBodyReaderImpl that determines if the incoming
      message is "json encoded". c1f1a093
    • ๐Ÿšš inject-modules: Removed the extra registration for closing a client, which used to log false
      โš  warnings when startup a ClientModule. Only register close after materialized clients.
      ddda0b12
    • inject-server: Addressed a race condition that could allow for an AdminHttpServer to be
      started, even when the disableAdminHttpServer property was set. The AdminHttpServer will
      no longer start prior to the warm-up phase if disabled. The disableAdminHttpServer property
      ๐Ÿšš has also been moved to com.twitter.server.AdminHttpServer. 113b7d8
    • ๐Ÿ— finatra: Remove com.sun.activation dependency from build.sbt file. The dependency
      duplicates the javax.activation dependency and as a result can cause a uber-JAR to fail
      ๐Ÿ— to build. fd67b836

    โž• Added

    • ๐Ÿšš finatra-jackson: (BREAKING API CHANGE) Move all Case Class annotation validation related logic to
      โšก๏ธ a new library in finatra-validation. Please update your library dependencies to the new library if
      you are using case class validations. ba5a0451