Note that RB_ID=#
and PHAB_ID=#
correspond to associated message in commits.
- finatra: Add NullKafkaProducer for unit tests to avoid network connection failures in the log
PHAB_ID=D429004
.
- finatra: Exposing Listening Server's bound address in Thrift and HTTP server traits
PHAB_ID=D424745
- finatra: Upgrade logback to 1.2.3
PHAB_ID=D415888
- inject-server: Fix issue in c.t.inject.server.EmbeddedHttpClient where assertion of an empty response body was incorrectly disallowed. This prevented asserting that a server was not yet healthy as the /health endpoint returns an empty string, thus even a not yet healthy server would report as "healthy" to the testing infrastructure as long as the health endpoint returned a 200 - OK response.
PHAB_ID=D422712
- finatra: Upgrade to jackson 2.9.10 and jackson-databind 2.9.10.1
PHAB_ID=D410846
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
PHAB_ID=D407474
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.
PHAB_ID=D400560
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
PHAB_ID=D401051
- finatra: Update Google Guice version to 4.1.0, update ScalaTest to 3.0.8, and ScalaCheck to 1.14.0.
PHAB_ID=D408309
- finatra-http: Remove deprecated c.t.finatra.http.HttpHeaders. Users should use com.twitter.finagle.http.Fields instead.
PHAB_ID=D407290
- finatra-http: Remove deprecated DocRootModule.
PHAB_ID=D404723
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.
PHAB_ID=D387629
- finatra-http: Fixed issue in the DefaultMessageBodyReaderImpl that determines if the incoming message is "json encoded".
PHAB_ID=D412993
- 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.
PHAB_ID=D401288
- 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. PHAB_ID=D397925`
- 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.
PHAB_ID=D396506
- 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.
PHAB_ID=D386969
- 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.
PHAB_ID=D381357
- finatra: Add initial support for JDK 11 compatibility.
PHAB_ID=D365075
- inject-core: Add support for optional binding in c.t.inject.TwitterModule.
PHAB_ID=D386288
- finatra-http: (BREAKING API CHANGE) StreamingResponse[Reader, String] and StreamingResponse[AsyncStream, String] now streaming String messages as JSON instead of returning as-is. Concatenating text messages need to be handled from the Controller by users.
PHAB_ID=D394904
- 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.
PHAB_ID=D392551
- 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.
PHAB_ID=D390932
- finatra-thrift: Updated BUILD files for Pants 1:1:1 layout.
PHAB_ID=D388297
- inject-ports: Add finatra/inject/inject-ports which has c.t.inject.server.Ports and c.t.inject.server.PortUtils.
PHAB_ID=D388277
- inject-utils: Move AnnotationUtils to c.t.inject.utils.AnnotationUtils and make public for use.
PHAB_ID=D388241
- 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.
PHAB_ID=D385792
- 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.
PHAB_ID=D368822
- 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.
PHAB_ID=D368822
- finatra-kafka: Sanitize topic name in MonitoringConsumer stats scope
PHAB_ID=D373402
- 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.
PHAB__ID=D372108
- inject-logback: A NullReferenceException could be thrown during metrics collection due to an incorrect logback.xml configuration. This has been fixed.
PHAB_ID=D369234
- finatra-kafka: Add withConfig method variant which takes a Map[String, String] to allow for more complex configurations
PHAB_ID=D354389
- finatra: Remove commons-lang as a dependency and replace it with alternatives from stdlib when possible.
PHAB_ID=D354013
- 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.
PHAB_ID=D360470
- finatra-kafka-streams: Improve StaticPartitioning error message
PHAB_ID=D351368
- finatra-http: Support Http 405 response code, improve routing performance for non-constant route
PHAB_ID=D278146
- 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.
PHAB_ID=D349587
- finatra-http: Introduce the new streaming request and response types: c.t.finatra.http.streaming.StreamingRequest
PHAB_ID=D342728
, c.t.finatra.http.streaming.StreamingResponsePHAB_ID=D342703
. Examples are located in finatra/examples/streaming-example/. - finatra-jackson: Add the ability to specify fields in the MethodValidation annotation.
PHAB_ID=D338079
- finatra-kafka: Make KafkaConsumerConfig config public from FinagleKafkaConsumerBuilder.
PHAB_ID=D362058
- inject-thrift-client: make ThriftClientModuleTrait extend StackClientModuleTrait for symmetry with other protocol client modules.
PHAB_ID=D342710
- 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.
PHAB_ID=D342703
- finatra: Upgrade to Jackson 2.9.9.
PHAB_ID=D345969
- finatra-kafka-streams: Adding test/sample for FinatraDslWindowedAggregations.aggregate.
PHAB_ID=D322558
- finatra-jackson: Add com.twitter.util.Time deserializer with JsonFormat support.
PHAB_ID=D330682
- finatra-kafka: BUILD file update compile and runtime deps.
PHAB_ID=D337742
finatra-httpclient: introduce new HttpClientModuleTrait and deprecate HttpClientModule. The HttpClientModule has been modified to extend from HttpClientModuleTrait to allow for bridging the two implementations. c.t.f.httpclient.RichHttpClient has also been deprecated as part of this change. The new HttpClientModuleTrait allows for direct configuration of the underling c.t.finagle.Http.Client. The new HttpClientModuleTrait does not provide any default bindings, so it is up to users to supply them - this allows for custom binding annotations and binding multiple HttpClient`s, which was not previously possible with `HttpClientModule.
PHAB_ID=D338320
To 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) }
`
- inject-modules: Introduce a StackClientModuleTrait to aid in configuring modules for generic Finagle Stack Clients.
PHAB_ID=D324891
- finatra-http: Add c.t.inject.server.InMemoryStatsReceiverUtility which allows for testing assertions on metrics captured within an embedded server's InMemoryStatsReceiver. Update the Kafka tests and utilities to use the InMemoryStatsReceiverUtility and mark the c.t.finatra.kafka.test.utilsInMemoryStatsUtil as deprecated.
PHAB_ID=D316806
- finatra-http: Removed deprecated response_size stat from c.t.finatra.http.filters.StatsFilter.
PHAB_ID=D328254
- finatra-kafka: Update finatra exported metrics to contains KafkaMetrics 'rocksdb-window-state-id'.
PHAB_ID=D326320
- finatra-kafka: Deprecate in c.t.finatra.kafka.consumers.FinagleKafkaConsumer. Add c.t.finatra.kafka.consumers.FinagleKafkaConsumer.buildClient and c.t.finatra.kafka.producters.FinagleKafkaProducer.buildClient.
PHAB_ID=D321699
- finatra: Add an explicit dependency on com.sun.activation to allow for using Finatra with JDK 11. This fixes #484.
PHAB_ID=D328724
- finatra: The added c.t.finatra.http.RouteHint was missing from the test-jar sources and has been added.
PHAB_ID=D317282
- inject-server/http/thrift: Allow users to specify a StatsReceiver implementation to use in the underlying EmbeddedTwitterServer instead of always providing an InMemoryStatsReceiver implementation.
PHAB_ID=D315440
- finatra-http: Add ability for Java HTTP Controllers to use the RouteDSL for per-route filtering and for route prefixing.
PHAB_ID=D311625
- 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.
PHAB_ID=D310395
- finatra-http: Route params are now URL-decoded automatically.
PHAB_ID=D309144
- finatra-jackson: Add ability to bypass case class validation using the NullValidationFinatraJacksonModule.
PHAB_ID=D307795
- 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.
PHAB_ID=D303813
- 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.
PHAB_ID=D314152
- 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.
PHAB_ID=D314958
- finatra: Removed Commons IO as a dependency.
PHAB_ID=D314606
- 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.
PHAB_ID=D313984
- 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.
PHAB_ID=D314329
- 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.
PHAB_ID=D313153
- finatra: Fix Commons FileUpload vulnerability. Update org.apache.commons-fileupload from version 1.3.1 to version 1.4. This closes #PR-497.
PHAB_ID=D310470
- 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.
PHAB_ID=D308761
- finatra-http: Add http scope to shutdown.time flag, making it http.shutdown.time.
PHAB_ID=D307552
- finatra-http: Remove deprecated DefaultExceptionMapper. Extend c.t.finatra.http.exceptions.ExceptionMapper[Throwable] directly instead.
PHAB_ID=D307520
- 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.
PHAB_ID=D307858
- 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.
PHAB_ID=D306897
- finatra-examples: Update "twitter-clone" example to use Dtabs instead of the deprecated resolverMap. Move the "hello-world" example to "http-server".
PHAB_ID=D303813
- finatra-jackson: Properly account for timezone in Joda DateTime deserialization.
PHAB_ID=D312027
- finatra-http: EmbeddedHttpServer's httpGetJson method now properly passes all parameters through to the underlying client call.
PHAB_ID=D312151
- 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.
PHAB_ID=D288032
- inject-utils: add toOrderedMap implicit conversion for java.util.Map
PHAB_ID=D295005
- 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.
PHAB_ID=D290130
- finatra-http: Add commaSeparatedList boolean parameter to QueryParams, for parsing comma-separated query parameters into collection types.
PHAB_ID=D268989
- finatra: Update snakeyaml to version 1.24.
PHAB_ID=D232547
- finatra-kafka: Upgraded kafka libraries from 2.0.0 to 2.2.0.
- Kafka 2.2.0 Release Notes
PHAB_ID=D248171
- 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.
PHAB_ID=D278231
- finatra-thrift: Constructing a ThriftRouter now requires serverName.
PHAB_ID=D294345
- finatra-examples: Updated StreamingController to use Reader instead of AsyncStream
PHAB_ID=D295227
- finatra-kafka-streams: Implement FinatraKeyValueStore as custom store.
PHAB_ID=D277612
- finatra-thrift: Constructing a ThriftRouter now requires c.t.f.StackTransformer.
PHAB_ID=D277493
- finatra-kafka: Ensure that EmbeddedKafka implementation of beforeAll() makes call to super.beforeAll() so hooks registered in super class get executed.
PHAB_ID=D296643
- 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.
PHAB_ID=D293979
- finatra-kafka-streams: Exposing additional consumer configuration flags.
- kafka.consumer.max.poll.interval.ms Maximum delay between invocations of poll() when using consumer group management.
- kafka.consumer.max.partition.fetch.bytes Consumer's maximum amount of data per-partition the server will return.
- kafka.consumer.request.timeout.ms Consumer's maximum amount of time to wait for the response of a request.
- kafka.consumer.connections.max.idle.ms Consumer's maximum idle time for connections before closing the connection.
PHAB_ID=D287371
- finatra-kafka: FinagleKafka clients pass correct deadline for close to underlying Kafka clients.
PHAB_ID=D261115
- finatra-kafka-streams: (BREAKING API CHANGE) Create flags for common consumer and producer configs. KafkaFlagUtils#kafkaDocumentation and getKafkaDefault are no longer public methods.
PHAB_ID=D277044
- finatra-kafka: Added support to fetch end offset for a given partition.
PHAB_ID=D283813
- finatra-http: Added HttpServerTrait which allows for a simple way to serve a Finagle Service[Request, Response] on an external interface without the need to configure the Finatra HttpRouter.
PHAB_ID=D280896
- finatra-http: Added support to serve c.t.io.Reader as a streaming request.
PHAB_ID=D278988
- finatra-kafka-streams: finatra-kafka-streams: Refactor queryable state management
PHAB_ID=D277594
- finatra-kafka-streams: Improve querying of windowed stores.
PHAB_ID=D277553
- inject-utils: Mark c.t.inject.utils.StringUtils#snakify,camelify,pascalify as deprecated as their implementations have moved to util/util-core c.t.conversions.StringOps. Encourage users to switch usages to c.t.conversions.StringOps#toSnakeCase,toCamelCase,toPascalCase.
PHAB_ID=D280886
- finatra-thrift: Changed c.t.finatra.thrift.ThriftServerTrait#service to #thriftService to not collide with the serving of a Finagle service from the HttpServer when a server extends both HttpServer and ThriftServer.
PHAB_ID=D280896
- finatra-kafka: Expose timeout duration in FinagleKafkaConsumerBuilder dest().
PHAB_ID=D269701
- finatra-kafka-streams: Expose all existing RocksDb configurations. See c.t.f.k.config.FinatraRocksDBConfig for details on flag names, descriptions and default values.
PHAB_ID=D272068
- finatra-kafka-streams: Added two RocksDB flags related to block cache tuning, cache_index_and_filter_blocks and pin_l0_filter_and_index_blocks_in_cache.
PHAB_ID=D269516
- finatra-kafka: Adding an implicit implementation of c.t.app.Flaggable[c.t.finatra.kafka.domain.SeekStrategy] and c.t.app.Flaggable[org.apache.kafka.clients.consumer.OffsetResetStrategy].
PHAB_ID=D271098
- finatra-http: Added support to serve c.t.io.Reader as a streaming response in c.t.finatra.http.internal.marshalling.CallbackConverter.
PHAB_ID=D266863
- finatra-kafka: Expose endOffsets() in FinagleKafkaConsumer.
PHAB_ID=D263573
- finatra-kafka-streams: Adding missing ScalaDocs. Adding metric for elapsed state restore time. RocksDB configuration now contains a flag for adjusting the number of cache shard bits, rocksdb.block.cache.shard.bits.
PHAB_ID=D255771
- finatra-jackson: Added @Pattern annotation to support finatra/jackson for regex pattern validation on string values.
PHAB_ID=D259719
- finatra-kafka-streams: Refactor package names. All classes moved from com.twitter.finatra.streams to com.twitter.finatra.kafkastreams.
PHAB_ID=D268027
- finatra-kafka-streams: Delete deprecated and unused classes.
PHAB_ID=D267921
- finatra-kafka-streams: c.t.finatra.streams.transformer.domain.Time is now the canonical
representation of time for watermarks and timers. RichLong implicit from com.twitter.finatra.streams.converters.time has been renamed to RichFinatraKafkaStreamsLong.
PHAB_ID=D255736
- finatra-jackson: Fix CaseClassField annotation reflection for Scala 2.12.
PHAB_ID=D264423
- finatra-kafka-streams: Combine FinatraTransformer with FinatraTransformerV2.
PHAB_ID=D254411
- finatra-thrift: The return type of ReqRepDarkTrafficFilterModule#newFilter has been changed from DarkTrafficFilter[MethodIface] to Filter.TypeAgnostic.
PHAB_ID=D261868
- finatra-kafka: Add lookupBootstrapServers function that takes timeout as a parameter.
PHAB_ID=D256997
- finatra-thrift: If a Controller is not configured with exactly one endpoint per method, it will throw an AssertionError instead of logging an error message. An attempt to use non-legacy functionality with a legacy Controller will throw an AssertionError.
PHAB_ID=D260230
- finatra-kafka: Add flags for controlling rocksdb internal LOG file growth.
- rocksdb.log.info.level Allows the setting of rocks log levels DEBUG_LEVEL, INFO_LEVEL, WARN_LEVEL, ERROR_LEVEL, FATAL_LEVEL, HEADER_LEVEL.
- rocksdb.log.max.file.size The maximal size of the info log file.
- rocksdb.log.keep.file.num Maximal info log files to be kept.
PHAB_ID=D259579
- finatra-kafka: Add admin routes for properties and topology information
- /admin/kafka/streams/properties Dumps the KafkaStreamsTwitterServer#properties as plain text in the TwitterServer admin page.
- - /admin/kafka/streams/topology Dumps the
KafkaStreamsTwitterServer#topology as plain text in the TwitterServer admin page.
PHAB_ID=D259597
- inject-server: EmbeddedTwitterServer that fails to start will now continue to throw the startup failure on calls to methods that require a successfully started server.
PHAB_ID=D265543
- finatra-kafka-streams: FinatraTopologyTester did not set TopologyTestDriver#initialWallClockTimeMs on initialization causing diverging wall clock time when TopologyTestDriver#advanceWallClockTime advanced time. The divergence was between system time set by org.joda.time.DateTimeUtils.setCurrentMillisFixed and internal mock timer TopologyTestDriver#mockWallClockTime. FinatraTopologyTester.inMemoryStatsReceiver is reset on TopologyFeatureTest#beforeEach for all test that extend TopologyFeatureTest.
PHAB_ID=D269013
- finatra-kafka-streams: Improve watermark assignment/propagation upon reading the first message and when caching key value stores are used.
PHAB_ID=D262054
finatra-jackson: Support inherited annotations in case class deserialization. Case class deserialization support does not properly find inherited Jackson annotations. This means that code like this:
` trait MyTrait { @JsonProperty("differentName") def name: String } case class MyCaseClass(name: String) extends MyTrait
`would not properly expect an incoming field with name differentName to parse into the case class name field. This commit provides support for capturing inherited annotations on case class fields. Annotations processed in order, thus if the same annotation appears in the class hierarchy multiple times, the value configured on the class will win otherwise will be in the order of trait linearization with the "last" declaration prevailing.
PHAB_ID=D260376
- finatra: Remove extraneous dependency on old javax.servlet ServletAPI dependency. The fixes #478.
PHAB_ID=D259671
- finatra-kafka-streams: SumAggregator and CompositeSumAggregator only support enhanced window aggregations for the sum operation. Deprecate SumAggregator and CompositeSumAggregator and create an AggregatorTransformer class that can perform arbitrary aggregations.
PHAB_ID=D257138
- finatra-streams: Open-source Finatra Streams. Finatra Streams is an integration between Kafka Streams and Finatra which we've been using internally at Twitter for the last year. The library is not currently open-source.
PHAB_ID=D248408
- inject-server: Add lint rule to alert when deprecated util-logging JUL flags from the c.t.inject.server.DeprecatedLogging trait are user defined. This trait was mixed-in only for backwards compatibility when TwitterServer was moved to the slf4j-api and the flags are not expected to be configured. By default, util-app based applications will fail to start if they are passed a flag value at startup which they do not define. Users should instead configure their chosen slf4j-api logging implementation directly.
PHAB_ID=D256489
finatra-thrift: c.t.finatra.thrift.Controllers now support per-method filtering and access to headers via c.t.scrooge.{Request, Response} wrappers. To use this new functionality, create a Controller which extends the c.t.finatra.thrift.Controller(SomeThriftService) abstract class instead of constructing a Controller that mixes in the SomeThriftService.BaseServiceIface trait. With this, you can now provide implementations in form of c.t.scrooge.Request/c.t.scrooge.Response wrappers by calling the handle(ThriftMethod) method. Note that a Controller constructed this way cannot also extend a BaseServiceIface.
- handle(SomeMethod).filtered(someFilter).withFn { req: Request[SomeMethod.Args] =>
val requestHeaders = req.headers // .. implementation here
// response: Future[Response[SomeMethod.SuccessType]]
}
Note that if Request/Response based implementations are used the types on any existing ExceptionMappers should be adjusted accordingly. Also, if a DarkTrafficFilterModule was previously used, it must be swapped out for a ReqRepDarkTrafficFilterModule
PHAB_ID=D236724
- inject-core, inject-server: Remove deprecated @Bind support from test mixins. Users should instead prefer using the bind[T] DSL in tests.
PHAB_ID=D250325
inject-app: Remove deprecated bind[T] DSL methods from c.t.inject.app.BindDSL.
Instead of:
injector.bind[T](instance) injector.bind[T, Ann](instance) injector.bind[T](ann, instance)
Users should instead use the more expressive forms of these methods, e.g.,:
injector.bind[T].toInstance(instance) injector.bind[T].annotatedWith[Ann].toInstance(instance) injector.bind[T].annotatedWith(ann).toInstance(instance)
which more closely mirrors the scala-guice binding DSL.
PHAB_ID=D255591
- finatra-thrift: For services that wish to support dark traffic over c.t.scrooge.Request/c.t.scrooge.Response-based services, a new dark traffic module is available: c.t.finatra.thrift.modules.ReqRepDarkTrafficFilterModule
PHAB_ID=D236724
- finatra-thrift: Creating a c.t.finatra.thrift.Controller that extends a ThriftService.BaseServiceIface has been deprecated. See the related bullet point in "Added" with the corresponding PHAB_ID to this one for how to migrate.
PHAB_ID=D236724
- inject-core, inject-server: Remove deprecated WordSpec testing utilities. The framework default ScalaTest testing style is FunSuite though users are free to mix their testing style of choice with the framework provided test mixins as per the documentation.
PHAB_ID=D255094
- finatra-thrift: Instead of failing (potentially silently) c.t.finatra.thrift.routing.ThriftWarmup now explicitly checks that it is using a properly configured c.t.finatra.thrift.routing.Router
PHAB_ID=D253603
- finatra-inject: c.t.finatra.inject.server.PortUtils has been modified to work with c.t.f.ListeningServer only. Methods which worked with the now-removed c.t.f.b.Server have been modified or removed.
PHAB_ID=D254339
- finatra-kafka-streams: Finatra Queryable State methods currently require the window size to be passed into query methods for windowed key value stores. This is unnecessary, as the queryable state class can be passed the window size at construction time. We also now save off all FinatraKeyValueStores in a global manager class to allow query services (e.g. thrift) to access the same KeyValueStore implementation that the FinatraTransformer is using.
PHAB_ID=D256920
- finatra-kafka-streams: Fix bug where KeyValueStore#isOpen was throwing an exception when called on an uninitialized key value store
PHAB_ID=D257635
- finatra-thrift: c.t.finatra.thrift.Controller is now an abstract class rather than a trait.
PHAB_ID=D251314
- finatra-thrift: c.t.finatra.thrift.internal.ThriftMethodService is now private.
PHAB_ID=D251186
- finatra-thrift: c.t.finatra.thrift.exceptions.FinatraThriftExceptionMapper and c.t.finatra.thrift.exceptions.FinatraJavaThriftExceptionMapper now extend ExceptionManager[Throwable, Nothing] since the return type was never used. They are now also final.
PHAB_ID=D249011
- finatra-thrift: Remove c.t.finatra.thrift.routing.JavaThriftRouter#beforeFilter. This method adds too much confusion to the Router API and users are encouraged to instead apply their TypeAgnostic Filters directly to the resultant Service[-R, +R] by overriding the c.t.finatra.thrift.AbstractThriftServer#configureService method instead.
PHAB_ID=D245424
- finatra-thrift: c.t.finagle.Filter.TypeAgnostic filters are now the standard type of filter that can be added by configuring a ThriftRouter. c.t.finatra.thrift.ThriftFilter has been deprecated.
PHAB_ID=D238666
- finatra-thrift: c.t.finatra.thrift.ThriftRequest has been deprecated. All of the information contained in a ThriftRequest can be found in other ways: methodName -> Method.current.get.name traceId -> Trace.id clientId -> ClientId.current
PHAB_ID=D238666
- finatra-http: Validate headers to prevent header injection vulnerability.
PHAB_ID=D246889
- finatra-thrift: Fixes and improvements for better Java support. ExceptionMappingFilter now works properly with generated Java controllers, added an exception mapper for the exceptions defined in finatra_thrift_exceptions.thrift which works on the geneated Java code for these exceptions. Better Java API separation to make usage less error prone and confusing.
PHAB_ID=D237483
- finatra-thrift: (BREAKING API CHANGE) Update DarkTrafficFilter#handleFailedInvocation to accept the request type for more fidelity in handling the failure.
PHAB_ID=D237484
- finatra-http: Move request.ContentType and response.Mustache Java annotations to com.twitter.finatra.http package namespace.
PHAB_ID=D237485
- finatra-jackson: Move away from deprecated code and update error handling and exceptions post Jackson 2.9.x upgrade.
PHAB_ID=D229601
- inject-core: (BREAKING API CHANGE) Remove c.t.inject.TestMixin#sleep. We do not want to promote this usage of Thread blocking in testing utilities. Add a new testing function: c.t.inject.TestMixin#await which will perform Await.result on a given c.t.util.Awaitable. This function was duplicated across tests in the codebase. We also introduce an overridable default timeout on the underlying Await.result call: c.t.inject.TestMixin#defaultAwaitTimeout.
PHAB_ID=D231717
- finatra-http: Fix registration of HTTP Routes in the Library registry to properly account for Routes that duplicate a URI with a different HTTP verb. That is, a Route should be considered unique per URI + HTTP verb combination.
PHAB_ID=D232014
- finatra-http, finatra-thrift: Make HTTP and Thrift StatsFilters "Response Classification" aware.
PHAB_ID=D219116
finatra-http, finatra-thrift: (BREAKING API CHANGE) Update the DarkTrafficFilterModule in both HTTP and Thrift to allow for specifying further configuration of the underlying Finagle client. This allows users the ability to set Finagle client concerns like ResponseClassification or other configuration not expressed by the DarkTrafficFilterModule's API.
Additionally, the Thrift DarkTrafficFilterModule has been updated to be ThriftMux only. For more information on mux see: What is ThriftMux.
We also update the enableSampling method to accept a c.t.inject.Injector to aid in the decision-making for if a given request should be "sampled" by the filter.
PHAB_ID=D225897
- finatra-thrift: (BREAKING API CHANGE) Update c.t.finatra.thrift.routing.ThriftRouter API for adding Java Thrift controllers. The service: Class[_] was rendered unnecessary some time ago but not removed from the API signature. Because this parameter is useless and it shadows another variable inside of the code we remove it from the signature altogether rather than deprecating the API.
PHAB_ID=D224336
- finatra-thrift: Rename defaultFinatraThriftPort to defaultThriftPort.
PHAB_ID=D224735
- finatra-thrift: Set the bound StatsReceiver in the underlying Finagle ThriftMux server in the c.t.finatra.thrift.ThriftServer. This prevented testing of underlying Finagle server stats as the InMemoryStatsReceiver used by the EmbeddedThriftServer was not properly passed all the way through the stack.
PHAB_ID=D228494
- finatra-thrift: Allow java classes to extend ThriftFilter via AbstractThriftFilter.
PHAB_ID=D221534
- http/thrift: Update Library registry route information to include controller class name.
PHAB_ID=D216425
- inject-core: Remove unnecessary Await.result Future.Value in TestMixin.
PHAB_ID=D208995
- finatra-http: (BREAKING API CHANGE)
c.t.io.Reader
andc.t.io.Writer
are now abstracted over the type they produce/consume (Reader[A]
andWriter[A]
) and are no longer fixed toBuf
.PHAB_ID=D195638
- finatra-http: (BREAKING API CHANGE) Typical TLS Configuration for an HTTPS server has been moved into a trait,
c.t.finatra.http.Tls
which also defines the relevant flags (and overridable defaults) for specifying the SSL cert and key paths. Users can choose to mix this trait into theirc.t.finatra.http.HttpServer
classes in order to specify an HTTPS server. Users who wish to maintain the current HTTPS functionality SHOULD mix in the Tls trait to their HttpServer: e.g.,class FooService extends HttpServer with Tls { ... }
Additionally, TLS transport configuration for the underlying Finaglec.t.finagle.Http.Server
is no longer done by default when creating and running an HTTPS server. This is to allow for more flexible configuration on the underlyingc.t.finagle.Http.Server
when setting up TLS. Thus it is recommended that users ensure to either mix in the provided Tls trait or provide the correctc.t.finagle.Http.Server
transport configuration via theconfigureHttpsServer
method.PHAB_ID=D193579
- finatra-http: Rename
defaultFinatraHttpPort
todefaultHttpPort
.PHAB_ID=D193578
- finatra-utils: Remove deprecated
c.t.f.utils.Handler
.PHAB_ID=D192288
- inject-utils: Add 'toLoggable' implicit from Array[Byte] to String.
PHAB_ID=D182262
- finatra-http: Fix infinite loop introduced by
PHAB D180166
. Fix underlying issue of theResponseBuilder
requiring a storedRouteInfo
for classifying exceptions for stating.PHAB_ID=D189504
- finatra-http: Fix FailureExceptionMapper handling of wrapped exceptions. Unwrap cause for all
c.t.finagle.Failure
exceptions, regardless of flags and add a try-catch toExceptionManager
to remap exceptions thrown byExceptionMapper
sPHAB_ID=D180166
- finatra-http: (BREAKING API CHANGE) Fix HttpResponseFilter to properly respect URI schema during location header overwriting
PHAB_ID=D191448
- finatra: Add HTTP route, Thrift method, and Filter information to the Library registry.
PHAB_ID=D177583
- finatra-inject/inject-logback: Add an
c.t.inject.logback.AsyncAppender
to provide metrics about the underlying queue.PHAB_ID=D173278
- inject-slf4j: Move the SLF4J API logging bridges from
inject-slf4j
toinject-app
andinject-server
. This allows code in the inject framework to be mostly useful in environments where having the bridges on the classpath causes issues.PHAB_ID=D179652
- finatra-http: Fail startup for incorrect Controller callback functions. Controller route callback functions that do not specify an input parameter or specify an incorrect input parameter should fail server startup but were not correctly detected when building routes in the
CallbackConverter
. The route building logic has been patched to correctly detect these routes which would fail at runtime to ensure we fail fast at server startup (and can thus be caught by StartupTests).PHAB_ID=D178330
- finatra-http: Change exceptions emitted from
c.t.f.http.filter.HttpNackFilter
to not extend fromHttpException
and add a specific mapper overHttpNackException
such that Nack exceptions are handled distinctly from HttpExceptions and thus more specifically. Handling of Nack exceptions should not be conflated with handling of the more genericHttpExceptions
and it should be clear if a new mapper is desired that it is specifically for changing how Nack exceptions are handled.PHAB_ID=D172456
- examples: Add external TwitterServer example.
PHAB_ID=D161204
- inject-utils: Remove deprecated
c.t.inject.RootMonitor
.PHAB_ID=D161036
- finatra-http: Updated
c.t.finatra.http.AdminHttpServer
to isolate routes added to the admin.PHAB_ID=D157818
inject-slf4j, finatra-http: Fix
c.t.inject.logging.FinagleMDCAdapter
to initialize properly. We were lazily initializing the backingjava.util.Map
of theFinagleMDCAdapter
which could cause values to disappear when the map was not created eagerly enough. Typical usage would add one of the MDC logging filters to the top of the request filter chain which would put a value into the MDC thus creating the backingjava.util.Map
early in the request chain. However, if a filter which puts to the MDC was not included and the first put happened in a Future closure the map state would be lost upon exiting the closure.This change updates how the MDC mapping is stored to move from a
Local
to aLocalContext
and introduces new ergonomics for using/initializing the framework MDC integration.Initialization of the MDC integration should now go through the
c.t.inject.logging.MDCInitializer
(that is users are not expected to need to interact directly with theFinagleMDCAdapter
). E.g., to initialize the MDC:com.twitter.inject.logging.MDCInitializer.init()
This will initialize the
org.slf4j.MDC
and swap out the defaultorg.slf4j.spi.MDCAdapter
with an instance of thec.t.inject.logging.FinagleMDCAdapter
allowing for reading/writing MDC values across Future boundaries.Then to start the scoping of an MDC context, use
c.t.inject.logging.MDCInitializer#let
:com.twitter.inject.logging.MDCInitializer.let { // operations which set and read MDC values ??? }
Typically, this is done in a Filter wrapping the execution of the service in the Filter's apply, For example, the framework provides this initialization and scoping in both thec.t.finatra.http.filters.LoggingMDCFilter
and thec.t.finatra.thrift.filters.LoggingMDCFilter
.Simply including these at the top of the request filter chain for a service will allow MDC integration to function properly.
PHAB_ID=D159536
- inject-app: Ensure that installed modules are de-duped before creating injector.
PHAB_ID=D160955
- finatra-http: Added the ability for requests to have a maximum forward depth to
c.t.finatra.http.routing.HttpRouter
, which prevents requests from being forwarded an infinite number of times. By default the maximum forward depth is 5.PHAB_ID=D154737
- inject-thrift-client: Update
configureServicePerEndpoint
andconfigureMethodBuilder
inThriftMethodBuilderClientModule
to also pass ac.t.inject.Injector
instance which allows users to use bound instances from the object graph when providing furtherthriftmux.MethodBuilder
orThriftMethodBuilderFactory
configuration.PHAB_ID=D155451
- inject-thrift-client: Update
configureThriftMuxClient
inThriftClientModuleTrait
to also pass ac.t.inject.Injector
instance which allows users to use bound instances from the object graph when providing furtherThriftMux.client
configuration.PHAB_ID=D152973
- inject-server: Capture errors on close of the underlying TwitterServer. The embedded testing utilities can now capture and report on an exception that occurs during close of the underlying TwitterServer.
EmbeddedTwitterServer#assertCleanShutdown
inspects for any Throwable captured from closing the underlying server which it will then throw.PHAB_ID=D148946
- finatra-http: Created a new API into
c.t.f.h.response.StreamingResponse
which permits passing atransformer
which is anAsynStream[T] => AsyncStream[(U, Buf)]
for serialization purposes, as well as two callbacks -*onDisconnect
, called when the stream is disconnected, andonWrite
, which is arespond
side-effecting callback to every individual write to the stream.PHAB_ID=D147925
inject-app: Update and improve the test
#bind[T]
DSL. The testing#bind[T]
DSL is lacking in its ability to be used from Java and we would like to revise the API to be more expressive such that it also includes binding from a Type to a Type. Due to wanting to also support the ability to bind a Type to a Type, the DSL has been re-worked to more closely match the actual Guice binding DSL.For Scala users the
#bind[T]
DSL now looks as follows:bind[T].to[U <: T] bind[T].to[Class[U <: T]] bind[T].toInstance(T) bind[T].annotatedWith[Ann].to[U <: T] bind[T].annotatedWith[Ann].to[Class[U <: T]] bind[T].annotatedWith[Ann].toInstance(T) bind[T].annotatedWith[Class[Ann]].to[U <: T] bind[T].annotatedWith[Class[Ann]].to[Class[U <: T]] bind[T].annotatedWith[Class[Ann]].toInstance(T) bind[T].annotatedWith(Annotation).to[U <: T] bind[T].annotatedWith(Annotation).to[Class[U <: T]] bind[T].annotatedWith(Annotation).toInstance(T) bindClass(Class[T]).to[T] bindClass(Class[T]).to[Class[U <: T]] bindClass(Class[T]).toInstance(T) bindClass(Class[T]).annotatedWith[Class[Ann]].to[T] bindClass(Class[T]).annotatedWith[Class[Ann]].[Class[U <: T]] bindClass(Class[T]).annotatedWith[Class[Ann]].toInstance(T) bindClass(Class[T]).annotatedWith(Annotation).to[T] bindClass(Class[T]).annotatedWith(Annotation).[Class[U <: T]] bindClass(Class[T]).annotatedWith(Annotation).toInstance(T)
For Java users, there are more Java-friendly methods:
bindClass(Class[T], T) bindClass(Class[T], Annotation, T) bindClass(Class[T], Class[Annotation], T) bindClass(Class[T], Class[U <: T]) bindClass(Class[T], Annotation, Class[U <: T]) bindClass(Class[T], Class[Annotation], Class[U <: T])
Additionally, these changes highlighted the lack of Java-support in the
TwitterModule
for creating injectable Flags. Thusc.t.inject.TwitterModuleFlags
has been updated to also provide Java-friendly flag creation methods:protected def createFlag[T](name: String, default: T, help: String, flggble: Flaggable[T]): Flag[T] protected def createMandatoryFlag[T](name: String, help: String, usage: String, flggble: Flaggable[T]): Flag[T]``
PHAB_ID=D149252
- inject-thrift-client: The "retryBudget" in the
c.t.inject.thrift.modules.ThriftMethodBuilderClientModule
should be aRetryBudget
and not the genericBudget
configuration Param. Updated the type.PHAB_ID=D151938
- inject-server: Move HTTP-related concerns out of the embedded testing utilities into specific HTTP "clients". The exposed
httpAdminClient
in theEmbeddedTwitterServer
and thehttpClient
andhttpsClient
in theEmbeddedHttpServer
are no longer just Finagle Services from Request to Response, but actual objects. The underlying FinagleService[Request, Response]
can be accessed viaClient.service
.PHAB_ID=D148946
- inject-server: Add a lint rule in
c.t.inject.server.TwitterServer#warmup
. If a server does not override the default implementation ofTwitterServer#warmup
a lint rule violation will appear on the lint page of the HTTP admin interface.PHAB_ID=D141267
- inject-server: Add
c.t.inject.server.TwitterServer#setup
lifecycle callback method. This is run at the end of thepostInjectorStartup
phase and is primarily intended as a way for servers to start pub-sub components on which the server depends. Users should prefer this method over overriding thec.t.inject.server.TwitterServer#postWarmup
@Lifecycle-annotated method as the callback does not require a call its super implementation for the server to correctly start and is ideally less error-prone to use.PHAB_ID=D135827
- inject-app: Add
c.t.inject.annotations.Flags#named
for getting an implementation of an@Flag
annotation. This is useful when trying to get or bind an instance of an@Flag
annotated type.PHAB_ID=D140831
- finatra-http:
ReaderDiscarded
failures writing inc.t.f.http.StreamingResponse
now only log at the info level without a stack trace, while other failures log at the error level with a stacktrace.PHAB_ID=D141453
- inject-thrift-client: Removed
withBackupRequestFilter
method on deprecatedc.t.inject.thrift.filters.ThriftClientFilterChain
. Instead ofc.t.inject.thrift.modules.FilteredThriftClientModule
, usec.t.inject.thrift.modules.ThriftMethodBuilderClientModule
and use theidempotent
method onc.t.inject.thrift.ThriftMethodBuilder
to configure backup requests.PHAB_ID=D142049
. - inject-app:
c.t.inject.annotations.FlagImpl
is no longer public and should not be used directly. Usec.t.inject.annotations.Flags#named
instead.PHAB_ID=D140831
- inject-thrift-client: Fix for duplicate stack client registration. The
c.t.inject.thrift.modules.ThriftMethodBuilderClientModule
was incorrectly calling theThriftMux.client
twice. Once to create a MethodBuilder and once to create a ServicePerEndpoint. Now, the ServicePerEndpoint is obtained from the configured MethodBuilder.PHAB_ID=D141304
- inject-thrift-client: Convert non-camel case
ThriftMethod
names, e.g., "get_tweets" to camelCase, e.g., "getTweets" for reflection lookup on generatedServicePerEndpoint
interface inc.t.inject.thrift.ThriftMethodBuilder
.PHAB_ID=D138499
- inject-thrift-client: Add methods to
c.t.inject.thrift.filters.ThriftClientFilterChain
to allow Tunable timeouts and request timeouts.PHAB_ID=D128506
- inject-thrift-client: Add
idempotent
andnonIdempotent
methods toc.t.inject.thrift.ThriftMethodBuilder
, which can be used to configure retries and the sending of backup requests.PHAB_ID=D129959
- inject-thrift-client: Add
c.t.inject.thrift.modules.ServicePerEndpointModule
for building ThriftMux clients using thethriftmux.MethodBuilder
.PHAB_ID=D128196
- inject-thrift: Update
c.t.inject.thrift.PossibleRetryable
to specify a ResponseClassifier and update usages in inject-thrift-client to use it.PHAB_ID=D134328
- inject-thrift-client: Un-deprecate
c.t.inject.thrift.modules.ThriftClientModule
and update for parity withServicePerEndpointModule
in regards to ThriftMux client configuration. Update documentation. RenameServicePerEndpointModule
to the more descriptive and consistently namedThriftMethodBuilderClientModule
.PHAB_ID=D129891
- finatra-thrift: Add support for building all types of Finagle Thrift clients to the underlying embedded TwitterServer with the
c.t.finatra.thrift.ThriftClient
test utility. See: Creating a clientPHAB_ID=D123915
- finatra-jackson: Added support to finatra/jackson for de-serializing
com.twitter.util.Duration
instances from their String representations.PHAB_ID=D122366
- finatra-http: Change visibility of internal class
c.t.finatra.http.internal.marshalling.RequestInjectableValues
to be correctly specified as private to thehttp
package.PHAB_ID=D127975
- finatra-http: Ensure we close resources in the
ResponseBuilder
. Addresses #440.PHAB_ID=D120779
- finatra-thrift: Add tests for new Scrooge
ReqRepServicePerEndpoint
functionality.PHAB_ID=D107397
- finatra-http: add a
multipart = true
arg toEmbeddedHttpServer.httpMultipartFormPost
`PHAB_ID=D113151
- inject-sever: Do not use the
c.t.inject.server.EmbeddedTwitterServer
InMemoryStatsReceiver
for embedded http clients. The http client stats are emitted with the server under test stats which can be confusing, thus we now create a newInMemoryStatsReceiver
when creating an embedded http client.PHAB_ID=D112024
- EmbeddedTwitterServer, EmbeddedHttpServer, and EmbeddedThriftServer flags and args parameters changed to call-by-name. `
PHAB_ID=
D104733`
- inject-server: Ensure EmbeddedTwitterServer has started before trying to close httpAdminClient.
PHAB_ID=D111294
- inject-core: Remove deprecated
c.t.inject.TestMixin#resetMocks
. Properly usec.t.inject.Mockito
trait in tests. Deprecate resetting of mocks and resettables inc.t.inject.IntegrationTestMixin
.PHAB_ID=D93876
- finatra-http: Parameterize
@RouteParam
,@QueryParam
,@FormParam
, and@Header
to allow specifying the field name to read from the params or header map. Previously these annotations only looked for values by the case class field name leading to possible ugliness when defining case class fields (especially with@Header
). `PHAB_ID=
D94220` - finatra: Add support for using a
java.lang.annotation.Annotation
instance with the#bind[T]
testing DSL. This adds a way to bind instances in tests that use the @Named binding annotation.PHAB_ID=D91330
- finatra-http: Allow setting the content type of a Mustache view.
PHAB_ID=D91949
- finatra-http: Move
FileResolver
to finatra/utils.PHAB_ID=D103536
- finatra-utils: Move
ResponseUtils
to finatra/http.PHAB_ID=D103507
- From now on, release versions will be based on release date in the format of YY.MM.x where x is a patch number.
PHAB_ID=D101244
- finatra-utils: Remove deprecated
ExternalServiceExceptionMatcher
.PHAB_ID=D98343
- finatra-jackson: ScalaType's
isMap
andisCollection
methods now check that the given object's class is a subclass ofscala.collection.Map[Any, Any]
andscala.collection.Iterable[Any]
, respectively. Previously the superclasses' packages were unspecified. This is a runtime behavior change.PHAB_ID=D93104
- finatra-http: Require that route URIs and prefixes begin with forward slash (/).
PHAB_ID=D90895
- inject-utils: (BREAKING API CHANGE) RichOption toFutureOrFail, toTryOrFail, and toFutureOrElse signature changed to take the fail or else parameter by name.
PHAB_ID=D89544
- inject-server: Remove usage of deprecated
c.t.inject.logging.Slf4jBridgeUtility
. Change usages toc.t.util.logging.Slf4jBridgeUtility
.PHAB_ID=D88095
- finatra-http, inject-thrift-client: Remove netty3 specific types and dependency. In finatra-http, the code using these types is deprecated and can be removed allowing us to remove netty3-specific dependencies. In inject-thrift-client we can default to use the DefaultTimer for the backupRequestFilter method param instead of the HashedWheelTimer.
PHAB_ID=D88025
- finatra-http: Parameterized route callback inputs fail because the lookup of a corresponding
MessageBodyManager
reader lookup does not properly handle parameterized types such as collections. This change updates theMessageBodyManager
MessageBodyReader
lookup to take into account parameterized types. This allows for a user to parse aSeq[T]
, orMap[K, V]
as a route callback input type using the default FinatraMessageBodyReader
.PHAB_ID=D104277
- finatra-jackson: Fix issue causing
IllegalArgumentException
from Validations to be swallowed. A catch clause in thec.t.finatra.json.internal.caseclass.jackson.FinatraCaseClassDeserializer
is too broad as it catches thrownIllegalArgumentException
s from field validations when the annotation is applied to a field of the incorrect type, e.g., when@Max
is applied to a String field.PHAB_ID=D95306
- inject-server: Add ability to fail embedded server startup on lint rule violation. There is now a flag in the embedded servers that when set to true will fail server startup if a lint rule violation is detected. This will then fail the running test.
PHAB_ID=D82399
- finatra-http: No longer depend on bijection-util.
PHAB_ID=D86640
- finatra-jackson: Deprecate c.t.finatra.json.utils.CamelCasePropertyNamingStrategy. This object was created to reduce ambiguity with previous releases of Jackson in which the default PropertyNamingStrategy was an abstract class with a default of camel case. Users are encouraged to use the Jackson PropertyNamingStrategy constants directly.
PHAB_ID=D81707
- finatra-jackson: Add support for injecting a snake case FinatraObjectMapper by annotating parameters with a new @SnakeCaseMapper binding annotation.
PHAB_ID=D7798
- finatra-http: Add close hook when constructing a StreamingResponse to allow for resource release without consuming an entire AsyncStream.
PHAB_ID=D64013
- finatra-http: Unmarshalling JSON no longer consumes the body of a HTTP Request.
PHAB_ID=D74519
- finatra-inject: RetryUtil.retry has been removed because it used a blocking call to Thread.sleep. Blocking Finagle threads results in poor performance and RetryUtil.retryFuture should be used instead.
PHAB_ID=D73949
- finatra-jackson: Fix JSON deserialization of scala.util.Either type in FinatraObjectMapper for Scala 2.12.
RB_ID=917699
- finatra-http: Increase composability and flexibility of RouteDSL.
RB_ID=912095
- inject-app: Run installed modules postInjectorStartup before server function. This makes reasoning about the server lifecycle a bit more straight-forward and simplifies things like the exception manager logic for adding and overridding mappers.
RB_ID=911965
- finatra-jackson: Update framework tests to FunSuite ScalaTest testing style.
RB_ID=911745
- finatra: Move finatra/benchmarks and finatra/utils framework tests to FunSuite ScalaTest testing style.
RB_ID=910680
- finatra-http: Correctly return a JsonParseException when the incoming JSON is not parsable as an expected custom case class request object.
RB_ID=912529
- finatra-http: Ensure underlying members are injected for AbstractControllers.
RB_ID=911635
- finatra-jackson: Patch
FinatraDatetimeDeserializer
to support parsing of Long value passed as String, e.g., when parsing a query parameter.RB_ID=911162
- finatra: Close embedded server clients on embedded server close.
RB_ID=910862
- inject-core: (BREAKING API CHANGE) Allow for binding of higher-kinded types when testing. Deprecated
@Bind
mechanism for replacing bound types in an object graph. Now instead of using@Bind
like this:
class DarkTrafficCanonicalResourceHeaderTest extends FeatureTest with Mockito { @Bind @DarkTrafficService val darkTrafficService: Option[Service[Request, Response]] = Some(smartMock[Service[Request, Response]]) /* mock request */ darkTrafficService.get.apply(any[Request]).returns(Future.value(smartMock[Response])) override val server = new EmbeddedHttpServer( twitterServer = new DarkTrafficTestServer) test("DarkTrafficServer#has Canonical-Resource header correctly set") { ...
Users can instead do:
class DarkTrafficCanonicalResourceHeaderTest extends FeatureTest with Mockito { val darkTrafficService: Option[Service[Request, Response]] = Some(smartMock[Service[Request, Response]]) /* mock request */ darkTrafficService.get.apply(any[Request]).returns(Future.value(smartMock[Response])) override val server = new EmbeddedHttpServer( twitterServer = new DarkTrafficTestServer) .bind[Option[Service[Request, Response]], DarkTrafficService](darkTrafficService) test("DarkTrafficServer#has Canonical-Resource header correctly set") { ...
This allows for more flexibility (as the binding is now per object graph, rather than per test files) and is less susceptible to errors due to incorrect usage.
The breaking API change is due to adding this support in the TestInjector, it is now required that users call the
TestInjector#create
method in order to build the injector and that this is done after calls toTestInjector#bind
. Previously, anInjector
was directly returned fromTestInjector#apply
which is no longer true, thus it may look like your IntegrationTests are broken as you now need to add a call toTestInjector#create
.Additionally, this change updates all of the framework tests in the inject modules to the FunSuite testing style from the deprecated WordSpec testing style.
RB_ID=910011
- finatra-thrift: Update framework tests to FunSuite ScalaTest testing style.
RB_ID=910262
- inject-core: Move Logging from grizzled-slf4j to util/util-slf4j-api.
c.t.inject.Logger
is now deprecated in favor ofc.t.util.logging.Logger
in util.PHAB_ID=D29713
- finatra-httpclient: Update framework tests to FunSuite ScalaTest testing style.
RB_ID=909526
- finatra-http: Update framework tests to FunSuite ScalaTest testing style.
RB_ID=909349
- finatra: Bump guava to 19.0.
RB_ID=907807
- inject-thrift-client: Various APIs have changed to work with
ThriftMethod.SuccessType
instead ofThriftMethod.Result
. SeeThriftClientFilterChain
,Controller
,ThriftWarmup
,PossiblyRetryable
.RB_ID=908846
- finatra-http: Correctly support adding Java AbstractController by instance.
RB_ID=910502
- finatra-http: Add Java support for declaring admin routes.
RB_ID=906264
- finatra-http: Add AbstractExceptionMapper for ExceptionMapper usage from Java. Also update the HttpRouter to allow for registration of AbstractExceptionMappers.
RB_ID=902995
- finatra-http: Support for JSON Patch (https://tools.ietf.org/html/rfc6902). Utilities are located in package
com.twitter.finatra.http.jsonpatch
.RB_ID=889152
- finatra: Created companion trait mixins for Test/FeatureTest/IntegrationTest/HttpTest.
RB_ID=897778
- finatra-http: Support for optional trailing slashes in HTTP routes. Routes can now specify that they allow an optional trailing slash by ending the route URI in the Controller with "/?".
RB_ID=893167
- finatra-http: Support for Controller route prefixes. This allows users to define a common prefix for a set of routes declaratively inside a controller.
RB_ID=894695
- inject-core: Add back JUNitRUnner to
c.t.inject.Test
andc.t.inject.WordSpecTest
so that tests can be run when building with maven.RB_ID=909789
- finatra-http: Allow routes which begin with "/admin" to be exposed on the external interface and routes which DO NOT begin with "/admin" to be exposed on the admin interface. NOTE: routes which begin with "/admin/finatra" will continue to be on the admin interface only. Routes which begin with "/admin" that should be served from the admin interface MUST set the flag "admin = true" on the route in the Controller.
RB_ID=905225
- finatra: Move conversions and retry utilities from finatra/utils to finatra/inject/inject-utils.
RB_ID=905109
- finatra: (BREAKING API CHANGE) Rename the existing test helper classes to include their current opinionated testing style, "WordSpec". These are functionally equivalent as this is just a name change. We also introduce new versions of the test helpers which mix in the recommended FunSuite. Thus it will look like your tests are broken as you will need to update to change to use the new "WordSpec" classes or changed your testing style to the recommended
FunSuite
style.PHAB_ID=D19822
- inject-core: Remove JUnitRunner from
c.t.inject.Test
. This was only necessary for internal building with pants and is no longer required. The sbt build uses the ScalaTest runner and is thus not affected. Additionally, update specs2 to 2.4.17 and to depend on just thespecs2-mock
dependency where needed.PHAB_ID=D18011
- finatra-http: Fix issue where added admin routes did not have their HTTP method correctly specified leading to all routes being defaulted to 'GET'.
RB_ID=905887
- finatra-http: Fix for custom request case class collection-type fields which are annotated with either
@RouteParam
,@QueryParam
, or@FormParam
to correctly use a specified default value when a value is not sent in the request.RB_ID=903697
- inject-app: Fix TestInjector to properly parse flags. The TestInjector didn't properly handle defaulted boolean flags when defined in Modules. Updated the TestInjector logic to properly parse flags. Fixes Issue #373
RB_ID=901525
- finatra: Correctly filter published tests-javadocs and tests-sources jars for projects. We are incorrectly publishing tests in the sources and javadocs jars for projects which publish a test-jar dependency (http, httpclient, jackson, thrift, util, inject-app, inject-core, inject-modules, and inject-server).
RB_ID=901153
- finatra-http: Add built-in support for Scala
scala.concurrent.Future
. The CallbackConverter now supports a return type of Scalascala.concurrent.Future
by using a bijection to convert to a Twitterc.t.util.Future
.RB_ID=898147
- finatra-http: Support for request forwarding. Requests can be forwarded from one route to another. Forwarded requests will not go through the server's defined filter chain again but will pass through any Controller defined filters on the "forwarded to" route.
RB_ID=883224
- finatra: Move the OSS documentation to internal code repository to be co-located with source code.
RB_ID=881112
- finatra-http: Decompose the
ThrowableExceptionMapper
to allow users to more easily replace the portions they care about. Users can now just replace the functionality per exception type rather than needing to replace the entireThrowableExceptionMapper
. `RB_ID=891666`` - finatra-http: The 'cookie' method of
c.t.finatra.http.response.ResponseBuilder#EnrichedResponse
that takes a Netty 3 cookie instance has been deprecated. Please use the method which takes a Finagle HTTP cookie instead.RB_ID=888683
- finatra-http: Update adding routes to the TwitterServer HTTP Admin Interface to use
c.t.finagle.http.RouteIndex
and remove thec.t.finatra.http.routing.AdminIndexInfo
. Also relaxed the rules for what routes can be added to the index to include constant /POST routes. Additionally, no longer fail if you define conflicting admin routes --we will now only warn. It is up to the user to not shoot themselves in the foot.RB_ID=889792
- finatra-http: Request in request case classes no longer requires Inject annotation.
RB_ID=888197
- inject-utils: Deprecated RootMonitor since finagle DefaultMonitor is implicitly installed and handles all exceptions caught in stack. We provide a monitor method by default is a NullMonitor in
c.t.finatra.thrift.modules.DarkTrafficFilterModule
andc.t.inject.thrift.modules.FilteredThriftClientModule
, users can handle other exceptions (unhandled by DefaultMonitor) by overriding the monitor methodRB_ID=886773
- finatra: We now depend on a fork of libthrift hosted in the Central Repository. The new package lives in the 'com.twitter' organization. This removes the necessity of depending on maven.twttr.com. This also means that eviction will not be automatic and using a newer libthrift library requires manual eviction if artifacts are being pulled in transitively.
RB_ID=885879
- inject-thrift-client: (BREAKING API CHANGE) Update filter building API with FilteredThriftClientModule. The
c.t.inject.thrift.filters.ThriftClientFilterChain
builder API has changed along with the underlying mechanisms to support enforcement of a "correct" filter order when using the helper methods. Methods have been renamed to a 'with'-syntax to be more inline with other builders and the confusing "globalFilter" method to the more verbose but more accurate "withAgnosticFilter".RB_ID=878260
- inject-thrift-client: Remove deprecated package aliases. We'd like people to move the correct packages.
RB_ID=879330
- finatra-http: (BREAKING API CHANGE) Update StreamingResponse to avoid keeping a reference to the head of the AsyncStream. This resolves the memory leak when streaming an infinite stream. The constructor is now private; use the StreamingResponse object methods that take an AsyncStream by-name instead. ``RB_ID=890205''
- finatra-http: Allow 0,1,t,f as valid boolean values for QueryParam case class requests.
RB_ID=881939
- finatra-http: Add DarkTrafficFilterModule symmetric with thrift/DarkTrafficFilterModule. Add DarkTrafficService annotation in finatra-utils and a filter function used for requests annotated with Annotation Type in order to add DarkTrafficFilter.
RB_ID=878079
- finatra: No longer need to add an additional resolver that points to maven.twttr.com.
RB_ID=878967
- inject-thrift-client: Stop counting response failures in the
c.t.inject.thrift.ThriftClientFilterChain
as these are now counted in thec.t.finagle.thrift.ThriftServiceIface
.RB_ID=879075
- finatra-jackson: Fix issue around JsonProperty annotation empty value. In CaseClassField.jsonNameForField, if the @JsonProperty annotation is used without a value, the property name is interpreted as "". It now follows the default Jackson behavior of using the name field name as the property name when the annotation is empty.
RB_ID=877060
- finatra: Correct instances of misspelled word "converter". There are several instances where the word "converter" is misspelled as "convertor". Specifically, TwitterModule.addTypeConvertor has been changed to TwitterModule.addTypeConverter. Other internal renamings are TwitterDurationTypeConverter, JodatimeDurationTypeConverter, and JacksonToGuiceTypeConverter.
RB_ID=877736
- finatra: Move installation of the SLF4JBridgeHandler to the constructor of
c.t.inject.server.TwitterServer
. Thec.t.finatra.logging.modules.Slf4jBridgeModule
has been removed as there is now little reason to use it unless you are building an application directly fromc.t.inject.app.App
since the functionality is now provided by default in the constructor ofc.t.inject.server.TwitterServer
. If usingc.t.inject.app.App
, then users can use thec.t.inject.logging.modules.LoggerModule
. The main advantage is that slf4j bridges are now installed earlier in the application or server lifecycle and thus more of the initialization logging is bridged to the slf4j-api.RB_ID=870913
- finatra-jackson: Test jar is missing files. Classes in the test
c.t.finatra.validation
package were not properly marked for inclusion in the finatra-jackson tests jar. They've now been added.RB_ID=878755
- finatra-thrift: Enhanced support for Java Thrift services.
RB_ID=868254
- finatra-examples: Add web/UI application example.
RB_ID=868027
- inject-server: Allow for the ability to disable test logging via System property.
RB_ID=867344
- finatra-http: Simplify ExceptionMapper configuration and usage. We are dropping the need for a specialized DefaultExceptionMapper (which was simply an ExceptionMapper[Throwable]). Instead we now allow the configuration of mappers in the ExceptionManager to be much more flexible. Previously, the framework tried to prevent a user from registering a mapper over a given exception type multiple times and specialized a "default" ExceptionMapper to invoke on an exception type of Throwable. The ExceptionManager will now accept any mapper. If a mapper is added over a type already added, the previous mapper will be overwritten.
The last registered mapper for an exception type wins.
to swap out any of these defaults they simply need add their own mapper to
the manager for the exception type to map. E.g., by default the framework
will add:
Throwable ->
com.twitter.finatra.http.internal.exceptions.ThrowableExceptionMapper
JsonParseException ->
com.twitter.finatra.http.internal.exceptions.json.JsonParseExceptionMapper
CaseClassMappingException ->
com.twitter.finatra.http.internal.exceptions.json.CaseClassExceptionMapper
exceptiontype and moving up the inheritence chain until it finds mapper
configured for the type. In this manner an ExceptionMapper[Throwable] will
be the last mapper invoked and performs as the "default".
Throwable type will suffice, i.e., ExceptionMapper[Throwable] to the
ExceptionManager. There are multiple ways to add a mapper. Either through
the HttpRouter:
override def configureHttp(router: HttpRouter): Unit = {
router
.exceptionMapper[MyDefaultExceptionMapper]
...
}
Or in a module which is then added to the Server, e.g.,
object MyExceptionMapperModule extends TwitterModule {
override def singletonStartup(injector: Injector): Unit = {
val manager = injector.instance[ExceptionManager]
manager.add[MyDefaultExceptionMapper]
manager.add[OtherExceptionMapper]
}
}
override val modules = Seq(
MyExceptionMapperModule,
...)
any "framework" module for overridding the default ExceptionMappers. So the
"def exceptionMapperModule" has also been removed.
RB_ID=868614
- finatra-http: Specify HTTP Java API consistently.
RB_ID=868264
- inject-core: Clean up inject.Logging trait. Remove dead code from Logging.
RB_ID=868261
- finatra-http: Move integration tests to a package under
com.twitter.finatra.http
.RB_ID=866487
- finatra-http: Fix issue with unimplemented methods in NonValidatingHttpHeadersResponse.
RB_ID=868480
- finatra-thrift: Add non-guice method to add controller to ThriftRouter
RB_ID=863977
- finatra-thrift: Add support for a "dark" traffic filter in thrift routing. Add a Finatra implementation of the Finagle AbstractDarkTrafficFilter which sub-classes ThriftFilter and will work in the Finatra filter chain. This will allow users to play incoming requests to a configured "dark" service.
RB_ID=852338
- finatra-http: Performance improvements from latest micro-benchmarking run.
- BREAKING API CHANGE: Removed
HttpHeaders#setDate
,HttpHeaders#set
andHttpHeaders#GMT
.RB_ID=865247
- finatra-thrift: Provide access to statsReceiver argument in ThriftClientFilterBuilder.
RB_ID=857286
- finatra-http: Add content headers for EmbeddedHttpServer #httpDelete and #httpPatch methods.
RB_ID=862200
- finatra-thrift: Add python namespace to finatra_thrift_exceptions.thrift.
RB_ID=844668
- finatra-http: Support ANY method in HTTP Controllers. Adds support for defining routes which will answer to "any" HTTP method.
RB_ID=830429
- finatra: Address lifecycle around com.twitter.inject.app.App#appMain.
- (BREAKING CHANGE) EmbeddedApp has been completely re-written to be a better utility for testing command-line applications, as a result there are transparent changes to EmbeddedTwitterServer.
com.twitter.inject.app.App#appMain is now com.twitter.inject.app.App#run and com.twitter.inject.server.TwitterServer#start.
run() is used for "running" applications and #start() is used for "starting" servers. In the lifecycle TwitterServer implements
App#run() as final and simply delegates to the start() method.
- Server await callback for adding server Awaitables to a list so that the server will now Await.all on all collected Awaitables.
- Added a new TwitterModuleLifecycle method: singletonPostWarmupComplete.
- More documentation around server and app Lifecycle methods, their intended usages, and usages of callback functions.
RB_ID=844303
- finatra: Narrow visibility on classes/objects in internal packages. Classes/objects in internal packages are not intended for use outside of the framework.
RB_ID=845278
- finatra-http: fix HttpHeaders's Date locale problem.
RB_ID=843966
- inject-thrift: Address issues with com.twitter.inject.exceptions.PossiblyRetryable. PossiblyRetryable does not correctly determine what is retryable. Updated to correct the logic for better default retry utility.
RB_ID=843428
- finatra: finatra: Move com.twitter.finatra.annotations.Flag|FlagImpl to com.twitter.inject.annotations.Flag|FlagImpl.
RB_ID=843383
- finatra: Remove com.twitter.inject.conversions.map#atomicGetOrElseUpdate. This was necessary for Scala 2.10 support since #getOrElseUpdate was not atomic until Scala 2.11.6. See: scala/scala#4319.
RB_ID=842684
- finatra: Upgrade to Jackson 2.6.5.
RB_ID=836819
- inject: Introduce inject/inject-thrift module to undo cyclic dependency introduced in RB 839427.
RB_ID=841128
- inject-thrift-client: Improvements to FilteredThriftClientModule to provide finer-grain insight on ThriftClientExceptions. NOTE: previously per-route failure stats were in the form: route/add1String/GET/status/503/handled/ThriftClientException/Adder/add1String/com.twitter.finatra.thrift.thriftscala.ServerError
These will now split across per-route and detailed "service component" failure stats, e.g.,
route/add1String/GET/failure/adder-thrift/Adder/add1String/com.twitter.finatra.thrift.thriftscala.ServerError
route/add1String/GET/status/503/mapped/ThriftClientException
// service component
service/failure/adder-thrift/Adder/add1String/com.twitter.finatra.thrift.thriftscala.ServerError
"SOURCE" is by default the thrift client label, however, users are able to map this to something else.
RB_ID=839427
- finatra: Renamed Embedded testing utilities constructor args, clientFlags --> flags and extraArgs --> args.
RB_ID=839537
- finatra-http: Set Content-Length correctly in EmbeddedHttpServer, to support multi-byte characters in the request body.
RB_ID=837438
- finatra-http: No longer special-case NoSuchMethodException in the ExceptionMappingFilter.
RB_ID=837369
- finatra-http: Remove deprecated package objects in com.twitter.finatra. Callers should be using code in the com.twitter.finatra.http package.
RB_ID=836194
- finatra-http: Removed deprecated ExceptionBarrierFilter. NOTE: The ExceptionBarrierFilter produced stats in the form: "server/response/status/RESPONSE_CODE". Using the replacement StatsFilter (in combination with the ExceptionMappingFilter) will produce more granular per-route stats. The comparable stats from the StatsFilter will be in the form: "route/ROUTE_URI/HTTP_METHOD/status/RESPONSE_CODE" with an additional aggregated total stat.
RB_ID=836073
E.g, server/response/status/200: 5, server/response/status/201: 5, server/response/status/202: 5, server/response/status/403: 5,
route/bar_uri/GET/status/200: 5,
route/bar_uri/GET/status/2XX: 5,
route/bar_uri/GET/status/400: 5,
route/bar_uri/GET/status/401: 5,
route/bar_uri/GET/status/403: 5,
route/bar_uri/GET/status/4XX: 15,
route/foo_uri/POST/status/200: 5,
route/foo_uri/POST/status/2XX: 5,
route/foo_uri/POST/status/400: 5,
route/foo_uri/POST/status/401: 5,
route/foo_uri/POST/status/403: 5,
route/foo_uri/POST/status/4XX: 15,
- finatra: Made implicit classes extend AnyVal for less runtime overhead.
RB_ID=835972
- finatra-http: Remove deprecated package objects in com.twitter.finatra. Callers should be using code in the com.twitter.finatra.http package.
RB_ID=836194
- finatra: Publish all artifacts under com.twitter organization.
RB_ID=834484
- finatra: Update sbt memory settings.
RB_ID=834571
- inject-server: Rename com.twitter.inject.server.TwitterServer#run to com.twitter.inject.server.TwitterServer#handle.
RB_ID=833965
- finatra-http: Move test utilities in
com.twitter.finatra.http.test.*
tocom.twitter.finatra.http.*
.RB_ID=833170
- finatra: Update SLF4J to version 1.7.21 and Logback to 1.1.7. Also update example logging configurations for best practices.
RB_ID=832633
- Builds are now only for Java 8 and Scala 2.11. See the
blog post <https://finagle.github.io/blog/2016/04/20/scala-210-and-java7/>
_ for details.RB_ID=828898
- finatra-examples: Add sbt-revolver to the hello-world example. Fixes GH-209.
RB_ID=838215
- finatra: Fix to properly support Java controllers that return Futures in their route callbacks.
RB_ID=834467
- finatra-thrift: Add ThriftWarmup for thrift servers.
RB_ID=820771
- finatra-inject/inject-server: Register framework in Library registry.
RB_ID=809458
- finatra-http: Support for trace, connect & options in RequestBuilder.
RB_ID=811102
- finatra-thrift: Allow for thrift server configuration.
RB_ID=811126
- finatra/twitter-server: Update to register TwitterServer as library in /admin/registry.json.
RB_ID=825129
- finatra-inject/inject-server: Deprecate PromoteToOldGenUtils in favor of twitter-server's prebindWarmup event.
RB_ID=819411
- finatra-http: Move HttpServer to new Http stack API.
RB_ID=812718
- finatra: Revert sbt-scoverage plugin to 1.2.0.
RB_ID=812098
- finatra-http: Ensure headers are set correctly in requests and responses.
RB_ID=813969
v2.1.5 (2016-03-15)
- finatra-http: Ability to access the finagle request in the ResponseBuilder for templating.
RB_ID=805317
- finatra-http: Added ability to register routes into the TwitterServer admin UI.
RB_ID=808272
- finatra: Added PULL_REQUEST_TEMPLATE
RB_ID=808946
- finatra: Move to
develop
branch as default branch for Github.RB_ID=810088
- finatra: Updated test jars to only contain test utility code.
RB_ID=809803
- finatra-http; finatra-thrift: Slf4JBridgeModule is added by default and no longer breaks services which use the slf4k-jdk14 logging implementation.
RB_ID=807171
- finatra-http: Fixed incorrect (or missing) content-type on some http responses.
RB_ID=807773
- finatra-jackson: Fix to support doubles/floats in the jackson Min/Max/Range validations.
RB_ID=809821
v2.1.4 (2016-02-25)
- Some Scaladoc links are broken on twitter.github.io/finatra Github Issue 298
- LoggingMDCFilter lacks documentation Github Issue 303
- bug in finatra/examples/hello-world/src/main/resources/logback.xml Github Issue 289
- Improve error message when @Header field is missing Github Issue 263
v2.1.3 (2016-02-05)
- Is it possible to have different modules listen in different ports? Github Issue 295
- Asynchronous method validations Github Issue 292
- if the Cookie contain version='' ,can't get the request.cookies Github Issue 290
- Failed to auto configure default logger context Github Issue 288
- Inject properties Github Issue 287
- sbt compile error on master Github Issue 284
- Optionally announce server location on startup Github Issue 241
v2.1.2 (2015-12-09)
- Missing Scaladoc Github Issue 279
- Finatra + Protobuf Github Issue 277
- Simple hello-world example does not compiled Github Issue 274
- Allow overriding of the http service name Github Issue 270
- Bump to latest finagle? Github Issue 266
- ClassCastException: com.twitter.inject.logging.FinagleMDCAdapter cannot be cast to ch.qos.logback.classic.util.LogbackMDCAdapter Github Issue 256
v2.1.1 (2015-10-29)
- Update Startup Test on doc Github Issue 261
- Error with simple test using httpPutJson Github Issue 257
- appfrog problem with admin server, I only can use one port Github Issue 252
- Streaming content every X seconds Github Issue 250
- Mustache templates getting stripped Github Issue 112
Merged pull requests:
- Remove unneccesary files Github Issue 265 (cacoco)
v2.1.0 (2015-10-01)
Merged pull requests:
- finatra/inject * Rename InjectUtils to more specific PoolUtils Github Issue 258 (cacoco)
v2.0.1 (2015-09-21)
- Split code into packages/modules Github Issue 254
- Support for Scala Future's Github Issue 249
- Override TwitterModule in FeatureTest Github Issue 233
Merged pull requests:
- Update TweetsControllerIntegrationTest.scala Github Issue 251 (scosenza)
- Update Travis CI to build with java8 fix. Github Issue 244 (cacoco)
v2.0.0 (2015-09-09)
- Singleton classes Github Issue 236
- com.twitter.finatra.utils.ResponseUtils for 2.0.0.M2 missing functions used in examples Github Issue 235
- Warmup example in README seems to be using non-existent features Github Issue 234
- Unable to resolve finatra-slf4j artifact Github Issue 232
- Unable to resolve some of the dependencies Github Issue 231
- How to render static webpage in finatra2 Github Issue 230
- When running a FeatureTest a lot of data is dumped to stdout and stderr Github Issue 226
- Mapping a header by name to a case class requires additional metadata Github Issue 225
- Missing scaladoc documentation Github Issue 221
- finatra-hello-world does not compile Github Issue 219
- Add tags for Finatra 1.6.0 and 1.5.4 Github Issue 216
- FeatureTest withJsonBody not working Github Issue 215
- Disable admin Github Issue 208
- Regexes in paths for route definitions Github Issue 197
- AppService doesn't support POST of JSON containing % and then & Github Issue 173
- fatjar includes unexpected assets in the public directory Github Issue 147
- allow subclassing of request Github Issue 116
- Builtin Compressor for static files Github Issue 113
- bring back controller prefixes Github Issue 104
- code coverage stats Github Issue 98
- Add Aurora/Mesos support Github Issue 94
- Simplify Cookie API with a CookieBuilder Github Issue 93
- implement a routes.txt in admin Github Issue 80
- support ETAGS and/or Cache-Control headers in file server Github Issue 73
- asset pipeline filter Github Issue 62
Merged pull requests:
- Scosenza update readmes Github Issue 242 (scosenza)
- Update warmup docs Github Issue 238 (scosenza)
- Change Google Analytics tracking to use Twitter OSS account Github Issue 217 (travisbrown)
v2.0.0.M2 (2015-06-12)
- Issue with POST request Github Issue 214
- error running example with sbt run: overloaded method value settings with alternatives. Github Issue 207
- Was the 1.5.3 release retagged? Github Issue 206
- Finatra 1.5.3 and dependencies at Travis CI Github Issue 205
- Add an ADOPTERs.md Github Issue 204
- connect finagle filter to specific controller Github Issue 203
- Does Finatra support Scala 2.11? Github Issue 196
- Support multipart PUT requests Github Issue 194
- Content-type custom settings do not work when render json Github Issue 191
- FlatSpecHelper dependency missing in finagle 1.6.0 Github Issue 189
- Allow other logging handlers Github Issue 187
- ErrorHandler used by ControllerCollection depends on order Controllers are added Github Issue 182
- Deployment for newly generated project does not work on heroku Github Issue 180
- finatra doc typo Github Issue 174
- Admin interface is showing a blank page. Github Issue 171
- Update to scala 2.11.x Github Issue 159
- Missing static resources report 500 Internal Server Error Github Issue 157
- flag values are not resolved until server starts Github Issue 148
- docs are wrong about default template path Github Issue 143
- Static files can`t be found if finatra server starts at Windows Github Issue 130
- Add support for parsing JSON request body Github Issue 129
- Add test for unicode content-length Github Issue 122
- Expose logger without having to include App and Logger traits in every class Github Issue 121
- Make View class generic Github Issue 118
- premain docs Github Issue 114
- allow registration of custom jackson modules Github Issue 110
- Add CONTRIBUTING.md Github Issue 109
- expose server ip at startup time Github Issue 108
- explore dynamic routing Github Issue 103
- implement rails-like "flash" Github Issue 100
- CSRF Support Github Issue 89
- Session support Github Issue 88
- Configurable Key/Value store Github Issue 87
- apache-like directory browser for files Github Issue 54
- benchmark suite with caliper Github Issue 45
- RequestAdapter does not support multiple values for query params Github Issue 22
Merged pull requests:
- Update README.md Github Issue 202 (scosenza)
v2.0.0.M1 (2015-04-30)
- UNRESOLVED DEPENDENCIES Github Issue 199
- Changing port breaks embedded static file server Github Issue 192
- Finatra cannot be built when Finagle's version is greater than 6.13.0 Github Issue 153
Merged pull requests:
- 2.0.0.M1 Github Issue 200 (cacoco)
- Finatra 1.5.4 with finagle-stats 6.22.0 throws an exception Github Issue 184
- Document unit testing controllers by using MockApp Github Issue 178
- maven.twttr.com not showing finatra Github Issue 175
- Finatra 1.5.4 java.lang.RuntimeException with Finagle 6.22.0 Github Issue 172
- Error while pushing on Heroku Github Issue 170
- Finatra closes connection Github Issue 161
- Spec test doesn't populate multiParams Github Issue 155
- RequestAdapter fails to decode non-multipart POSTs Github Issue 154
Merged pull requests:
- FIX: issue Github Issue 182, let controller's error handler handle its own errors. Github Issue 188 (plaflamme)
- Update to use new Travis CI infrastructure Github Issue 186 (caniszczyk)
- Refactor FinatraServer to allow custom tlsConfig Github Issue 183 (bpfoster)
- Fix heroku deployments for template project Github Issue 181 (tomjadams)
- remove dependency on scalatest Github Issue 179 (c089)
- Update to twitter-server 1.8.0 and finagle 6.22.0 Github Issue 176 (bpfoster)
- Add an apache style directory browser Github Issue 169 (leeavital)
- MultipartParsing should only be called for POST requests that are multipart Github Issue 168 (manjuraj)
- fixed resource resolution not loading from dependencies, and consistent ... Github Issue 167 (tptodorov)
- Fix type error in sample code Github Issue 165 (leeavital)
- added builder from ChannelBuffer Github Issue 164 (tptodorov)
- Do not log errors in the ErrorHandler Github Issue 163 (eponvert)
- Adding missing copyright headers to source files Github Issue 162 (bdimmick)
- support use of templates from dependencies in development mode, by loadi... Github Issue 160 (tptodorov)
- Update readme.md to reflect issues on installation Github Issue 152 (comamitc)
- Add code coverage support with coveralls Github Issue 151 (caniszczyk)
- Use HttpServerDispatcher to fix remoteAddress property of Request. Github Issue 142 (pixell)
- Don't add .mustache extension to template file name if it already has an extension Github Issue 138 (jliszka)
- Pass the filename of the template to the factory Github Issue 136 (jliszka)
- path definitions on routes Github Issue 131 (grandbora)
- ObjectMapper reuse & config Github Issue 126 (Xorlev)
- Could add support for Windows? Github Issue 145
- Sessions example Github Issue 134
- No main class detected. Github Issue 133
- Unresolved dependencies Github Issue 132
Merged pull requests:
- Bumped twitter-server to 1.6.1 Github Issue 150 (pcalcado)
- modify FileService handle conditional GETs for static assets Github Issue 144 (tomcz)
- remove duplicated
organization
config Github Issue 140 (jalkoby) - More render shortcuts Github Issue 139 (grandbora)
- mixing Router with Twitter App creates exitTimer thread per request Github Issue 135 (manjuraj)
- Response body truncated Github Issue 120
- Add 2 methods in FinatraServer.scala for custom start stop Code Github Issue 107
Merged pull requests:
- Adding shortcut methods to common http statuses Github Issue 128 (grandbora)
- maxRequestSize flag has no effect Github Issue 127 (manjuraj)
- Add content-length: 0 for no content responses Github Issue 124 (grandbora)
- Updated SpecHelper to support a body for POST, PUT and OPTIONS methods Github Issue 123 (mattweyant)
- Use bytes length for content-length instead of string length Github Issue 117 (beenokle)
- Add helper for setting contentType Github Issue 115 (murz)
- multipart/form-data regression Github Issue 101
- flight/bower and bootstrap built in Github Issue 63
Merged pull requests:
- upgrade mustache to 0.8.14 Github Issue 106 (murz)
- set Content-Length on static file responses Github Issue 102 (zuercher)
- Add support for Bower and use default bootstrap.css in new projects Github Issue 99 (armandocanals)
- 1.7.x Github Issue 96
- Investigate automatic html escaping in mustache templating Github Issue 91
- Missing share files? Github Issue 90
- Stats broken after twitter-server upgrade Github Issue 95
- Response tied to originating request Github Issue 86
- Test/Harden logging Github Issue 84
- LogLevel doesn't seem to work Github Issue 83
- enable full admin endpoints besides metrics.json Github Issue 74
- request.routeParams should be decoded Github Issue 68
Merged pull requests:
- Fix unicode rendering in json. Correct size of response is now set Github Issue 97 (yuzeh)
- enable HTML escaping in mustache templates Github Issue 92 (zuercher)
- 0 deprecation/warnings Github Issue 17
- filters for select routes only Github Issue 85
- using websockets Github Issue 81
- maven to sbt Github Issue 78
- support in release scripts for dual publishing scala 2.9 and 2.10 Github Issue 75
- PUT and PATCH command param issue Github Issue 71
Merged pull requests:
- Add Content-Length header as part of building the request. Github Issue 82 (BenWhitehead)
- FinatraServer should take the generic Filters, not SimpleFilters Github Issue 76 (pcalcado)
- 1.4.1 Github Issue 72
- Filter invoked 4 times per single request? Github Issue 69
- Filters not working Github Issue 66
- libthrift outdated Github Issue 65
Merged pull requests:
- Adding lazy service Github Issue 67 (grandbora)
- Fixed a bug with Inheritance using Mustache Github Issue 64 (pranjaltech)
- port back apache's multiupload handler Github Issue 43
- move to com.twitter.common.metrics instead of ostrich.stats Github Issue 42
- move to twitter-server once published Github Issue 41
- Add public/ dir in src/main/resources as new docroot Github Issue 39
- Make mustache factory use baseTemplatePath local docroot and template path Github Issue 56
Merged pull requests:
- Concatenate local docroot and template path when forming mustacheFactory Github Issue 57 (yuzeh)
- handle param routing for static file handling Github Issue 55
- make redirects RFC compliant Github Issue 49
- Sending redirect require a body Github Issue 48
- support a "rails style" render.action to render arbitrary actions from any other action without a redirect Github Issue 44
- Startup / Shutdown hooks Github Issue 37
Merged pull requests:
- Support OPTIONS HTTP method Github Issue 53 (theefer)
- Stying pass across the codebase. Fixing conventions. Github Issue 51 (twoism)
- closes Github Issue 49 * make redirects match the RFC Github Issue 50 (twoism)
Merged pull requests:
- fixed typing of jsonGenerator so it can be actually overridden Github Issue 47 (bmdhacks)
Merged pull requests:
- allow json encoder to be overwritten Github Issue 46 (bmdhacks)
- shutdown the built server on shutdown Github Issue 40 (sprsquish)
- ./finatra update-readme no longer works Github Issue 34
- ./finatra generator doesnt work on linux Github Issue 24
Merged pull requests:
- Handle downstream exceptions and display the error handler. Github Issue 38 (bmdhacks)
- Force mustache partials to be uncached from the local filesystem in development mode. Github Issue 36 (morria)
- Fixing call to the request logger Github Issue 35 (morria)
- Custom error handlers Github Issue 29
Merged pull requests:
- Fix Set-Cookier header bug in response Github Issue 31 (hontent)
- Publish to Maven Central Github Issue 23
- Serve static files Github Issue 28
- Unable to retrieve post parameters Github Issue 26
Merged pull requests:
- fix of post parameters Github Issue 27 (mairbek)
- Immutable instead of mutable map in tests Github Issue 25 (mairbek)
- an config Github Issue 12
- do a perf review Github Issue 13
- update docs Github Issue 8
- allow insertion of userland filters into the finagle stack Github Issue 15
- bubble up view/mustache errors Github Issue 14
Merged pull requests:
- Add Controller method callback timing Github Issue 21 (franklinhu)
Merged pull requests:
- Pass controllers into AppService Github Issue 20 (franklinhu)
Merged pull requests:
- Fix FinatraServer register for AbstractFinatraController type change Github Issue 19 (franklinhu)
- regexed routes Github Issue 11
- PID management Github Issue 5
Merged pull requests:
- Add Travis CI status to README Github Issue 18 (caniszczyk)
- mvn package doesnt fully package Github Issue 16
- update gem Github Issue 7
- verify heroku uploads works Github Issue 6
- unbreak file upload/form support Github Issue 10
- add logging Github Issue 4
- unbreak cookie support Github Issue 9
Merged pull requests:
- Fix synchronization/correctness issues Github Issue 3 (franklinhu)
- Fix HTTP response code for routes not found Github Issue 2 (franklinhu)
- Fix template file resolving for packaged jarfiles Github Issue 1 (franklinhu)