Skip to content

@finaglehelper finaglehelper released this May 21, 2019 · 2 commits to develop since this release

Fixed

  • finatra: The added c.t.finatra.http.RouteHint was missing from the test-jar sources and has
    been added. 7945d128
Assets 2

@finaglehelper finaglehelper released this May 17, 2019 · 7 commits to develop since this release

19.5.0

Added

  • inject-server/http/thrift: Allow users to specify a StatsReceiver implementation to use in the
    underlying EmbeddedTwitterServer instead of always providing an InMemoryStatsReceiver
    implementation. 7a486fd2
  • finatra-http: Add ability for Java HTTP Controllers to use the RouteDSL for per-route filtering
    and for route prefixing. c2733158
  • inject-request-scope: Add a Filter.TypeAgnostic implementation for the FinagleRequestScopeFilter
    for better compatibility with Thrift servers. Update the FinagleRequestScope to make more idiomatic
    use of Context locals. 451cff77
  • finatra-http: Route params are now URL-decoded automatically. a79f5634
  • finatra-jackson: Add ability to bypass case class validation using the
    NullValidationFinatraJacksonModule. 401d7285
  • inject-app: Add c.t.inject.app.DtabResolution to help users apply supplemental Dtabs added by
    setting the dtab.add flag. This will append the supplemental Dtabs to the
    Dtab.base in a premain function. 6c4eeda0

Changed

  • finatra-http: Move when admin routes are added to the AdminHttpServer to the postInjectorStartup
    phase, such that any admin routes are available to be hit during server warmup. Simplify HttpWarmup
    utility to make it clear that it can and should only be used for sending requests to endpoints added
    to the server's configured HttpRouter. The forceRouteToAdminHttpMuxers param has been renamed
    to admin to signal that the request should be sent to the HttpRouter#adminRoutingService instead
    of the HttpRouter#externalRoutingService. Routing to TwitterServer HTTP Admin Interface via this
    utility never worked properly and the (broken) support has been dropped. 0cd3ed69
  • finatra-kafka: Update com.twitter.finatra.kafka.test.KafkaTopic, and
    com.twitter.finatra.kafka.test.utils.PollUtils methods to take
    com.twitter.util.Duration instead of org.joda.time.Duration. 94c051b3
  • finatra: Removed Commons IO as a dependency. 4b6e4726
  • finatra-http: com.twitter.finatra.http.EmbeddedHttpServer methods which previously used the
    routeToAdminServer parameter have been changed to use a RouteHint instead for added
    flexibility in controlling where a test request is sent. 4653992c
  • finatra-inject: Feature tests no longer default to printing metrics after tests.
    This can be enabled on a per-test basis by overriding FeatureTestMixin.printStats
    and setting it to true. 28eecabe
  • finatra-inject: Update com.twitter.inject.utils.RetryPolicyUtils,
    com.twitter.inject.thrift.modules.FilteredThriftClientModule, and
    com.twitter.inject.thrift.filters.ThriftClientFilterChain methods to take
    com.twitter.util.Duration instead of org.joda.time.Duration. c295efb0
  • finatra: Fix Commons FileUpload vulnerability. Update org.apache.commons-fileupload from version
    1.3.1 to version 1.4. This closes #PR-497. d5d32737
  • finatra-http: Replace all usages of guava's com.google.common.net.MediaType with String.
    You can migrate by calling MediaType#toString everywhere you passed a MediaType before. 826fabb2
  • finatra-http: Add http scope to shutdown.time flag, making it http.shutdown.time.
    2abb46f8
  • finatra-http: Remove deprecated DefaultExceptionMapper. Extend
    c.t.finatra.http.exceptions.ExceptionMapper[Throwable] directly instead. cd2d5be3
  • inject-app: Move override of com.twitter.app.App#failfastOnFlagsNotParsed up from
    c.t.inject.server.TwitterServer to com.twitter.inject.app.App such that all Finatra-based
    applications default to this behavior. feb887e0
  • inject-app|server: change capturing of flag ordering from Modules for adding to the App's c.t.app.Flags
    instance to match the semantics of directly calling c.t.app.Flags#add. Prefer AtomicBoolean
    instances over where we currently use mutable Boolean instances in c.t.inject.app.App, c.t.inject.app.TestInjector,
    and c.t.inject.server.EmbeddedTwitterServer. 2dfd33b5
  • finatra-examples: Update "twitter-clone" example to use Dtabs instead of the deprecated resolverMap.
    Move the "hello-world" example to "http-server". 6c4eeda0

