payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Katello/katello/pulls/comments/338957336","pull_request_review_id":307075903,"id":338957336,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMzODk1NzMzNg==","diff_hunk":"@@ -75,19 +75,33 @@ def regenerate_applicability\n           smart_proxy.pulp_api.extensions.repository.regenerate_applicability_by_ids([repo.pulp_id], true)\n         end\n \n+        def generate_mapping(destination_repo)\n+          source_repo_map = {}\n+          repo.siblings.each do |sibling|\n+            key = sibling.library_instance? ? sibling.id : sibling.library_instance_id\n+            source_repo_map[key] = sibling.pulp_id\n+          end\n+\n+          Hash[destination_repo.siblings.map { |sibling| [source_repo_map[sibling.library_instance_id], sibling.pulp_id] }]\n+        end\n+\n         def copy_contents(destination_repo, options = {})\n-          override_config = Katello::Repository.build_override_config(options)\n+          override_config = Katello::Repository.build_override_config(","path":"app/services/katello/pulp/repository/yum.rb","position":16,"original_position":16,"commit_id":"e5f0b96c9e40b89678994c2b8dc8f5e29ebf5665","original_commit_id":"e5f0b96c9e40b89678994c2b8dc8f5e29ebf5665","user":{"login":"jlsherrill","id":395077,"node_id":"MDQ6VXNlcjM5NTA3Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/395077?v=4","gravatar_id":"","url":"https://api.github.com/users/jlsherrill","html_url":"https://github.com/jlsherrill","followers_url":"https://api.github.com/users/jlsherrill/followers","following_url":"https://api.github.com/users/jlsherrill/following{/other_user}","gists_url":"https://api.github.com/users/jlsherrill/gists{/gist_id}","starred_url":"https://api.github.com/users/jlsherrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlsherrill/subscriptions","organizations_url":"https://api.github.com/users/jlsherrill/orgs","repos_url":"https://api.github.com/users/jlsherrill/repos","events_url":"https://api.github.com/users/jlsherrill/events{/privacy}","received_events_url":"https://api.github.com/users/jlsherrill/received_events","type":"User","site_admin":false},"body":"you could probably have it handle injecting the mapping there as well (if we're dep solving) instead of .merge'ing it in below","created_at":"2019-10-25T09:10:09Z","updated_at":"2019-10-25T09:10:09Z","html_url":"https://github.com/Katello/katello/pull/8378#discussion_r338957336","pull_request_url":"https://api.github.com/repos/Katello/katello/pulls/8378","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Katello/katello/pulls/comments/338957336"},"html":{"href":"https://github.com/Katello/katello/pull/8378#discussion_r338957336"},"pull_request":{"href":"https://api.github.com/repos/Katello/katello/pulls/8378"}},"in_reply_to_id":338956733},"pull_request":{"url":"https://api.github.com/repos/Katello/katello/pulls/8378","id":326839942,"node_id":"MDExOlB1bGxSZXF1ZXN0MzI2ODM5OTQy","html_url":"https://github.com/Katello/katello/pull/8378","diff_url":"https://github.com/Katello/katello/pull/8378.diff","patch_url":"https://github.com/Katello/katello/pull/8378.patch","issue_url":"https://api.github.com/repos/Katello/katello/issues/8378","number":8378,"state":"open","locked":false,"title":"Fixes #28037 - Incremental Update additional repos","user":{"login":"parthaa","id":1069779,"node_id":"MDQ6VXNlcjEwNjk3Nzk=","avatar_url":"https://avatars1.githubusercontent.com/u/1069779?v=4","gravatar_id":"","url":"https://api.github.com/users/parthaa","html_url":"https://github.com/parthaa","followers_url":"https://api.github.com/users/parthaa/followers","following_url":"https://api.github.com/users/parthaa/following{/other_user}","gists_url":"https://api.github.com/users/parthaa/gists{/gist_id}","starred_url":"https://api.github.com/users/parthaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parthaa/subscriptions","organizations_url":"https://api.github.com/users/parthaa/orgs","repos_url":"https://api.github.com/users/parthaa/repos","events_url":"https://api.github.com/users/parthaa/events{/privacy}","received_events_url":"https://api.github.com/users/parthaa/received_events","type":"User","site_admin":false},"body":"This commit handles incremental update with additional_repos parameters.\r\nContent from one repo can depend on content from another repo, this is\r\nespecially true with RHEL 8. This causes a problem during depsolving.\r\nFor example if we have a module/errata in one repo pointing packages in\r\nanother repo, we'd like to ideally copy the dependencies across both\r\nrepositories in the same operation.\r\nIn the incremental update case for example the user may request a\r\ncertain errata to be copied over along with their dependencies.\r\nTo address this Pulp 2.21 updated their copy api to accept\r\n\"additional repos\" (https://pulp.plan.io/issues/5067.)\r\n\r\nThis commit sets up the appropriate mapping for this operation. So if\r\nthe content view has depsolve turned on or if its incremental katello\r\nwill create a 'repository_mapping' which maps source repo to a\r\ndestination repo. The entries in this hash consist of all the\r\nrepositories in the content view version minus the main one.\r\nFor example\r\nCVV1 - repos A,B\r\nOn incremental update CVV1 -> CVV 1.1\r\nThe copy operation for content in repo A will  have {b:dest-b} as the\r\n\"additional_repos\" aka \"repository mapping\".\r\nThis mapping is then passed to pulp copy api.\r\n\r\nThis change has a couple of complexities. We need all the destination\r\nrepositories to be created before we call the copy operations with the\r\naddition_repos mapping. To handle this a new CreateRepos plan was\r\ncreated and the CloneToVersion plan was modified to accept a\r\ndestination repo. The CloneToVersion call now expects the destination\r\nrepo to have been created before copying.\r\nChanges were made to both IncrementalUpdate and Publish plans to\r\naccomodate the new structure.","created_at":"2019-10-10T17:05:38Z","updated_at":"2019-10-25T09:10:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"033d7155bb5c9410d19cb9df40a080198813bdc1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":117819343,"node_id":"MDU6TGFiZWwxMTc4MTkzNDM=","url":"https://api.github.com/repos/Katello/katello/labels/Needs%20testing","name":"Needs testing","color":"fbca04","default":false},{"id":117819415,"node_id":"MDU6TGFiZWwxMTc4MTk0MTU=","url":"https://api.github.com/repos/Katello/katello/labels/Not%20yet%20reviewed","name":"Not yet reviewed","color":"009800","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Katello/katello/pulls/8378/commits","review_comments_url":"https://api.github.com/repos/Katello/katello/pulls/8378/comments","review_comment_url":"https://api.github.com/repos/Katello/katello/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Katello/katello/issues/8378/comments","statuses_url":"https://api.github.com/repos/Katello/katello/statuses/e5f0b96c9e40b89678994c2b8dc8f5e29ebf5665","head":{"label":"parthaa:incremental","ref":"incremental","sha":"e5f0b96c9e40b89678994c2b8dc8f5e29ebf5665","user":{"login":"parthaa","id":1069779,"node_id":"MDQ6VXNlcjEwNjk3Nzk=","avatar_url":"https://avatars1.githubusercontent.com/u/1069779?v=4","gravatar_id":"","url":"https://api.github.com/users/parthaa","html_url":"https://github.com/parthaa","followers_url":"https://api.github.com/users/parthaa/followers","following_url":"https://api.github.com/users/parthaa/following{/other_user}","gists_url":"https://api.github.com/users/parthaa/gists{/gist_id}","starred_url":"https://api.github.com/users/parthaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parthaa/subscriptions","organizations_url":"https://api.github.com/users/parthaa/orgs","repos_url":"https://api.github.com/users/parthaa/repos","events_url":"https://api.github.com/users/parthaa/events{/privacy}","received_events_url":"https://api.github.com/users/parthaa/received_events","type":"User","site_admin":false},"repo":{"id":4150075,"node_id":"MDEwOlJlcG9zaXRvcnk0MTUwMDc1","name":"katello","full_name":"parthaa/katello","private":false,"owner":{"login":"parthaa","id":1069779,"node_id":"MDQ6VXNlcjEwNjk3Nzk=","avatar_url":"https://avatars1.githubusercontent.com/u/1069779?v=4","gravatar_id":"","url":"https://api.github.com/users/parthaa","html_url":"https://github.com/parthaa","followers_url":"https://api.github.com/users/parthaa/followers","following_url":"https://api.github.com/users/parthaa/following{/other_user}","gists_url":"https://api.github.com/users/parthaa/gists{/gist_id}","starred_url":"https://api.github.com/users/parthaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parthaa/subscriptions","organizations_url":"https://api.github.com/users/parthaa/orgs","repos_url":"https://api.github.com/users/parthaa/repos","events_url":"https://api.github.com/users/parthaa/events{/privacy}","received_events_url":"https://api.github.com/users/parthaa/received_events","type":"User","site_admin":false},"html_url":"https://github.com/parthaa/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/parthaa/katello","forks_url":"https://api.github.com/repos/parthaa/katello/forks","keys_url":"https://api.github.com/repos/parthaa/katello/keys{/key_id}","collaborators_url":"https://api.github.com/repos/parthaa/katello/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/parthaa/katello/teams","hooks_url":"https://api.github.com/repos/parthaa/katello/hooks","issue_events_url":"https://api.github.com/repos/parthaa/katello/issues/events{/number}","events_url":"https://api.github.com/repos/parthaa/katello/events","assignees_url":"https://api.github.com/repos/parthaa/katello/assignees{/user}","branches_url":"https://api.github.com/repos/parthaa/katello/branches{/branch}","tags_url":"https://api.github.com/repos/parthaa/katello/tags","blobs_url":"https://api.github.com/repos/parthaa/katello/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/parthaa/katello/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/parthaa/katello/git/refs{/sha}","trees_url":"https://api.github.com/repos/parthaa/katello/git/trees{/sha}","statuses_url":"https://api.github.com/repos/parthaa/katello/statuses/{sha}","languages_url":"https://api.github.com/repos/parthaa/katello/languages","stargazers_url":"https://api.github.com/repos/parthaa/katello/stargazers","contributors_url":"https://api.github.com/repos/parthaa/katello/contributors","subscribers_url":"https://api.github.com/repos/parthaa/katello/subscribers","subscription_url":"https://api.github.com/repos/parthaa/katello/subscription","commits_url":"https://api.github.com/repos/parthaa/katello/commits{/sha}","git_commits_url":"https://api.github.com/repos/parthaa/katello/git/commits{/sha}","comments_url":"https://api.github.com/repos/parthaa/katello/comments{/number}","issue_comment_url":"https://api.github.com/repos/parthaa/katello/issues/comments{/number}","contents_url":"https://api.github.com/repos/parthaa/katello/contents/{+path}","compare_url":"https://api.github.com/repos/parthaa/katello/compare/{base}...{head}","merges_url":"https://api.github.com/repos/parthaa/katello/merges","archive_url":"https://api.github.com/repos/parthaa/katello/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/parthaa/katello/downloads","issues_url":"https://api.github.com/repos/parthaa/katello/issues{/number}","pulls_url":"https://api.github.com/repos/parthaa/katello/pulls{/number}","milestones_url":"https://api.github.com/repos/parthaa/katello/milestones{/number}","notifications_url":"https://api.github.com/repos/parthaa/katello/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/parthaa/katello/labels{/name}","releases_url":"https://api.github.com/repos/parthaa/katello/releases{/id}","deployments_url":"https://api.github.com/repos/parthaa/katello/deployments","created_at":"2012-04-26T17:15:07Z","updated_at":"2015-08-11T19:20:30Z","pushed_at":"2019-10-25T02:30:17Z","git_url":"git://github.com/parthaa/katello.git","ssh_url":"git@github.com:parthaa/katello.git","clone_url":"https://github.com/parthaa/katello.git","svn_url":"https://github.com/parthaa/katello","homepage":"katello.org","size":97800,"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,"disabled":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":"e529012872d54ddf9e31ba4f2d524a237b19b048","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","private":false,"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},"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":"2019-10-23T18:26:24Z","pushed_at":"2019-10-25T02:30: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":107039,"stargazers_count":274,"watchers_count":274,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":230,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":103,"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":230,"open_issues":103,"watchers":274,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Katello/katello/pulls/8378"},"html":{"href":"https://github.com/Katello/katello/pull/8378"},"issue":{"href":"https://api.github.com/repos/Katello/katello/issues/8378"},"comments":{"href":"https://api.github.com/repos/Katello/katello/issues/8378/comments"},"review_comments":{"href":"https://api.github.com/repos/Katello/katello/pulls/8378/comments"},"review_comment":{"href":"https://api.github.com/repos/Katello/katello/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Katello/katello/pulls/8378/commits"},"statuses":{"href":"https://api.github.com/repos/Katello/katello/statuses/e5f0b96c9e40b89678994c2b8dc8f5e29ebf5665"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"jlsherrill"}}