Merge pull request #17761 from 2m/wip-check-all-bc

=pro verify BC against all binary compatible versions
This commit is contained in:
Patrik Nordwall 2015-10-23 09:40:35 +02:00
commit ee6b3cd8f3
24 changed files with 56 additions and 63 deletions

View file

@ -9,6 +9,6 @@ OSGi.actor
Dependencies.actor Dependencies.actor
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-actor").value MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-actor").value
spray.boilerplate.BoilerplatePlugin.Boilerplate.settings spray.boilerplate.BoilerplatePlugin.Boilerplate.settings

View file

@ -9,6 +9,6 @@ OSGi.agent
Dependencies.agent Dependencies.agent
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-agent").value MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-agent").value
enablePlugins(ScaladocNoVerificationOfDiagrams) enablePlugins(ScaladocNoVerificationOfDiagrams)

View file

@ -9,4 +9,4 @@ OSGi.camel
Dependencies.camel Dependencies.camel
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-camel").value MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-camel").value

View file

@ -12,7 +12,7 @@ OSGi.clusterMetrics
Dependencies.clusterMetrics Dependencies.clusterMetrics
//MimaKeys.previousArtifact := akkaPreviousArtifact("akka-cluster-metrics").value //MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-cluster-metrics").value
parallelExecution in Test := false parallelExecution in Test := false

View file

@ -9,6 +9,6 @@ OSGi.clusterSharding
Dependencies.clusterSharding Dependencies.clusterSharding
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-cluster-sharding").value MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-cluster-sharding").value
enablePlugins(MultiNode, ScaladocNoVerificationOfDiagrams) enablePlugins(MultiNode, ScaladocNoVerificationOfDiagrams)

View file

@ -9,6 +9,6 @@ OSGi.clusterTools
Dependencies.clusterTools Dependencies.clusterTools
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-cluster-tools").value MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-cluster-tools").value
enablePlugins(MultiNode, ScaladocNoVerificationOfDiagrams) enablePlugins(MultiNode, ScaladocNoVerificationOfDiagrams)

View file

@ -10,7 +10,7 @@ OSGi.cluster
Dependencies.cluster Dependencies.cluster
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-cluster").value MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-cluster").value
// disable parallel tests // disable parallel tests
parallelExecution in Test := false parallelExecution in Test := false

View file

@ -9,8 +9,6 @@ OSGi.contrib
Dependencies.contrib Dependencies.contrib
MimaKeys.reportBinaryIssues := () // disable bin comp check
description := """| description := """|
|This subproject provides a home to modules contributed by external |This subproject provides a home to modules contributed by external
|developers which may or may not move into the officially supported code |developers which may or may not move into the officially supported code

View file

@ -11,8 +11,6 @@ OSGi.distributedData
Dependencies.distributedData Dependencies.distributedData
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-distributed-data-experimental").value MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-distributed-data-experimental").value
enablePlugins(MultiNodeScalaTest) enablePlugins(MultiNodeScalaTest)

View file

@ -25,8 +25,6 @@ Dependencies.docs
unmanagedSourceDirectories in ScalariformKeys.format in Test <<= unmanagedSourceDirectories in Test unmanagedSourceDirectories in ScalariformKeys.format in Test <<= unmanagedSourceDirectories in Test
MimaKeys.reportBinaryIssues := () // disable bin comp check
additionalTasks in ValidatePR += generate in Sphinx additionalTasks in ValidatePR += generate in Sphinx
AkkaBuild.dontPublishSettings AkkaBuild.dontPublishSettings

View file

@ -7,6 +7,6 @@ Formatting.formatSettings
Dependencies.kernel Dependencies.kernel
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-kernel").value MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-kernel").value
enablePlugins(ScaladocNoVerificationOfDiagrams) enablePlugins(ScaladocNoVerificationOfDiagrams)

View file

