Hi everyone. Simple question (or not). We've just ...
# singer-tap-development
l
Hi everyone. Simple question (or not). We've just been bitten by a dumb bug where we specified a primary key on a stream, but forgot to add the corresponding field in the stream. PR went through review, pushed the code to production, and then we wondered what the error was about 🙈 What would be the most logical way to implement super basic checks like this? I was imagining a test in the sdk that validates certain basic assumptions on all taps built with it. https://gitlab.com/meltano/sdk/-/issues/259 looks relevant, but maybe that's aiming quite a bit higher than what I have in mind?
a
Yeah, this seems like something we could test in the SDK standard test suite and perhaps also just have a hard failure at runtime.
I recently added a similar check for stream maps, such that if your steam map config overrides the key properties to a set of key properties that don't exist, we would fail at runtime.
l
that's a good start, it would fail in CI at least. Can you point me to some code? I'll see if I can adapt to our check
v
There's some function in the sdk that looks at data being in the response but not in the selection criteria and gives you a warning, maybe around there makes the most sense?
Forgetting the message exactly