GitHub PullRequestReviewCommentEvent at 2014-11-13 21:44:18
Repository: puppetdb
Actor: wkalt
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments/20325625","id":20325625,"diff_hunk":"@@ -53,3 +60,40 @@\n          (is (= 404 (:status response))))\n        (let [response (client/get (jutils/current-url \"/puppetdb/v4/version\"))]\n          (is (= 200 (:status response))))))))\n+\n+\n+(deftest query-via-puppdbserver-service\n+  (jutils/with-puppetdb-instance\n+    (submit-command :replace-facts 3 {:name \"foo.local\"\n+                                      :environment \"DEV\"\n+                                      :values {:foo \"the foo\"\n+                                               :bar \"the bar\"\n+                                               :baz \"the baz\"}\n+                                      :producer-timestamp (to-string (now))})\n+\n+    @(block-until-results 100 (export/facts-for-node \"localhost\" jutils/*port* \"foo.local\"))\n+    (let [pdb-service (get-service jutils/*server* :PuppetDBServer)\n+          results (atom nil)\n+          before-slurp? (atom nil)\n+          after-slurp? (atom nil)]\n+      (query pdb-service :facts :v4 [\"=\" \"certname\" \"foo.local\"] (fn [f]","path":"test/puppetlabs/puppetdb/cli/services_test.clj","position":36,"original_position":36,"commit_id":"874efa3b56f6ddcc6f7b18eb48d0a0ef65756139","original_commit_id":"874efa3b56f6ddcc6f7b18eb48d0a0ef65756139","user":{"login":"wkalt","id":4952091,"avatar_url":"https://avatars.githubusercontent.com/u/4952091?v=3","gravatar_id":"","url":"https://api.github.com/users/wkalt","html_url":"https://github.com/wkalt","followers_url":"https://api.github.com/users/wkalt/followers","following_url":"https://api.github.com/users/wkalt/following{/other_user}","gists_url":"https://api.github.com/users/wkalt/gists{/gist_id}","starred_url":"https://api.github.com/users/wkalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkalt/subscriptions","organizations_url":"https://api.github.com/users/wkalt/orgs","repos_url":"https://api.github.com/users/wkalt/repos","events_url":"https://api.github.com/users/wkalt/events{/privacy}","received_events_url":"https://api.github.com/users/wkalt/received_events","type":"User","site_admin":false},"body":"I'm convinced that the query eng endpoints work -- the issues I was having were related to my output function. One additional thing that occurred to me though is that this new access point doesn't restrict queries to active nodes -- that's something we've been doing in the http files.","created_at":"2014-11-13T21:44:18Z","updated_at":"2014-11-13T21:44:18Z","html_url":"https://github.com/puppetlabs/puppetdb/pull/1147#discussion_r20325625","pull_request_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1147","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments/20325625"},"html":{"href":"https://github.com/puppetlabs/puppetdb/pull/1147#discussion_r20325625"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1147"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1147","id":24193272,"html_url":"https://github.com/puppetlabs/puppetdb/pull/1147","diff_url":"https://github.com/puppetlabs/puppetdb/pull/1147.diff","patch_url":"https://github.com/puppetlabs/puppetdb/pull/1147.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1147","number":1147,"state":"open","locked":false,"title":"(PDB-1011) Allow querying of PDB directly via a TK service","user":{"login":"senior","id":215910,"avatar_url":"https://avatars.githubusercontent.com/u/215910?v=3","gravatar_id":"","url":"https://api.github.com/users/senior","html_url":"https://github.com/senior","followers_url":"https://api.github.com/users/senior/followers","following_url":"https://api.github.com/users/senior/following{/other_user}","gists_url":"https://api.github.com/users/senior/gists{/gist_id}","starred_url":"https://api.github.com/users/senior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senior/subscriptions","organizations_url":"https://api.github.com/users/senior/orgs","repos_url":"https://api.github.com/users/senior/repos","events_url":"https://api.github.com/users/senior/events{/privacy}","received_events_url":"https://api.github.com/users/senior/received_events","type":"User","site_admin":false},"body":"This commit adds a function to the PuppetDBServer service to execute a\r\nquery and return the results as a Clojure data structure (rather than\r\nstreaming JSON over HTTP). A function can be passed in that will accept\r\na lazy seq to consume the rows","created_at":"2014-11-11T01:52:39Z","updated_at":"2014-11-13T21:44:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe4c630f39be9777ca5bc4427de3667349df6013","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1147/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1147/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments/{number}","comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1147/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/874efa3b56f6ddcc6f7b18eb48d0a0ef65756139","head":{"label":"senior:ticket/master/pdb-1011-pdb-query-from-service","ref":"ticket/master/pdb-1011-pdb-query-from-service","sha":"874efa3b56f6ddcc6f7b18eb48d0a0ef65756139","user":{"login":"senior","id":215910,"avatar_url":"https://avatars.githubusercontent.com/u/215910?v=3","gravatar_id":"","url":"https://api.github.com/users/senior","html_url":"https://github.com/senior","followers_url":"https://api.github.com/users/senior/followers","following_url":"https://api.github.com/users/senior/following{/other_user}","gists_url":"https://api.github.com/users/senior/gists{/gist_id}","starred_url":"https://api.github.com/users/senior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senior/subscriptions","organizations_url":"https://api.github.com/users/senior/orgs","repos_url":"https://api.github.com/users/senior/repos","events_url":"https://api.github.com/users/senior/events{/privacy}","received_events_url":"https://api.github.com/users/senior/received_events","type":"User","site_admin":false},"repo":{"id":13152306,"name":"puppetdb","full_name":"senior/puppetdb","owner":{"login":"senior","id":215910,"avatar_url":"https://avatars.githubusercontent.com/u/215910?v=3","gravatar_id":"","url":"https://api.github.com/users/senior","html_url":"https://github.com/senior","followers_url":"https://api.github.com/users/senior/followers","following_url":"https://api.github.com/users/senior/following{/other_user}","gists_url":"https://api.github.com/users/senior/gists{/gist_id}","starred_url":"https://api.github.com/users/senior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senior/subscriptions","organizations_url":"https://api.github.com/users/senior/orgs","repos_url":"https://api.github.com/users/senior/repos","events_url":"https://api.github.com/users/senior/events{/privacy}","received_events_url":"https://api.github.com/users/senior/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/senior/puppetdb","description":"Centralized Puppet Storage","fork":true,"url":"https://api.github.com/repos/senior/puppetdb","forks_url":"https://api.github.com/repos/senior/puppetdb/forks","keys_url":"https://api.github.com/repos/senior/puppetdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/senior/puppetdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/senior/puppetdb/teams","hooks_url":"https://api.github.com/repos/senior/puppetdb/hooks","issue_events_url":"https://api.github.com/repos/senior/puppetdb/issues/events{/number}","events_url":"https://api.github.com/repos/senior/puppetdb/events","assignees_url":"https://api.github.com/repos/senior/puppetdb/assignees{/user}","branches_url":"https://api.github.com/repos/senior/puppetdb/branches{/branch}","tags_url":"https://api.github.com/repos/senior/puppetdb/tags","blobs_url":"https://api.github.com/repos/senior/puppetdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/senior/puppetdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/senior/puppetdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/senior/puppetdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/senior/puppetdb/statuses/{sha}","languages_url":"https://api.github.com/repos/senior/puppetdb/languages","stargazers_url":"https://api.github.com/repos/senior/puppetdb/stargazers","contributors_url":"https://api.github.com/repos/senior/puppetdb/contributors","subscribers_url":"https://api.github.com/repos/senior/puppetdb/subscribers","subscription_url":"https://api.github.com/repos/senior/puppetdb/subscription","commits_url":"https://api.github.com/repos/senior/puppetdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/senior/puppetdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/senior/puppetdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/senior/puppetdb/issues/comments/{number}","contents_url":"https://api.github.com/repos/senior/puppetdb/contents/{+path}","compare_url":"https://api.github.com/repos/senior/puppetdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/senior/puppetdb/merges","archive_url":"https://api.github.com/repos/senior/puppetdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/senior/puppetdb/downloads","issues_url":"https://api.github.com/repos/senior/puppetdb/issues{/number}","pulls_url":"https://api.github.com/repos/senior/puppetdb/pulls{/number}","milestones_url":"https://api.github.com/repos/senior/puppetdb/milestones{/number}","notifications_url":"https://api.github.com/repos/senior/puppetdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/senior/puppetdb/labels{/name}","releases_url":"https://api.github.com/repos/senior/puppetdb/releases{/id}","created_at":"2013-09-27T14:18:50Z","updated_at":"2014-06-21T06:15:55Z","pushed_at":"2014-11-11T17:20:43Z","git_url":"git://github.com/senior/puppetdb.git","ssh_url":"git@github.com:senior/puppetdb.git","clone_url":"https://github.com/senior/puppetdb.git","svn_url":"https://github.com/senior/puppetdb","homepage":"http://docs.puppetlabs.com/puppetdb","size":13064,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"1ecc168b6a63af9a428f5ad8f89239a40ef7f01d","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":2193032,"name":"puppetdb","full_name":"puppetlabs/puppetdb","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/puppetdb","description":"Centralized Puppet Storage","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppetdb","forks_url":"https://api.github.com/repos/puppetlabs/puppetdb/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppetdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppetdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppetdb/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppetdb/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppetdb/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppetdb/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppetdb/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppetdb/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppetdb/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppetdb/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppetdb/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppetdb/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppetdb/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppetdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/comments/{number}","contents_url":"https://api.github.com/repos/puppetlabs/puppetdb/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppetdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppetdb/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppetdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppetdb/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppetdb/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppetdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppetdb/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppetdb/releases{/id}","created_at":"2011-08-11T18:54:46Z","updated_at":"2014-11-12T13:36:14Z","pushed_at":"2014-11-13T17:25:42Z","git_url":"git://github.com/puppetlabs/puppetdb.git","ssh_url":"git@github.com:puppetlabs/puppetdb.git","clone_url":"https://github.com/puppetlabs/puppetdb.git","svn_url":"https://github.com/puppetlabs/puppetdb","homepage":"http://docs.puppetlabs.com/puppetdb","size":20983,"stargazers_count":150,"watchers_count":150,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":112,"mirror_url":null,"open_issues_count":8,"forks":112,"open_issues":8,"watchers":150,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1147"},"html":{"href":"https://github.com/puppetlabs/puppetdb/pull/1147"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1147"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1147/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1147/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1147/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/874efa3b56f6ddcc6f7b18eb48d0a0ef65756139"}}}}