All Versions
Latest Version
Avg Release Cycle
29 days
Latest Release
36 days ago

Changelog History
Page 1

  • v20.10.0

    October 27, 2020

    โž• Added

    finatra-kafka-streams: Add toCluster DSL call to publish to another Kafka cluster. 449eea1a

    ๐Ÿ‘ jackson: Add support for validating @JsonCreator annotated static (e.g., companion object defined apply methods) or secondary case class constructors. 1c1b55c9

    0๏ธโƒฃ inject-app: Allow injecting flags without default values as both scala.Option and java.util.Optional. b74fe9e9

    ๐Ÿ”„ Changed

    • utils: Undo usage of TypesApi for help in determining if a class is a Scala case class
      ๐Ÿ‘ as this fails for generic case classes in Scala 2.11, failing some supported cases for
      Jackson processing. b1d43381
    • โšก๏ธ utils: Update ClassUtils#simpleName to handle when package names have underscores
      โœ… followed by a number which throws an InternalError. Add tests. bbc0cf7b
    • utils: Revamp ClassUtils#isCaseClass to use the TypesApi for help in determining
      โœ… if a class is a Scala case class. Add tests. bbc0cf7b
    • ๐ŸŒฒ http: The http server did not properly log the bound address on server startup. Fix this
      and make the thrift server consistent. 4410ff38
    • utils: (BREAKING API CHANGE) Rename maybeIsCaseClass to notCaseClass in
      ClassUtils and change the scope of the method. 82ffb4be
    • ๐Ÿ‘ http: Adding support for optionally passing chain in the TLS sever trait. 5bcce35c
    • finatra: Bump version of Joda-Time to 2.10.8. e2cbca30

    ๐Ÿ›  Fixed

    โช finatra-kafka-streams: Revert AsyncTransformer to still use ConcurrentHashMap. 7d5b3ccf

    ๐Ÿšš inject-thrift-client: The Singleton annotation has been removed from the DarkTrafficFilter and the JavaDarkTrafficFilter. It was there in error. 5efc1ab2

    inject-thrift-client: When using RepRepServicePerEndpoint, Finatra's DarkTrafficFilter would throw a NoSuchMethodException when trying to lookup an inherited Thrift endpoint.

  • v20.9.0

    September 25, 2020

    โž• Added

    • โœ… finatra-inject: TestInjector has been reworked to allow users executing modules' lifecycle
      ๐Ÿ— callbacks. Specifically, the TestInjector builder API has been moved under TestInjector.Builder
      โœ… to allow TestInjector extends Injector with two new methods: start() and close().

    ๐Ÿ”„ Changed

    • โšก๏ธ finatra-kafka-streams: Update and separate the Finatra kafka stream code base which has direct
      โฌ†๏ธ dependency on Kafka 2.2. Separate any code which cannot easily be upgraded to separate build
      target. 3c78c34d
    • inject-core: c.t.inject.Injector is now an abstract class. Use Injector.apply to create
      a new instance (versus the new Injector(...) before). 64ba51e9
    • http: Ensure HttpWarmer creates the request exactly the number of times requested and
      mutates the correct objects. 0a3be376
    • kafka: Replaced the com.twitter.finatra.kafka.TracingEnabled toggle with a GlobalFlag enabling
      Zipkin tracing for Kafka clients. 0e829aae
    • finatra: Bump version of Jackson to 2.11.2. 94bc773d

    ๐Ÿ›  Fixed

    • jackson: Fix issue in the handling of unknown properties. The CaseClassDeserializer only
      considered the case where the incoming JSON contained more fields than the case class and
      not the case where the incoming JSON contained less fields than specified in the case class.
      ๐Ÿ›  This has been fixed to ensure that when the fields of the JSON do not line up to the
      non-ignored case class fields the handling of unknown properties is properly invoked.
    • validation: c.t.f.validation.Validator would throw an IndexOutOfBoundsException when
      trying to validate a case class which contained additional fields that are not included in the
      constructor parameters. bb342c09
  • v20.8.1

    August 25, 2020

    โž• Added

    * thrift: `JavaThriftRouter` now allows mounting controllers by value (as opposed to via DI).
    * โฑ finatra-kafka: Expose delivery timeout duration in KafkaProducerConfig. ``PHAB_ID=D535761``
    ๐Ÿ”„ Changed
    • ๐Ÿšš inject-core: Remove deprecated com.twitter.inject.Mockito trait. Users are encouraged to switch to the com.twitter.util.mock.Mockito trait from util/util-mock. PHAB_ID=D529174

    ๐Ÿ›  Fixed

    * inject-server: Ensure `Awaiter.any` does not try to block on an empty list of Awaitables. Add
      tests. ``PHAB_ID=D537727``
    * finatra-jackson: Fix bugs around generic case class deserialization involving other generic
      types. Reported (with reproduction and pointers) on GitHub by @aatasiei
      ( Fixes #547. ``PHAB_ID=D532768``
    * ๐Ÿ“œ finatra-jackson: Fix a bug preventing JSON parsing of generic case classes, which in turn, contain
      fields with generic case classes. Reported (with a thorough reproducer and an analysis) on GitHub
      by @aatasiei ( Fixes #548. ``PHAB_ID=D531452``
  • v20.8.0

    August 11, 2020

    โž• Added

    * โœ… inject-app: Add more Java-friendly constructors for the TestInjector. ``PHAB_ID=D520900``
    ๐Ÿ”„ Changed
    • inject-modules: Improve Java usability: rename apply to get for StatsReceiverModule and LoggerModule. Add get methods for other TwitterModule singleton objects. (BREAKING API CHANGE) PHAB_IB=D525696

    • โœ… inject-core: Deprecate c.t.inject.Resettable (no replacement) and c.t.inject.TestTwitterModule. Users should prefer the #bind[T] DSL over usage of the TestTwitterModule. PHAB_ID=D520889

    ๐Ÿ›  Fixed

    * inject-server: Fix EmbeddedTwitterServer to return `StartupTimeoutException` when server under
      test fails to start within max startup time. ``PHAB_ID=D519318``
  • v20.7.0

    July 22, 2020


    โž• Added

    • inject-app: Adding flag converters for (including comma-separated variants).
    • finatra-kafka-streams: Added TracingKafkaClientSupplier to provide TracingKafkaProducer and
      TracingKafkaConsumer to enable Zipkin tracing. Tracing can be enabled with the toggle
      com.twitter.finatra.kafka.TracingEnabled. fd2c5e0d
    • finatra-kafka: Added TracingKafkaProducer and TracingKafkaConsumer to enable Zipkin tracing
      ๐Ÿ— for Kafka. and FinagleKafkaConsumerBuilder.buildClient()
      now return instances of TracingKafkaProducer and TracingKafkaConsumer respectively with
      0๏ธโƒฃ tracing enabled by default. Tracing can be enabled with the toggle
      com.twitter.finatra.kafka.TracingEnabled. d0d8a060

    ๐Ÿ”„ Changed

    โšก๏ธ finatra: Update org.scalatest dependency to 3.1.2 and introduce finer-grained dependencies on
    โœ… org.scalatestplus artifacts. ceccb7c5 fbb7b535

    ๐Ÿšš inject-thrift-client: Remove unused ClientId property from
    ThriftMethodBuilderClientModule#provideServicePerEndpoint method. 381853f8

    inject-server: Improve startup time of EmbeddedTwitterServer by observing lifecycle events to
    determine startup, where previously we were doing 1 second polls. The nonInjectableServerStarted
    ๐Ÿšš property is removed and isStarted should be referenced regardless of the type of underlying
    ๐Ÿ‘€ twitterServer type. The end result should see a faster test execution feedback loop. Our Finatra
    โœ… test targets range from a roughly 2x to 10x reduction in execution times.

    โœ… You may experience new test failures in cases where an exception is thrown as part of
    โœ… c.t.inject.TwitterServer.start() or c.t.server.TwitterServer.main() and the test would have
    expected a failure as part of startup. As the error takes place after the startup lifecycle,
    you may now need to Await.result the EmbeddedTwitterServer.mainResult() to assert the error.

    ๐Ÿ’… You may also experience some new non-deterministic behavior when testing against PubSub style
    โœ… logic. As the server may be started earlier, your tests may be relying on assumptions that
    ๐Ÿ“Š an event would have occurred within the previous 1 second startup poll, which is no longer
    โœ… guaranteed. You may need to adjust your test logic to account for this behavior.


    โšก๏ธ finatra: Update dependency to 4.2.3 and net.codingwell.scala-guice
    to version 4.2.11. The net.codingwell.scala-guice library has switched from Manifests to TypeTags
    ๐Ÿšš for transparent binding and injector key creation. The c.t.inject.TwitterModule has moved from its
    custom bind DSL to the scalaguice.ScalaModule which brings the TwitterModule inline with both the
    โœ… TwitterPrivateModule and the bind[T] test DSL to now have the same consistent binding DSL across
    all three. Thus, there is no more confusing bindSingleton function in the TwitterModule bind API.

    โฌ†๏ธ Upgrading scalaguice helps move a necessary dependency of Finatra to a version which is Scala 2.13
    ๐Ÿ‘ compatible moving Finatra closer to Scala 2.13 support. 26c1e810 5faa2e6f

    ๐Ÿ›  Fixed

    • inject-app: Having two sets of flag converters for primitive types (both Java and Scala) confuses
      the DI runtime, preventing the injection. We now have only a single set of converters, based off
      Scala primitive types. 9c1b0d68
  • v20.6.0

    June 24, 2020

    โž• Added

    • inject-app: You can now inject Flag values of any type (not just primitive types). Most of the
      ๐Ÿ‘ common Flag types are already supported out of the box (e.g., Seq[InetSocketAddress]), but it's
      also possible to register your own converters derived from any Flaggable instance.
    • ๐Ÿšš inject-stack: Move StackTransformer from inject/inject-core to inject/inject-stack to
      โœ‚ remove the finagle-core dependency from inject/inject-core. 554e367e
    • โœ… inject-server: adding httpPostAdmin test method. 067b45cf

    ๐Ÿ”„ Changed

    • ๐ŸŒฒ thrift/http: Introduce a Common Log Format
      ๐ŸŒฒ type of formatting for Thrift access logging to replace the current prelog text. Ensure
      ๐ŸŒฒ the HTTP and Thrift access logging filters are aligned in functionality and behavior.
    • ๐Ÿšš inject-slf4j: Remove Jackson dependency. Case classes which wish to use the slf4j Logging
      functionality should use the finatra/jackson c.t.finatra.jackson.caseclass.SerdeLogging
      ๐ŸŒฒ trait which provides a @JsonIgnoreProperties to ignore logging fields. 70111cd8
  • v20.5.0

    May 19, 2020

    โž• Added

    * ๐Ÿšš inject-mdc: Move MDC integration from `inject/inject-slf4j` to `inject/inject-mdc`.
    * โšก๏ธ finatra-http|finatra-thrift: Update TraceIdMDCFilter to log traceSampled and traceSpanId
    * finatra-examples: Ensure there are Java and Scala examples for the different
      types of applications and servers which can be built with Finatra. Update `/examples`
      directory layout for discoverability and consistency. ``PHAB_ID=D469677``
    ๐Ÿ”„ Changed
    • ๐Ÿšš inject-slf4j: Move MDC integration from inject/inject-slf4j to inject/inject-mdc. PHAB_ID=D485870

    • finatra-http: Allow extensions of the c.t.finatra.http.filters.HttpResponseFilter to specify how to set the Location Header value into a Response. Additionally, don't allow exceptions resulting from the inability to set a non-compliant 'Location' response header escape the filter. PHAB_ID=D483793

    • inject-core: Make flag methods in c.t.inject.TwitterModule public an final. PHAB_ID=D484168

    • ๐Ÿ—„ inject-core: c.t.inject.Mockito has been marked deprecated. Users are encouraged to prefer mockito-scala <>_ (or ScalaTest MockitoSugar <>_ which provides some basic syntax sugar for Mockito). PHAB_ID=D482531

    • โšก๏ธ http: (BREAKING API CHANGE) Update the c.t.finatra.http.HttpResponseFilter to optionally fully qualify response 'Location' header values. A previous change <>_ made the filter always attempt to fully qualify any response 'Location' header value. This updates the logic to be opt-in for the more strict returning of fully qualified 'Location' header values with the default being to allow relative values per the RFC7231 <>_ which replaces the obsolete RFC2616 <>_. This is thus a breaking API change as the default is now to allow relative values. To enable the previous strict behavior, users should instantiate the filter with the constructor arg fullyQualifyLocationHeader set to 'true'. This addresses issue #524. PHAB_ID=D467909

    • ๐Ÿšš jackson: Remove deprecated FinatraObjectMapper and FinatraJacksonModule. Users are encouraged to switch to the equivalent c.t.finatra.jackson.ScalaObjectMapper and c.t.finatra.jackson.modules.ScalaObjectMapperModule. PHAB_ID=D473177

    • โšก๏ธ finatra-http: Update c.t.finatra.http.StreamingJsonTestHelper to not use Thread.sleep for writing JSON elements on an artificial delay. PHAB_ID=D470793

    • ๐Ÿšš inject-app: Remove finagle-core dependency. Introduce finatra/inject/inject-dtab. PHAB_ID=D474298

    • finatra: Bump version of Jackson to 2.11.0. PHAB_ID=D457496

    • finatra-http: Only create EnrichedResponse counters when needed. Any "service/failure" response counters will only be generated upon first failure and not eagerly for each response generated. This change impacts users who expect a counter value of 0 when no response failures have been encountered - now the counter will not exist until the first failure has been recorded. PHAB_ID=D474918

    • finatra: Bump version of Joda-Time to 2.10.6. PHAB_ID=D473522

    ๐Ÿ›  Fixed

    * inject-thrift-client: Convert non-camel case `ThriftMethod` names, e.g., "get_tweets" to
      camelCase, e.g., "getTweets" for reflection lookup of generated `ReqRepServicePerEndpoint`
      interface methods in `c.t.inject.thrift.filters.DarkTrafficFilter`. ``PHAB_ID=D478104``
  • v20.4.1

    April 26, 2020

    โž• Added

    * 0๏ธโƒฃ inject-app: Add default type conversions for `java.time.LocalTime`, `c.t.util.Time`,
      ``, and `c.t.util.StorageUnit`. This allows the injector to convert from
      a String representation to the given type. The type conversion for ``
      uses the `` implementation and the type conversion for
      `c.t.util.Time` uses the `` implementation for consistency with Flag parsing.
      Because of the current state of type erasure with `` instances, Finatra currently binds
      a parsed `` value as a String type, relying on registered Guice TypeConverters to convert
      from the bound String type to the requested type. These conversions now allow for a ``
      defined over the type to be injected by the type as Guice now has a type conversion from the bound
      String type rather than as a String representation which then must be manually converted.
    * โœ… finatra-http: Method in tests to return an absolute path URI with the https scheme and authority
    * โœ… finatra: Java-friendly `bindClass` test APIs. The `bindClass` API calls from Java can be
      now chained with the `TestInjector`, `EmbeddedApp`, `EmbeddedTwitterServer`,
      `EmbeddedThriftServer`, and `EmbeddedHttpServer`. For example, the following is now possible:

    EmbeddedHttpServer server = new EmbeddedHttpServer( new HelloWorldServer(), Collections.emptyMap(), Stage.DEVELOPMENT) .bindClass(Integer.class, Flags.named("magic.number"), 42) .bindClass(Integer.class, Flags.named("module.magic.number"), 9999);

    return server;

    ๐Ÿ”„ Changed
    • inject-app: Introduce consistent creation methods for Java. Bring HTTP and Thrift server traits inline with each other to provide consistent Java support. Ensure Java examples in documentation. PHAB_ID=D471716

    • โšก๏ธ inject-core: Update the configuration of instances created within a c.t.inject.TwitterModule to have failFastUntilParsed set to 'true' by default. While this is configurable for a given c.t.inject.TwitterModule, much like for the application itself, it is STRONGLY recommended that users adopt this behavior. PHAB_ID=D448047

    • โšก๏ธ inject-app: Update to always add the InjectorModule. PHAB_ID=D465943

    • inject-app: Reduce visibility of internal code in PHAB_ID=D465597

    • โšก๏ธ inject-modules: Updated BUILD files for Pants 1:1:1 layout. PHAB_ID=D442977

    ๐Ÿ›  Fixed

    * finatra-kafka: Close a result observer when Namer.resolve fails. ``PHAB_ID=D416044``
  • v20.4.0

    April 02, 2020

    โž• Added

    inject-app: Add Java-friendly main to EmbeddedApp. 4b40075d

    โฑ finatra-kafka: Expose timeout duration in KafkaProducerConfig dest(). c5340a97

    ๐Ÿ”„ Changed

    • finatra-validation|jackson: (BREAKING API CHANGE) Introduced new case class validation library
      inspired by JSR-380 specification. The new library can be used as its own to validate field and
      method annotations for a case class. The library is also automatically integrated with Finatra's
      custom CaseClassDeserializer to efficiently apply per field and method validations as request
      ๐Ÿ“œ parsing is performed. However, Users can easily turn off validation during request parsing with
      ๐Ÿ”ง the setting noValidation in their server configurations. For more information, please checkout
      Finatra User's Guide <>__.
  • v20.3.0

    March 08, 2020

    โž• Added

    โœ… finatra-kafka-streams: Add method to c.t.f.kafkastreams.test.TopologyTesterTopic to write
    Kafka messages with custom headers to topics. a9fef3dc

    finatra-http: Add toBufReader to get the underlying Reader of Buf from StreamingResponse.
    If the consumed Stream primitive is not Buf, the returned reader streams a serialized
    JSON array. 876d0ba9

    ๐Ÿ‘ inject-app: Add functions to to provide better
    ergonomics for Java users to call and use basic App lifecycle callbacks.

    inject-server: Add functions to c.t.inject.server.AbstractTwitterServer to provide
    ๐Ÿ‘ better ergonomics for Java users to call and use basic TwitterServer lifecycle
    callbacks. f04772df

    inject-slf4j: Add a way to retrieve the currently stored Local Context map backing the
    MDC. 12b9410e

    ๐Ÿ‘ finatra-jackson: Added new functionality in the CaseClassDeserializer to support more
    ๐Ÿ“š Jackson annotations during deserialization. See documentation for more information.

    โœ… finatra: Add NullKafkaProducer for unit tests to avoid network connection failures in the log.

    ๐Ÿ”„ Changed

    ๐Ÿšš finatra-validation|jackson: Remove Jackson dependency from finatra/validation. This
    ๐Ÿšš was for ErrorCode reporting but can be moved to finatra/jackson. f024f929

    โšก๏ธ finatra-kafka-streams: (BREAKING API CHANGE) Update AsyncTransformer to preserve
    record context. be5dd08f

    ๐Ÿ‘ finatra-jackson: Better handling of Scala enumeration mapping errors. Currently, if mapping
    of a Scala enumeration during deserialization fails a java.util.NoSuchElementException is
    โšก๏ธ thrown which escapes deserialization error handling. Update to instead handle this failure case
    in order to correctly translate into a CaseClassFieldMappingException which will be wrapped
    into a CaseClassMappingException. 4753c6e8

    โšก๏ธ finatra: Update Google Guice version to 4.2.0 76506c35

    finatra: Bumped version of Joda to 2.10.2 and Joda-Convert to 1.5. 9adef421

    ๐Ÿšš finatra-jackson|finatra-http-annotations: Move http-releated Jackson "injectablevalues"
    annotations from finatra/jackson to finatra/http-annotations.

    ๐Ÿ“ฆ Specifically the follow have changed packages,
    c.t.finatra.request.QueryParam --> c.t.finatra.http.annotations.QueryParam
    c.t.finatra.request.RouteParam --> c.t.finatra.http.annotations.RouteParam
    c.t.finatra.request.FormParam --> c.t.finatra.http.annotations.FormParam
    c.t.finatra.request.Header --> c.t.finatra.http.annotations.Header
    c.t.finatra.request.JsonIgnoreBody --> c.t.finatra.http.annotations.JsonIgnoreBody

    โšก๏ธ Users should update from finatra/jackson/src/main/java (finatra-jackson_2.12)
    to finatra/http-annotations/src/main/java (finatra-http-annotations_2.12).

    โšก๏ธ finatra-jackson: Updated Finatra Jackson integration to introduce a new ScalaObjectMapper
    ๐Ÿ“š and module to simplify configuration and creation of the mapper. See documentation for more
    information. 49014890

    ๐Ÿšš finatra-jackson: (BREAKING API CHANGE) Moved the java binding annotations, CamelCaseMapper and
    SnakeCaseMapper from c.t.finatra.annotations in finatra/jackson to
    ๐Ÿšš c.t.finatra.json.annotations in finatra/json-annotations. Moved
    c.t.finatra.response.JsonCamelCase to c.t.finatra.json.annotations.JsonCamelCase which is also
    ๐Ÿ—„ now deprecated. Users are encouraged to use the standard Jackson annotations or a mapper with
    ๐Ÿ”ง the desired property naming strategy configured.

    Many exceptions for case class deserialization were meant to be internal to the framework but are
    ๐Ÿ‘‰ useful or necessary outside of the internals of JSON deserialization. As such we have cleaned up
    ๐Ÿšš and made most JSON deserialization exceptions public. As a result, all the exceptions have been moved
    from c.t.finatra.json.internal.caseclass.exceptions to c.t.finatra.jackson.caseclass.exceptions.

    c.t.finatra.json.internal.caseclass.exceptions.CaseClassValidationException has been renamed to
    c.t.finatra.jackson.caseclass.exceptions.CaseClassFieldMappingException. JsonInjectException,
    ๐Ÿ‘ JsonInjectionNotSupportedException, and RequestFieldInjectionNotSupportedException have all been
    โœ‚ deleted and replaced with c.t.finatra.jackson.caseclass.exceptions.InjectableValuesException
    which represents the same error cases.

    ๐Ÿšš The FinatraJsonMappingException has been removed. Users are encouraged to instead use the general
    Jackson JsonMappingException (which the FinatraJsonMappingException extends).

    ๐Ÿšš RepeatedCommaSeparatedQueryParameterException has been moved tom finatra/http.

    ๐Ÿ›  Fixed

    ๐Ÿ‘ finatra-jackson: Access to parameter names via Java reflection is not supported in Scala 2.11.
    โž• Added a work around for the parsing of case class structures to support JSON deserialization in
    Scala 2.11 and forward. 59ec2c21

    finatra-jackson: Fix for enforcing "fail on unknown properties" during deserialization. Previously,
    โšก๏ธ the CaseClassDeserializer was optimized to only read the fields in the case class constructor
    from the incoming JSON and thus ignored any unknown fields during deserialization. The fix will
    ๐Ÿ”ง now properly fail if the DeserializationFeature is set or if the JsonProperties is configured
    accordingly. 49014890