Automated validation of precursor declarations?
In #628 @pralitp said:
Do have have a test to check the precursors are actually right? This would be a very long running test and so maybe we would only run it every once in a while but could be implemented by:
Running all chunks For each chunk perturb each table in it's declare.INPUTS Check to make sure that only the declare.OUPUTS tables changed which had declared the input as a precursor and the others did not.
and @rplzzz replied
Pralit's idea for validating the precursors is interesting. I would make it a utility rather than a test, and I'd make it run just on user-selected tables, rather than the whole system. The main use I see for it are that in code review for a chunk, a reviewer can check that the precursors have been set correctly. You don't need to check every table in the whole system for that.
This is something that would be nice to have. The issue I see (and have run into giving this a quick try) is how we deal with errors thrown by chunks. The ideal is to iterate through each input, setting each input to an empty tibble and then testing if the outputs match the expected output. The problem is that this will often cause an error, perhaps unrelated to the output we are trying to validate, as the chunk tries to perform some operation for which it doesn't have data. We basically want to run every single line/pipeline through a try() call so that the chunk is guaranteed to finish and return outputs.