Releases: twitter/finatra
Finatra 19.11.0
Fixed
- finatra-http: Better handling of URI decoding issues when extracting path parameters for
routing. If we cannot extract a path pattern, and the exception is not intercepted by a
user-defined Exception Mapper, we will now explicitly return a 400 - BAD REQUEST.
Fixes #507. 5f293844
Added
- finatra: Add initial support for JDK 11 compatibility. dfc521c9
- inject-core: Add support for optional binding in c.t.inject.TwitterModule.
285da3bb
Changed
- finatra-http: (BREAKING API CHANGE) AsyncStream[Buf] => AsyncStream[String] and
Reader[Buf] => Reader[String] handlers will always be tread the output as a JSON arrays of
Strings. Whereas, before, the incoming bytes would have been converted to String and
returned as-is. 43eaa555 - finatra: Deprecate c.t.finatra.http.modules.DocRootModule. Introduce FileResolverModule.
The DocRootModule defines configuration flags for the FileResolver which was moved from
finatra/http to a more correctly generic location in finatra/utils. However, configuration for
injection of a properly configured FileResolver is still incorrectly tied to HTTP because of the
DocRootModule. Thus, we deprecate the DocRootModule and introduce the
c.t.finatra.modules.FileResolverModule which is defined closer to the
c.t.finatra.utils.FileResolver in finatra/utils. This allows the FileResolver to be properly
configured outside of HTTP concerns. 5a97b2aa - finatra-thrift: Updated BUILD files for Pants 1:1:1 layout. c46209fd
- inject-ports: Add finatra/inject/inject-ports which has c.t.inject.server.Ports and
c.t.inject.server.PortUtils. 5676d038 - inject-utils: Move AnnotationUtils to c.t.inject.utils.AnnotationUtils and make public
for use. 0ac7af99 - finatra-http: Updated package structure for Pants 1:1:1 layout. Moved META-INF/mime.types file
to finatra/utils which is where the FileResolver is located for proper resolution of mime types
from file extension. 57555f80
Finatra 19.10.0
Changed
- finatra-jackson: Update jackson reflection to use org.json.reflect instead of
custom reflection. This enables support for parsing case classes defined over generic
types, e.g., case class Page[T](data: T). As a result of this change, use of lazy val
for trait members which are mixed into case classes for use in deserialization is no
longer supported. This addresses issue #480. 83d3ed6d
Fixed
- finatra-jackson: Add support for parsing of case classes defined over generic types
(even nested, and multiple), e.g., case class Page[T, U] (data: List[T], column: U).
Fixes issue #408. 83d3ed6d - finatra-kafka: Sanitize topic name in MonitoringConsumer stats scope
0df09c6b - inject-server: Fix printing of all stats from the underlying InMemoryStatsReceiver in
the eventually loop for stat assertion. Address finatra/kafka test logging for
finatra/kakfa-streams/kafka-streams and finatra/kafka. 32833de1 - inject-logback: A NullReferenceException could be thrown during metrics
collection due to an incorrect logback.xml configuration. This has been fixed.
82f0382f
Finatra 19.9.0
Added
- finatra-kafka: Add withConfig method variant which takes a Map[String, String] to allow for more complex configurations 60b5d3f1
Changed
-
finatra: Remove commons-lang as a dependency and replace it with alternatives from stdlib when possible. 1c32f9a7
-
inject-server: Changed c.t.inject.server.InMemoryStatsReceiverUtility to show the expected and
actual values as part of the error message when metric values do not match. cefb1749 -
finatra-kafka-streams: Improve StaticPartitioning error message ec0f87fd
Fixed
-
finatra-http: Support Http 405 response code, improve routing performance for non-constant route 983a2c8f
-
inject-app: Update c.t.inject.app.App to only recurse through modules once. We currently
call TwitterModule#modules more than once in reading flags and parsing the list of modules
over which to create the injector. When TwitterModule#modules is a function that inlines the
instantiation of new modules we can end up creating multiple instances causing issues with the
list of flags defined in the application. This is especially true in instances of TwitterModule
implemented in Java as there is no way to implement the trait TwitterModule#modules method as a
eagerly evaluated value. We also don't provide an ergonomic method for Java users to define
dependent modules like we do in apps and servers via App#javaModules. Thus we also add a
TwitterModule#javaModules function which expresses a better API for Java users. 8d0a59fa
Finatra 19.8.0
Added
- finatra-http: Introduce the new streaming request and response types:
c.t.finatra.http.streaming.StreamingRequest
9687e2d7,
c.t.finatra.http.streaming.StreamingResponse
30fcb686.
Examples are located in finatra/examples/streaming-example/. - finatra-jackson: Add the ability to specify
fields
in theMethodValidation
annotation.
545674e6
Changed
- inject-thrift-client: make ThriftClientModuleTrait extend StackClientModuleTrait for symmetry
with other protocol client modules. 27105149 - finatra-http: Deprecated
c.t.finatra.http.response.StreamingResponse
, Use
c.t.finatra.http.response.ResponseBuilder.streaming
to construct a
c.t.finatra.http.streaming.StreamingResponse
instead. 30fcb686 - finatra: Upgrade to Jackson 2.9.9. f050be4f
Finatra 19.7.0
Added
-
finatra-kafka-streams: Adding test/sample for
FinatraDslWindowedAggregations.aggregate
. ae433fc -
finatra-jackson: Add
com.twitter.util.Time
deserializer withJsonFormat
support. ed3d666
Changed
-
finatra-kafka: BUILD file update compile and runtime deps. 8241cd7
-
finatra-httpclient: introduce new
HttpClientModuleTrait
and deprecateHttpClientModule
.
TheHttpClientModule
has been modified to extend fromHttpClientModuleTrait
to allow
for bridging the two implementations.c.t.f.httpclient.RichHttpClient
has also been deprecated
as part of this change. The newHttpClientModuleTrait
allows for direct configuration of the
underlingc.t.finagle.Http.Client
. The newHttpClientModuleTrait
does not provide any
default bindings, so it is up to users to supply them - this allows for custom binding
annotations and binding multipleHttpClient
s, which was not previously possible with
HttpClientModule
. fe0c94aTo migrate,
class MyHttpClientModule extends HttpClientModule { override val dest = "flag!mydest" override val sslHostname = Some("sslHost") }
becomes
class MyHttpClientModule extends HttpClientModuleTrait { override val dest = "flag!mydest" override val label = "myhttpclient" val sslHostname = "sslHost" // we only override in this example for TLS configuration with the `sslHostname` override def configureClient( injector: Injector, client: Http.Client ): Http.Client = client.withTls(sslHostname) @Singleton @Provides final def provideHttpClient( injector: Injector, statsReceiver: StatsReceiver, mapper: FinatraObjectMapper ): HttpClient = newHttpClient(injector, statsReceiver, mapper) // Note that `provideHttpClient` no longer needs an injected `Service[Request, Response]` so // the following is only needed if you require a `Service[Request, Response]` elsewhere: @Singleton @Provides final def provideHttpService( injector: Injector, statsReceiver: StatsReceiver ): Service[Request, Response] = newService(injector, statsReceiver) }
Finatra 19.6.0
Added
- inject-modules: Introduce a
StackClientModuleTrait
to aid in configuring modules for generic
Finagle Stack Clients. c6c43f76 - finatra-http: Add
c.t.inject.server.InMemoryStatsReceiverUtility
which allows for testing
assertions on metrics captured within an embedded server'sInMemoryStatsReceiver
. Update the
Kafka tests and utilities to use theInMemoryStatsReceiverUtility
and mark the
c.t.finatra.kafka.test.utilsInMemoryStatsUtil
as deprecated. f82afa58
Changed
- finatra-http: Removed deprecated
response_size
stat fromc.t.finatra.http.filters.StatsFilter
.
0c6c47b8 - finatra-kafka: Update finatra exported metrics to contains KafkaMetrics 'rocksdb-window-state-id'.
63ab9954 - finatra-kafka: Deprecate in
c.t.finatra.kafka.consumers.FinagleKafkaConsumer
.
Addc.t.finatra.kafka.consumers.FinagleKafkaConsumer.buildClient
and
c.t.finatra.kafka.producters.FinagleKafkaProducer.buildClient
. 4f975c34
Fixed
Finatra 19.5.1
Fixed
- finatra: The added
c.t.finatra.http.RouteHint
was missing from the test-jar sources and has
been added. 7945d128
Finatra 19.5.0
19.5.0
Added
- inject-server/http/thrift: Allow users to specify a StatsReceiver implementation to use in the
underlying EmbeddedTwitterServer instead of always providing an InMemoryStatsReceiver
implementation. 7a486fd2 - finatra-http: Add ability for Java HTTP Controllers to use the RouteDSL for per-route filtering
and for route prefixing. c2733158 - inject-request-scope: Add a Filter.TypeAgnostic implementation for the FinagleRequestScopeFilter
for better compatibility with Thrift servers. Update the FinagleRequestScope to make more idiomatic
use of Context locals. 451cff77 - finatra-http: Route params are now URL-decoded automatically. a79f5634
- finatra-jackson: Add ability to bypass case class validation using the
NullValidationFinatraJacksonModule. 401d7285 - inject-app: Add c.t.inject.app.DtabResolution to help users apply supplemental Dtabs added by
setting the dtab.add flag. This will append the supplemental Dtabs to the
Dtab.base in a premain function. 6c4eeda0
Changed
- finatra-http: Move when admin routes are added to the AdminHttpServer to the postInjectorStartup
phase, such that any admin routes are available to be hit during server warmup. Simplify HttpWarmup
utility to make it clear that it can and should only be used for sending requests to endpoints added
to the server's configured HttpRouter. The forceRouteToAdminHttpMuxers param has been renamed
to admin to signal that the request should be sent to the HttpRouter#adminRoutingService instead
of the HttpRouter#externalRoutingService. Routing to TwitterServer HTTP Admin Interface via this
utility never worked properly and the (broken) support has been dropped. 0cd3ed69 - finatra-kafka: Update com.twitter.finatra.kafka.test.KafkaTopic, and
com.twitter.finatra.kafka.test.utils.PollUtils methods to take
com.twitter.util.Duration instead of org.joda.time.Duration. 94c051b3 - finatra: Removed Commons IO as a dependency. 4b6e4726
- finatra-http: com.twitter.finatra.http.EmbeddedHttpServer methods which previously used the
routeToAdminServer parameter have been changed to use a RouteHint instead for added
flexibility in controlling where a test request is sent. 4653992c - finatra-inject: Feature tests no longer default to printing metrics after tests.
This can be enabled on a per-test basis by overriding FeatureTestMixin.printStats
and setting it to true. 28eecabe - finatra-inject: Update com.twitter.inject.utils.RetryPolicyUtils,
com.twitter.inject.thrift.modules.FilteredThriftClientModule, and
com.twitter.inject.thrift.filters.ThriftClientFilterChain methods to take
com.twitter.util.Duration instead of org.joda.time.Duration. c295efb0 - finatra: Fix Commons FileUpload vulnerability. Update org.apache.commons-fileupload from version
1.3.1 to version 1.4. This closes #PR-497. d5d32737 - finatra-http: Replace all usages of guava's com.google.common.net.MediaType with String.
You can migrate by calling MediaType#toString everywhere you passed a MediaType before. 826fabb2 - finatra-http: Add http scope to shutdown.time flag, making it http.shutdown.time.
2abb46f8 - finatra-http: Remove deprecated DefaultExceptionMapper. Extend
c.t.finatra.http.exceptions.ExceptionMapper[Throwable] directly instead. cd2d5be3 - inject-app: Move override of com.twitter.app.App#failfastOnFlagsNotParsed up from
c.t.inject.server.TwitterServer to com.twitter.inject.app.App such that all Finatra-based
applications default to this behavior. feb887e0 - inject-app|server: change capturing of flag ordering from Modules for adding to the App's c.t.app.Flags
instance to match the semantics of directly calling c.t.app.Flags#add. Prefer AtomicBoolean
instances over where we currently use mutable Boolean instances in c.t.inject.app.App, c.t.inject.app.TestInjector,
and c.t.inject.server.EmbeddedTwitterServer. 2dfd33b5 - finatra-examples: Update "twitter-clone" example to use Dtabs instead of the deprecated resolverMap.
Move the "hello-world" example to "http-server". 6c4eeda0
Fixed
Finatra 19.4.0
19.4.0
Added
-
inject-server: Add globalFlags argument to EmbeddedTwitterServer, which will
allow for scoping a c.t.a.GlobalFlag property change to the lifecycle of the
underlying TwitterServer, as a c.t.a.GlobalFlag is normally scoped to the JVM/process.
This change is also reflected in EmbeddedHttpServer and EmbeddedThriftServer constructors.
38a3180a -
inject-utils: add toOrderedMap implicit conversion for java.util.Map 1686420c
-
finatra-kafka-streams: Add flag rocksdb.manifest.preallocation.size with default value
4.megabytes to c.t.f.k.c.RocksDbFlags and set value in
c.t.f.k.c.FinatraRocksDBConfig. 0cac9785 -
finatra-http: Add commaSeparatedList boolean parameter to QueryParams, for
parsing comma-separated query parameters into collection types. 0ae425a2
Changed
-
finatra-kafka: Upgraded kafka libraries from 2.0.0 to 2.2.0.
-
finatra-thrift: Removed c.t.finatra.thrift.exceptions.FinatraThriftExceptionMapper,
c.t.finatra.thrift.filters.ClientIdAcceptlistFilter,
c.t.finatra.thrift.modules.ClientIdAcceptlistModule,
c.t.finatra.thrift.filters.ClientIdWhitelistFilter,
c.t.finatra.thrift.modules.ClientIdWhitelistModule,
and the finatra/finatra_thrift_exceptions.thrift IDL. caed5ec8 -
finatra-thrift: Constructing a ThriftRouter now requires serverName. dc357fd8
-
finatra-examples: Updated StreamingController to use Reader instead of AsyncStream
3d5e3282 -
finatra-kafka-streams: Implement FinatraKeyValueStore as custom store. cd38ddf6
-
finatra-thrift: Constructing a ThriftRouter now requires c.t.f.StackTransformer.
a96312d2
Fixed
- finatra-kafka: Ensure that EmbeddedKafka implementation of beforeAll() makes
call to super.beforeAll() so hooks registered in super class get executed. 9404b28f - finatra-kafka-streams: FinatraTransformer.timerStore config object references immutable
map which causes exception thrown if user code calls AbstractStoreBuilder.withLoggingDisabled.
Fixed FinatraTransformer.timerStore to convert from immutable map to mutable map before
forwarding config object to kafka library. 827c4612
Finatra 19.3.0
Added
-
finatra-kafka: FinagleKafka clients pass correct deadline for close to
underlying Kafka clients. 6e579e60 -
finatra-kafka-streams: (BREAKING API CHANGE) Create flags for common consumer and producer
configs. KafkaFlagUtils#kafkaDocumentation and getKafkaDefault are no longer public methods.
9ca7eac5 -
finatra-kafka: Added support to fetch end offset for a given partition. 2053b76a
-
finatra-http: Added
HttpServerTrait
which allows for a simple way to serve a
FinagleService[Request, Response]
on an external interface without the need to
configure the FinatraHttpRouter
. a4fe06c5 -
finatra-http: Added support to serve
c.t.io.Reader
as a streaming request.
4491e5e5
Changed
-
finatra-kafka-streams: Improve querying of windowed stores. ea65ef40
-
inject-utils: Mark
c.t.inject.utils.StringUtils#snakify,camelify,pascalify
as
deprecated as their implementations have moved to util/util-corec.t.conversions.StringOps
.
Encourage users to switch usages toc.t.conversions.StringOps#toSnakeCase,toCamelCase,toPascalCase
.
85b9361c -
finatra-thrift: Changed
c.t.finatra.thrift.ThriftServerTrait#service
to#thriftService
to
not collide with the serving of a Finagle service from theHttpServer
when a server extends
bothHttpServer
andThriftServer
. a4fe06c5