zalando / nakadi

A distributed event bus that implements a RESTful API abstraction on top of Kafka-like queues
https://nakadi.io
MIT License
952 stars 292 forks source link

Add logging for ISO-4217 currency format checks #1529

Closed 1u0 closed 1 year ago

1u0 commented 1 year ago

One-line summary

Description

This PR adds logging for ISO-4217 (currencies) code checks during publishing events according to their event schemas. Note: the validation is not enforced (for now), but just logging for observation for now. To avoid too much logging (in case of violations), one can use log4j filtering (for example using BurstFilter).

Review

Deployment Notes

These should highlight any db migrations, feature toggles, etc.

adyach commented 1 year ago

I am fine to go just with the validation of the current code, but it would be great to test that this validator is picked up and takes correct value from the JSON object.

1u0 commented 1 year ago

I am fine to go just with the validation of the current code, but it would be great to test that this validator is picked up and takes correct value from the JSON object.

The validator is picked up correctly, afaik - this is tested manually under debugger. Since the current behavior of validator is just to log issues, and won't raise any validation errors, imo, it would be artificial to test its integration. What if we add the proper test later, when the validator would actually enforce the validation (instead of logging)?

tor-vs-floki commented 1 year ago

👍

samizzy commented 1 year ago

:+1: