I’m seeing some invalid SchemaIssue errors since uprading to stream enrich 5.2.0.
The error is as follows:
ValidationError with DataReports:2 SchemaIssues:0 for 'iglu:jet.cust/cx_basket/jsonschema/1-0-2'
dataReport -- Path:'$.total' Keyword:'multipleOf' Message:'$.total: must be multiple of 0.01' Targets:'0.01'
dataReport -- Path:'$.deliveryFee' Keyword:'multipleOf' Message:'$.deliveryFee: must be multiple of 0.01' Targets:'0.01'
Thanks for the quick response Mike! I’m not aware of any redaction on the logs as we have seen events fail this same schema checks in the past with more than 2dp’s.
I think that something may be amiss here though. This context is used in many applications but this error was only being reported in one. Since reverting the deployment, the errors stopped. I’ll investigate further.
Ah, to clarify I just meant manually redact any personal data you might have in the raw schema violation itself.
I had a double check of enrich - there is an upgraded version of the library we use for validation (from 1.0.70 to 1.0.76) but there are unit tests for multipleOf in that library so I’d be surprised if there was a regression there (but still possible!).
We have managed to reproduce this and it does look like it’s due to the enricher was previously not decoding the base64 as it is now. I believe in 5.2.0 it is decoding correctly.
If this is the raw data you are receiving my feeling is that there may potentially be some floating point rounding errors in the tracking code itself given that seems to be the raw event? I get basically the same payload in JS and Enrich (as a string) however if you parse this as a JSON object you will hit the precision limits of floating points in Javascript and as a result you will get a rounded result.
Sorry, I should have mentioned this before but we are upgrading from 3.4.0 to 5.2.0.
We also switched the image which is when the error started being reported properly.
from: snowplow/stream-enrich-kinesis (no schema error detected)
to: snowplow/snowplow-enrich-kinesis (schema error detected)
There is nothing wrong with the way the enricher is currently validating. This was something that wasn’t being detected in stream-enrich-kinesis. In any case this is no longer a problem as of a long time ago. We’ll ensure we keep up to date on the latest releases going forward.