Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collector 3.x and Enrich 4.x #145

Closed
wants to merge 13 commits into from
Closed
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:

- name: Publish collector locally
run: |
git clone --branch 2.8.1 --depth 1 https://github.com/snowplow/stream-collector.git
git clone --branch 3.1.0_cross_scala_2.12 --depth 1 https://github.com/snowplow/stream-collector.git
cd stream-collector
sbt publishLocal
sbt +publishLocal

- name: Run sbt
run: sbt test
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:

- name: Publish collector locally
run: |
git clone --branch 2.8.1 --depth 1 https://github.com/snowplow/stream-collector.git
git clone --branch 3.1.0_cross_scala_2.12 --depth 1 https://github.com/snowplow/stream-collector.git
cd stream-collector
sbt publishLocal
sbt +publishLocal

- name: Run sbt
run: sbt test
21 changes: 12 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
* Copyright (c) 2019-2022 Snowplow Analytics Ltd. All rights reserved.
*/
import com.typesafe.sbt.packager.MappingsHelper.directory
import com.typesafe.sbt.packager.docker._
import com.typesafe.sbt.packager.docker.*

import scala.collection.Seq

lazy val buildSettings = Seq(
name := "snowplow-micro",
Expand All @@ -20,37 +22,38 @@ lazy val buildSettings = Seq(
baseDirectory.value / "ui" / "out"
),
Compile / unmanagedResources += file("LICENSE.md"),
resolvers ++= Dependencies.resolvers
resolvers ++= Dependencies.resolvers,
Test / parallelExecution := false
)

lazy val dependencies = Seq(
libraryDependencies ++= Seq(
Dependencies.snowplowStreamCollector,
Dependencies.snowplowCommonEnrich,
Dependencies.decline,
Dependencies.http4sCirce,
Dependencies.circeJawn,
Dependencies.circeGeneric,
Dependencies.specs2,
Dependencies.specs2CE,
Dependencies.badRows
)
)

lazy val exclusions = Seq(
excludeDependencies ++= Dependencies.exclusions
)

lazy val buildInfoSettings = Seq(
buildInfoKeys := Seq[BuildInfoKey](organization, name, version, scalaVersion),
buildInfoPackage := "buildinfo"
buildInfoKeys := Seq[BuildInfoKey](name, moduleName, dockerAlias, version, "shortName" -> "micro-ssc"),
buildInfoPackage := "com.snowplowanalytics.snowplow.micro",
buildInfoOptions += BuildInfoOption.Traits("com.snowplowanalytics.snowplow.collector.core.AppInfo")
)


lazy val dynVerSettings = Seq(
ThisBuild / dynverVTagPrefix := false, // Otherwise git tags required to have v-prefix
ThisBuild / dynverSeparator := "-" // to be compatible with docker
)

lazy val commonSettings =
dependencies ++
exclusions ++
buildSettings ++
buildInfoSettings ++
dynVerSettings ++
Expand Down
23 changes: 13 additions & 10 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,36 @@ object Dependencies {

object V {
// Snowplow
val snowplowStreamCollector = "2.8.1"
val snowplowCommonEnrich = "3.8.0"
val snowplowStreamCollector = "3.1.1-rc1"
val snowplowCommonEnrich = "4.0.1"
val http4sCirce = "0.23.23"

val decline = "2.4.1"

// circe
val circe = "0.14.2"

// specs2
val specs2 = "4.12.2"
val specs2CE = "1.5.0"

// force versions of transitive dependencies
val badRows = "2.2.0"
}

val exclusions = Seq(
"org.apache.tomcat.embed" % "tomcat-embed-core"
)

// Snowplow stream collector
val snowplowStreamCollector = "com.snowplowanalytics" %% "snowplow-stream-collector-core" % V.snowplowStreamCollector
val snowplowCommonEnrich = "com.snowplowanalytics" %% "snowplow-common-enrich" % V.snowplowCommonEnrich
val snowplowStreamCollector = "com.snowplowanalytics" %% "snowplow-stream-collector-http4s-core" % V.snowplowStreamCollector
val snowplowCommonEnrich = "com.snowplowanalytics" %% "snowplow-common-enrich" % V.snowplowCommonEnrich

val http4sCirce = "org.http4s" %% "http4s-circe" % V.http4sCirce
val decline = "com.monovore" %% "decline-effect" % V.decline

// circe
val circeJawn = "io.circe" %% "circe-jawn" % V.circe
val circeGeneric = "io.circe" %% "circe-generic" % V.circe

// specs2
val specs2 = "org.specs2" %% "specs2-core" % V.specs2 % Test
val specs2 = "org.specs2" %% "specs2-core" % V.specs2 % Test
val specs2CE = "org.typelevel" %% "cats-effect-testing-specs2" % V.specs2CE % Test

// transitive
val badRows = "com.snowplowanalytics" %% "snowplow-badrows" % V.badRows
Expand Down
249 changes: 0 additions & 249 deletions src/main/resources/application.conf

This file was deleted.

18 changes: 18 additions & 0 deletions src/main/resources/collector-micro.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
collector {
interface = "0.0.0.0"
port = 9090
ssl {
port = 9543
}

streams {
good = "good"
bad = "bad"
buffer {
byteLimit = 3145728
recordLimit = 500
timeLimit = 5000
}
sink {}
}
}
Loading
Loading