Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

"Key provided but not found in metadata" is misleading in many cases #126

Open
themonk911 opened this issue Aug 26, 2020 · 2 comments
Open

Comments

@themonk911
Copy link
Contributor

When running the unit tests, I can see a lot of messages that say (e.g.)

{"timestamp": "2020-08-26T14:22:58.2411", "classname": "CzechRepublicAgeSexDataSource", "record": {"key": "CZ_31_311", "date": "2020-03-13", "age": "20-29", "sex": "male", "new_confirmed": 1, "_vec": "CZ_31_311"}, "message": "Key provided but not found in metadata"}

However, looking in the metadata, those keys are definitely present. So it appears that the error message is incorrect in this case.

@owahltinez
Copy link
Contributor

This is tricky, because the unit tests intentionally run on a subset of the metadata (to make things reasonably fast). However, the data being pulled for the test is real data which means that it will have regions which do not exist in the metadata.

Something we could do is to disable certain warnings during unit testing, since it's only meant for basic validation, whereas things like mismatched keys can be tracked via monitoring (although it looks like only errors are being reported so far, and not warnings).

@themonk911
Copy link
Contributor Author

Yeah the tests don't fail on these warnings, it's just noise. I'm pro disabling them during testing, since the unit tests do not fail on them anyway.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants