{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/hiera/pulls/comments/47503063","id":47503063,"diff_hunk":"@@ -59,9 +64,19 @@ def do_interpolation(data, scope, extra_data, context)\n     end\n     private :do_interpolation\n \n-    def get_interpolation_method_and_key(data)\n+    def get_interpolation_method_and_key(data, is_config)\n       if (match = data.match(METHOD_INTERPOLATION))\n-        case match[1]\n+        key = match[1]\n+        if(is_config)\n+          if key == 'hiera'\n+            # Letting this pass while parsing the config is very likely to result in another attempt to parse\n+            # the config and hence, endless recursion.\n+            raise Hiera::InterpolationInvalidValue, \"Cannot use interpolation method 'hiera' in hiera configuration file\"","path":"lib/hiera/interpolate.rb","position":62,"original_position":62,"commit_id":"75514618a62fe9c67b11bb8ee49668a83c3354c8","original_commit_id":"75514618a62fe9c67b11bb8ee49668a83c3354c8","user":{"login":"hlindberg","id":563066,"avatar_url":"https://avatars.githubusercontent.com/u/563066?v=3","gravatar_id":"","url":"https://api.github.com/users/hlindberg","html_url":"https://github.com/hlindberg","followers_url":"https://api.github.com/users/hlindberg/followers","following_url":"https://api.github.com/users/hlindberg/following{/other_user}","gists_url":"https://api.github.com/users/hlindberg/gists{/gist_id}","starred_url":"https://api.github.com/users/hlindberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlindberg/subscriptions","organizations_url":"https://api.github.com/users/hlindberg/orgs","repos_url":"https://api.github.com/users/hlindberg/repos","events_url":"https://api.github.com/users/hlindberg/events{/privacy}","received_events_url":"https://api.github.com/users/hlindberg/received_events","type":"User","site_admin":false},"body":"IIRC someone posted an example they claimed worked. It is still wonky. I am inclined to just error out though.","created_at":"2015-12-14T14:31:26Z","updated_at":"2015-12-14T14:31:26Z","html_url":"https://github.com/puppetlabs/hiera/pull/328#discussion_r47503063","pull_request_url":"https://api.github.com/repos/puppetlabs/hiera/pulls/328","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/hiera/pulls/comments/47503063"},"html":{"href":"https://github.com/puppetlabs/hiera/pull/328#discussion_r47503063"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/hiera/pulls/328"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/hiera/pulls/328","id":53552944,"html_url":"https://github.com/puppetlabs/hiera/pull/328","diff_url":"https://github.com/puppetlabs/hiera/pull/328.diff","patch_url":"https://github.com/puppetlabs/hiera/pull/328.patch","issue_url":"https://api.github.com/repos/puppetlabs/hiera/issues/328","number":328,"state":"open","locked":false,"title":"(HI-220) Deprecate use of interpolation methods in Hiera config","user":{"login":"thallgren","id":209495,"avatar_url":"https://avatars.githubusercontent.com/u/209495?v=3","gravatar_id":"","url":"https://api.github.com/users/thallgren","html_url":"https://github.com/thallgren","followers_url":"https://api.github.com/users/thallgren/followers","following_url":"https://api.github.com/users/thallgren/following{/other_user}","gists_url":"https://api.github.com/users/thallgren/gists{/gist_id}","starred_url":"https://api.github.com/users/thallgren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thallgren/subscriptions","organizations_url":"https://api.github.com/users/thallgren/orgs","repos_url":"https://api.github.com/users/thallgren/repos","events_url":"https://api.github.com/users/thallgren/events{/privacy}","received_events_url":"https://api.github.com/users/thallgren/received_events","type":"User","site_admin":false},"body":"Using interpolation methods in the hiera configuration configuration\r\nfile should be avoided. The 'hiera' method in particular will lead\r\nto problems since it's very likely that it will cause an endless\r\nrecursion when a new attempt is made to read the configuration file.\r\n\r\nThis commit ensures that a deprecation warning is issued when the\r\ninterpolation method syntax is used in a hiera configuration file. An\r\nerror will be raised in case the 'hiera' interpolation method is used.","created_at":"2015-12-14T11:28:38Z","updated_at":"2015-12-14T14:31:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b2ddc5a077b931232f5e988bfdc77b84e2627b7d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/hiera/pulls/328/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/hiera/pulls/328/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/hiera/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/hiera/issues/328/comments","statuses_url":"https://api.github.com/repos/puppetlabs/hiera/statuses/75514618a62fe9c67b11bb8ee49668a83c3354c8","head":{"label":"thallgren:issue/hi-220/deprecate-interpolation-methods-in-config","ref":"issue/hi-220/deprecate-interpolation-methods-in-config","sha":"75514618a62fe9c67b11bb8ee49668a83c3354c8","user":{"login":"thallgren","id":209495,"avatar_url":"https://avatars.githubusercontent.com/u/209495?v=3","gravatar_id":"","url":"https://api.github.com/users/thallgren","html_url":"https://github.com/thallgren","followers_url":"https://api.github.com/users/thallgren/followers","following_url":"https://api.github.com/users/thallgren/following{/other_user}","gists_url":"https://api.github.com/users/thallgren/gists{/gist_id}","starred_url":"https://api.github.com/users/thallgren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thallgren/subscriptions","organizations_url":"https://api.github.com/users/thallgren/orgs","repos_url":"https://api.github.com/users/thallgren/repos","events_url":"https://api.github.com/users/thallgren/events{/privacy}","received_events_url":"https://api.github.com/users/thallgren/received_events","type":"User","site_admin":false},"repo":{"id":10775873,"name":"hiera","full_name":"thallgren/hiera","owner":{"login":"thallgren","id":209495,"avatar_url":"https://avatars.githubusercontent.com/u/209495?v=3","gravatar_id":"","url":"https://api.github.com/users/thallgren","html_url":"https://github.com/thallgren","followers_url":"https://api.github.com/users/thallgren/followers","following_url":"https://api.github.com/users/thallgren/following{/other_user}","gists_url":"https://api.github.com/users/thallgren/gists{/gist_id}","starred_url":"https://api.github.com/users/thallgren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thallgren/subscriptions","organizations_url":"https://api.github.com/users/thallgren/orgs","repos_url":"https://api.github.com/users/thallgren/repos","events_url":"https://api.github.com/users/thallgren/events{/privacy}","received_events_url":"https://api.github.com/users/thallgren/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thallgren/hiera","description":"Lightweight Pluggable Hierarchical Database","fork":true,"url":"https://api.github.com/repos/thallgren/hiera","forks_url":"https://api.github.com/repos/thallgren/hiera/forks","keys_url":"https://api.github.com/repos/thallgren/hiera/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thallgren/hiera/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thallgren/hiera/teams","hooks_url":"https://api.github.com/repos/thallgren/hiera/hooks","issue_events_url":"https://api.github.com/repos/thallgren/hiera/issues/events{/number}","events_url":"https://api.github.com/repos/thallgren/hiera/events","assignees_url":"https://api.github.com/repos/thallgren/hiera/assignees{/user}","branches_url":"https://api.github.com/repos/thallgren/hiera/branches{/branch}","tags_url":"https://api.github.com/repos/thallgren/hiera/tags","blobs_url":"https://api.github.com/repos/thallgren/hiera/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thallgren/hiera/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thallgren/hiera/git/refs{/sha}","trees_url":"https://api.github.com/repos/thallgren/hiera/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thallgren/hiera/statuses/{sha}","languages_url":"https://api.github.com/repos/thallgren/hiera/languages","stargazers_url":"https://api.github.com/repos/thallgren/hiera/stargazers","contributors_url":"https://api.github.com/repos/thallgren/hiera/contributors","subscribers_url":"https://api.github.com/repos/thallgren/hiera/subscribers","subscription_url":"https://api.github.com/repos/thallgren/hiera/subscription","commits_url":"https://api.github.com/repos/thallgren/hiera/commits{/sha}","git_commits_url":"https://api.github.com/repos/thallgren/hiera/git/commits{/sha}","comments_url":"https://api.github.com/repos/thallgren/hiera/comments{/number}","issue_comment_url":"https://api.github.com/repos/thallgren/hiera/issues/comments{/number}","contents_url":"https://api.github.com/repos/thallgren/hiera/contents/{+path}","compare_url":"https://api.github.com/repos/thallgren/hiera/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thallgren/hiera/merges","archive_url":"https://api.github.com/repos/thallgren/hiera/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thallgren/hiera/downloads","issues_url":"https://api.github.com/repos/thallgren/hiera/issues{/number}","pulls_url":"https://api.github.com/repos/thallgren/hiera/pulls{/number}","milestones_url":"https://api.github.com/repos/thallgren/hiera/milestones{/number}","notifications_url":"https://api.github.com/repos/thallgren/hiera/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thallgren/hiera/labels{/name}","releases_url":"https://api.github.com/repos/thallgren/hiera/releases{/id}","created_at":"2013-06-18T23:40:19Z","updated_at":"2015-01-27T15:35:59Z","pushed_at":"2015-12-14T11:26:29Z","git_url":"git://github.com/thallgren/hiera.git","ssh_url":"git@github.com:thallgren/hiera.git","clone_url":"https://github.com/thallgren/hiera.git","svn_url":"https://github.com/thallgren/hiera","homepage":"http://projects.puppetlabs.com/projects/hiera/","size":697,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"51d74ff8f693188d07297c80d9b3f2f8cc9ec310","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":1845241,"name":"hiera","full_name":"puppetlabs/hiera","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/hiera","description":"Lightweight Pluggable Hierarchical Database","fork":false,"url":"https://api.github.com/repos/puppetlabs/hiera","forks_url":"https://api.github.com/repos/puppetlabs/hiera/forks","keys_url":"https://api.github.com/repos/puppetlabs/hiera/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/hiera/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/hiera/teams","hooks_url":"https://api.github.com/repos/puppetlabs/hiera/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/hiera/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/hiera/events","assignees_url":"https://api.github.com/repos/puppetlabs/hiera/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/hiera/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/hiera/tags","blobs_url":"https://api.github.com/repos/puppetlabs/hiera/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/hiera/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/hiera/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/hiera/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/hiera/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/hiera/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/hiera/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/hiera/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/hiera/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/hiera/subscription","commits_url":"https://api.github.com/repos/puppetlabs/hiera/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/hiera/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/hiera/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/hiera/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/hiera/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/hiera/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/hiera/merges","archive_url":"https://api.github.com/repos/puppetlabs/hiera/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/hiera/downloads","issues_url":"https://api.github.com/repos/puppetlabs/hiera/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/hiera/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/hiera/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/hiera/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/hiera/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/hiera/releases{/id}","created_at":"2011-06-04T00:48:22Z","updated_at":"2015-11-26T10:00:42Z","pushed_at":"2015-12-14T11:28:38Z","git_url":"git://github.com/puppetlabs/hiera.git","ssh_url":"git@github.com:puppetlabs/hiera.git","clone_url":"https://github.com/puppetlabs/hiera.git","svn_url":"https://github.com/puppetlabs/hiera","homepage":"http://projects.puppetlabs.com/projects/hiera/","size":885,"stargazers_count":259,"watchers_count":259,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":175,"mirror_url":null,"open_issues_count":3,"forks":175,"open_issues":3,"watchers":259,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/hiera/pulls/328"},"html":{"href":"https://github.com/puppetlabs/hiera/pull/328"},"issue":{"href":"https://api.github.com/repos/puppetlabs/hiera/issues/328"},"comments":{"href":"https://api.github.com/repos/puppetlabs/hiera/issues/328/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/hiera/pulls/328/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/hiera/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/hiera/pulls/328/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/hiera/statuses/75514618a62fe9c67b11bb8ee49668a83c3354c8"}}}}