Changelog History
Page 2
-
v21.7.0 Changes
๐ Fixed
* โ inject-core: Fixed a bug where `c.t.inject.TestMixin#assertFailedFuture` would incorrectly pass for non-failed `c.t.util.Future` in some cases where the tested failure is a supertype of `org.scalatest.exceptions.TestFailedException`. ``PHAB_ID=D705002`` ๐ฅ Breaking API Change
๐ inject-utils: Removed deprecated
c.t.inject.conversions.string
, usec.t.conversions.StringOps
in the util/util-core project instead.PHAB_ID=D692729
๐ inject-utils: Removed deprecated
c.t.inject.conversions.tuple
, usec.t.conversions.TupleOps
in the util/util-core project instead.PHAB_ID=D692429
๐ inject-utils: Removed deprecated
c.t.inject.conversions.seq
, usec.t.conversions.SeqOps
in the util/util-core project instead.PHAB_ID=D692775
๐ inject-utils: Removed implicit class RichMap from
c.t.inject.conversions.map
, usec.t.conversions.MapOps
in the util/util-core project instead.PHAB_ID=D699010
๐ Changed
* โก๏ธ finatra: Update ScalaCheck to version 1.15.4 ``PHAB_ID=D691691``
-
v21.6.0 Changes
๐ Changed
* ๐ inject-thrift-client (BREAKING API CHANGE): Removed the deprecated `c.t.inject.thrift.modules.FilteredThriftClientModule`. Please use its successor `c.t.inject.thrift.modules.ThriftMethodBuilderClientModule` for per-method configuration of a Thrift client. ``PHAB_ID=D687663`` * thrift: Add `service_class` to Finatra library thrift registry entry. ``PHAB_ID=D687117`` * โก๏ธ finatra (BREAKING API CHANGE): Update to use the new util/util-jackson `ScalaObjectMapper` for case class object mapping. We've removed the custom Finatra `c.t.finatra.jackson.ScalaObjectMapper` and instead now use the `c.t.util.jackson.ScalaObjectMapper`. Since the `c.t.util.jackson.ScalaObjectMapper` does not support `Joda-Time <https://www.joda.org/joda-time/>`__, backwards compatibility is maintained through usage of the Finatra `ScalaObjectMapperModule` for obtaining a configured `ScalaObjectMapper` which will be created with Joda-Time support, though support for Joda-Time in Finatra is deprecated and users should expect for Joda-Time support to be removed in an upcoming release. Users should prefer to use the JDK 8 `java.time` classes or `java.util.Date`. The finatra/inject `c.t.inject.domain.WrappedValue` has been removed and users should update to the util/util-core `c.t.util.WrappedValue` instead. The finatra/jackson JsonDiff utility is also removed. Users should switch to the improved version in util/util-jackson: `c.t.util.jackson.JsonDiff`. With the move to the util/util-jackson `ScalaObjectMapper` we're also able to clean up some awkward directory structures in Finatra which were necessary because of dependencies. Specifically, the `finatra/json-annotations` library no longer exists, as `@InjectableValue` is now an annotation in `util/util-jackson-annotations`, and the remaining binding annotations `@CamelCaseMapper` and `@SnakeCaseMapper` have been moved into `finatra/jackson`. Using the util/util-jackson `ScalaObjectMapper` also brings `Java 8 date/time <https://www.oracle.com/technical-resources/articles/java/jf14-date-time.html>`__ (JSR310) support via inclusion of the Jackson `JavaTimeModule <https://github.com/FasterXML/jackson-modules-java8/tree/master/datetime>`__ by default. Lastly, we've also added the `YamlScalaObjectMapperModule` which can be used in place of the `ScalaObjectMapperModule` in order to provide a `YAMLFactory` configured `ScalaObjectMapper`. ``PHAB_ID=D664955`` * ๐ inject-utils: Remove deprecated `c.t.inject.utils.StringUtils`. Users should prefer to use the corresponding methods in `com.twitter.conversions.StringOps` from util/util-core, instead. ``PHAB_ID=D684659`` * ๐ inject-utils: Remove deprecated `c.t.inject.utils.AnnotationUtils`. Users should instead prefer `c.t.util.reflect.Annotations` from util/util-reflect. ``PHAB_ID=D684662``
-
v21.5.0 Changes
๐ Fixed
* finatra-jackson: Do not enforce `CaseClassDeserializer` deserialization semantics for a field until after any deserializer annotation has been resolved. This fully allows a deserializer to specify how to deserialize a field completely independent of the `CaseClassDeserializer` requirements for fields. For example, if a user wanted to allow parsing of a JSON `null` value into a `null` field instance value, they could define a custom deserializer to do so and annotate the case class field with `@JsonDeserialize(using = classOf[CustomNullableDeserializer])`. Additionally, we've fix a bug in how String case class fields are handled when the incoming JSON is not a String-type. The current code incorrectly returns an empty string when the field value is parsed into Jackson ContainerNode or ObjectNode types and an incorrect `toString` representation for a PojoNode type. We now correctly represent the field value as a string in these cases to deserialize into the case class field. ``PHAB_ID=D676938`` * finatra-jackson: Properly handle Scala enumeration fields wrapped in an `Option` during deserialization failures in the `CaseClassDeserializer#isScalaEnumerationType` method. ``PHAB_ID=D665062`` ๐ Changed
๐ finatra-kafka: Deprecate
c.t.finatra.kafka.consumers.TracingKafkaConsumer
as it only produced single-span traces and there is no way to propagate theTraceId
back to the caller without changing the entire API. Users should use thec.t.finatra.kafka.consumers.KafkaConsumerTracer.trace
method instead to enable tracing for Kafka Consumers. Also addedc.t.finatra.kafka.producers.KafkaProducerTraceAnnotator
andc.t.finatra.kafka.consumers.KafkaConsumerTraceAnnotator
services which will can be used to add custom trace annotations to the producer and consumer spans.PHAB_ID=D649655
โก๏ธ finatra (BREAKING API CHANGE): Update to use the new util/util-validator
ScalaValidator
for case class field validations. We've removed the custom Finatrac.t.finatra.validation.Validator
and instead now use thec.t.util.validation.ScalaValidator
. Constraint annotations and validator implementations now use the standardjakarta.validation
API interface classes instead of any custom Finatra types. We've deprecated the custom Finatra constraints as they are duplicative of already existing "standard" or otherwise provided constraints and validators. Additionally,c.t.finatra.validation.ErrorCode
is deprecated with no replacement. The same data carried can be obtained via the standardjakarta.validation.ConstraintViolation[T]
.
Adapting the Finatra framework to use the util/util-validator also includes the framework Jackson integration. We're also taking this opportunity to clean up the error reporting interface of the
CaseClassFieldMappingException
to define aCaseClassFieldMappingException.Reason
type to replace the usage of the (removed)ValidationResult.Invalid
type. TheReason
carries a message String as well as aCaseClassFieldMappingException.Detail
which can be one of several possible types including aCaseClassFieldMappingException.ValidationError
which carries any failed validation information including the emittedConstraintViolation[T]
.Lastly, we are deprecating support for JSON serialization/deserialization of JodaTime fields in case classes. This support will be dropped in an upcoming release. Users should prefer to use the JDK 8
java.time
classes and we will be adding support for these types in the Finatra Jackson integration in the future.PHAB_ID=D659556
- finatra-jackson: (BREAKING API CHANGE) JsonLogging should use the lazy Scala SLF4J logger
and no longer return the passed in argument that's logged as JSON.
PHAB_ID=D563699
-
v21.4.0 Changes
๐ Changed
* ๐ http-core: Add support to build a multipart/form-data POST request in Finatra RequestBuilder. ``PHAB_ID=D648869`` * โก๏ธ finatra-kafka-streams: Update AsyncTransformer to support threadpools. ``PHAB_ID=D611608`` * 0๏ธโฃ finatra-kafka-streams: Set kafka.producer.acks=all by default ``PHAB_ID=D643266``
-
v21.3.0 Changes
โ Added
* ๐ง inject-thrift-client: Add per-method retry configuration withMaxRetries in `com.twitter.inject.thrift.ThriftMethodBuilder` for customizing `configureServicePerEndpoint`. ``PHAB_ID=D619565`` ๐ Changed
๐ finatra (BREAKING API CHANGE): Deprecate
c.t.inject.utils.AnnotationUtils
, users should instead usec.t.util.reflect.Annotations
fromcom.twitter:util-reflect
. Deprecatec.t.finatra.utils.ClassUtils
, users should instead use eitherc.t.util.reflect.Classes#simpleName
,c.t.util.reflect.Types#isCaseClass
orc.t.util.reflect.Types#notCaseClass
fromcom.twitter:util-reflect
.PHAB_ID=D638655
๐ finatra (BREAKING API CHANGE): Builds are now only supported for Scala 2.12+
PHAB_ID=D631091
โช finatra: Revert to scala version 2.12.12 due to https://github.com/scoverage/sbt-scoverage/issues/319
PHAB_ID=D635917
finatra: Bump scala version to 2.12.13
PHAB_ID=D632567
๐ finatra: Move com.twitter.finatra.http.{jsonpatch,request} from the finatra/http-server project to finatra/http-core project. Please update your build artifact references accordingly.
PHAB_ID=D623745
โก๏ธ http-server|http-core|jackson|thrift|validation: Update to use
c.t.util.reflect.Types
in places for TypeTag reflection.PHAB_ID=D631819
๐ finatra: Move c.t.finatra.http.{context,exceptions,response} from the finatra/http-server project to finatra/http-core project. Please update your build artifact references accordingly.
PHAB_ID=D631772
๐ finatra: Move c.t.finatra.http.streaming from the finatra/http-server project to finatra/http-core project. Please update your build artifact references accordingly.
PHAB_ID=D631371
๐ http-core: Introduce
c.t.finatra.http.marshalling.MessageBodyManager#builder
for creating an immutablec.t.finatra.http.marshalling.MessageBodyManager
. The MessageBodyManager's constructor is now private.PHAB_ID=D621755
๐ http-server: Move
c.t.finatra.http.modules.MessageBodyFlagsModule
toc.t.finatra.http.marshalling.modules.MessageBodyFlagsModule
.PHAB_ID=D626600
๐ validation: Remove deprecated constraint type aliases under
com.twitter.finatra.validation
, users should prefer the actual constraint annotations atcom.twitter.finatra.validation.constraints
.PHAB_ID=D625174
๐ jackson: Remove deprecated
com.twitter.finatra.json.utils.CamelCasePropertyNamingStrategy
, users should prefer to usePropertyNamingStrategy#LOWER_CAMEL_CASE
or an equivalent directly. Also remove the deprecatedcom.twitter.finatra.json.annotations.JsonCamelCase
, users should use the@JsonProperty
or@JsonNaming
annotations or an appropriately configured JacksonPropertyNamingStrategy
instead.PHAB_ID=D623807
inject-core: (BREAKING API CHANGE) Rename
c.t.inject.TwitterModule.closeOnExit
toonExit
so it mirrors the API fromc.t.inject.App
.PHAB_ID=D621095
๐ http-client: Remove deprecated c.t.finatra.httpclient.modules.HttpClientModule. Use c.t.finatra.httpclient.modules.HttpClientModuleTrait instead.
PHAB_ID=D619591
๐ http-client: Remove deprecated c.t.finatra.httpclient.RichHttpClient. Use c.t.finagle.Http.Client or c.t.finatra.httpclient.modules.HttpClientModuleTrait instead. Additionally,
c.t.finatra.httpclient.modules.HttpClientModule.provideHttpService
has been removed. Usec.t.finatra.httpclient.modules.HttpClientModuleTrait.newService(injector, statsReceiver)
instead.PHAB_ID=D619547
๐ finatra: Move c.t.finatra.http.fileupload from the finatra/http-server project to finatra/http-core project. Please update your build artifact references accordingly.
PHAB_ID=D620478
๐ http-client: Remove deprecated method
get
from c.t.finatra.httpclient.HttpClient. Use HttpClient'sexecute
instead.PHAB_ID=D618904
finatra: Create the finatra/http-core project, which is meant to contain common artifacts for the finatra/http-server and finatra/http-client project. As part of this change, the
com.twitter.finatra.httpclient.RequestBuilder
has been deprecated and should be updated to referencecom.twitter.finatra.http.request.RequestBuilder
.
โก๏ธ finatra: Rename the finatra/httpclient project to finatra/http-client. Please update your build artifact references (i.e. SBT, Maven) to use "finatra-http-client".
PHAB_ID=D617614
0๏ธโฃ kafkaStreams: Switch the default Kafka client and Kafka Stream client to version 2.4.1.
PHAB_ID=D606782
โก๏ธ finatra: Rename the finatra/http project to finatra/http-server. Please update your build artifact references (i.e. SBT, Maven) to use "finatra-http-server". See the
Finatra User's Guide <https://twitter.github.io/finatra/user-guide/index.html>
__PHAB_ID=D616257
-
v21.2.0 Changes
๐ Changed
* ๐ finatra: all subprojects cross-building with 2.13.1. ``PHAB_ID=D613483`` * ๐ kafkaStreams: Enables cross-build for 2.13.1 for projects kafkaStreamsStaticPartitioning, kafkaStreamsPrerestore, and kafkaStreamsQueryableThrift. ``PHAB_ID=D608958``
-
v21.1.0 Changes
๐ Changed
* ๐ kafka: Enables cross-build for 2.13.1. Note that kafka 2.5 is bundled with scala 2.13+ and kafka 2.2 is bundled with scala 2.12-. ``PHAB_ID=D597065`` * ๐ kafkaStreams: Enables cross-build for 2.13.1. Note that kafka 2.5 is bundled with scala 2.13+ and kafka 2.2 is bundled with scala 2.12-. ``PHAB_ID=D597065`` * ๐ benchmarks: Enables cross-build for 2.13.1. ``PHAB_ID=D597288`` * ๐ inject-thrift-client-http-mapper: Enables cross-build for 2.13.1. ``PHAB_ID=D596470`` * ๐ http-mustache: Enables cross-build for 2.13.1. ``PHAB_ID=D596470`` * ๐ thrift: (BREAKING API CHANGE) Removed `JavaThriftRouter.add(controller, protocolFactory)` method. Use `AbstractThriftServer.configureThriftServer` to override Thrift-specific stack params (including `Thrift.param.ProtocolFactory`). ``PHAB_ID=D593876`` * ๐ finatra-http: Remove deprecated `c.t.finatra.http.response.StreamingResponse`. Use `c.t.finatra.http.streaming.StreamingResponse` instead. ``PHAB_ID=D594642`` * finatra-kafka-streams: (BREAKING API CHANGE) Changed the `delayWithStore` DSL call to ensure that the store name is consistent across shards. Requires a new `storeName` parameter to allow for multiple delays in a single topology. ``PHAB_ID=D593593`` ๐ Fixed ~~~~~ * finatra-kafka-streams: Renamed implicit Kafka Streams DSL classes in order to permit multiple DSL extensions to be used in the same Kafka Streams topology. ``PHAB_ID=D598368`` * ๐ thrift: Fixed a bug where Thrift stack params (i.e., protocol factory) that are passed to `AbstractThriftServer.configureThriftServer` are ignored in `JavaThriftRouter`. ``PHAB_ID=D593876``
-
v20.12.0 Changes
โ Added
* finatra-kafka-streams: Add async map commands to Kafka Streams DSL (`flatMapAsync`, `flatMapValuesAsync`, `mapAsync`, and `mapValuesAsync`) ``PHAB_ID=D593995`` * โฌ๏ธ finatra-kafka-streams: Allow String configuration to be null and set upgradefrom to null if it is running in 2.5 kafka client. ``PHAB_ID=D592608`` * finatra-http: Allow injecting filtered controllers in HttpRouter from Java. ``PHAB_ID=D590707`` * ๐ inject-utils: Move deprecation warning from `c.t.inject.conversions.map` to `c.t.inject.conversions.map.RichMap`. ``PHAB_ID=D591979`` * kafka: Add an option `includePartitionMetrics` to `KafkaFinagleMetricsReporter` to not include metrics per partition of the `FinagleKafkaConsumer`. Defaults to true. ``PHAB_ID=D587636`` * ๐ finatra: Enables cross-build for 2.13.1 for inject-logback. ``PHAB_ID=D588586`` * finatra-kafka-streams: Add delay DSL calls to insert a delay into a Kafka Streams topology. * ๐ finatra: Enables cross-build for 2.13.1 for inject-thrift-client. ``PHAB_ID=D583509`` * finatra-kafka-streams: Add `c.t.f.k.t.s.PersistentTimerValueStore` which stores a value in the timerstore that can be used when the timer is triggered. ``PHAB_ID=D583020`` * ๐ inject-core: Add ability to call `InMemoryStats#waitFor` with a fixed timeout ``PHAB_ID=D576147`` * ๐ finatra: Enables cross-build for 2.13.1 for httpclient, http, and jackson. ``PHAB_ID=D574391`` ๐ Changed
๐ inject-utils: Deprecate all methods in
c.t.inject.conversions.map.RichMap
, and move functionality toc.t.conversions.MapOps
in the util/util-core project.PHAB_ID=D578819
๐ inject-utils: Deprecate all methods in
c.t.inject.conversions.tuple
, and move functionality toc.t.conversions.TupleOps
in the util/util-core project.PHAB_ID=D578804
๐ inject-utils: Deprecate all methods in
c.t.inject.conversions.seq
, and move functionality toc.t.conversions.SeqOps
in the util/util-core project.PHAB_ID=D578605
๐ inject-utils: Remove deprecated
camelify
,pascalify
, andsnakify
fromc.t.inject.conversions.string.RichString
. Additionally, deprecatetoOption
andgetOrElse
inc.t.inject.conversions.string.RichString
, and move functionality toc.t.conversions.StringOps
in the util/util-core project.PHAB_ID=D578549
c.t.finatra.http.exceptions.ExceptionMapperCollection changed from Traversable to Iterable for cross-building 2.12 and 2.13.
PHAB_ID=D574391
๐ inject-core: (BREAKING API CHANGE) Move the testing utility
InMemoryStatsReceiverUtility
andInMemoryStats
into inject-core from inject-server. They can both be found undercom.twitter.inject
.PHAB_ID=D574643
๐ validation: (BREAKING API CHANGE) Introduce new Validation Framework APIs which support cascading validation to nested case classes and other improvements which also closer align to JSR380.
Validator#validate
has changed from returningUnit
and throwing an exception to model the JSR380 version that returns a Set of failed constraints. There is a new method which replicates the throwing behavior.PHAB_ID=D559644
kafka: Split
c.t.f.kafka.tracingEnabled
flag intoc.t.f.k.producers.producerTracingEnabled
andc.t.f.k.consumers.consumerTracingEnabled
to selectively enable/disable tracing for producers/consumers. Producer tracing is turned on by default and consumer tracing is turned off by default now.PHAB_ID=D571064
๐ Fixed
* inject-server: Wire through HTTP method in AdminHttpClient so that POST requests can be made to HTTPAdmin endpoints. ``PHAB_ID=D584988``
-
v20.10.0 Changes
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.
697b2137 - utils: Undo usage of TypesApi for help in determining if a class is a Scala case class
-
v20.9.0 Changes
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().
07bf53fa
๐ 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.
9762145d - 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
- โ
finatra-inject: TestInjector has been reworked to allow users executing modules' lifecycle