Skip to content

Commit

Permalink
Users must accept Snowplow Limited Use License Agreement (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
istreeter authored Nov 25, 2024
1 parent c462da4 commit db861ed
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 11 deletions.
4 changes: 4 additions & 0 deletions config/config.azure.minimal.hocon
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"license" {
"accept": true
}

"input": {
"topicName": "sp-dev-enriched"
"bootstrapServers": "localhost:9092"
Expand Down
5 changes: 5 additions & 0 deletions config/config.azure.reference.hocon
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
# -- Full license text available in LICENSE.md
"license" {
"accept": true
}

"input": {
# -- kafka topic name for the source of enriched events
"topicName": "sp-dev-enriched"
Expand Down
4 changes: 4 additions & 0 deletions config/config.kinesis.minimal.hocon
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"license" {
"accept": true
}

"input": {
"streamName": "snowplow-enriched-events"
}
Expand Down
5 changes: 5 additions & 0 deletions config/config.kinesis.reference.hocon
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
# -- Full license text available in LICENSE.md
"license" {
"accept": true
}

"input": {
# -- kinesis stream for the source of enriched events
"streamName": "snowplow-enriched-events"
Expand Down
4 changes: 4 additions & 0 deletions config/config.pubsub.minimal.hocon
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"license" {
"accept": true
}

"input": {
"subscription": "projects/myproject/subscriptions/snowplow-enriched"
}
Expand Down
5 changes: 5 additions & 0 deletions config/config.pubsub.reference.hocon
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
# -- Full license text available in LICENSE.md
"license" {
"accept": true
}

"input": {
# -- pubsub subscription for the source of enriched events
"subscription": "projects/myproject/subscriptions/snowplow-enriched"
Expand Down
5 changes: 5 additions & 0 deletions modules/core/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

{

"license" {
"accept": "false"
"accept": ${?ACCEPT_LIMITED_USE_LICENSE}
}

"output": {
"good": {
"table": "events"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import com.snowplowanalytics.iglu.core.circe.CirceIgluCodecs.schemaCriterionDeco

import scala.concurrent.duration.FiniteDuration
import scala.util.Try
import com.snowplowanalytics.snowplow.runtime.{HttpClient, Metrics => CommonMetrics, Retrying, Telemetry, Webhook}
import com.snowplowanalytics.snowplow.runtime.{AcceptedLicense, HttpClient, Metrics => CommonMetrics, Retrying, Telemetry, Webhook}
import com.snowplowanalytics.snowplow.runtime.HealthProbe.decoders._

case class Config[+Source, +Sink](
Expand All @@ -34,7 +34,8 @@ case class Config[+Source, +Sink](
skipSchemas: List[SchemaCriterion],
telemetry: Telemetry.Config,
monitoring: Config.Monitoring,
http: Config.Http
http: Config.Http,
license: AcceptedLicense
)

object Config {
Expand Down Expand Up @@ -130,6 +131,8 @@ object Config {
implicit val monitoringDecoder = deriveConfiguredDecoder[Monitoring]
implicit val retriesDecoder = deriveConfiguredDecoder[Retries]
implicit val httpDecoder = deriveConfiguredDecoder[Http]
implicit val licenseDecoder =
AcceptedLicense.decoder(AcceptedLicense.DocumentationLink("https://docs.snowplow.io/limited-use-license-1.0/"))
deriveConfiguredDecoder[Config[Source, Sink]]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import cats.effect.{ExitCode, IO}
import com.comcast.ip4s.Port
import com.snowplowanalytics.iglu.core.SchemaCriterion
import com.snowplowanalytics.snowplow.runtime.Metrics.StatsdConfig
import com.snowplowanalytics.snowplow.runtime.{ConfigParser, HttpClient, Retrying, Telemetry, Webhook}
import com.snowplowanalytics.snowplow.runtime.{AcceptedLicense, ConfigParser, HttpClient, Retrying, Telemetry, Webhook}
import com.snowplowanalytics.snowplow.sinks.kafka.KafkaSinkConfig
import com.snowplowanalytics.snowplow.snowflake.Config.Snowflake
import com.snowplowanalytics.snowplow.sources.kafka.KafkaSourceConfig
Expand Down Expand Up @@ -133,7 +133,8 @@ object KafkaConfigSpec {
healthProbe = Config.HealthProbe(port = Port.fromInt(8000).get, unhealthyLatency = 5.minutes),
webhook = Webhook.Config(endpoint = None, tags = Map.empty, heartbeat = 5.minutes)
),
http = Config.Http(HttpClient.Config(maxConnectionsPerServer = 4))
http = Config.Http(HttpClient.Config(maxConnectionsPerServer = 4)),
license = AcceptedLicense()
)

/**
Expand Down Expand Up @@ -233,6 +234,7 @@ object KafkaConfigSpec {
webhook =
Webhook.Config(endpoint = Some(uri"https://webhook.acme.com"), tags = Map("pipeline" -> "production"), heartbeat = 60.minutes)
),
http = Config.Http(HttpClient.Config(maxConnectionsPerServer = 4))
http = Config.Http(HttpClient.Config(maxConnectionsPerServer = 4)),
license = AcceptedLicense()
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import cats.effect.{ExitCode, IO}
import com.comcast.ip4s.Port
import com.snowplowanalytics.iglu.core.SchemaCriterion
import com.snowplowanalytics.snowplow.runtime.Metrics.StatsdConfig
import com.snowplowanalytics.snowplow.runtime.{ConfigParser, HttpClient, Retrying, Telemetry, Webhook}
import com.snowplowanalytics.snowplow.runtime.{AcceptedLicense, ConfigParser, HttpClient, Retrying, Telemetry, Webhook}
import com.snowplowanalytics.snowplow.sinks.kinesis.{BackoffPolicy, KinesisSinkConfig}
import com.snowplowanalytics.snowplow.snowflake.Config.Snowflake
import com.snowplowanalytics.snowplow.sources.kinesis.KinesisSourceConfig
Expand Down Expand Up @@ -129,7 +129,8 @@ object KinesisConfigSpec {
healthProbe = Config.HealthProbe(port = Port.fromInt(8000).get, unhealthyLatency = 5.minutes),
webhook = Webhook.Config(endpoint = None, tags = Map.empty, heartbeat = 5.minutes)
),
http = Config.Http(HttpClient.Config(maxConnectionsPerServer = 4))
http = Config.Http(HttpClient.Config(maxConnectionsPerServer = 4)),
license = AcceptedLicense()
)

/**
Expand Down Expand Up @@ -224,6 +225,7 @@ object KinesisConfigSpec {
webhook =
Webhook.Config(endpoint = Some(uri"https://webhook.acme.com"), tags = Map("pipeline" -> "production"), heartbeat = 60.minutes)
),
http = Config.Http(HttpClient.Config(maxConnectionsPerServer = 4))
http = Config.Http(HttpClient.Config(maxConnectionsPerServer = 4)),
license = AcceptedLicense()
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import com.comcast.ip4s.Port
import com.snowplowanalytics.iglu.core.SchemaCriterion
import com.snowplowanalytics.snowplow.pubsub.GcpUserAgent
import com.snowplowanalytics.snowplow.runtime.Metrics.StatsdConfig
import com.snowplowanalytics.snowplow.runtime.{ConfigParser, HttpClient, Retrying, Telemetry, Webhook}
import com.snowplowanalytics.snowplow.runtime.{AcceptedLicense, ConfigParser, HttpClient, Retrying, Telemetry, Webhook}
import com.snowplowanalytics.snowplow.sinks.pubsub.PubsubSinkConfig
import com.snowplowanalytics.snowplow.snowflake.Config.Snowflake
import com.snowplowanalytics.snowplow.sources.pubsub.PubsubSourceConfig
Expand Down Expand Up @@ -129,7 +129,8 @@ object PubsubConfigSpec {
healthProbe = Config.HealthProbe(port = Port.fromInt(8000).get, unhealthyLatency = 5.minutes),
webhook = Webhook.Config(endpoint = None, tags = Map.empty, heartbeat = 5.minutes)
),
http = Config.Http(HttpClient.Config(maxConnectionsPerServer = 4))
http = Config.Http(HttpClient.Config(maxConnectionsPerServer = 4)),
license = AcceptedLicense()
)

/**
Expand Down Expand Up @@ -223,6 +224,7 @@ object PubsubConfigSpec {
webhook =
Webhook.Config(endpoint = Some(uri"https://webhook.acme.com"), tags = Map("pipeline" -> "production"), heartbeat = 60.minutes)
),
http = Config.Http(HttpClient.Config(maxConnectionsPerServer = 4))
http = Config.Http(HttpClient.Config(maxConnectionsPerServer = 4)),
license = AcceptedLicense()
)
}

0 comments on commit db861ed

Please sign in to comment.