@ -5,4 +5,4 @@ AkkaBuild.defaultSettings
Formatting.formatSettings Formatting.formatSettings
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-multi-node-testkit").value MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-multi-node-testkit").value

View file

@ -10,5 +10,3 @@ OSGi.osgi
Dependencies.osgi Dependencies.osgi
parallelExecution in Test := false parallelExecution in Test := false
MimaKeys.reportBinaryIssues := () // disable bin comp check

View file

@ -11,7 +11,7 @@ OSGi.persistenceQuery
Dependencies.persistenceQuery Dependencies.persistenceQuery
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-persistence-query-experimental").value MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-persistence-query-experimental").value
enablePlugins(ScaladocNoVerificationOfDiagrams) enablePlugins(ScaladocNoVerificationOfDiagrams)

View file

@ -9,6 +9,4 @@ Formatting.formatSettings
Dependencies.persistenceTck Dependencies.persistenceTck
MimaKeys.previousArtifact := None
fork in Test := true fork in Test := true

View file

@ -9,6 +9,6 @@ OSGi.persistence
Dependencies.persistence Dependencies.persistence
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-persistence").value MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-persistence").value
fork in Test := true fork in Test := true

View file

@ -208,11 +208,11 @@ trait AsyncWriteJournal extends Actor with WriteJournalBase with AsyncRecovery {
* *
* Calls to this method are serialized by the enclosing journal actor. If you spawn * Calls to this method are serialized by the enclosing journal actor. If you spawn
* work in asyncronous tasks it is alright that they complete the futures in any order, * work in asyncronous tasks it is alright that they complete the futures in any order,
* but the actual writes for a specific persistenceId should be serialized to avoid * but the actual writes for a specific persistenceId should be serialized to avoid
* issues such as events of a later write are visible to consumers (query side, or replay) * issues such as events of a later write are visible to consumers (query side, or replay)
* before the events of an earlier write are visible. This can also be done with * before the events of an earlier write are visible. This can also be done with
* consistent hashing if it is too fine grained to do it on the persistenceId level. * consistent hashing if it is too fine grained to do it on the persistenceId level.
* Normally a `PersistentActor` will only have one outstanding write request to the journal but * Normally a `PersistentActor` will only have one outstanding write request to the journal but
* it may emit several write requests when `persistAsync` is used and the max batch size * it may emit several write requests when `persistAsync` is used and the max batch size
* is reached. * is reached.
* *

View file

@ -13,8 +13,6 @@ parallelExecution in Test := false
publishArtifact in Compile := false publishArtifact in Compile := false
MimaKeys.reportBinaryIssues := () // disable bin comp check
enablePlugins(MultiNodeScalaTest) enablePlugins(MultiNodeScalaTest)
AkkaBuild.dontPublishSettings AkkaBuild.dontPublishSettings

View file

@ -11,4 +11,4 @@ Dependencies.remote
parallelExecution in Test := false parallelExecution in Test := false
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-remote").value MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-remote").value

View file

@ -9,4 +9,4 @@ OSGi.slf4j
Dependencies.slf4j Dependencies.slf4j
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-slf4j").value MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-slf4j").value

View file

@ -12,4 +12,4 @@ Dependencies.testkit
initialCommands += "import akka.testkit._" initialCommands += "import akka.testkit._"
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-testkit").value MimaKeys.previousArtifacts := akkaPreviousArtifacts("akka-testkit").value

View file

