GitHub PushEvent at 2014-01-30 02:28:27
Repository: puppetdb
Actor: kbarber
Payload: {"shas":[["76629c2889b45670d82f86467d72c8c3831f22b2","470bc578162732ac7f9d387d34c4af4ca6e1b6f7@bob.sh","PDB-341 Fix some API version crossover issues\n\nThis patch fixes the immediate bug provided with PDB-341:\n\n* select-resources not working for file/line in v3 api\n\nBut as a consequence of solving this problem we've found other inconsistencies\nwith the API:\n\n* v3 of the resources end-point was using the v2 of the 'not' operator\n* v3 of the resources end-point was using the v2 fact operators for select-facts\n\nIn short, these bugs can be put down to copy & paste errors when we cut the v3\nrelease. The facts end-point in particular still had a lot of code pointing at\nv2 api stuff which was fine when these were backwards compatible but in some\ncases this has caused problems as we have found.\n\nThe patch here breaks up the facts endpoints into their versioned counterparts\nas you would expect to hopefully avoid this issue. In the future we should\nfind a better way to version and decompose this (for example, using a multi-method,\ncondp or other 'case' still look for version behaviour for all the operators).\n\nI've also copied over the testing from the v1 and v2 endpoints that was missing\nfrom v3. I've achieved this by combining the tests into a single file and simply\niterating over the v2 and v3 end-points.\n\nAlso, I've removed the use of custom 'get-request' functions all over the place\nsince this was making the development inconsistent. There was also a minor\nvariant known as 'make-request' which I've removed.\n\n'endpoint' is now declared at the top of each test to be re-used again to reduce\nany copy and paste errors in the future as well.\n\nAny other changes include either modifying items to fix bugs from the above\nchanges or a general increase in coverage where I saw it needed it.\n\nSigned-off-by: Ken Barber <ken@bob.sh>","Ken Barber",true]],"size":1,"ref":"refs/heads/ticket/1.6.x/PDB-341-select-resources-file-line","head":"76629c2889b45670d82f86467d72c8c3831f22b2"}