{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments/46324524","id":46324524,"diff_hunk":"@@ -318,10 +318,10 @@\n                               (format \"Attempt to set url-prefix to %s when it's already been set to %s\" url-prefix @old-url-prefix)))))\n   (shared-globals [this]\n                   (:shared-globals (service-context this)))\n-  (query [this query-obj version query-expr paging-options row-callback-fn]\n-         (let [{db :scf-read-db} (get (service-context this) :shared-globals)\n-               url-prefix @(get (service-context this) :url-prefix)]\n-           (qeng/stream-query-result query-obj version query-expr paging-options db url-prefix row-callback-fn))))\n+  (query [this version query-expr paging-options row-callback-fn]\n+         (let [query-options (-> (select-keys (get (service-context this) :shared-globals) [:scf-read-db :warn-experimental])","path":"src/puppetlabs/puppetdb/cli/services.clj","position":18,"original_position":18,"commit_id":"53978991146b16fd3607f431b473fe22e8d3344b","original_commit_id":"53978991146b16fd3607f431b473fe22e8d3344b","user":{"login":"ajroetker","id":3198124,"avatar_url":"https://avatars.githubusercontent.com/u/3198124?v=3","gravatar_id":"","url":"https://api.github.com/users/ajroetker","html_url":"https://github.com/ajroetker","followers_url":"https://api.github.com/users/ajroetker/followers","following_url":"https://api.github.com/users/ajroetker/following{/other_user}","gists_url":"https://api.github.com/users/ajroetker/gists{/gist_id}","starred_url":"https://api.github.com/users/ajroetker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajroetker/subscriptions","organizations_url":"https://api.github.com/users/ajroetker/orgs","repos_url":"https://api.github.com/users/ajroetker/repos","events_url":"https://api.github.com/users/ajroetker/events{/privacy}","received_events_url":"https://api.github.com/users/ajroetker/received_events","type":"User","site_admin":false},"body":"I might pull out the `(get (service-context this) :shared-gloabls)` to be the first argument of the `->`","created_at":"2015-12-01T19:20:31Z","updated_at":"2015-12-01T19:20:31Z","html_url":"https://github.com/puppetlabs/puppetdb/pull/1764#discussion_r46324524","pull_request_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1764","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments/46324524"},"html":{"href":"https://github.com/puppetlabs/puppetdb/pull/1764#discussion_r46324524"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1764"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1764","id":52019144,"html_url":"https://github.com/puppetlabs/puppetdb/pull/1764","diff_url":"https://github.com/puppetlabs/puppetdb/pull/1764.diff","patch_url":"https://github.com/puppetlabs/puppetdb/pull/1764.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1764","number":1764,"state":"open","locked":false,"title":"(PDB-2122) New 'root' single query endpoint and 'from' operator","user":{"login":"kbarber","id":80595,"avatar_url":"https://avatars.githubusercontent.com/u/80595?v=3","gravatar_id":"","url":"https://api.github.com/users/kbarber","html_url":"https://github.com/kbarber","followers_url":"https://api.github.com/users/kbarber/followers","following_url":"https://api.github.com/users/kbarber/following{/other_user}","gists_url":"https://api.github.com/users/kbarber/gists{/gist_id}","starred_url":"https://api.github.com/users/kbarber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbarber/subscriptions","organizations_url":"https://api.github.com/users/kbarber/orgs","repos_url":"https://api.github.com/users/kbarber/repos","events_url":"https://api.github.com/users/kbarber/events{/privacy}","received_events_url":"https://api.github.com/users/kbarber/received_events","type":"User","site_admin":false},"body":"This patch introduces the new 'root' endpoint that allows for querying any\r\nentity inside a single query by providing a context query.\r\n\r\nHere I've included this new feature all the way back to produce-streaming-body,\r\nstream-query-result and the query API. This patch means that all the HTTP\r\nendpoints are required to wrap their queries in from, so that this concept\r\nof a single query for all endpoints exists all the way back to the query engine\r\nAPI.\r\n\r\nFor cleanup, I've modified the produce-streaming-body and stream-query-results\r\nto take an options map instead of a list of ordered arguments as we seem to change\r\nthis frequently and some validation is desired. Plus this simplifies argument\r\npassing as most of the data is already available in `globals`.\r\n\r\nAs a side-effect of adding the from operator, I've added a new format for\r\nsubqueries that uses the same syntax at this level, as it does on the top-level.\r\nThis is provided for consistency, and it will hopefully remove the need for\r\nthe select_<entity> operator which was always a bit special.\r\n\r\nSigned-off-by: Ken Barber <ken@bob.sh>","created_at":"2015-11-27T18:52:39Z","updated_at":"2015-12-01T19:20:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7e60e8a8d3204dc2575fb273103d45928b118f45","assignee":null,"milestone":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/milestones/11","html_url":"https://github.com/puppetlabs/puppetdb/milestones/4.0.0%20(master)","labels_url":"https://api.github.com/repos/puppetlabs/puppetdb/milestones/11/labels","id":1341713,"number":11,"title":"4.0.0 (master)","description":"","creator":{"login":"kbarber","id":80595,"avatar_url":"https://avatars.githubusercontent.com/u/80595?v=3","gravatar_id":"","url":"https://api.github.com/users/kbarber","html_url":"https://github.com/kbarber","followers_url":"https://api.github.com/users/kbarber/followers","following_url":"https://api.github.com/users/kbarber/following{/other_user}","gists_url":"https://api.github.com/users/kbarber/gists{/gist_id}","starred_url":"https://api.github.com/users/kbarber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbarber/subscriptions","organizations_url":"https://api.github.com/users/kbarber/orgs","repos_url":"https://api.github.com/users/kbarber/repos","events_url":"https://api.github.com/users/kbarber/events{/privacy}","received_events_url":"https://api.github.com/users/kbarber/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":59,"state":"open","created_at":"2015-10-07T01:07:44Z","updated_at":"2015-12-01T15:06:19Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1764/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1764/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1764/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/53978991146b16fd3607f431b473fe22e8d3344b","head":{"label":"kbarber:ticket/master/pdb-2122-single-query-endpoint","ref":"ticket/master/pdb-2122-single-query-endpoint","sha":"53978991146b16fd3607f431b473fe22e8d3344b","user":{"login":"kbarber","id":80595,"avatar_url":"https://avatars.githubusercontent.com/u/80595?v=3","gravatar_id":"","url":"https://api.github.com/users/kbarber","html_url":"https://github.com/kbarber","followers_url":"https://api.github.com/users/kbarber/followers","following_url":"https://api.github.com/users/kbarber/following{/other_user}","gists_url":"https://api.github.com/users/kbarber/gists{/gist_id}","starred_url":"https://api.github.com/users/kbarber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbarber/subscriptions","organizations_url":"https://api.github.com/users/kbarber/orgs","repos_url":"https://api.github.com/users/kbarber/repos","events_url":"https://api.github.com/users/kbarber/events{/privacy}","received_events_url":"https://api.github.com/users/kbarber/received_events","type":"User","site_admin":false},"repo":{"id":4444970,"name":"puppetdb","full_name":"kbarber/puppetdb","owner":{"login":"kbarber","id":80595,"avatar_url":"https://avatars.githubusercontent.com/u/80595?v=3","gravatar_id":"","url":"https://api.github.com/users/kbarber","html_url":"https://github.com/kbarber","followers_url":"https://api.github.com/users/kbarber/followers","following_url":"https://api.github.com/users/kbarber/following{/other_user}","gists_url":"https://api.github.com/users/kbarber/gists{/gist_id}","starred_url":"https://api.github.com/users/kbarber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbarber/subscriptions","organizations_url":"https://api.github.com/users/kbarber/orgs","repos_url":"https://api.github.com/users/kbarber/repos","events_url":"https://api.github.com/users/kbarber/events{/privacy}","received_events_url":"https://api.github.com/users/kbarber/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kbarber/puppetdb","description":"Centralized Puppet Storage","fork":true,"url":"https://api.github.com/repos/kbarber/puppetdb","forks_url":"https://api.github.com/repos/kbarber/puppetdb/forks","keys_url":"https://api.github.com/repos/kbarber/puppetdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kbarber/puppetdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kbarber/puppetdb/teams","hooks_url":"https://api.github.com/repos/kbarber/puppetdb/hooks","issue_events_url":"https://api.github.com/repos/kbarber/puppetdb/issues/events{/number}","events_url":"https://api.github.com/repos/kbarber/puppetdb/events","assignees_url":"https://api.github.com/repos/kbarber/puppetdb/assignees{/user}","branches_url":"https://api.github.com/repos/kbarber/puppetdb/branches{/branch}","tags_url":"https://api.github.com/repos/kbarber/puppetdb/tags","blobs_url":"https://api.github.com/repos/kbarber/puppetdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kbarber/puppetdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kbarber/puppetdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/kbarber/puppetdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kbarber/puppetdb/statuses/{sha}","languages_url":"https://api.github.com/repos/kbarber/puppetdb/languages","stargazers_url":"https://api.github.com/repos/kbarber/puppetdb/stargazers","contributors_url":"https://api.github.com/repos/kbarber/puppetdb/contributors","subscribers_url":"https://api.github.com/repos/kbarber/puppetdb/subscribers","subscription_url":"https://api.github.com/repos/kbarber/puppetdb/subscription","commits_url":"https://api.github.com/repos/kbarber/puppetdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/kbarber/puppetdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/kbarber/puppetdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/kbarber/puppetdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/kbarber/puppetdb/contents/{+path}","compare_url":"https://api.github.com/repos/kbarber/puppetdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kbarber/puppetdb/merges","archive_url":"https://api.github.com/repos/kbarber/puppetdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kbarber/puppetdb/downloads","issues_url":"https://api.github.com/repos/kbarber/puppetdb/issues{/number}","pulls_url":"https://api.github.com/repos/kbarber/puppetdb/pulls{/number}","milestones_url":"https://api.github.com/repos/kbarber/puppetdb/milestones{/number}","notifications_url":"https://api.github.com/repos/kbarber/puppetdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kbarber/puppetdb/labels{/name}","releases_url":"https://api.github.com/repos/kbarber/puppetdb/releases{/id}","created_at":"2012-05-25T12:17:05Z","updated_at":"2015-05-05T11:09:30Z","pushed_at":"2015-12-01T18:23:10Z","git_url":"git://github.com/kbarber/puppetdb.git","ssh_url":"git@github.com:kbarber/puppetdb.git","clone_url":"https://github.com/kbarber/puppetdb.git","svn_url":"https://github.com/kbarber/puppetdb","homepage":"http://docs.puppetlabs.com/puppetdb","size":15349,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"232d088c5ebdd1ab4e4e055c372feb220ae18092","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":"2015-11-26T03:24:38Z","pushed_at":"2015-12-01T18:23:11Z","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":18384,"stargazers_count":177,"watchers_count":177,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":140,"mirror_url":null,"open_issues_count":6,"forks":140,"open_issues":6,"watchers":177,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1764"},"html":{"href":"https://github.com/puppetlabs/puppetdb/pull/1764"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1764"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1764/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1764/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1764/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/53978991146b16fd3607f431b473fe22e8d3344b"}}}}