Fixed

  • finatra-jackson: Properly account for timezone in Joda DateTime deserialization. abb17d5a
  • finatra-http: EmbeddedHttpServer's httpGetJson method now properly passes
    all parameters through to the underlying client call. 068cd440
Assets 2

@finaglehelper finaglehelper released this Apr 18, 2019 · 46 commits to develop since this release

19.4.0

Added

  • inject-server: Add globalFlags argument to EmbeddedTwitterServer, which will
    allow for scoping a c.t.a.GlobalFlag property change to the lifecycle of the
    underlying TwitterServer, as a c.t.a.GlobalFlag is normally scoped to the JVM/process.
    This change is also reflected in EmbeddedHttpServer and EmbeddedThriftServer constructors.
    38a3180a

  • inject-utils: add toOrderedMap implicit conversion for java.util.Map 1686420c

  • finatra-kafka-streams: Add flag rocksdb.manifest.preallocation.size with default value
    4.megabytes to c.t.f.k.c.RocksDbFlags and set value in
    c.t.f.k.c.FinatraRocksDBConfig. 0cac9785

  • finatra-http: Add commaSeparatedList boolean parameter to QueryParams, for
    parsing comma-separated query parameters into collection types. 0ae425a2

Changed

  • finatra-kafka: Upgraded kafka libraries from 2.0.0 to 2.2.0.

  • finatra-thrift: Removed c.t.finatra.thrift.exceptions.FinatraThriftExceptionMapper,
    c.t.finatra.thrift.filters.ClientIdAcceptlistFilter,
    c.t.finatra.thrift.modules.ClientIdAcceptlistModule,
    c.t.finatra.thrift.filters.ClientIdWhitelistFilter,
    c.t.finatra.thrift.modules.ClientIdWhitelistModule,
    and the finatra/finatra_thrift_exceptions.thrift IDL. caed5ec8

  • finatra-thrift: Constructing a ThriftRouter now requires serverName. dc357fd8

  • finatra-examples: Updated StreamingController to use Reader instead of AsyncStream
    3d5e3282

  • finatra-kafka-streams: Implement FinatraKeyValueStore as custom store. cd38ddf6

  • finatra-thrift: Constructing a ThriftRouter now requires c.t.f.StackTransformer.
    a96312d2

Fixed

  • finatra-kafka: Ensure that EmbeddedKafka implementation of beforeAll() makes
    call to super.beforeAll() so hooks registered in super class get executed. 9404b28f
  • finatra-kafka-streams: FinatraTransformer.timerStore config object references immutable
    map which causes exception thrown if user code calls AbstractStoreBuilder.withLoggingDisabled.
    Fixed FinatraTransformer.timerStore to convert from immutable map to mutable map before
    forwarding config object to kafka library. 827c4612
Assets 2

@finaglehelper finaglehelper released this Mar 13, 2019 · 76 commits to develop since this release

Added

  • finatra-kafka: FinagleKafka clients pass correct deadline for close to
    underlying Kafka clients. 6e579e60

  • finatra-kafka-streams: (BREAKING API CHANGE) Create flags for common consumer and producer
    configs. KafkaFlagUtils#kafkaDocumentation and getKafkaDefault are no longer public methods.
    9ca7eac5

  • finatra-kafka: Added support to fetch end offset for a given partition. 2053b76a

  • finatra-http: Added HttpServerTrait which allows for a simple way to serve a
    Finagle Service[Request, Response] on an external interface without the need to
    configure the Finatra HttpRouter. a4fe06c5

  • finatra-http: Added support to serve c.t.io.Reader as a streaming request.
    4491e5e5

Changed

  • finatra-kafka-streams: Improve querying of windowed stores. ea65ef40

  • inject-utils: Mark c.t.inject.utils.StringUtils#snakify,camelify,pascalify as
    deprecated as their implementations have moved to util/util-core c.t.conversions.StringOps.
    Encourage users to switch usages to c.t.conversions.StringOps#toSnakeCase,toCamelCase,toPascalCase.
    85b9361c

  • finatra-thrift: Changed c.t.finatra.thrift.ThriftServerTrait#service to #thriftService to
    not collide with the serving of a Finagle service from the HttpServer when a server extends
    both HttpServer and ThriftServer. a4fe06c5

Fixed

Closed

Assets 2

@finaglehelper finaglehelper released this Feb 21, 2019 · 88 commits to develop since this release

