snowplow / enrich

Snowplow Enrichment jobs and library
https://snowplowanalytics.com
Other
21 stars 39 forks source link

[ERROR] Variable substitution in Iglu resolver configuration hocon in 3.7.1 #779

Closed piankris closed 1 year ago

piankris commented 1 year ago

Hey, we have just updated from snowplow/snowplow-enrich-kinesis:3.6.0.2 to snowplow/snowplow-enrich-kinesis:3.7.1 and we're suddenly getting the error message:

ERROR com.snowplowanalytics.snowplow.enrich.common.fs2.Run - CLI arguments valid but some of the configuration is not correct. Error: Cannot parse file /snowplow/resolver.hocon: ParsingFailure: need to Config#resolve(), see the API docs for Config#resolve(); substitution not resolved: ConfigReference(${SP_SCHEMA_URI})

The resolver.hocon file:

{
  "schema": "iglu:com.snowplowanalytics.iglu/resolver-config/jsonschema/1-0-0",
  "data": {
    "cacheSize": 500,
    "repositories": [
      {
        "name": "S3-schemas-registry",
        "priority": 0,
        "vendorPrefixes": ["com.oneapp"],
        "connection": {
          "http": {
            "uri": ${SP_SCHEMA_URI}
          }
        }
      }
    ]
  }
}

We call the enrichment app in Docker like this:

FROM snowplow/snowplow-enrich-kinesis:3.7.1
COPY ./src/config.hocon /snowplow/config.hocon
COPY ./src/resolver.hocon /snowplow/resolver.hocon
COPY ./src/enrichments /snowplow/enrichments

ARG SP_SCHEMA_URI
...

ENV SP_SCHEMA_URI $SP_SCHEMA_URI
...

USER root

ENTRYPOINT ["/usr/bin/env"]

CMD /home/snowplow/bin/snowplow-enrich-kinesis --config /snowplow/config.hocon \
    --iglu-config /snowplow/resolver.hocon \
    --enrichments /snowplow/enrichments \
benjben commented 1 year ago

Hi @piankris ,

The feature was introduced in 3.7.0, but had a bug, which was fixed but not released yet.

It will probably be released before the end of the week and will be announced on discourse.

Meanwhile if you want to use this feature already, feel free to use 3.7.1-rc1.