[PDB-2843] Exceptions when using functions Created: 2016/06/26 Updated: 2017/03/15 Resolved: 2016/08/02
|Fix Version/s:||PDB 4.2.0|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
When using any of the PQL functions it is very easy to get PuppetDB to throw a Input to munge-result-row does not match schema error. When this is thrown PuppetDB never responds to the query, causing it to timeout.
All queries below are calling the root endpoint i.e. http://(master):8080/pdb/query/v4?query=(query)
e.g. The following query:
Returns the following data as expected:
However if I try to average these numbers:
I get the following exception in the PuppetDB logs:
However if I try seemingly the exact same thing using a different entity:
And If I try to average it:
This seems weird given that the input data for each function seems to be in the exact same format. This not only applicable to the avg() function. In situations where it fails, it will fail regardless of the function that is used.
|Comment by Wyatt Alt [ 2016/06/27 ]|
The input and output schemas for the fact-contents munge function need to be wrapped with query/wrap-with-supported-fns. While we're at it we should double check that other endpoints didn't slip through the cracks.
|Comment by Ryan Senior [ 2016/08/08 ]|
Released with 4.2.0