{"action":"closed","number":28375,"pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/28375","id":49066643,"html_url":"https://github.com/saltstack/salt/pull/28375","diff_url":"https://github.com/saltstack/salt/pull/28375.diff","patch_url":"https://github.com/saltstack/salt/pull/28375.patch","issue_url":"https://api.github.com/repos/saltstack/salt/issues/28375","number":28375,"state":"closed","locked":false,"title":"Merge pillar includes correctly","user":{"login":"merll","id":6816929,"avatar_url":"https://avatars.githubusercontent.com/u/6816929?v=3","gravatar_id":"","url":"https://api.github.com/users/merll","html_url":"https://github.com/merll","followers_url":"https://api.github.com/users/merll/followers","following_url":"https://api.github.com/users/merll/following{/other_user}","gists_url":"https://api.github.com/users/merll/gists{/gist_id}","starred_url":"https://api.github.com/users/merll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/merll/subscriptions","organizations_url":"https://api.github.com/users/merll/orgs","repos_url":"https://api.github.com/users/merll/repos","events_url":"https://api.github.com/users/merll/events{/privacy}","received_events_url":"https://api.github.com/users/merll/received_events","type":"User","site_admin":false},"body":"When a pillar is included multiple times (e.g. in some ``init.sls`` or the top file), the rendering checks for duplicates and skips merging pillar modules that have been merged before. However, this causes the preceding module to be merged again if there is any. In the ``recurse`` merge strategy this goes mostly unnoticed, but when using ``recurse_list`` leads to strange behavior. The following setup can reproduce the problem:\r\n\r\ntop.sls\r\n```yaml\r\nbase:\r\n  '*':\r\n   - order: 1\r\n   - test.sub2\r\n  minion1:\r\n   - order: 2\r\n   - test\r\n```\r\n\r\ntest/init.sls\r\n```yaml\r\ninclude:\r\n - test.sub1\r\n - test.sub2\r\n```\r\n\r\ntest/sub1.sls\r\n```yaml\r\np1:\r\n - value1_1\r\n - value1_2\r\n```\r\n\r\ntest/sub2.sls\r\n```yaml\r\np2:\r\n - value2_1\r\n - value2_2\r\n```\r\n\r\nOutput of ``salt minion1 pillar.get p1``:\r\n```\r\nminion1:\r\n    - value1_1\r\n    - value1_2\r\n    - value1_1\r\n    - value1_2\r\n```\r\n\r\nOutput of ``salt minion1 pillar.get p2``:\r\n```\r\nminion1:\r\n    - value2_1\r\n    - value2_2\r\n```\r\n\r\nFirst ``test.sub2`` is read from the top file and merged. The include statement in ``test`` lists it once more; the rendering ignores it, and instead merges ``test.sub1`` again.\r\n\r\nThis PR fixes the aforementioned issue, caused by a re-used variable in a for-loop. It also includes a test similar to the setup above.","created_at":"2015-10-28T21:03:42Z","updated_at":"2015-10-29T15:12:48Z","closed_at":"2015-10-29T15:12:48Z","merged_at":"2015-10-29T15:12:48Z","merge_commit_sha":"582a37a2bffd8a6d3488eedea508d53e8baeaf7c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/saltstack/salt/pulls/28375/commits","review_comments_url":"https://api.github.com/repos/saltstack/salt/pulls/28375/comments","review_comment_url":"https://api.github.com/repos/saltstack/salt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/28375/comments","statuses_url":"https://api.github.com/repos/saltstack/salt/statuses/f8e2c26473bfe751b21a0522750565bc65e0f146","head":{"label":"Precis:fix-pillar-include-loop","ref":"fix-pillar-include-loop","sha":"f8e2c26473bfe751b21a0522750565bc65e0f146","user":{"login":"Precis","id":6817050,"avatar_url":"https://avatars.githubusercontent.com/u/6817050?v=3","gravatar_id":"","url":"https://api.github.com/users/Precis","html_url":"https://github.com/Precis","followers_url":"https://api.github.com/users/Precis/followers","following_url":"https://api.github.com/users/Precis/following{/other_user}","gists_url":"https://api.github.com/users/Precis/gists{/gist_id}","starred_url":"https://api.github.com/users/Precis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Precis/subscriptions","organizations_url":"https://api.github.com/users/Precis/orgs","repos_url":"https://api.github.com/users/Precis/repos","events_url":"https://api.github.com/users/Precis/events{/privacy}","received_events_url":"https://api.github.com/users/Precis/received_events","type":"Organization","site_admin":false},"repo":{"id":36351098,"name":"salt","full_name":"Precis/salt","owner":{"login":"Precis","id":6817050,"avatar_url":"https://avatars.githubusercontent.com/u/6817050?v=3","gravatar_id":"","url":"https://api.github.com/users/Precis","html_url":"https://github.com/Precis","followers_url":"https://api.github.com/users/Precis/followers","following_url":"https://api.github.com/users/Precis/following{/other_user}","gists_url":"https://api.github.com/users/Precis/gists{/gist_id}","starred_url":"https://api.github.com/users/Precis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Precis/subscriptions","organizations_url":"https://api.github.com/users/Precis/orgs","repos_url":"https://api.github.com/users/Precis/repos","events_url":"https://api.github.com/users/Precis/events{/privacy}","received_events_url":"https://api.github.com/users/Precis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Precis/salt","description":"Infrastructure automation and management system","fork":true,"url":"https://api.github.com/repos/Precis/salt","forks_url":"https://api.github.com/repos/Precis/salt/forks","keys_url":"https://api.github.com/repos/Precis/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Precis/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Precis/salt/teams","hooks_url":"https://api.github.com/repos/Precis/salt/hooks","issue_events_url":"https://api.github.com/repos/Precis/salt/issues/events{/number}","events_url":"https://api.github.com/repos/Precis/salt/events","assignees_url":"https://api.github.com/repos/Precis/salt/assignees{/user}","branches_url":"https://api.github.com/repos/Precis/salt/branches{/branch}","tags_url":"https://api.github.com/repos/Precis/salt/tags","blobs_url":"https://api.github.com/repos/Precis/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Precis/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Precis/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/Precis/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Precis/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/Precis/salt/languages","stargazers_url":"https://api.github.com/repos/Precis/salt/stargazers","contributors_url":"https://api.github.com/repos/Precis/salt/contributors","subscribers_url":"https://api.github.com/repos/Precis/salt/subscribers","subscription_url":"https://api.github.com/repos/Precis/salt/subscription","commits_url":"https://api.github.com/repos/Precis/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/Precis/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/Precis/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/Precis/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/Precis/salt/contents/{+path}","compare_url":"https://api.github.com/repos/Precis/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Precis/salt/merges","archive_url":"https://api.github.com/repos/Precis/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Precis/salt/downloads","issues_url":"https://api.github.com/repos/Precis/salt/issues{/number}","pulls_url":"https://api.github.com/repos/Precis/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/Precis/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/Precis/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Precis/salt/labels{/name}","releases_url":"https://api.github.com/repos/Precis/salt/releases{/id}","created_at":"2015-05-27T07:36:27Z","updated_at":"2015-05-27T07:36:38Z","pushed_at":"2015-10-29T06:27:08Z","git_url":"git://github.com/Precis/salt.git","ssh_url":"git@github.com:Precis/salt.git","clone_url":"https://github.com/Precis/salt.git","svn_url":"https://github.com/Precis/salt","homepage":"saltstack.com","size":122597,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"saltstack:2015.8","ref":"2015.8","sha":"e7571e6d6166731e706cd018e4655213d0e3e3d6","user":{"login":"saltstack","id":1147473,"avatar_url":"https://avatars.githubusercontent.com/u/1147473?v=3","gravatar_id":"","url":"https://api.github.com/users/saltstack","html_url":"https://github.com/saltstack","followers_url":"https://api.github.com/users/saltstack/followers","following_url":"https://api.github.com/users/saltstack/following{/other_user}","gists_url":"https://api.github.com/users/saltstack/gists{/gist_id}","starred_url":"https://api.github.com/users/saltstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltstack/subscriptions","organizations_url":"https://api.github.com/users/saltstack/orgs","repos_url":"https://api.github.com/users/saltstack/repos","events_url":"https://api.github.com/users/saltstack/events{/privacy}","received_events_url":"https://api.github.com/users/saltstack/received_events","type":"Organization","site_admin":false},"repo":{"id":1390248,"name":"salt","full_name":"saltstack/salt","owner":{"login":"saltstack","id":1147473,"avatar_url":"https://avatars.githubusercontent.com/u/1147473?v=3","gravatar_id":"","url":"https://api.github.com/users/saltstack","html_url":"https://github.com/saltstack","followers_url":"https://api.github.com/users/saltstack/followers","following_url":"https://api.github.com/users/saltstack/following{/other_user}","gists_url":"https://api.github.com/users/saltstack/gists{/gist_id}","starred_url":"https://api.github.com/users/saltstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltstack/subscriptions","organizations_url":"https://api.github.com/users/saltstack/orgs","repos_url":"https://api.github.com/users/saltstack/repos","events_url":"https://api.github.com/users/saltstack/events{/privacy}","received_events_url":"https://api.github.com/users/saltstack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/saltstack/salt","description":"Infrastructure automation and management system","fork":false,"url":"https://api.github.com/repos/saltstack/salt","forks_url":"https://api.github.com/repos/saltstack/salt/forks","keys_url":"https://api.github.com/repos/saltstack/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/saltstack/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/saltstack/salt/teams","hooks_url":"https://api.github.com/repos/saltstack/salt/hooks","issue_events_url":"https://api.github.com/repos/saltstack/salt/issues/events{/number}","events_url":"https://api.github.com/repos/saltstack/salt/events","assignees_url":"https://api.github.com/repos/saltstack/salt/assignees{/user}","branches_url":"https://api.github.com/repos/saltstack/salt/branches{/branch}","tags_url":"https://api.github.com/repos/saltstack/salt/tags","blobs_url":"https://api.github.com/repos/saltstack/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/saltstack/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/saltstack/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/saltstack/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/saltstack/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/saltstack/salt/languages","stargazers_url":"https://api.github.com/repos/saltstack/salt/stargazers","contributors_url":"https://api.github.com/repos/saltstack/salt/contributors","subscribers_url":"https://api.github.com/repos/saltstack/salt/subscribers","subscription_url":"https://api.github.com/repos/saltstack/salt/subscription","commits_url":"https://api.github.com/repos/saltstack/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/saltstack/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/saltstack/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/saltstack/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/saltstack/salt/contents/{+path}","compare_url":"https://api.github.com/repos/saltstack/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/saltstack/salt/merges","archive_url":"https://api.github.com/repos/saltstack/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/saltstack/salt/downloads","issues_url":"https://api.github.com/repos/saltstack/salt/issues{/number}","pulls_url":"https://api.github.com/repos/saltstack/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/saltstack/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/saltstack/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/saltstack/salt/labels{/name}","releases_url":"https://api.github.com/repos/saltstack/salt/releases{/id}","created_at":"2011-02-20T20:16:56Z","updated_at":"2015-10-29T11:52:42Z","pushed_at":"2015-10-29T15:12:48Z","git_url":"git://github.com/saltstack/salt.git","ssh_url":"git@github.com:saltstack/salt.git","clone_url":"https://github.com/saltstack/salt.git","svn_url":"https://github.com/saltstack/salt","homepage":"saltstack.com","size":256592,"stargazers_count":5810,"watchers_count":5810,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2476,"mirror_url":null,"open_issues_count":3071,"forks":2476,"open_issues":3071,"watchers":5810,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/saltstack/salt/pulls/28375"},"html":{"href":"https://github.com/saltstack/salt/pull/28375"},"issue":{"href":"https://api.github.com/repos/saltstack/salt/issues/28375"},"comments":{"href":"https://api.github.com/repos/saltstack/salt/issues/28375/comments"},"review_comments":{"href":"https://api.github.com/repos/saltstack/salt/pulls/28375/comments"},"review_comment":{"href":"https://api.github.com/repos/saltstack/salt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/saltstack/salt/pulls/28375/commits"},"statuses":{"href":"https://api.github.com/repos/saltstack/salt/statuses/f8e2c26473bfe751b21a0522750565bc65e0f146"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"cachedout","id":111616,"avatar_url":"https://avatars.githubusercontent.com/u/111616?v=3","gravatar_id":"","url":"https://api.github.com/users/cachedout","html_url":"https://github.com/cachedout","followers_url":"https://api.github.com/users/cachedout/followers","following_url":"https://api.github.com/users/cachedout/following{/other_user}","gists_url":"https://api.github.com/users/cachedout/gists{/gist_id}","starred_url":"https://api.github.com/users/cachedout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cachedout/subscriptions","organizations_url":"https://api.github.com/users/cachedout/orgs","repos_url":"https://api.github.com/users/cachedout/repos","events_url":"https://api.github.com/users/cachedout/events{/privacy}","received_events_url":"https://api.github.com/users/cachedout/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":3,"additions":94,"deletions":14,"changed_files":2}}