{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq-schema/pulls/comments/221943761","pull_request_review_id":160711699,"id":221943761,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTk0Mzc2MQ==","diff_hunk":"@@ -0,0 +1,47 @@\n+require_migration\n+\n+describe AddConversionHostIdToMiqRequestTasks do\n+  let(:task_stub) { migration_stub(:MiqRequestTask) }\n+  let(:host_stub) { migration_stub(:Host) }\n+  let(:conversion_host_stub) { migration_stub(:ConversionHost) }\n+\n+  migration_context :up do\n+    it \"creates conversion host\" do\n+      task = task_stub.create!\n+      host = host_stub.create!\n+      conversion_host = conversion_host_stub.create!(\n+        :resource_id   => host.id,\n+        :resource_type => host.type\n+      )\n+      task.options = { :transformation_host_id => conversion_host.id }","path":"spec/migrations/20181001131632_add_conversion_host_id_to_miq_request_tasks_spec.rb","position":16,"original_position":16,"commit_id":"659be65d3192b1b7392e0bf612ba1b38e1c9eb35","original_commit_id":"659be65d3192b1b7392e0bf612ba1b38e1c9eb35","user":{"login":"agrare","id":12851112,"node_id":"MDQ6VXNlcjEyODUxMTEy","avatar_url":"https://avatars2.githubusercontent.com/u/12851112?v=4","gravatar_id":"","url":"https://api.github.com/users/agrare","html_url":"https://github.com/agrare","followers_url":"https://api.github.com/users/agrare/followers","following_url":"https://api.github.com/users/agrare/following{/other_user}","gists_url":"https://api.github.com/users/agrare/gists{/gist_id}","starred_url":"https://api.github.com/users/agrare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agrare/subscriptions","organizations_url":"https://api.github.com/users/agrare/orgs","repos_url":"https://api.github.com/users/agrare/repos","events_url":"https://api.github.com/users/agrare/events{/privacy}","received_events_url":"https://api.github.com/users/agrare/received_events","type":"User","site_admin":false},"body":"You can pass `:options => {:trans....}` into the `create!()` and then you don't need the extra save","created_at":"2018-10-02T13:11:44Z","updated_at":"2018-10-02T13:11:44Z","html_url":"https://github.com/ManageIQ/manageiq-schema/pull/281#discussion_r221943761","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/pulls/281","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq-schema/pulls/comments/221943761"},"html":{"href":"https://github.com/ManageIQ/manageiq-schema/pull/281#discussion_r221943761"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq-schema/pulls/281"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq-schema/pulls/281","id":219374038,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5Mzc0MDM4","html_url":"https://github.com/ManageIQ/manageiq-schema/pull/281","diff_url":"https://github.com/ManageIQ/manageiq-schema/pull/281.diff","patch_url":"https://github.com/ManageIQ/manageiq-schema/pull/281.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/issues/281","number":281,"state":"open","locked":false,"title":"Add conversion_host_id to miq_request_task","user":{"login":"fdupont-redhat","id":25821288,"node_id":"MDQ6VXNlcjI1ODIxMjg4","avatar_url":"https://avatars0.githubusercontent.com/u/25821288?v=4","gravatar_id":"","url":"https://api.github.com/users/fdupont-redhat","html_url":"https://github.com/fdupont-redhat","followers_url":"https://api.github.com/users/fdupont-redhat/followers","following_url":"https://api.github.com/users/fdupont-redhat/following{/other_user}","gists_url":"https://api.github.com/users/fdupont-redhat/gists{/gist_id}","starred_url":"https://api.github.com/users/fdupont-redhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdupont-redhat/subscriptions","organizations_url":"https://api.github.com/users/fdupont-redhat/orgs","repos_url":"https://api.github.com/users/fdupont-redhat/repos","events_url":"https://api.github.com/users/fdupont-redhat/events{/privacy}","received_events_url":"https://api.github.com/users/fdupont-redhat/received_events","type":"User","site_admin":false},"body":"The `ServiceTemplateTransformationPlanTask` class relies on a conversion host to actually run the migration. The conversion host is modeled in `ConversionHost` class. From a database point of view, the `ServiceTemplateTransformationPlanTask` class is stored in `miq_request_tasks` table, because it's a sub-sub-class of `MiqRequestTask`. This PR adds a `conversion_host_id` column to `miq_request_tasks` to set the relationship.\r\n\r\nAssociated RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1634029","created_at":"2018-10-01T13:22:51Z","updated_at":"2018-10-02T13:11:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1db169d724bd046a647c59b976bb7e1d809a0777","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":736077080,"node_id":"MDU6TGFiZWw3MzYwNzcwODA=","url":"https://api.github.com/repos/ManageIQ/manageiq-schema/labels/gaprindashvili/no","name":"gaprindashvili/no","color":"555555","default":false},{"id":654725933,"node_id":"MDU6TGFiZWw2NTQ3MjU5MzM=","url":"https://api.github.com/repos/ManageIQ/manageiq-schema/labels/schema","name":"schema","color":"5319e7","default":false},{"id":830463059,"node_id":"MDU6TGFiZWw4MzA0NjMwNTk=","url":"https://api.github.com/repos/ManageIQ/manageiq-schema/labels/transformation","name":"transformation","color":"5319e7","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/pulls/281/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/pulls/281/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/issues/281/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/statuses/659be65d3192b1b7392e0bf612ba1b38e1c9eb35","head":{"label":"fdupont-redhat:v2v_add_conversion_host_id_to_transformation_task","ref":"v2v_add_conversion_host_id_to_transformation_task","sha":"659be65d3192b1b7392e0bf612ba1b38e1c9eb35","user":{"login":"fdupont-redhat","id":25821288,"node_id":"MDQ6VXNlcjI1ODIxMjg4","avatar_url":"https://avatars0.githubusercontent.com/u/25821288?v=4","gravatar_id":"","url":"https://api.github.com/users/fdupont-redhat","html_url":"https://github.com/fdupont-redhat","followers_url":"https://api.github.com/users/fdupont-redhat/followers","following_url":"https://api.github.com/users/fdupont-redhat/following{/other_user}","gists_url":"https://api.github.com/users/fdupont-redhat/gists{/gist_id}","starred_url":"https://api.github.com/users/fdupont-redhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdupont-redhat/subscriptions","organizations_url":"https://api.github.com/users/fdupont-redhat/orgs","repos_url":"https://api.github.com/users/fdupont-redhat/repos","events_url":"https://api.github.com/users/fdupont-redhat/events{/privacy}","received_events_url":"https://api.github.com/users/fdupont-redhat/received_events","type":"User","site_admin":false},"repo":{"id":149120172,"node_id":"MDEwOlJlcG9zaXRvcnkxNDkxMjAxNzI=","name":"manageiq-schema","full_name":"fdupont-redhat/manageiq-schema","private":false,"owner":{"login":"fdupont-redhat","id":25821288,"node_id":"MDQ6VXNlcjI1ODIxMjg4","avatar_url":"https://avatars0.githubusercontent.com/u/25821288?v=4","gravatar_id":"","url":"https://api.github.com/users/fdupont-redhat","html_url":"https://github.com/fdupont-redhat","followers_url":"https://api.github.com/users/fdupont-redhat/followers","following_url":"https://api.github.com/users/fdupont-redhat/following{/other_user}","gists_url":"https://api.github.com/users/fdupont-redhat/gists{/gist_id}","starred_url":"https://api.github.com/users/fdupont-redhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdupont-redhat/subscriptions","organizations_url":"https://api.github.com/users/fdupont-redhat/orgs","repos_url":"https://api.github.com/users/fdupont-redhat/repos","events_url":"https://api.github.com/users/fdupont-redhat/events{/privacy}","received_events_url":"https://api.github.com/users/fdupont-redhat/received_events","type":"User","site_admin":false},"html_url":"https://github.com/fdupont-redhat/manageiq-schema","description":"SQL schema and database migrations for ManageIQ","fork":true,"url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema","forks_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/forks","keys_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/teams","hooks_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/hooks","issue_events_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/issues/events{/number}","events_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/events","assignees_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/assignees{/user}","branches_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/branches{/branch}","tags_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/tags","blobs_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/git/refs{/sha}","trees_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/statuses/{sha}","languages_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/languages","stargazers_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/stargazers","contributors_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/contributors","subscribers_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/subscribers","subscription_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/subscription","commits_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/commits{/sha}","git_commits_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/git/commits{/sha}","comments_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/comments{/number}","issue_comment_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/issues/comments{/number}","contents_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/contents/{+path}","compare_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/merges","archive_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/downloads","issues_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/issues{/number}","pulls_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/pulls{/number}","milestones_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/milestones{/number}","notifications_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/labels{/name}","releases_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/releases{/id}","deployments_url":"https://api.github.com/repos/fdupont-redhat/manageiq-schema/deployments","created_at":"2018-09-17T12:14:50Z","updated_at":"2018-09-17T12:14:53Z","pushed_at":"2018-10-01T21:35:38Z","git_url":"git://github.com/fdupont-redhat/manageiq-schema.git","ssh_url":"git@github.com:fdupont-redhat/manageiq-schema.git","clone_url":"https://github.com/fdupont-redhat/manageiq-schema.git","svn_url":"https://github.com/fdupont-redhat/manageiq-schema","homepage":null,"size":3424,"stargazers_count":0,"watchers_count":0,"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":"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":"ManageIQ:master","ref":"master","sha":"46cc3f254368ccab8a6ec68b99188b3fffd322ab","user":{"login":"ManageIQ","id":1125575,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjU1NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1125575?v=4","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"repo":{"id":90904181,"node_id":"MDEwOlJlcG9zaXRvcnk5MDkwNDE4MQ==","name":"manageiq-schema","full_name":"ManageIQ/manageiq-schema","private":false,"owner":{"login":"ManageIQ","id":1125575,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjU1NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1125575?v=4","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ManageIQ/manageiq-schema","description":"SQL schema and database migrations for ManageIQ","fork":false,"url":"https://api.github.com/repos/ManageIQ/manageiq-schema","forks_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/forks","keys_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/teams","hooks_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/events","assignees_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/tags","blobs_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/subscription","commits_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/merges","archive_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/downloads","issues_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/releases{/id}","deployments_url":"https://api.github.com/repos/ManageIQ/manageiq-schema/deployments","created_at":"2017-05-10T20:11:26Z","updated_at":"2018-09-28T20:42:19Z","pushed_at":"2018-10-02T12:58:58Z","git_url":"git://github.com/ManageIQ/manageiq-schema.git","ssh_url":"git@github.com:ManageIQ/manageiq-schema.git","clone_url":"https://github.com/ManageIQ/manageiq-schema.git","svn_url":"https://github.com/ManageIQ/manageiq-schema","homepage":null,"size":3426,"stargazers_count":12,"watchers_count":12,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":84,"mirror_url":null,"archived":false,"open_issues_count":17,"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":84,"open_issues":17,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq-schema/pulls/281"},"html":{"href":"https://github.com/ManageIQ/manageiq-schema/pull/281"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq-schema/issues/281"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq-schema/issues/281/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq-schema/pulls/281/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq-schema/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq-schema/pulls/281/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq-schema/statuses/659be65d3192b1b7392e0bf612ba1b38e1c9eb35"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"agrare"}}