{"action":"created","comment":{"url":"https://api.github.com/repos/Katello/katello/pulls/comments/192856401","pull_request_review_id":125713437,"id":192856401,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Mjg1NjQwMQ==","diff_hunk":"@@ -38,13 +38,24 @@ def plan(smart_proxy, options = {})\n           affected_repos = affected_repositories(capsule_content, environment, content_view, repository)\n           need_updates = repos_needing_updates(capsule_content, affected_repos)\n           repository_ids = get_repository_ids(capsule_content, environment, content_view, repository)\n+\n+          # Create a list of non-puppet repos to sync first, and then sync puppet repos last.\n+          # Puppet modules may refer to non-puppet content in the same CV, and thus need to publish last.\n+          puppet_repository_ids = []\n+          non_puppet_repository_ids = []\n+          repository_ids.each do |repo_id|","path":"app/lib/actions/katello/capsule_content/sync.rb","position":9,"original_position":9,"commit_id":"062c2d6dce940e8280080776c1032068b6fc5cc8","original_commit_id":"062c2d6dce940e8280080776c1032068b6fc5cc8","user":{"login":"akofink","id":761923,"node_id":"MDQ6VXNlcjc2MTkyMw==","avatar_url":"https://avatars2.githubusercontent.com/u/761923?v=4","gravatar_id":"","url":"https://api.github.com/users/akofink","html_url":"https://github.com/akofink","followers_url":"https://api.github.com/users/akofink/followers","following_url":"https://api.github.com/users/akofink/following{/other_user}","gists_url":"https://api.github.com/users/akofink/gists{/gist_id}","starred_url":"https://api.github.com/users/akofink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akofink/subscriptions","organizations_url":"https://api.github.com/users/akofink/orgs","repos_url":"https://api.github.com/users/akofink/repos","events_url":"https://api.github.com/users/akofink/events{/privacy}","received_events_url":"https://api.github.com/users/akofink/received_events","type":"User","site_admin":false},"body":"Rails provides a [built in way to split arrays](http://api.rubyonrails.org/classes/Array.html#method-i-split) with arbitrary logic if you want to use it:\r\n\r\n```rb\r\npuppet_repository_ids, non_puppet_repository_ids = repository_ids.split do |repo_id|\r\n  ...\r\nend\r\n```","created_at":"2018-06-04T19:37:07Z","updated_at":"2018-06-04T19:37:07Z","html_url":"https://github.com/Katello/katello/pull/7408#discussion_r192856401","pull_request_url":"https://api.github.com/repos/Katello/katello/pulls/7408","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Katello/katello/pulls/comments/192856401"},"html":{"href":"https://github.com/Katello/katello/pull/7408#discussion_r192856401"},"pull_request":{"href":"https://api.github.com/repos/Katello/katello/pulls/7408"}}},"pull_request":{"url":"https://api.github.com/repos/Katello/katello/pulls/7408","id":191842098,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxODQyMDk4","html_url":"https://github.com/Katello/katello/pull/7408","diff_url":"https://github.com/Katello/katello/pull/7408.diff","patch_url":"https://github.com/Katello/katello/pull/7408.patch","issue_url":"https://api.github.com/repos/Katello/katello/issues/7408","number":7408,"state":"open","locked":false,"title":"Fixes #23672 - publish puppet repos last","user":{"login":"beav","id":563254,"node_id":"MDQ6VXNlcjU2MzI1NA==","avatar_url":"https://avatars0.githubusercontent.com/u/563254?v=4","gravatar_id":"","url":"https://api.github.com/users/beav","html_url":"https://github.com/beav","followers_url":"https://api.github.com/users/beav/followers","following_url":"https://api.github.com/users/beav/following{/other_user}","gists_url":"https://api.github.com/users/beav/gists{/gist_id}","starred_url":"https://api.github.com/users/beav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beav/subscriptions","organizations_url":"https://api.github.com/users/beav/orgs","repos_url":"https://api.github.com/users/beav/repos","events_url":"https://api.github.com/users/beav/events{/privacy}","received_events_url":"https://api.github.com/users/beav/received_events","type":"User","site_admin":false},"body":"Previously, CV repos would be sync/published in any order. This could result in\r\na situation where if your CV had a yum repo and a puppet repo, your puppet repo\r\ncould get published first while the yum repo was still being synced. If the\r\npuppet repo had a module that referred to an RPM in the yum repo that was being\r\npublished, this could result in puppet errors.\r\n\r\nThis commit re-orders CV publish so puppet repos are done last. Additionally,\r\ncapsule syncs are broken apart so the non-puppet repos are synced in one\r\nconcurrent block, and then once that's complete, puppet repos are synced in a\r\nsecond concurrent block.","created_at":"2018-05-31T18:50:05Z","updated_at":"2018-06-04T19:37:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0c2ae8516a55990a859ca066b57e2fddad0c9d89","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":117832941,"node_id":"MDU6TGFiZWwxMTc4MzI5NDE=","url":"https://api.github.com/repos/Katello/katello/labels/Needs%20re-review","name":"Needs re-review","color":"0052cc","default":false},{"id":117819343,"node_id":"MDU6TGFiZWwxMTc4MTkzNDM=","url":"https://api.github.com/repos/Katello/katello/labels/Needs%20testing","name":"Needs testing","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Katello/katello/pulls/7408/commits","review_comments_url":"https://api.github.com/repos/Katello/katello/pulls/7408/comments","review_comment_url":"https://api.github.com/repos/Katello/katello/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Katello/katello/issues/7408/comments","statuses_url":"https://api.github.com/repos/Katello/katello/statuses/062c2d6dce940e8280080776c1032068b6fc5cc8","head":{"label":"beav:23672","ref":"23672","sha":"062c2d6dce940e8280080776c1032068b6fc5cc8","user":{"login":"beav","id":563254,"node_id":"MDQ6VXNlcjU2MzI1NA==","avatar_url":"https://avatars0.githubusercontent.com/u/563254?v=4","gravatar_id":"","url":"https://api.github.com/users/beav","html_url":"https://github.com/beav","followers_url":"https://api.github.com/users/beav/followers","following_url":"https://api.github.com/users/beav/following{/other_user}","gists_url":"https://api.github.com/users/beav/gists{/gist_id}","starred_url":"https://api.github.com/users/beav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beav/subscriptions","organizations_url":"https://api.github.com/users/beav/orgs","repos_url":"https://api.github.com/users/beav/repos","events_url":"https://api.github.com/users/beav/events{/privacy}","received_events_url":"https://api.github.com/users/beav/received_events","type":"User","site_admin":false},"repo":{"id":4666670,"node_id":"MDEwOlJlcG9zaXRvcnk0NjY2Njcw","name":"katello","full_name":"beav/katello","owner":{"login":"beav","id":563254,"node_id":"MDQ6VXNlcjU2MzI1NA==","avatar_url":"https://avatars0.githubusercontent.com/u/563254?v=4","gravatar_id":"","url":"https://api.github.com/users/beav","html_url":"https://github.com/beav","followers_url":"https://api.github.com/users/beav/followers","following_url":"https://api.github.com/users/beav/following{/other_user}","gists_url":"https://api.github.com/users/beav/gists{/gist_id}","starred_url":"https://api.github.com/users/beav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beav/subscriptions","organizations_url":"https://api.github.com/users/beav/orgs","repos_url":"https://api.github.com/users/beav/repos","events_url":"https://api.github.com/users/beav/events{/privacy}","received_events_url":"https://api.github.com/users/beav/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/beav/katello","description":"Katello integrates open source systems management tools into a single solution for controlling the lifecycle of your machines.","fork":true,"url":"https://api.github.com/repos/beav/katello","forks_url":"https://api.github.com/repos/beav/katello/forks","keys_url":"https://api.github.com/repos/beav/katello/keys{/key_id}","collaborators_url":"https://api.github.com/repos/beav/katello/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/beav/katello/teams","hooks_url":"https://api.github.com/repos/beav/katello/hooks","issue_events_url":"https://api.github.com/repos/beav/katello/issues/events{/number}","events_url":"https://api.github.com/repos/beav/katello/events","assignees_url":"https://api.github.com/repos/beav/katello/assignees{/user}","branches_url":"https://api.github.com/repos/beav/katello/branches{/branch}","tags_url":"https://api.github.com/repos/beav/katello/tags","blobs_url":"https://api.github.com/repos/beav/katello/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/beav/katello/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/beav/katello/git/refs{/sha}","trees_url":"https://api.github.com/repos/beav/katello/git/trees{/sha}","statuses_url":"https://api.github.com/repos/beav/katello/statuses/{sha}","languages_url":"https://api.github.com/repos/beav/katello/languages","stargazers_url":"https://api.github.com/repos/beav/katello/stargazers","contributors_url":"https://api.github.com/repos/beav/katello/contributors","subscribers_url":"https://api.github.com/repos/beav/katello/subscribers","subscription_url":"https://api.github.com/repos/beav/katello/subscription","commits_url":"https://api.github.com/repos/beav/katello/commits{/sha}","git_commits_url":"https://api.github.com/repos/beav/katello/git/commits{/sha}","comments_url":"https://api.github.com/repos/beav/katello/comments{/number}","issue_comment_url":"https://api.github.com/repos/beav/katello/issues/comments{/number}","contents_url":"https://api.github.com/repos/beav/katello/contents/{+path}","compare_url":"https://api.github.com/repos/beav/katello/compare/{base}...{head}","merges_url":"https://api.github.com/repos/beav/katello/merges","archive_url":"https://api.github.com/repos/beav/katello/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/beav/katello/downloads","issues_url":"https://api.github.com/repos/beav/katello/issues{/number}","pulls_url":"https://api.github.com/repos/beav/katello/pulls{/number}","milestones_url":"https://api.github.com/repos/beav/katello/milestones{/number}","notifications_url":"https://api.github.com/repos/beav/katello/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/beav/katello/labels{/name}","releases_url":"https://api.github.com/repos/beav/katello/releases{/id}","deployments_url":"https://api.github.com/repos/beav/katello/deployments","created_at":"2012-06-14T18:06:10Z","updated_at":"2013-12-17T15:09:45Z","pushed_at":"2018-05-31T19:03:24Z","git_url":"git://github.com/beav/katello.git","ssh_url":"git@github.com:beav/katello.git","clone_url":"https://github.com/beav/katello.git","svn_url":"https://github.com/beav/katello","homepage":"katello.org","size":87578,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"Katello:master","ref":"master","sha":"2e7aef07c56840e702c4562362884b865498d82d","user":{"login":"Katello","id":1316386,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTYzODY=","avatar_url":"https://avatars0.githubusercontent.com/u/1316386?v=4","gravatar_id":"","url":"https://api.github.com/users/Katello","html_url":"https://github.com/Katello","followers_url":"https://api.github.com/users/Katello/followers","following_url":"https://api.github.com/users/Katello/following{/other_user}","gists_url":"https://api.github.com/users/Katello/gists{/gist_id}","starred_url":"https://api.github.com/users/Katello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Katello/subscriptions","organizations_url":"https://api.github.com/users/Katello/orgs","repos_url":"https://api.github.com/users/Katello/repos","events_url":"https://api.github.com/users/Katello/events{/privacy}","received_events_url":"https://api.github.com/users/Katello/received_events","type":"Organization","site_admin":false},"repo":{"id":4007018,"node_id":"MDEwOlJlcG9zaXRvcnk0MDA3MDE4","name":"katello","full_name":"Katello/katello","owner":{"login":"Katello","id":1316386,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTYzODY=","avatar_url":"https://avatars0.githubusercontent.com/u/1316386?v=4","gravatar_id":"","url":"https://api.github.com/users/Katello","html_url":"https://github.com/Katello","followers_url":"https://api.github.com/users/Katello/followers","following_url":"https://api.github.com/users/Katello/following{/other_user}","gists_url":"https://api.github.com/users/Katello/gists{/gist_id}","starred_url":"https://api.github.com/users/Katello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Katello/subscriptions","organizations_url":"https://api.github.com/users/Katello/orgs","repos_url":"https://api.github.com/users/Katello/repos","events_url":"https://api.github.com/users/Katello/events{/privacy}","received_events_url":"https://api.github.com/users/Katello/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Katello/katello","description":"Katello integrates open source systems management tools into a single solution for controlling the lifecycle of your machines.","fork":false,"url":"https://api.github.com/repos/Katello/katello","forks_url":"https://api.github.com/repos/Katello/katello/forks","keys_url":"https://api.github.com/repos/Katello/katello/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Katello/katello/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Katello/katello/teams","hooks_url":"https://api.github.com/repos/Katello/katello/hooks","issue_events_url":"https://api.github.com/repos/Katello/katello/issues/events{/number}","events_url":"https://api.github.com/repos/Katello/katello/events","assignees_url":"https://api.github.com/repos/Katello/katello/assignees{/user}","branches_url":"https://api.github.com/repos/Katello/katello/branches{/branch}","tags_url":"https://api.github.com/repos/Katello/katello/tags","blobs_url":"https://api.github.com/repos/Katello/katello/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Katello/katello/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Katello/katello/git/refs{/sha}","trees_url":"https://api.github.com/repos/Katello/katello/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Katello/katello/statuses/{sha}","languages_url":"https://api.github.com/repos/Katello/katello/languages","stargazers_url":"https://api.github.com/repos/Katello/katello/stargazers","contributors_url":"https://api.github.com/repos/Katello/katello/contributors","subscribers_url":"https://api.github.com/repos/Katello/katello/subscribers","subscription_url":"https://api.github.com/repos/Katello/katello/subscription","commits_url":"https://api.github.com/repos/Katello/katello/commits{/sha}","git_commits_url":"https://api.github.com/repos/Katello/katello/git/commits{/sha}","comments_url":"https://api.github.com/repos/Katello/katello/comments{/number}","issue_comment_url":"https://api.github.com/repos/Katello/katello/issues/comments{/number}","contents_url":"https://api.github.com/repos/Katello/katello/contents/{+path}","compare_url":"https://api.github.com/repos/Katello/katello/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Katello/katello/merges","archive_url":"https://api.github.com/repos/Katello/katello/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Katello/katello/downloads","issues_url":"https://api.github.com/repos/Katello/katello/issues{/number}","pulls_url":"https://api.github.com/repos/Katello/katello/pulls{/number}","milestones_url":"https://api.github.com/repos/Katello/katello/milestones{/number}","notifications_url":"https://api.github.com/repos/Katello/katello/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Katello/katello/labels{/name}","releases_url":"https://api.github.com/repos/Katello/katello/releases{/id}","deployments_url":"https://api.github.com/repos/Katello/katello/deployments","created_at":"2012-04-12T16:59:08Z","updated_at":"2018-06-04T19:32:26Z","pushed_at":"2018-06-04T19:32:19Z","git_url":"git://github.com/Katello/katello.git","ssh_url":"git@github.com:Katello/katello.git","clone_url":"https://github.com/Katello/katello.git","svn_url":"https://github.com/Katello/katello","homepage":"katello.org","size":94510,"stargazers_count":242,"watchers_count":242,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":206,"mirror_url":null,"archived":false,"open_issues_count":111,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":206,"open_issues":111,"watchers":242,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Katello/katello/pulls/7408"},"html":{"href":"https://github.com/Katello/katello/pull/7408"},"issue":{"href":"https://api.github.com/repos/Katello/katello/issues/7408"},"comments":{"href":"https://api.github.com/repos/Katello/katello/issues/7408/comments"},"review_comments":{"href":"https://api.github.com/repos/Katello/katello/pulls/7408/comments"},"review_comment":{"href":"https://api.github.com/repos/Katello/katello/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Katello/katello/pulls/7408/commits"},"statuses":{"href":"https://api.github.com/repos/Katello/katello/statuses/062c2d6dce940e8280080776c1032068b6fc5cc8"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"akofink"}}