From 845b572f92c474473f363f7d9d39596491bf0d2a Mon Sep 17 00:00:00 2001 From: Piotr Limanowski Date: Wed, 12 Jun 2024 10:54:20 +0200 Subject: [PATCH] Validate cross navigation for 4.0.0 enrich The purpose of this test is to verify that enric version prior to 4.1.0 will not break with additional cross_nagivation_config enrichment. --- .../config/enrichments/cross_navigation_config.json | 9 +++++++++ .../common/enrichments/EnrichmentRegistry.scala | 3 ++- project/plugins.sbt | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 integration-tests/enrich-kafka/config/enrichments/cross_navigation_config.json diff --git a/integration-tests/enrich-kafka/config/enrichments/cross_navigation_config.json b/integration-tests/enrich-kafka/config/enrichments/cross_navigation_config.json new file mode 100644 index 000000000..4eced189c --- /dev/null +++ b/integration-tests/enrich-kafka/config/enrichments/cross_navigation_config.json @@ -0,0 +1,9 @@ +{ + "schema": "iglu:com.snowplowanalytics.snowplow.enrichments/cross_navigation_config/jsonschema/1-0-0", + + "data": { + "enabled": true, + "vendor": "com.snowplowanalytics.snowplow.enrichments", + "name": "cross_navigation_config" + } +} diff --git a/modules/common/src/main/scala/com.snowplowanalytics.snowplow.enrich/common/enrichments/EnrichmentRegistry.scala b/modules/common/src/main/scala/com.snowplowanalytics.snowplow.enrich/common/enrichments/EnrichmentRegistry.scala index a59219bb3..e796d687c 100644 --- a/modules/common/src/main/scala/com.snowplowanalytics.snowplow.enrich/common/enrichments/EnrichmentRegistry.scala +++ b/modules/common/src/main/scala/com.snowplowanalytics.snowplow.enrich/common/enrichments/EnrichmentRegistry.scala @@ -224,7 +224,8 @@ object EnrichmentRegistry { PiiPseudonymizerEnrichment.parse(enrichmentConfig, schemaKey).map(_.some) case "iab_spiders_and_robots_enrichment" => IabEnrichment.parse(enrichmentConfig, schemaKey, localMode).map(_.some) - case _ => + case err => + println(s"HOLA>>> Enrichment is not recognized $err") Option.empty[EnrichmentConf].validNel // Enrichment is not recognized } } diff --git a/project/plugins.sbt b/project/plugins.sbt index 269e50c4e..3edbbb943 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -5,4 +5,4 @@ addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.17") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.1") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.2") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") -addSbtPlugin("com.snowplowanalytics" % "sbt-snowplow-release" % "0.3.1") +addSbtPlugin("com.snowplowanalytics" % "sbt-snowplow-release" % "0.3.2")