{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments/37809582","id":37809582,"diff_hunk":"@@ -65,19 +80,19 @@\n (def report-v3-wireformat-schema\n   (dissoc report-v4-wireformat-schema :status))\n \n-(pls/defn-validated sanitize-events :- [resource-event-wireformat-schema]\n+(pls/defn-validated sanitize-v5-resource-events :- [resource-event-v5-wireformat-schema]\n   \"This function takes an array of events and santizes them, ensuring only\n    valid keys are returned.\"\n-  [events :- (s/pred coll? 'coll?)]\n-  (for [event events]\n-    (pls/strip-unknown-keys resource-event-wireformat-schema event)))\n+  [resource-events :- (s/pred coll? 'coll?)]\n+  (for [resource-event resource-events]\n+    (pls/strip-unknown-keys resource-event-v5-wireformat-schema resource-event)))","path":"src/puppetlabs/puppetdb/reports.clj","position":112,"original_position":112,"commit_id":"1e1878b400d57e27c75e1bac2ce96fbdfb317fea","original_commit_id":"1e1878b400d57e27c75e1bac2ce96fbdfb317fea","user":{"login":"mullr","id":24409,"avatar_url":"https://avatars.githubusercontent.com/u/24409?v=3","gravatar_id":"","url":"https://api.github.com/users/mullr","html_url":"https://github.com/mullr","followers_url":"https://api.github.com/users/mullr/followers","following_url":"https://api.github.com/users/mullr/following{/other_user}","gists_url":"https://api.github.com/users/mullr/gists{/gist_id}","starred_url":"https://api.github.com/users/mullr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mullr/subscriptions","organizations_url":"https://api.github.com/users/mullr/orgs","repos_url":"https://api.github.com/users/mullr/repos","events_url":"https://api.github.com/users/mullr/events{/privacy}","received_events_url":"https://api.github.com/users/mullr/received_events","type":"User","site_admin":false},"body":"fair enough\n\nOn Mon, Aug 24, 2015 at 2:41 PM, Andrew Roetker <notifications@github.com>\nwrote:\n\n> In src/puppetlabs/puppetdb/reports.clj\n> <https://github.com/puppetlabs/puppetdb/pull/1599#discussion_r37808392>:\n>\n> >    \"This function takes an array of events and santizes them, ensuring only\n> >     valid keys are returned.\"\n> > -  [events :- (s/pred coll? 'coll?)]\n> > -  (for [event events]\n> > -    (pls/strip-unknown-keys resource-event-wireformat-schema event)))\n> > +  [resource-events :- (s/pred coll? 'coll?)]\n> > +  (for [resource-event resource-events]\n> > +    (pls/strip-unknown-keys resource-event-v5-wireformat-schema resource-event)))\n>\n> I know I thought that looked more complicated though >_>\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/puppetlabs/puppetdb/pull/1599/files#r37808392>.\n>\n","created_at":"2015-08-24T21:53:39Z","updated_at":"2015-08-24T21:53:39Z","html_url":"https://github.com/puppetlabs/puppetdb/pull/1599#discussion_r37809582","pull_request_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1599","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments/37809582"},"html":{"href":"https://github.com/puppetlabs/puppetdb/pull/1599#discussion_r37809582"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1599"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1599","id":42489753,"html_url":"https://github.com/puppetlabs/puppetdb/pull/1599","diff_url":"https://github.com/puppetlabs/puppetdb/pull/1599.diff","patch_url":"https://github.com/puppetlabs/puppetdb/pull/1599.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1599","number":1599,"state":"open","locked":false,"title":"(PDB-1852) Add migration and storage for JSONB columns for Unchanged Resources","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":"This commit moves to using JSONB columns for metrics, logs, and the new\r\ncolumn resources in the reports table. The resources column will be used\r\nby unchanged resources for storing \"resource\" jsonb blobs. The old\r\nmetrics and logs json columns have been moved to deprecated_metrics and\r\ndeprecated_logs (coalesced with the jsonb columns in the query-eng to\r\npreserve querying for the old data).\r\n\r\nThis commit also changes PuppetDB's report storage to expect the v6\r\nwire-format with the resources (instead of resource_events) field and\r\nstores the resources document as a JSONB column in reports that was\r\ncreated in a previous commit's migration addition. This commit updates\r\nthe tests to be more compatible with the new version, removing\r\nunnecessary fields in the example reports' `resource_events` fields.","created_at":"2015-08-14T19:31:57Z","updated_at":"2015-08-24T21:53:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5fe42fa15b7430a6b78dd44ef5e5b5425521a5c9","assignee":null,"milestone":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/milestones/8","html_url":"https://github.com/puppetlabs/puppetdb/milestones/3.2.0","labels_url":"https://api.github.com/repos/puppetlabs/puppetdb/milestones/8/labels","id":1256027,"number":8,"title":"3.2.0","description":"","creator":{"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},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2015-08-14T23:38:34Z","updated_at":"2015-08-18T11:37:26Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1599/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1599/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1599/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/1e1878b400d57e27c75e1bac2ce96fbdfb317fea","head":{"label":"ajroetker:ticket/master/pdb-1852/add_migration_for_jsonb_columns","ref":"ticket/master/pdb-1852/add_migration_for_jsonb_columns","sha":"1e1878b400d57e27c75e1bac2ce96fbdfb317fea","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},"repo":{"id":10415180,"name":"puppetdb","full_name":"ajroetker/puppetdb","owner":{"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},"private":false,"html_url":"https://github.com/ajroetker/puppetdb","description":"Centralized Puppet Storage","fork":true,"url":"https://api.github.com/repos/ajroetker/puppetdb","forks_url":"https://api.github.com/repos/ajroetker/puppetdb/forks","keys_url":"https://api.github.com/repos/ajroetker/puppetdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ajroetker/puppetdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ajroetker/puppetdb/teams","hooks_url":"https://api.github.com/repos/ajroetker/puppetdb/hooks","issue_events_url":"https://api.github.com/repos/ajroetker/puppetdb/issues/events{/number}","events_url":"https://api.github.com/repos/ajroetker/puppetdb/events","assignees_url":"https://api.github.com/repos/ajroetker/puppetdb/assignees{/user}","branches_url":"https://api.github.com/repos/ajroetker/puppetdb/branches{/branch}","tags_url":"https://api.github.com/repos/ajroetker/puppetdb/tags","blobs_url":"https://api.github.com/repos/ajroetker/puppetdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ajroetker/puppetdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ajroetker/puppetdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/ajroetker/puppetdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ajroetker/puppetdb/statuses/{sha}","languages_url":"https://api.github.com/repos/ajroetker/puppetdb/languages","stargazers_url":"https://api.github.com/repos/ajroetker/puppetdb/stargazers","contributors_url":"https://api.github.com/repos/ajroetker/puppetdb/contributors","subscribers_url":"https://api.github.com/repos/ajroetker/puppetdb/subscribers","subscription_url":"https://api.github.com/repos/ajroetker/puppetdb/subscription","commits_url":"https://api.github.com/repos/ajroetker/puppetdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/ajroetker/puppetdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/ajroetker/puppetdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/ajroetker/puppetdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/ajroetker/puppetdb/contents/{+path}","compare_url":"https://api.github.com/repos/ajroetker/puppetdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ajroetker/puppetdb/merges","archive_url":"https://api.github.com/repos/ajroetker/puppetdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ajroetker/puppetdb/downloads","issues_url":"https://api.github.com/repos/ajroetker/puppetdb/issues{/number}","pulls_url":"https://api.github.com/repos/ajroetker/puppetdb/pulls{/number}","milestones_url":"https://api.github.com/repos/ajroetker/puppetdb/milestones{/number}","notifications_url":"https://api.github.com/repos/ajroetker/puppetdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ajroetker/puppetdb/labels{/name}","releases_url":"https://api.github.com/repos/ajroetker/puppetdb/releases{/id}","created_at":"2013-05-31T23:59:00Z","updated_at":"2015-04-29T22:51:50Z","pushed_at":"2015-08-24T21:13:15Z","git_url":"git://github.com/ajroetker/puppetdb.git","ssh_url":"git@github.com:ajroetker/puppetdb.git","clone_url":"https://github.com/ajroetker/puppetdb.git","svn_url":"https://github.com/ajroetker/puppetdb","homepage":"http://docs.puppetlabs.com/puppetdb","size":14977,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"22b7cf62590d0ee6ef7e568e7482bbde117a6719","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-08-08T19:01:46Z","pushed_at":"2015-08-24T21:39:24Z","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":22759,"stargazers_count":172,"watchers_count":172,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":133,"mirror_url":null,"open_issues_count":8,"forks":133,"open_issues":8,"watchers":172,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1599"},"html":{"href":"https://github.com/puppetlabs/puppetdb/pull/1599"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1599"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1599/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1599/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1599/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/1e1878b400d57e27c75e1bac2ce96fbdfb317fea"}}}}