December 2019 Release Notes - Version 19.12.0
The seasons changed and depending on which hemisphere you’re in it’s time to enjoy either the snow ❄️ or the sun ☀️!
- finagle-core, finagle-exp: Add annotations to
DarkTrafficFilter to identify which span
is dark, as well as which light span it correlates with. ba351f4d
- finagle-core: Introduce Trace#traceLocal for creating local spans within a trace context.
Runtime Behavior Changes
- finagle: Upgrade to jackson 2.9.10 and jackson-databind 220.127.116.11 e333c839
- finagle-core: Per-method metrics on MethodBuilder are now created lazily, so if you have
methods that you don’t use, the associated metrics won’t be exported. 6be5dc48
- finagle-mysql: The RollbackFactory no longer attempts to roll back if the underlying
session is closed since it is highly unlikely to succeed. It now simply poisons the
session and calls close. 99135e00
- finagle-netty4: Change the ‘connection_requests’ metric to debug verbosity.
- finagle-serversets: Ensure ZkSession#retrying is resilient to ZK host resolution failure.
- finagle-thrift: Per-method metrics are now created lazily, so if you have methods on a Thrift
service that you don’t use, the associated metrics won’t be exported. 6be5dc48
- finagle-zipkin-core: Tracing produces microsecond resolution timestamps in JDK9 or later.
- finagle-core: Trace#time and Trace#timeFuture no longer generate timestamped annotations or
silently discard timing information. They now instead generate a BinaryAnnotation containing
the timing information. In order to also get timestamped Annotations for when the operation
began and ended, use in conjunction with Trace#traceLocal. 1c6d5d24
Breaking API Changes
- finagle-core: The RetryPolicy companion object is no longer a JavaSingleton.
- finagle-thrift: The RichClientParam constructors are now all either
deprecated, so to construct it, you must call one of the RichClientParam.apply
- finagle-core: Deprecate Tracing#record(message, duration) as it does not have the intended
effect and silently discards any duration information in the resulting trace. Instead you should
use either Tracing#recordBinary or a combination of Trace#traceLocal and Trace#time.
- finagle-core: ClosableService client stack module that prevents the reuse of closed services
when FactoryToService is not set. This is important for clients making use of the newClient
- finatra: Upgrade to jackson 2.9.10 and jackson-databind 18.104.22.168 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.
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.finatra.thrift.modules.DarkTrafficFilterModule ->
- c.t.finatra.thrift.modules.ReqRepDarkTrafficFilterModule ->
- c.t.finatra.thrift.modules.JavaDarkTrafficFilterModule ->
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
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
- 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.
- 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. 113b7d8d
- 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
- 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
- util-stats: Introduces c.t.f.stats.LazyStatsReceiver which ensures that counters and histograms
don’t export metrics until after they have been incred or added at least once. 36d82071
- util-core: Introduce Time#nowNanoPrecision to produce nanosecond resolution timestamps in JDK9
or later. e6f39b07
- util-core: Introduce Future#toCompletableFuture, which derives a CompletableFuture from
a com.twitter.util.Future to make integrating with Java APIs simpler. 26427919
Runtime Behavior Changes
- util: Upgrade to jackson 2.9.10 and jackson-databind 22.214.171.124 c6e3f317
Breaking API Changes
- util-core: The lightly used com.twitter.util.JavaSingleton trait has been removed. It
did not work as intended. Users should provide Java friendly objects, classes, and methods
- util-test: The c.t.logging.TestLogging mixin has been deprecated. Users are encouraged to
move to slf4j for logging and minimize dependencies on com.twitter.logging in general, as
it is intended to be replaced entirely by slf4j. 0dc6641c
- util-core: Future#toJavaFuture incorrectly threw the exception responsible for failing it,
instead of a j.u.c.ExecutionException wrapping the exception responsible for failing it.
- Upgrade to jackson 2.9.10 and jackson-databind 126.96.36.199 acf7e010
- Multiple changes have happened around query parameter retrieval in order
to remove duplicated functionality from Twitter Server that exists in
Finagle. Users are encouraged to use finagle-http’s Uri class within their
own code to retrieve params. b538228c
- The parse method of HttpUtils has been removed.
- The protected getParams method of TwitterHandler has been removed.
- The signature of the getGraceParam method of ShutdownHandler has
been changed to take a Request.
- Add a disableAdminHttpServer property to the AdminHttpServer that can be used to
prevent the AdminHttpServer from starting by default on a TwitterServer. ecef399a
- The ResourceHandler companion object is no longer a JavaSingleton.
- Update ScalaTest to 3.0.8, and ScalaCheck to 1.14.0. d9b1fc04