{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppetserver/pulls/comments/258691497","pull_request_review_id":206018634,"id":258691497,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI1ODY5MTQ5Nw==","diff_hunk":"@@ -127,6 +162,79 @@ def getTaskData(environment_name, module_name, task_name)\n \n   private\n \n+  # @return Puppet::Node::Facts facts, Hash trusted_facts\n+  def process_facts(request_data)\n+    if request_data['facts'].nil?\n+      facts = get_facts_from_pdb(request_data['certname'], request_data['environment'])\n+    else\n+      facts_from_request = request_data['facts']\n+      facts_from_request['name'] = request_data['certname']\n+      facts = Puppet::Node::Facts.from_data_hash(facts_from_request)\n+    end\n+\n+    fact_values = if facts.nil?\n+                    {}\n+                  else\n+                    facts.sanitize","path":"src/ruby/puppetserver-lib/puppet/server/master.rb","position":77,"original_position":77,"commit_id":"ba5bd96848d4ab1d97b4ec2102bd6430d48cba88","original_commit_id":"ba5bd96848d4ab1d97b4ec2102bd6430d48cba88","user":{"login":"justinstoller","id":241423,"node_id":"MDQ6VXNlcjI0MTQyMw==","avatar_url":"https://avatars0.githubusercontent.com/u/241423?v=4","gravatar_id":"","url":"https://api.github.com/users/justinstoller","html_url":"https://github.com/justinstoller","followers_url":"https://api.github.com/users/justinstoller/followers","following_url":"https://api.github.com/users/justinstoller/following{/other_user}","gists_url":"https://api.github.com/users/justinstoller/gists{/gist_id}","starred_url":"https://api.github.com/users/justinstoller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinstoller/subscriptions","organizations_url":"https://api.github.com/users/justinstoller/orgs","repos_url":"https://api.github.com/users/justinstoller/repos","events_url":"https://api.github.com/users/justinstoller/events{/privacy}","received_events_url":"https://api.github.com/users/justinstoller/received_events","type":"User","site_admin":false},"body":"_And_ `Node#merge` calls `#sanitize` on the facts that are passed into it, which in our case is the `facts` variable.","created_at":"2019-02-20T21:49:15Z","updated_at":"2019-02-20T21:49:15Z","html_url":"https://github.com/puppetlabs/puppetserver/pull/1979#discussion_r258691497","pull_request_url":"https://api.github.com/repos/puppetlabs/puppetserver/pulls/1979","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetserver/pulls/comments/258691497"},"html":{"href":"https://github.com/puppetlabs/puppetserver/pull/1979#discussion_r258691497"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppetserver/pulls/1979"}},"in_reply_to_id":258686801},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetserver/pulls/1979","id":253189567,"node_id":"MDExOlB1bGxSZXF1ZXN0MjUzMTg5NTY3","html_url":"https://github.com/puppetlabs/puppetserver/pull/1979","diff_url":"https://github.com/puppetlabs/puppetserver/pull/1979.diff","patch_url":"https://github.com/puppetlabs/puppetserver/pull/1979.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppetserver/issues/1979","number":1979,"state":"open","locked":false,"title":"(SERVER-2444) Process facts for flexible catalog request","user":{"login":"Magisus","id":839145,"node_id":"MDQ6VXNlcjgzOTE0NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/839145?v=4","gravatar_id":"","url":"https://api.github.com/users/Magisus","html_url":"https://github.com/Magisus","followers_url":"https://api.github.com/users/Magisus/followers","following_url":"https://api.github.com/users/Magisus/following{/other_user}","gists_url":"https://api.github.com/users/Magisus/gists{/gist_id}","starred_url":"https://api.github.com/users/Magisus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Magisus/subscriptions","organizations_url":"https://api.github.com/users/Magisus/orgs","repos_url":"https://api.github.com/users/Magisus/repos","events_url":"https://api.github.com/users/Magisus/events{/privacy}","received_events_url":"https://api.github.com/users/Magisus/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-02-14T19:14:23Z","updated_at":"2019-02-20T21:49:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9df1572ca4b535d9524132aa5e3ff1482c8d58cd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":631074882,"node_id":"MDU6TGFiZWw2MzEwNzQ4ODI=","url":"https://api.github.com/repos/puppetlabs/puppetserver/labels/DO%20NOT%20MERGE","name":"DO NOT MERGE","color":"b60205","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppetserver/pulls/1979/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppetserver/pulls/1979/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppetserver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppetserver/issues/1979/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppetserver/statuses/ba5bd96848d4ab1d97b4ec2102bd6430d48cba88","head":{"label":"Magisus:fact-processing","ref":"fact-processing","sha":"ba5bd96848d4ab1d97b4ec2102bd6430d48cba88","user":{"login":"Magisus","id":839145,"node_id":"MDQ6VXNlcjgzOTE0NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/839145?v=4","gravatar_id":"","url":"https://api.github.com/users/Magisus","html_url":"https://github.com/Magisus","followers_url":"https://api.github.com/users/Magisus/followers","following_url":"https://api.github.com/users/Magisus/following{/other_user}","gists_url":"https://api.github.com/users/Magisus/gists{/gist_id}","starred_url":"https://api.github.com/users/Magisus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Magisus/subscriptions","organizations_url":"https://api.github.com/users/Magisus/orgs","repos_url":"https://api.github.com/users/Magisus/repos","events_url":"https://api.github.com/users/Magisus/events{/privacy}","received_events_url":"https://api.github.com/users/Magisus/received_events","type":"User","site_admin":false},"repo":{"id":75239189,"node_id":"MDEwOlJlcG9zaXRvcnk3NTIzOTE4OQ==","name":"puppetserver","full_name":"Magisus/puppetserver","private":false,"owner":{"login":"Magisus","id":839145,"node_id":"MDQ6VXNlcjgzOTE0NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/839145?v=4","gravatar_id":"","url":"https://api.github.com/users/Magisus","html_url":"https://github.com/Magisus","followers_url":"https://api.github.com/users/Magisus/followers","following_url":"https://api.github.com/users/Magisus/following{/other_user}","gists_url":"https://api.github.com/users/Magisus/gists{/gist_id}","starred_url":"https://api.github.com/users/Magisus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Magisus/subscriptions","organizations_url":"https://api.github.com/users/Magisus/orgs","repos_url":"https://api.github.com/users/Magisus/repos","events_url":"https://api.github.com/users/Magisus/events{/privacy}","received_events_url":"https://api.github.com/users/Magisus/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Magisus/puppetserver","description":"Server automation framework and application","fork":true,"url":"https://api.github.com/repos/Magisus/puppetserver","forks_url":"https://api.github.com/repos/Magisus/puppetserver/forks","keys_url":"https://api.github.com/repos/Magisus/puppetserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Magisus/puppetserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Magisus/puppetserver/teams","hooks_url":"https://api.github.com/repos/Magisus/puppetserver/hooks","issue_events_url":"https://api.github.com/repos/Magisus/puppetserver/issues/events{/number}","events_url":"https://api.github.com/repos/Magisus/puppetserver/events","assignees_url":"https://api.github.com/repos/Magisus/puppetserver/assignees{/user}","branches_url":"https://api.github.com/repos/Magisus/puppetserver/branches{/branch}","tags_url":"https://api.github.com/repos/Magisus/puppetserver/tags","blobs_url":"https://api.github.com/repos/Magisus/puppetserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Magisus/puppetserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Magisus/puppetserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/Magisus/puppetserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Magisus/puppetserver/statuses/{sha}","languages_url":"https://api.github.com/repos/Magisus/puppetserver/languages","stargazers_url":"https://api.github.com/repos/Magisus/puppetserver/stargazers","contributors_url":"https://api.github.com/repos/Magisus/puppetserver/contributors","subscribers_url":"https://api.github.com/repos/Magisus/puppetserver/subscribers","subscription_url":"https://api.github.com/repos/Magisus/puppetserver/subscription","commits_url":"https://api.github.com/repos/Magisus/puppetserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/Magisus/puppetserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/Magisus/puppetserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/Magisus/puppetserver/issues/comments{/number}","contents_url":"https://api.github.com/repos/Magisus/puppetserver/contents/{+path}","compare_url":"https://api.github.com/repos/Magisus/puppetserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Magisus/puppetserver/merges","archive_url":"https://api.github.com/repos/Magisus/puppetserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Magisus/puppetserver/downloads","issues_url":"https://api.github.com/repos/Magisus/puppetserver/issues{/number}","pulls_url":"https://api.github.com/repos/Magisus/puppetserver/pulls{/number}","milestones_url":"https://api.github.com/repos/Magisus/puppetserver/milestones{/number}","notifications_url":"https://api.github.com/repos/Magisus/puppetserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Magisus/puppetserver/labels{/name}","releases_url":"https://api.github.com/repos/Magisus/puppetserver/releases{/id}","deployments_url":"https://api.github.com/repos/Magisus/puppetserver/deployments","created_at":"2016-12-01T00:21:16Z","updated_at":"2019-01-29T16:49:45Z","pushed_at":"2019-02-20T19:22:59Z","git_url":"git://github.com/Magisus/puppetserver.git","ssh_url":"git@github.com:Magisus/puppetserver.git","clone_url":"https://github.com/Magisus/puppetserver.git","svn_url":"https://github.com/Magisus/puppetserver","homepage":"https://tickets.puppetlabs.com/browse/SERVER","size":6767,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"948190ddf39a3b8d229decc7d29dec11b9eb0782","user":{"login":"puppetlabs","id":234268,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNDI2OA==","avatar_url":"https://avatars0.githubusercontent.com/u/234268?v=4","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":19546488,"node_id":"MDEwOlJlcG9zaXRvcnkxOTU0NjQ4OA==","name":"puppetserver","full_name":"puppetlabs/puppetserver","private":false,"owner":{"login":"puppetlabs","id":234268,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNDI2OA==","avatar_url":"https://avatars0.githubusercontent.com/u/234268?v=4","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},"html_url":"https://github.com/puppetlabs/puppetserver","description":"Server automation framework and application","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppetserver","forks_url":"https://api.github.com/repos/puppetlabs/puppetserver/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppetserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppetserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppetserver/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppetserver/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppetserver/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppetserver/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppetserver/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppetserver/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppetserver/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppetserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppetserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppetserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppetserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppetserver/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppetserver/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppetserver/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppetserver/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppetserver/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppetserver/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppetserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppetserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppetserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppetserver/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppetserver/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppetserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppetserver/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppetserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppetserver/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppetserver/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppetserver/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppetserver/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppetserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppetserver/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppetserver/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/puppetserver/deployments","created_at":"2014-05-07T19:00:24Z","updated_at":"2019-02-20T07:23:20Z","pushed_at":"2019-02-20T21:37:17Z","git_url":"git://github.com/puppetlabs/puppetserver.git","ssh_url":"git@github.com:puppetlabs/puppetserver.git","clone_url":"https://github.com/puppetlabs/puppetserver.git","svn_url":"https://github.com/puppetlabs/puppetserver","homepage":"https://tickets.puppetlabs.com/browse/SERVER","size":6745,"stargazers_count":200,"watchers_count":200,"language":"Clojure","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":154,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":154,"open_issues":7,"watchers":200,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetserver/pulls/1979"},"html":{"href":"https://github.com/puppetlabs/puppetserver/pull/1979"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppetserver/issues/1979"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppetserver/issues/1979/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppetserver/pulls/1979/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppetserver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppetserver/pulls/1979/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppetserver/statuses/ba5bd96848d4ab1d97b4ec2102bd6430d48cba88"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"justinstoller"}}