@ -53,7 +53,7 @@ object AkkaBuild extends Build {
samplePersistenceJava, samplePersistenceScala, samplePersistenceJavaLambda, samplePersistenceJava, samplePersistenceScala, samplePersistenceJavaLambda,
sampleRemoteJava, sampleRemoteScala, sampleSupervisionJavaLambda, sampleRemoteJava, sampleRemoteScala, sampleSupervisionJavaLambda,
sampleDistributedDataScala, sampleDistributedDataJava), sampleDistributedDataScala, sampleDistributedDataJava),
S3.host in S3.upload := "downloads.typesafe.com.s3.amazonaws.com", S3.host in S3.upload := "downloads.typesafe.com.s3.amazonaws.com",
S3.progress in S3.upload := true, S3.progress in S3.upload := true,
mappings in S3.upload <<= (Release.releaseDirectory, version) map { (d, v) => mappings in S3.upload <<= (Release.releaseDirectory, version) map { (d, v) =>
@ -404,17 +404,28 @@ object AkkaBuild extends Build {
mavenLocalResolverSettings ++ mavenLocalResolverSettings ++
JUnitFileReporting.settings ++ StatsDMetrics.settings JUnitFileReporting.settings ++ StatsDMetrics.settings
def akkaPreviousArtifact(id: String): Def.Initialize[Option[sbt.ModuleID]] = Def.setting { def akkaPreviousArtifacts(id: String): Def.Initialize[Set[sbt.ModuleID]] = Def.setting {
if (enableMiMa) { if (enableMiMa) {
val version: String = "2.4.0" // FIXME verify all 2.3.x versions val versions = {
val fullId = crossVersion.value match { val akka23Versions = Seq("2.3.11", "2.3.12", "2.3.13", "2.3.14")
case _ : CrossVersion.Binary => id + "_" + scalaBinaryVersion.value val akka24Versions = Seq("2.4.0")
case _ : CrossVersion.Full => id + "_" + scalaVersion.value val akka24NewArtifacts = Seq(
case CrossVersion.Disabled => id "akka-cluster-sharding",
"akka-cluster-tools",
"akka-persistence",
"akka-distributed-data-experimental",
"akka-persistence-query-experimental"
)
scalaBinaryVersion.value match {
case "2.11" if !akka24NewArtifacts.contains(id) => akka23Versions ++ akka24Versions
case _ => akka24Versions // Only Akka 2.4.x for scala > than 2.11
}
} }
Some(organization.value % fullId % version) // the artifact to compare binary compatibility with
// check against all binary compatible artifacts
versions.map(organization.value %% id % _).toSet
} }
else None else Set.empty
} }
def loadSystemProperties(fileName: String): Unit = { def loadSystemProperties(fileName: String): Unit = {

View file

@ -3,7 +3,7 @@
*/ */
package akka package akka
import com.typesafe.tools.mima.plugin.MimaKeys.{binaryIssueFilters, previousArtifact} import com.typesafe.tools.mima.plugin.MimaKeys.{bbcIssueFilters, previousArtifacts}
import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
import sbt._ import sbt._
@ -12,8 +12,8 @@ object MiMa extends AutoPlugin {
override def trigger = allRequirements override def trigger = allRequirements
override val projectSettings = mimaDefaultSettings ++ Seq( override val projectSettings = mimaDefaultSettings ++ Seq(
previousArtifact := None, previousArtifacts := Set.empty,
binaryIssueFilters ++= mimaIgnoredProblems bbcIssueFilters ++= mimaIgnoredProblems
) )
case class FilterAnyProblem(name: String) extends com.typesafe.tools.mima.core.ProblemFilter { case class FilterAnyProblem(name: String) extends com.typesafe.tools.mima.core.ProblemFilter {
@ -23,7 +23,7 @@ object MiMa extends AutoPlugin {
case m: MemberProblem => m.ref.owner.fullName != name && m.ref.owner.fullName != (name + '$') case m: MemberProblem => m.ref.owner.fullName != name && m.ref.owner.fullName != (name + '$')
} }
} }
case class FilterAnyProblemStartingWith(start: String) extends com.typesafe.tools.mima.core.ProblemFilter { case class FilterAnyProblemStartingWith(start: String) extends com.typesafe.tools.mima.core.ProblemFilter {
import com.typesafe.tools.mima.core._ import com.typesafe.tools.mima.core._
override def apply(p: Problem): Boolean = p match { override def apply(p: Problem): Boolean = p match {
@ -34,12 +34,8 @@ object MiMa extends AutoPlugin {
val mimaIgnoredProblems = { val mimaIgnoredProblems = {
import com.typesafe.tools.mima.core._ import com.typesafe.tools.mima.core._
Seq(
FilterAnyProblem("akka.remote.transport.ProtocolStateActor")) val bcIssuesBetween23and24 = Seq(
// FIXME somehow we must use different filters when akkaPreviousArtifact is 2.3.x
/* Below are the filters we used when comparing to 2.3.x
Seq(
FilterAnyProblem("akka.remote.testconductor.Terminate"), FilterAnyProblem("akka.remote.testconductor.Terminate"),
FilterAnyProblem("akka.remote.testconductor.TerminateMsg"), FilterAnyProblem("akka.remote.testconductor.TerminateMsg"),
ProblemFilters.exclude[MissingMethodProblem]("akka.remote.testconductor.Conductor.shutdown"), ProblemFilters.exclude[MissingMethodProblem]("akka.remote.testconductor.Conductor.shutdown"),
@ -433,7 +429,7 @@ object MiMa extends AutoPlugin {
// method nrOfInstances(akka.actor.ActorSystem) in trait akka.routing.Pool does not have a correspondent in old version // method nrOfInstances(akka.actor.ActorSystem) in trait akka.routing.Pool does not have a correspondent in old version
// ok to exclude, since we don't call nrOfInstances(sys) for old implementations // ok to exclude, since we don't call nrOfInstances(sys) for old implementations
ProblemFilters.exclude[MissingMethodProblem]("akka.routing.Pool.nrOfInstances"), ProblemFilters.exclude[MissingMethodProblem]("akka.routing.Pool.nrOfInstances"),
// method paths(akka.actor.ActorSystem) in trait akka.routing.Group does not have a correspondent in old version // method paths(akka.actor.ActorSystem) in trait akka.routing.Group does not have a correspondent in old version
// ok to exclude, since we don't call paths(sys) for old implementations // ok to exclude, since we don't call paths(sys) for old implementations
ProblemFilters.exclude[MissingMethodProblem]("akka.routing.Group.paths"), ProblemFilters.exclude[MissingMethodProblem]("akka.routing.Group.paths"),
@ -544,7 +540,6 @@ object MiMa extends AutoPlugin {
// issue #17554 // issue #17554
ProblemFilters.exclude[MissingMethodProblem]("akka.remote.ReliableDeliverySupervisor.maxResendRate"), ProblemFilters.exclude[MissingMethodProblem]("akka.remote.ReliableDeliverySupervisor.maxResendRate"),
ProblemFilters.exclude[MissingMethodProblem]("akka.remote.ReliableDeliverySupervisor.resendLimit"), ProblemFilters.exclude[MissingMethodProblem]("akka.remote.ReliableDeliverySupervisor.resendLimit"),
//changes introduced by #16911 //changes introduced by #16911
ProblemFilters.exclude[MissingMethodProblem]("akka.remote.RemoteActorRefProvider.afterSendSystemMessage"), ProblemFilters.exclude[MissingMethodProblem]("akka.remote.RemoteActorRefProvider.afterSendSystemMessage"),
FilterAnyProblem("akka.remote.RemoteWatcher"), FilterAnyProblem("akka.remote.RemoteWatcher"),
@ -553,18 +548,10 @@ object MiMa extends AutoPlugin {
FilterAnyProblem("akka.remote.RemoteWatcher$Rewatch"), FilterAnyProblem("akka.remote.RemoteWatcher$Rewatch"),
FilterAnyProblem("akka.remote.RemoteWatcher$RewatchRemote"), FilterAnyProblem("akka.remote.RemoteWatcher$RewatchRemote"),
FilterAnyProblem("akka.remote.RemoteWatcher$Stats"), FilterAnyProblem("akka.remote.RemoteWatcher$Stats"),
// toString is available on any object, mima is confused due to a generated toString appearing #17722
ProblemFilters.exclude[MissingMethodProblem]("akka.japi.Pair.toString"),
// #17805
ProblemFilters.exclude[MissingMethodProblem]("akka.actor.ActorCell.clearActorFields"),
// internal changes introduced by #17253 // internal changes introduced by #17253
ProblemFilters.exclude[IncompatibleResultTypeProblem]("akka.cluster.ClusterDaemon.coreSupervisor"), ProblemFilters.exclude[IncompatibleResultTypeProblem]("akka.cluster.ClusterDaemon.coreSupervisor"),
ProblemFilters.exclude[MissingMethodProblem]("akka.cluster.ClusterCoreSupervisor.publisher"), ProblemFilters.exclude[MissingMethodProblem]("akka.cluster.ClusterCoreSupervisor.publisher"),
ProblemFilters.exclude[IncompatibleResultTypeProblem]("akka.cluster.ClusterCoreSupervisor.coreDaemon"), ProblemFilters.exclude[IncompatibleResultTypeProblem]("akka.cluster.ClusterCoreSupervisor.coreDaemon"),
// protofbuf embedding #13783 // protofbuf embedding #13783
FilterAnyProblemStartingWith("akka.remote.WireFormats"), FilterAnyProblemStartingWith("akka.remote.WireFormats"),
FilterAnyProblemStartingWith("akka.remote.ContainerFormats"), FilterAnyProblemStartingWith("akka.remote.ContainerFormats"),
@ -572,11 +559,17 @@ object MiMa extends AutoPlugin {
FilterAnyProblemStartingWith("akka.remote.testconductor.TestConductorProtocol"), FilterAnyProblemStartingWith("akka.remote.testconductor.TestConductorProtocol"),
FilterAnyProblemStartingWith("akka.cluster.protobuf.msg.ClusterMessages"), FilterAnyProblemStartingWith("akka.cluster.protobuf.msg.ClusterMessages"),
FilterAnyProblemStartingWith("akka.cluster.protobuf.ClusterMessageSerializer"), FilterAnyProblemStartingWith("akka.cluster.protobuf.ClusterMessageSerializer"),
// #13584 change in internal actor // #13584 change in internal actor
ProblemFilters.exclude[IncompatibleMethTypeProblem]("akka.cluster.ClusterCoreDaemon.akka$cluster$ClusterCoreDaemon$$isJoiningToUp$1") ProblemFilters.exclude[IncompatibleMethTypeProblem]("akka.cluster.ClusterCoreDaemon.akka$cluster$ClusterCoreDaemon$$isJoiningToUp$1")
)
) Map(
*/ "2.3.11" -> Seq(
ProblemFilters.exclude[MissingMethodProblem]("akka.actor.ActorCell.clearActorFields"), // #17805, incomatibility with 2.4.x fixed in 2.3.12
ProblemFilters.exclude[MissingMethodProblem]("akka.japi.Pair.toString") // reported on PR validation machine which uses Java 1.8.0_45
),
"2.3.14" -> bcIssuesBetween23and24,
"2.4.0" -> Seq(FilterAnyProblem("akka.remote.transport.ProtocolStateActor"))
)
} }
} }

View file

@ -17,7 +17,8 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.7.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.6.0") addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.6.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.7") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.7-32-g3bebac4")
resolvers += Resolver.url("2m-sbt-plugins", url("https://dl.bintray.com/2m/sbt-plugins/"))(Resolver.ivyStylePatterns)
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0") addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
@ -35,7 +36,7 @@ libraryDependencies += "com.timgroup" % "java-statsd-client" % "2.0.0"
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.0-RC1") addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.0-RC1")
// for advanced PR validation features // for advanced PR validation features
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.4") addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.5")
libraryDependencies += "org.kohsuke" % "github-api" % "1.68" libraryDependencies += "org.kohsuke" % "github-api" % "1.68"