Skip to content

Commit

Permalink
Remove scoverage integration
Browse files Browse the repository at this point in the history
Problem

We've run into more problems with scoverage integration.

Solution

Remove scoverage. It's a cool feature but effectively never utilized
anyway, resulting in all pain no gain.

JIRA Issues: CSL-12211

Differential Revision: https://phabricator.twitter.biz/D945589
  • Loading branch information
Bryce Anderson authored and jenkins committed Jul 29, 2022
1 parent e3bc71d commit cad6c23
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 37 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,4 @@ jobs:
publish-m2: true
verbose: true
- name: test
run: ${{ format('./sbt ++{0} clean coverage test coverageReport', matrix.scala) }}
- name: coverage
run: ${{ format('./sbt ++{0} coverageAggregate', matrix.scala) }}
- name: upload coverage
uses: codecov/codecov-action@v2
run: ${{ format('./sbt ++{0} clean test', matrix.scala) }}
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Finatra

[![Build Status](https://github.com/twitter/finatra/workflows/continuous%20integration/badge.svg?branch=develop)](https://github.com/twitter/finatra/actions?query=workflow%3A%22continuous+integration%22+branch%3Adevelop)
[![Test Coverage](https://codecov.io/github/twitter/finatra/coverage.svg?branch=develop)](https://codecov.io/github/twitter/finatra?branch=develop)
[![Project status](https://img.shields.io/badge/status-active-brightgreen.svg)](#status)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.twitter/finatra-http-server_2.12/badge.svg)][maven-central]
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/twitter/finatra)
Expand Down
30 changes: 0 additions & 30 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import scala.language.reflectiveCalls
import scoverage.ScoverageKeys

Global / onChangedBuildSource := ReloadOnSourceChanges
Global / excludeLintKeys += scalacOptions
Expand Down Expand Up @@ -194,17 +193,6 @@ lazy val publishSettings = Seq(
<url>https://www.twitter.com/</url>
</developer>
</developers>,
pomPostProcess := { node: scala.xml.Node =>
val rule: scala.xml.transform.RewriteRule = new scala.xml.transform.RewriteRule {
override def transform(n: scala.xml.Node): scala.xml.NodeSeq =
n.nameToString(new StringBuilder()).toString() match {
case "dependency" if (n \ "groupId").text.trim == "org.scoverage" => Nil
case _ => n
}
}

new scala.xml.transform.RuleTransformer(rule).transform(node).head
},
Compile / resourceGenerators += Def.task {
val dir = (Compile / resourceManaged).value
val file = dir / "com" / "twitter" / name.value / "build.properties"
Expand Down Expand Up @@ -238,7 +226,6 @@ lazy val baseServerSettings = baseSettings ++ buildSettings ++ publishSettings +

lazy val exampleServerSettings = baseServerSettings ++ Seq(
run / fork := true,
coverageEnabled := false,
Test / javaOptions ++= Seq(
// we are unable to guarantee that Logback will not get picked up b/c of coursier caching
// so we set the Logback System properties in addition to the slf4j-simple and the
Expand Down Expand Up @@ -401,7 +388,6 @@ lazy val injectStack = (project in file("inject/inject-stack"))
libraryDependencies ++= Seq(
"com.twitter" %% "finagle-core" % versions.twLibVersion,
),
ScoverageKeys.coverageExcludedPackages := "<empty>;.*StackTransformer.*"
)

lazy val injectLogback = (project in file("inject/inject-logback"))
Expand Down Expand Up @@ -481,7 +467,6 @@ lazy val injectApp = (project in file("inject/inject-app"))
"org.slf4j" % "slf4j-api" % versions.slf4j,
"org.slf4j" % "slf4j-simple" % versions.slf4j % "test-internal"
),
ScoverageKeys.coverageExcludedPackages := "<empty>;.*TypeConverter.*",
Test / publishArtifact := true,
(Test / packageBin / mappings) := {
val previous = (Test / packageBin / mappings).value
Expand Down Expand Up @@ -518,7 +503,6 @@ lazy val injectPorts = (project in file("inject/inject-ports"))
.settings(
name := "inject-ports",
moduleName := "inject-ports",
ScoverageKeys.coverageExcludedPackages := "<empty>",
libraryDependencies ++= Seq(
"com.twitter" %% "finagle-core" % versions.twLibVersion,
"com.twitter" %% "twitter-server" % versions.twLibVersion,
Expand All @@ -543,7 +527,6 @@ lazy val injectServer = (project in file("inject/inject-server"))
.settings(
name := "inject-server",
moduleName := "inject-server",
ScoverageKeys.coverageExcludedPackages := "<empty>",
libraryDependencies ++= Seq(
"com.twitter" %% "util-slf4j-api" % versions.twLibVersion,
"com.twitter" %% "twitter-server" % versions.twLibVersion,
Expand Down Expand Up @@ -575,7 +558,6 @@ lazy val injectMdc = (project in file("inject/inject-mdc"))
.settings(
name := "inject-mdc",
moduleName := "inject-mdc",
ScoverageKeys.coverageExcludedPackages := "<empty>;",
libraryDependencies ++= Seq(
"com.twitter" %% "finagle-core" % versions.twLibVersion,
"com.twitter" %% "util-core" % versions.twLibVersion,
Expand All @@ -591,7 +573,6 @@ lazy val injectSlf4j = (project in file("inject/inject-slf4j"))
.settings(
name := "inject-slf4j",
moduleName := "inject-slf4j",
ScoverageKeys.coverageExcludedPackages := "<empty>;",
libraryDependencies ++= Seq(
"com.twitter" %% "util-core" % versions.twLibVersion,
"com.twitter" %% "util-slf4j-api" % versions.twLibVersion,
Expand Down Expand Up @@ -620,7 +601,6 @@ lazy val injectThrift = (project in file("inject/inject-thrift"))
.settings(
name := "inject-thrift",
moduleName := "inject-thrift",
ScoverageKeys.coverageExcludedPackages := "<empty>;.*\\.thriftscala.*;.*\\.thriftjava.*;.*ThriftCommonLogFormatter.*;.*ThriftFilter.*",
libraryDependencies ++= Seq(
"org.apache.thrift" % "libthrift" % versions.libThrift exclude ("commons-logging", "commons-logging"),
"com.twitter" %% "finagle-core" % versions.twLibVersion,
Expand All @@ -640,7 +620,6 @@ lazy val injectThriftClient = (project in file("inject/inject-thrift-client"))
.settings(
name := "inject-thrift-client",
moduleName := "inject-thrift-client",
ScoverageKeys.coverageExcludedPackages := "<empty>;.*\\.thriftscala.*;.*\\.thriftjava.*;.*LatencyFilter.*",
Test / scroogeLanguages := Seq("java", "scala"),
Test / scroogePublishThrift := true,
libraryDependencies ++= Seq(
Expand Down Expand Up @@ -721,7 +700,6 @@ lazy val utils = project
.settings(
name := "finatra-utils",
moduleName := "finatra-utils",
ScoverageKeys.coverageExcludedPackages := "<empty>;com\\.twitter\\.finatra\\..*package.*;.*DeadlineValues.*;.*RichBuf.*;.*RichByteBuf.*",
libraryDependencies ++= Seq(
"com.google.inject" % "guice" % versions.guice,
"joda-time" % "joda-time" % versions.jodaTime,
Expand Down Expand Up @@ -761,7 +739,6 @@ lazy val validation = project
.settings(
name := "finatra-validation",
moduleName := "finatra-validation",
ScoverageKeys.coverageExcludedPackages := "<empty>;com\\.twitter\\.finatra\\..*package.*;.*ValidationResult.*;.*InvalidCaseClassException.*",
libraryDependencies ++= Seq(
"joda-time" % "joda-time" % versions.jodaTime,
"com.twitter" %% "util-core" % versions.twLibVersion,
Expand Down Expand Up @@ -801,7 +778,6 @@ lazy val jackson = project
.settings(
name := "finatra-jackson",
moduleName := "finatra-jackson",
ScoverageKeys.coverageExcludedPackages := ".*DurationMillisSerializer.*;.*ByteBufferUtils.*",
libraryDependencies ++= Seq(
"com.fasterxml.jackson.core" % "jackson-annotations" % versions.jackson,
"com.fasterxml.jackson.core" % "jackson-databind" % versions.jackson,
Expand Down Expand Up @@ -832,7 +808,6 @@ lazy val mustache = project
.settings(
name := "finatra-mustache",
moduleName := "finatra-mustache",
ScoverageKeys.coverageExcludedPackages := "<empty>;.*ScalaObjectHandler.*",
libraryDependencies ++= Seq(
"javax.inject" % "javax.inject" % "1",
"com.github.spullara.mustache.java" % "compiler" % versions.mustache exclude ("com.google.guava", "guava"),
Expand Down Expand Up @@ -887,7 +862,6 @@ lazy val httpServer = (project in file("http-server"))
.settings(
name := "finatra-http-server",
moduleName := "finatra-http-server",
ScoverageKeys.coverageExcludedPackages := "<empty>;com\\.twitter\\.finatra\\..*package.*;.*ThriftExceptionMapper.*;.*HttpResponseExceptionMapper.*;.*HttpResponseException.*",
libraryDependencies ++= Seq(
"org.apache.thrift" % "libthrift" % versions.libThrift intransitive (),
"com.twitter" %% "finagle-http" % versions.twLibVersion,
Expand Down Expand Up @@ -1007,7 +981,6 @@ lazy val thrift = project
.settings(
name := "finatra-thrift",
moduleName := "finatra-thrift",
ScoverageKeys.coverageExcludedPackages := "<empty>;.*\\.thriftscala.*;.*\\.thriftjava.*",
libraryDependencies ++= Seq(
"com.twitter" %% "finagle-core" % versions.twLibVersion,
"com.twitter" %% "finagle-exp" % versions.twLibVersion,
Expand Down Expand Up @@ -1205,7 +1178,6 @@ lazy val thriftIdl = (project in file("examples/thrift-server/idl"))
name := "thrift-server-idl",
moduleName := "thrift-example-idl",
Compile / scroogeLanguages := Seq("java", "scala"),
ScoverageKeys.coverageExcludedPackages := "<empty>;.*\\.thriftscala.*;.*\\.thriftjava.*",
Compile / scroogeThriftIncludeFolders := Seq(file("examples/thrift-server/idl/src/main/thrift"))
).dependsOn(
thrift
Expand Down Expand Up @@ -1237,7 +1209,6 @@ lazy val scalaThriftServer = (project in file("examples/thrift-server/scala"))
.settings(
name := "scala-thrift-server",
moduleName := "scala-thrift-server",
ScoverageKeys.coverageExcludedPackages := "<empty>;.*ExceptionTranslationFilter.*",
libraryDependencies ++= Seq(
"org.slf4j" % "slf4j-simple" % versions.slf4j % "test-internal"
)
Expand Down Expand Up @@ -1274,7 +1245,6 @@ lazy val twitterClone = (project in file("examples/advanced/twitter-clone"))
.settings(
name := "twitter-clone",
moduleName := "twitter-clone",
ScoverageKeys.coverageExcludedPackages := "<empty>;finatra\\.quickstart\\..*",
libraryDependencies ++= Seq(
"com.twitter" %% "util-core" % versions.twLibVersion,
"com.twitter" %% "util-jackson" % versions.twLibVersion,
Expand Down
1 change: 0 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1")
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.1")

0 comments on commit cad6c23

Please sign in to comment.