[PDB-1473] firm up behavior around empty lists vs 404s for nonexistent data Created: 2015/05/04 Updated: 2015/07/10 Resolved: 2015/06/04
|Fix Version/s:||PDB 3.0.0|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
|Sprint:||PuppetDB 2015-06-03, PuppetDB 2015-06-17|
The console UI team needs to be able to differentiate between "nonexistent node" and "no data for existing node" when they issue the query
Talking with, Russell Mull I think we reached the following proposal:
Our shorthand endpoints follow the pattern
If the result of filtering <endpoint> to all values matching <identifier> is an empty list, then /<endpoint>/<identifier> and any children thereof should 404.
If the result of filtering <endpoint> to all values matching <identifier> is nonempty, then all children should be lists, empty or not.
|Comment by Ken Barber [ 2015/05/21 ]|
Did a quick survey of the impact so we know where the incorrect parts are: https://docs.google.com/spreadsheets/d/1ya_IPOgPYw_e9POAGmPJDd5YbqiNO32hLZDoCq5JL5w/edit#gid=0
In short it looks like:
... all return 200's with empty arrays when there is no parent data.
|Comment by Ken Barber [ 2015/05/27 ]|
Patch is here: https://github.com/puppetlabs/puppetdb/pull/1419
Doc I used to analyse the endpoints that were broken: https://docs.google.com/spreadsheets/d/1ya_IPOgPYw_e9POAGmPJDd5YbqiNO32hLZDoCq5JL5w/edit#gid=0