diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a482e472c..4edbc7ed8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: - name: Check formatting run: sbt scalafmtCheckAll - name: Run unit tests - run: sbt test + run: sbt +test - name: Run integration tests Kinesis run: sbt "project kinesisDistroless" IntegrationTest/test - name: Run integration tests PubSub diff --git a/core/src/main/scala/com.snowplowanalytics.snowplow.collector.core/HttpServer.scala b/core/src/main/scala/com.snowplowanalytics.snowplow.collector.core/HttpServer.scala index e150119db..4a2e46db7 100644 --- a/core/src/main/scala/com.snowplowanalytics.snowplow.collector.core/HttpServer.scala +++ b/core/src/main/scala/com.snowplowanalytics.snowplow.collector.core/HttpServer.scala @@ -58,7 +58,7 @@ object HttpServer { private def createStatsdConfig(metricsConfig: Config.Metrics): StatsDMetricFactoryConfig = { val server = InetSocketAddress.createUnresolved(metricsConfig.statsd.hostname, metricsConfig.statsd.port) - val tags = metricsConfig.statsd.tags.toSeq.map { case (name, value) => Tag.of(name, value) } + val tags = metricsConfig.statsd.tags.toVector.map { case (name, value) => Tag.of(name, value) } StatsDMetricFactoryConfig(Some(metricsConfig.statsd.prefix), server, defaultTags = tags) } diff --git a/core/src/main/scala/com.snowplowanalytics.snowplow.collector.core/Service.scala b/core/src/main/scala/com.snowplowanalytics.snowplow.collector.core/Service.scala index e85b493b2..317bc3020 100644 --- a/core/src/main/scala/com.snowplowanalytics.snowplow.collector.core/Service.scala +++ b/core/src/main/scala/com.snowplowanalytics.snowplow.collector.core/Service.scala @@ -193,8 +193,7 @@ class Service[F[_]: Sync]( config.doNotTrackCookie.enabled && req .cookies .find(_.name == config.doNotTrackCookie.name) - .map(cookie => config.doNotTrackCookie.value.r.matches(cookie.content)) - .getOrElse(false) + .exists(cookie => config.doNotTrackCookie.value.r.pattern.matcher(cookie.content).matches()) def extractHostname(req: Request[F]): Option[String] = req.uri.authority.map(_.host.renderString) // Hostname is extracted like this in Akka-Http as well diff --git a/project/BuildSettings.scala b/project/BuildSettings.scala index 8bd46e191..bcefd4492 100644 --- a/project/BuildSettings.scala +++ b/project/BuildSettings.scala @@ -27,6 +27,7 @@ object BuildSettings { name := "snowplow-stream-collector", description := "Scala Stream Collector for Snowplow raw events", scalaVersion := "2.13.12", + crossScalaVersions := Seq("2.13.12", "2.12.14"), scalacOptions ++= Seq("-Ywarn-macros:after"), javacOptions := Seq("-source", "11", "-target", "11"), resolvers ++= Seq(