Skip to content

Commit

Permalink
Merge commit '5ca91fd027058ff35d118fb912a38773898a8b97'
Browse files Browse the repository at this point in the history
  • Loading branch information
CSL committed Sep 6, 2017
2 parents d5c2c09 + 5ca91fd commit 8df305d
Show file tree
Hide file tree
Showing 85 changed files with 753 additions and 177 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ sudo: false

language: scala

scala:
- 2.11.11
- 2.12.1

env:
- JAVA_OPTS="-Dsbt.log.noformat=true"
- JAVA_OPTS="-DSKIP_FLAKY=true -Dsbt.log.noformat=true"

# These directories are cached to S3 at the end of the build
cache:
Expand All @@ -22,6 +18,10 @@ before_cache:
- find $HOME/.ivy2 -name "ivydata-*.properties" -delete
- find $HOME/.sbt -name "*.lock" -delete

scala:
- 2.11.11
- 2.12.1

jdk:
- oraclejdk8

Expand Down
31 changes: 27 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# Change Log
All notable changes to this project will be documented in this file. Note that ``RB_ID=#`` and ``DIFF_ID=#`` correspond to associated message in commits.
All notable changes to this project will be documented in this file. Note that ``RB_ID=#`` and ``PHAB_ID=#`` correspond to associated message in commits.

## [Unreleased]

Expand All @@ -12,6 +12,29 @@ All notable changes to this project will be documented in this file. Note that `

### Closed

## [finatra-2.13.0](https://github.com/twitter/finatra/tree/finatra-2.13.0) (2017-09-06)

### Added

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

### Changed

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

### Fixed

### Closed

## [finatra-2.12.0](https://github.com/twitter/finatra/tree/finatra-2.12.0) (2017-08-15)

### Added
Expand Down Expand Up @@ -147,7 +170,7 @@ All notable changes to this project will be documented in this file. Note that `

* inject-core: Move Logging from grizzled-slf4j to util/util-slf4j-api.
`c.t.inject.Logger` is now deprecated in favor of `c.t.util.logging.Logger`
in util. ``DIFF_ID=D29713``
in util. ``PHAB_ID=D29713``

* finatra-httpclient: Update framework tests to FunSuite ScalaTest testing style. ``RB_ID=909526``

