Skip to content

Commit

Permalink
Merge commit 'a3e4c69ba5bc76b8609558b8697463f761ccc027'
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins authored and jenkins committed Jan 9, 2019
2 parents 4714706 + a3e4c69 commit 1b18c59
Show file tree
Hide file tree
Showing 290 changed files with 16,772 additions and 728 deletions.
118 changes: 117 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,116 @@ Note that ``RB_ID=#`` and ``PHAB_ID=#`` correspond to associated message in comm
Unreleased
----------

19.1.0
-------

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. ``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``

Changed
~~~~~~~

* inject-core, inject-server: Remove deprecated `@Bind` support from test mixins. Users should
instead prefer using the `bind[T] <https://twitter.github.io/finatra/user-guide/testing/bind_dsl.html>`__
DSL in tests. ``PHAB_ID=D250325``

* inject-app: Remove deprecated `bind[T]` DSL methods from `c.t.inject.app.BindDSL`.

Instead of:

.. code:: scala
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.,:

.. code:: scala
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 <https://twitter.github.io/finatra/user-guide/testing/mixins.html>`__.
``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``

Fixed
~~~~~

* finatra-kafka-streams: Fix bug where KeyValueStore#isOpen was throwing an
exception when called on an uninitialized key value store
``PHAB_ID=D257635``

Closed
~~~~~~

18.12.0
-------

Expand All @@ -16,6 +126,12 @@ Added
Changed
~~~~~~~

* 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
Expand All @@ -40,7 +156,7 @@ Changed
Fixed
~~~~~

* finatra-http: Validate headers to prevent header injection vulnerability. ``PHAB_ID=D246889``
* finatra-http: Validate headers to prevent header injection vulnerability. ``PHAB_ID=D246889``

Closed
~~~~~~
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ the maintainers will help out during code review.
We've standardized on using the [ScalaTest testing framework][scalatest].
Because ScalaTest has such a big surface area, we use a restricted subset of it
in our tests to keep them easy to read. We've chosen the `Matchers` API, and we
use the [`WordSpec` mixin][wordspec]. Please mixin our [Test trait][test-trait]
use the [`FunSuite` mixin][funsuite]. Please mixin our [Test trait][test-trait]
to get these defaults.

Note that while you will see a [Travis CI][travis-ci] status message in your
Expand Down Expand Up @@ -200,13 +200,13 @@ Scaladocs. Please file an [issue](https://github.com/twitter/finatra/issues).
[finagle-repo]: https://github.com/twitter/finagle
[util-repo]: https://github.com/twitter/util
[effectivescala]: https://twitter.github.io/effectivescala/
[wordspec]: http://doc.scalatest.org/2.2.1/#org.scalatest.WordSpec
[funsuite]: http://doc.scalatest.org/2.2.1/#org.scalatest.FunSuite
[scalatest]: http://www.scalatest.org/
[scala-style-guide]: http://docs.scala-lang.org/style/scaladoc.html
[sbt]: http://www.scala-sbt.org/
[scala-style-guide]: https://docs.scala-lang.org/style/index.html
[sbt]: https://www.scala-sbt.org/
[travis-ci]: https://travis-ci.org/twitter/finatra
[test-trait]: https://github.com/twitter/finatra/blob/develop/inject/inject-core/src/test/scala/com/twitter/inject/Test.scala
[scaladoc]: http://docs.scala-lang.org/style/scaladoc.html
[scaladoc]: https://docs.scala-lang.org/style/scaladoc.html
[scalacheck]: https://www.scalacheck.org/
[gendrivenprop]: http://www.scalatest.org/user_guide/generator_driven_property_checks

Expand Down
Loading

0 comments on commit 1b18c59

Please sign in to comment.