Skip to content

Commit

Permalink
Remove license check
Browse files Browse the repository at this point in the history
  • Loading branch information
pondzix committed Feb 16, 2024
1 parent e1a09a1 commit 576323d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 23 deletions.
4 changes: 0 additions & 4 deletions src/main/resources/collector-micro.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
collector {
license {
accept = false
accept = ${?ACCEPT_LIMITED_USE_LICENSE}
}
interface = "0.0.0.0"
port = 9090
ssl {
Expand Down
15 changes: 1 addition & 14 deletions src/main/scala/com.snowplowanalytics.snowplow.micro/Run.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
package com.snowplowanalytics.snowplow.micro

import cats.data.EitherT
import cats.effect.{ExitCode, IO, Resource, Sync}
import cats.effect.{ExitCode, IO, Resource}
import cats.implicits._
import com.monovore.decline.Opts
import com.snowplowanalytics.iglu.client.resolver.registries.JavaNetRegistryLookup
Expand Down Expand Up @@ -41,7 +41,6 @@ object Run {
Configuration.load().map { configuration =>
handleAppErrors {
configuration
.flatTap(config => checkLicense(config.collector.license.accept))
.semiflatMap { validMicroConfig =>
buildEnvironment(validMicroConfig)
.use(_ => IO.never)
Expand Down Expand Up @@ -137,18 +136,6 @@ object Run {
}
}

private def checkLicense(acceptLicense: Boolean): EitherT[IO, String, Unit] =
EitherT.liftF {
if (acceptLicense)
IO.unit
else
IO.raiseError(
new IllegalStateException(
"Please accept the terms of the Snowplow Limited Use License Agreement to proceed. See https://docs.snowplow.io/docs/pipeline-components-and-applications/stream-collector/configure/#license for more information on the license and how to configure this."
)
)
}

private def handleAppErrors(appOutput: EitherT[IO, String, ExitCode]): IO[ExitCode] = {
appOutput
.leftSemiflatMap { error =>
Expand Down
5 changes: 0 additions & 5 deletions src/test/resources/collector-micro.conf

This file was deleted.

0 comments on commit 576323d

Please sign in to comment.