Added

  • finatra-kafka: Expose timeout duration in FinagleKafkaConsumerBuilder dest(). abd68ddf
  • finatra-kafka-streams: Expose all existing RocksDb configurations. See
    c.t.f.k.config.FinatraRocksDBConfig for details on flag names,
    descriptions and default values. 1454867c
  • 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.
    3b0931e3
  • 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].
    ef071e54
  • finatra-http: Added support to serve c.t.io.Reader as a streaming response in
    c.t.finatra.http.internal.marshalling.CallbackConverter. e5bda446
  • finatra-kafka: Expose endOffsets() in FinagleKafkaConsumer. bcbb5774
  • 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. afd9a17c
  • finatra-jackson: Added @pattern annotation to support finatra/jackson for regex pattern
    validation on string values. 862f0ab1

Changed

  • finatra-kafka-streams: Refactor package names. All classes moved from
    com.twitter.finatra.streams to com.twitter.finatra.kafkastreams. a2ad0ef3
  • finatra-kafka-streams: Delete deprecated and unused classes. ee948398
  • 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.
    093b31b8
  • finatra-jackson: Fix CaseClassField annotation reflection for Scala 2.12. 3747c1ab
  • finatra-kafka-streams: Combine FinatraTransformer with FinatraTransformerV2. cd455c43
  • finatra-thrift: The return type of ReqRepDarkTrafficFilterModule#newFilter has been changed from
    DarkTrafficFilter[MethodIface] to Filter.TypeAgnostic. 50184f1b
  • finatra-kafka: Add lookupBootstrapServers function that takes timeout as a parameter.
    e3426fb9
  • 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. d1d6d1e0
  • 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.
      c03a497c
  • 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.
      ecf2e54f
  • 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.
    3ca4437c

Fixed

  • 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.
    3b93a7d7
  • finatra-kafka-streams: Improve watermark assignment/propagation upon reading the first
    message and when caching key value stores are used. 9aa12b8d
  • 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.
    6237ff86
  • finatra: Remove extraneous dependency on old javax.servlet ServletAPI dependency.
    The fixes #478. 85100952
Assets 2

@finaglehelper finaglehelper released this Jan 10, 2019 · 133 commits to develop since this release

Added

  • 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. f588970e

  • 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.
    47cce546

  • 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. 388bf8f9

  • 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
    9d891cd1

Changed

  • inject-core, inject-server: Remove deprecated @Bind support from test mixins. Users should
    instead prefer using the bind[T]
    DSL in tests. 841f6974

  • 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. 2690003d

  • 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 9d891cd1

  • 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. 9d891cd1

  • 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.
    41767c6e

  • 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 e2dc8b30

  • 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.
    642d7260

  • 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. c51e174b

Fixed

  • finatra-kafka-streams: Fix bug where KeyValueStore#isOpen was throwing an
    exception when called on an uninitialized key value store
    d3f833a1

Closed

Assets 2

@finaglehelper finaglehelper released this Dec 12, 2018 · 154 commits to develop since this release

18.12.0

Added

Changed

  • 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. dc894547
  • 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. b0cb8eaf
  • 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. 6e93b9cc
  • 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
    6e93b9cc

Fixed

  • finatra-http: Validate headers to prevent header injection vulnerability. 8a925000

Closed

Assets 2

@finaglehelper finaglehelper released this Nov 12, 2018 · 166 commits to develop since this release

Changed

  • finatra-thrift: (BREAKING API CHANGE) Update DarkTrafficFilter#handleFailedInvocation to accept
    the request type for more fidelity in handling the failure. 20bd33ac
  • finatra-http: Move request.ContentType and response.Mustache Java annotations to
    com.twitter.finatra.http package namespace. ef135610
  • finatra-jackson: Move away from deprecated code and update error handling and exceptions post
    Jackson 2.9.x upgrade. f1e5c96e
  • 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.
    4aee1051

Fixed

  • 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. 6a715075
Assets 2

@finaglehelper finaglehelper released this Oct 19, 2018 · 178 commits to develop since this release

Fixed

  • 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. 33d0524b

Changed

  • finatra-http, finatra-thrift: Make HTTP and Thrift StatsFitlers "Response Classification"
    aware. 4085d40c

  • 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. d7486843

  • 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. c2378cc7

  • finatra-thrift: Rename defaultFinatraThriftPort to defaultThriftPort.
    5910fd23

Assets 2

@finaglehelper finaglehelper released this Sep 27, 2018 · 191 commits to develop since this release

Changed

  • http/thrift: Update Library registry route information to include controller class name. ffb644e5
Assets 2
You can’t perform that action at this time.