Expand Down Expand Up @@ -208,12 +231,12 @@ All notable changes to this project will be documented in this file. Note that `
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.
``DIFF_ID=D19822``
``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 the `specs2-mock` dependency where needed. ``DIFF_ID=D18011``
to depend on just the `specs2-mock` dependency where needed. ``PHAB_ID=D18011``

### Fixed

Expand Down
1 change: 1 addition & 0 deletions benchmarks/src/test/scala/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ junit_tests(
],
fatal_warnings=True,
sources=rglobs('*.scala'),
strict_deps=True,
)
31 changes: 21 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import scoverage.ScoverageKeys

concurrentRestrictions in Global += Tags.limit(Tags.Test, 1)

lazy val projectVersion = "2.12.0"
lazy val projectVersion = "2.13.0"

lazy val buildSettings = Seq(
version := projectVersion,
Expand All @@ -15,19 +15,30 @@ lazy val buildSettings = Seq(
javaOptions in Test ++= travisTestJavaOptions
)

lazy val noPublishSettings = Seq(
publish := {},
publishLocal := {},
publishArtifact := false
)

def travisTestJavaOptions: Seq[String] = {
// When building on travis-ci, we want to suppress logging to error level only.
val travisBuild = sys.env.getOrElse("TRAVIS", "false").toBoolean
if (travisBuild) {
Seq(
"-DSKIP_FLAKY=true",
"-Dsbt.log.noformat=true",
"-Dorg.slf4j.simpleLogger.defaultLogLevel=error",
"-Dcom.twitter.inject.test.logging.disabled",
// Needed to avoid cryptic EOFException crashes in forked tests
// in Travis with `sudo: false`.
// See https://github.com/sbt/sbt/issues/653
// and https://github.com/travis-ci/travis-ci/issues/3775
"-Xmx3G")
} else Seq.empty
} else {
Seq(
"-DSKIP_FLAKY=true")
}
}

lazy val versions = new {
Expand All @@ -38,12 +49,11 @@ lazy val versions = new {
val suffix = if (branch == "master" || travisBranch == "master") "" else "-SNAPSHOT"

// Use SNAPSHOT versions of Twitter libraries on non-master branches
val finagleVersion = "7.0.0" + suffix
val scroogeVersion = "4.19.0" + suffix
val twitterserverVersion = "1.31.0" + suffix
val utilVersion = "7.0.0" + suffix
val finagleVersion = "7.1.0" + suffix
val scroogeVersion = "4.20.0" + suffix
val twitterserverVersion = "1.32.0" + suffix
val utilVersion = "7.1.0" + suffix

val bijectionVersion = "0.9.5"
val commonsCodec = "1.9"
val commonsFileupload = "1.3.1"
val commonsIo = "2.4"
Expand Down Expand Up @@ -98,6 +108,8 @@ lazy val baseSettings = Seq(
scalaCompilerOptions,
javacOptions in (Compile, compile) ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint:unchecked"),
javacOptions in doc ++= Seq("-source", "1.8"),
// -a: print stack traces for failing asserts
testOptions += Tests.Argument(TestFrameworks.JUnit, "-a"),
// broken in 2.12 due to: https://issues.scala-lang.org/browse/SI-10134
scalacOptions in (Compile, doc) ++= {
if (scalaVersion.value.startsWith("2.12")) Seq("-no-java-comments")
Expand Down Expand Up @@ -237,7 +249,7 @@ lazy val root = (project in file("."))
.enablePlugins(ScalaUnidocPlugin)
.settings(baseSettings)
.settings(buildSettings)
.settings(publishSettings)
.settings(noPublishSettings)
.settings(
organization := "com.twitter",
moduleName := "finatra-root",
Expand Down Expand Up @@ -586,8 +598,7 @@ lazy val http = project
moduleName := "finatra-http",
ScoverageKeys.coverageExcludedPackages := "<empty>;.*ScalaObjectHandler.*;.*NonValidatingHttpHeadersResponse.*;com\\.twitter\\.finatra\\..*package.*;.*ThriftExceptionMapper.*;.*HttpResponseExceptionMapper.*;.*HttpResponseException.*",
libraryDependencies ++= Seq(
"com.github.spullara.mustache.java" % "compiler" % versions.mustache,
"com.twitter" %% "bijection-util" % versions.bijectionVersion,
"com.github.spullara.mustache.java" % "compiler" % versions.mustache exclude("com.google.guava", "guava"),
"com.twitter" %% "finagle-exp" % versions.finagleVersion,
"com.twitter" %% "finagle-http" % versions.finagleVersion,
"commons-fileupload" % "commons-fileupload" % versions.commonsFileupload,
Expand Down
2 changes: 1 addition & 1 deletion doc/src/sphinx/user-guide/http/requests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ An example of testing this endpoint:
def deserializeRequest(name: String) = {
val requestBytes = IOUtils.toByteArray(getClass.getResourceAsStream(name))
Request.decodeBytes(requestBytes)
HttpCodec.decodeBytesToRequest(requestBytes)
}
"post multipart" in {
Expand Down
2 changes: 1 addition & 1 deletion doc/src/sphinx/user-guide/json/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ For example,
override val serializationInclusion = Include.NON_EMPTY
override val propertyNamingStrategy = CamelCasePropertyNamingStrategy
override val propertyNamingStrategy = PropertyNamingStrategy.LOWER_CAMEL_CASE
override def additionalMapperConfiguration(mapper: ObjectMapper) {
mapper.configure(Feature.WRITE_NUMBERS_AS_STRINGS, true)
Expand Down
4 changes: 2 additions & 2 deletions examples/benchmark-server/build.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name := "benchmark-server"
organization := "com.twitter"
version := "2.12.0"
version := "2.13.0"
scalaVersion := "2.12.1"
parallelExecution in ThisBuild := false

lazy val versions = new {
val finatra = "2.12.0"
val finatra = "2.13.0"
val logback = "1.1.7"
}

Expand Down
5 changes: 4 additions & 1 deletion examples/benchmark-server/src/main/scala/BUILD
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
scala_library(
dependencies=[
'3rdparty/jvm/org/slf4j:slf4j-nop',
'3rdparty/jvm/com/fasterxml/jackson/core:jackson-databind',
'3rdparty/jvm/com/fasterxml/jackson/datatype:jackson-datatype-joda',
'3rdparty/jvm/com/fasterxml/jackson/module:jackson-module-scala',
'3rdparty/jvm/com/google/inject:guice',
'3rdparty/jvm/org/slf4j:slf4j-nop',
'finagle/finagle-core/src/main/scala',
'finagle/finagle-http/src/main/scala',
'finatra/http/src/main/scala',
'finatra/inject/inject-app/src/main/scala',
'finatra/inject/inject-core/src/main/scala',
'finatra/inject/inject-server/src/main/scala',
'finatra/inject/inject-slf4j/src/main/scala:scala',
'twitter-server/src/main/scala',
'util/util-app/src/main/scala',
'util/util-core/src/main/scala',
'util/util-lint/src/main/scala:scala',
'util/util-logging/src/main/scala',
'util/util-slf4j-api/src/main/scala',
'util/util-stats/src/main/scala',
Expand All @@ -23,4 +25,5 @@ scala_library(
],
fatal_warnings=True,
sources=rglobs('*.scala'),
strict_deps=True,
)
4 changes: 3 additions & 1 deletion examples/benchmark-server/src/test/scala/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ junit_tests(
'3rdparty/jvm/org/slf4j:slf4j-api',
'finagle/finagle-http/src/main/scala',
'finatra/examples/benchmark-server/src/main/scala',
'finatra/examples/benchmark-server/src/test/resources',
'finatra/http/src/test/scala:test-deps',
'finatra/inject/inject-core/src/main/scala',
'finatra/inject/inject-core/src/test/scala:test-deps',
'finatra/inject/inject-server/src/main/scala:scala',
'util/util-slf4j-api/src/main/scala',
'finatra/examples/benchmark-server/src/test/resources',
],
fatal_warnings=True,
sources=rglobs('*.scala'),
strict_deps=True,
)
4 changes: 2 additions & 2 deletions examples/hello-world-heroku/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import com.typesafe.sbt.SbtNativePackager._
packageArchetype.java_application
name := "hello-world-heroku"
organization := "com.twitter"
version := "2.12.0"
version := "2.13.0"
scalaVersion := "2.12.1"
fork in run := true
parallelExecution in ThisBuild := false

lazy val versions = new {
val finatra = "2.12.0"
val finatra = "2.13.0"
val guice = "4.0"
val logback = "1.1.7"
val finagleMetrics = "0.0.3"
Expand Down
5 changes: 4 additions & 1 deletion examples/hello-world-heroku/src/main/scala/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ scala_library(
'3rdparty/jvm/com/google/inject:guice',
'3rdparty/jvm/org/slf4j:slf4j-api',
'finagle/finagle-http/src/main/scala',
'finatra/examples/hello-world-heroku/src/main/resources',
'finatra/http/src/main/scala',
'finatra/inject/inject-app/src/main/scala',
'finatra/inject/inject-core/src/main/scala',
'finatra/inject/inject-server/src/main/scala',
'finatra/inject/inject-slf4j/src/main/scala:scala',
'twitter-server/src/main/scala',
'util/util-app/src/main/scala',
'util/util-core/src/main/scala',
'util/util-lint/src/main/scala:scala',
'util/util-logging/src/main/scala',
'util/util-slf4j-api/src/main/scala',
'finatra/examples/hello-world-heroku/src/main/resources',
],
excludes = [
exclude(org='org.slf4j', name='slf4j-jdk14')
],
fatal_warnings=True,
sources=rglobs('*.scala'),
strict_deps=True,
)
4 changes: 2 additions & 2 deletions examples/hello-world/build.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name := "hello-world"
organization := "com.twitter"
version := "2.12.0"
version := "2.13.0"
scalaVersion := "2.12.1"
parallelExecution in ThisBuild := false

lazy val versions = new {
val finatra = "2.12.0"
val finatra = "2.13.0"
val guice = "4.0"
val logback = "1.1.7"
}
Expand Down
4 changes: 2 additions & 2 deletions examples/hello-world/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.twitter</groupId>
<artifactId>hello-world</artifactId>
<version>2.12.0</version>
<version>2.13.0</version>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<encoding>UTF-8</encoding>
<scala.version>2.12.1</scala.version>
<scala.artifactVersion>2.12</scala.artifactVersion>
<finatra.version>2.12.0</finatra.version>
<finatra.version>2.13.0</finatra.version>

<mainClass>com.twitter.hello.HelloWorldServerMain</mainClass>
<buildPropertiesPackage>com.twitter.hello</buildPropertiesPackage>
Expand Down
5 changes: 4 additions & 1 deletion examples/hello-world/src/main/scala/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ scala_library(
'3rdparty/jvm/com/google/inject:guice',
'3rdparty/jvm/org/slf4j:slf4j-api',
'finagle/finagle-http/src/main/scala',
'finatra/examples/hello-world/src/main/resources',
'finatra/http/src/main/scala',
'finatra/inject/inject-app/src/main/scala',
'finatra/inject/inject-core/src/main/scala',
'finatra/inject/inject-server/src/main/scala',
'finatra/inject/inject-slf4j/src/main/scala:scala',
'twitter-server/src/main/scala',
'util/util-app/src/main/scala',
'util/util-core/src/main/scala',
'util/util-lint/src/main/scala:scala',
'util/util-logging/src/main/scala',
'util/util-slf4j-api/src/main/scala',
'finatra/examples/hello-world/src/main/resources',
],
excludes = [
exclude(org='org.slf4j', name='slf4j-jdk14')
],
fatal_warnings=True,
sources=rglobs('*.scala'),
strict_deps=True,
)
4 changes: 3 additions & 1 deletion examples/hello-world/src/test/scala/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ junit_tests(
'3rdparty/jvm/org/slf4j:slf4j-api',
'finagle/finagle-http/src/main/scala',
'finatra/examples/hello-world/src/main/scala',
'finatra/examples/hello-world/src/test/resources',
'finatra/http/src/test/scala:test-deps',
'finatra/inject/inject-core/src/main/scala',
'finatra/inject/inject-core/src/test/scala:test-deps',
'finatra/inject/inject-server/src/main/scala:scala',
'finatra/inject/inject-server/src/test/scala:test-deps',
'util/util-slf4j-api/src/main/scala',
'finatra/examples/hello-world/src/test/resources',
],
fatal_warnings=True,
sources=rglobs('*.scala'),
strict_deps=True,
)
4 changes: 2 additions & 2 deletions examples/java-http-server/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name := "java-http-server"
organization := "com.twitter"
version := "2.12.0"
version := "2.13.0"
scalaVersion := "2.12.1"
parallelExecution in ThisBuild := false
publishMavenStyle := true
Expand All @@ -16,7 +16,7 @@ javacOptions ++= Seq(
mainClass in (Compile, packageBin) := Some("com.twitter.hello.server.HelloWorldServerMain")

lazy val versions = new {
val finatra = "2.12.0"
val finatra = "2.13.0"
val guice = "4.0"
val logback = "1.1.7"
val junit = "4.12"
Expand Down
Loading

0 comments on commit 8df305d

Please sign in to comment.