{"action":"created","comment":{"url":"https://api.github.com/repos/portworx/torpedo/pulls/comments/140410589","pull_request_review_id":64480692,"id":140410589,"diff_hunk":"@@ -138,11 +160,11 @@ func (s *ssh) ShutdownNode(n node.Node, options node.ShutdownNodeOpts) error {\n \t\tshutdownCmd = \"halt\"\n \t}\n \n-\tt := func() error {\n+\tt := func() (interface{}, error) {","path":"drivers/node/ssh/ssh.go","position":156,"original_position":156,"commit_id":"1c51afa68d7ef46685efa96ba9aeccaf774b974e","original_commit_id":"1c51afa68d7ef46685efa96ba9aeccaf774b974e","user":{"login":"harsh-px","id":26801153,"avatar_url":"https://avatars1.githubusercontent.com/u/26801153?v=4","gravatar_id":"","url":"https://api.github.com/users/harsh-px","html_url":"https://github.com/harsh-px","followers_url":"https://api.github.com/users/harsh-px/followers","following_url":"https://api.github.com/users/harsh-px/following{/other_user}","gists_url":"https://api.github.com/users/harsh-px/gists{/gist_id}","starred_url":"https://api.github.com/users/harsh-px/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harsh-px/subscriptions","organizations_url":"https://api.github.com/users/harsh-px/orgs","repos_url":"https://api.github.com/users/harsh-px/repos","events_url":"https://api.github.com/users/harsh-px/events{/privacy}","received_events_url":"https://api.github.com/users/harsh-px/received_events","type":"User","site_admin":false},"body":"An `interface{}` should be used when you defined a generic API or struct that users will consume and you don't know what data type you might want to use. `t` here is a function variable, neither an API nor a generic data structure. API's like `DoRetryWithTimeout` are good candidates of using `interface{}` as return type since it provides a generic functionality and doesn't make assumptions about what callers might want.\r\n\r\nIn \r\n```\r\n t := func() (interface{}, error) {\r\n      return s.doCmd(addr, shutdownCmd, true)\r\n} \r\n```\r\n\r\nYou exactly know the return type since  `s.doCmd(...)` returns the string type. Infact, any other return type when defining `t` won't work.\r\n\r\nWhile the code does compile, one shouldn't use `interface{}` as a placeholder for all types when we exactly know the returning type.                       ","created_at":"2017-09-22T04:36:24Z","updated_at":"2017-09-22T04:36:24Z","html_url":"https://github.com/portworx/torpedo/pull/34#discussion_r140410589","pull_request_url":"https://api.github.com/repos/portworx/torpedo/pulls/34","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/portworx/torpedo/pulls/comments/140410589"},"html":{"href":"https://github.com/portworx/torpedo/pull/34#discussion_r140410589"},"pull_request":{"href":"https://api.github.com/repos/portworx/torpedo/pulls/34"}},"in_reply_to_id":140389880},"pull_request":{"url":"https://api.github.com/repos/portworx/torpedo/pulls/34","id":142220178,"html_url":"https://github.com/portworx/torpedo/pull/34","diff_url":"https://github.com/portworx/torpedo/pull/34.diff","patch_url":"https://github.com/portworx/torpedo/pull/34.patch","issue_url":"https://api.github.com/repos/portworx/torpedo/issues/34","number":34,"state":"open","locked":false,"title":"Ssh changes","user":{"login":"varunturlapati","id":16810494,"avatar_url":"https://avatars0.githubusercontent.com/u/16810494?v=4","gravatar_id":"","url":"https://api.github.com/users/varunturlapati","html_url":"https://github.com/varunturlapati","followers_url":"https://api.github.com/users/varunturlapati/followers","following_url":"https://api.github.com/users/varunturlapati/following{/other_user}","gists_url":"https://api.github.com/users/varunturlapati/gists{/gist_id}","starred_url":"https://api.github.com/users/varunturlapati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varunturlapati/subscriptions","organizations_url":"https://api.github.com/users/varunturlapati/orgs","repos_url":"https://api.github.com/users/varunturlapati/repos","events_url":"https://api.github.com/users/varunturlapati/events{/privacy}","received_events_url":"https://api.github.com/users/varunturlapati/received_events","type":"User","site_admin":false},"body":"I have fixed the connectivity part and added an attribute to track a usable address instead of querying each time.\r\nI also modified task to now return string and error to support returning stdout/any output and an error.\r\n\r\nBefore diverging much further I think we should do a review.","created_at":"2017-09-20T22:46:29Z","updated_at":"2017-09-22T04:36:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"997b63f98da1ee559bee02fe1f0a135a8493e2bf","assignee":null,"assignees":[],"requested_reviewers":[{"login":"adityadani","id":313611,"avatar_url":"https://avatars3.githubusercontent.com/u/313611?v=4","gravatar_id":"","url":"https://api.github.com/users/adityadani","html_url":"https://github.com/adityadani","followers_url":"https://api.github.com/users/adityadani/followers","following_url":"https://api.github.com/users/adityadani/following{/other_user}","gists_url":"https://api.github.com/users/adityadani/gists{/gist_id}","starred_url":"https://api.github.com/users/adityadani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adityadani/subscriptions","organizations_url":"https://api.github.com/users/adityadani/orgs","repos_url":"https://api.github.com/users/adityadani/repos","events_url":"https://api.github.com/users/adityadani/events{/privacy}","received_events_url":"https://api.github.com/users/adityadani/received_events","type":"User","site_admin":false},{"login":"ankitgd","id":10536680,"avatar_url":"https://avatars2.githubusercontent.com/u/10536680?v=4","gravatar_id":"","url":"https://api.github.com/users/ankitgd","html_url":"https://github.com/ankitgd","followers_url":"https://api.github.com/users/ankitgd/followers","following_url":"https://api.github.com/users/ankitgd/following{/other_user}","gists_url":"https://api.github.com/users/ankitgd/gists{/gist_id}","starred_url":"https://api.github.com/users/ankitgd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankitgd/subscriptions","organizations_url":"https://api.github.com/users/ankitgd/orgs","repos_url":"https://api.github.com/users/ankitgd/repos","events_url":"https://api.github.com/users/ankitgd/events{/privacy}","received_events_url":"https://api.github.com/users/ankitgd/received_events","type":"User","site_admin":false},{"login":"jessicapwx","id":13735311,"avatar_url":"https://avatars2.githubusercontent.com/u/13735311?v=4","gravatar_id":"","url":"https://api.github.com/users/jessicapwx","html_url":"https://github.com/jessicapwx","followers_url":"https://api.github.com/users/jessicapwx/followers","following_url":"https://api.github.com/users/jessicapwx/following{/other_user}","gists_url":"https://api.github.com/users/jessicapwx/gists{/gist_id}","starred_url":"https://api.github.com/users/jessicapwx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessicapwx/subscriptions","organizations_url":"https://api.github.com/users/jessicapwx/orgs","repos_url":"https://api.github.com/users/jessicapwx/repos","events_url":"https://api.github.com/users/jessicapwx/events{/privacy}","received_events_url":"https://api.github.com/users/jessicapwx/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/portworx/torpedo/pulls/34/commits","review_comments_url":"https://api.github.com/repos/portworx/torpedo/pulls/34/comments","review_comment_url":"https://api.github.com/repos/portworx/torpedo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/portworx/torpedo/issues/34/comments","statuses_url":"https://api.github.com/repos/portworx/torpedo/statuses/1c51afa68d7ef46685efa96ba9aeccaf774b974e","head":{"label":"varunturlapati:ssh_changes","ref":"ssh_changes","sha":"1c51afa68d7ef46685efa96ba9aeccaf774b974e","user":{"login":"varunturlapati","id":16810494,"avatar_url":"https://avatars0.githubusercontent.com/u/16810494?v=4","gravatar_id":"","url":"https://api.github.com/users/varunturlapati","html_url":"https://github.com/varunturlapati","followers_url":"https://api.github.com/users/varunturlapati/followers","following_url":"https://api.github.com/users/varunturlapati/following{/other_user}","gists_url":"https://api.github.com/users/varunturlapati/gists{/gist_id}","starred_url":"https://api.github.com/users/varunturlapati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varunturlapati/subscriptions","organizations_url":"https://api.github.com/users/varunturlapati/orgs","repos_url":"https://api.github.com/users/varunturlapati/repos","events_url":"https://api.github.com/users/varunturlapati/events{/privacy}","received_events_url":"https://api.github.com/users/varunturlapati/received_events","type":"User","site_admin":false},"repo":{"id":103712002,"name":"torpedo","full_name":"varunturlapati/torpedo","owner":{"login":"varunturlapati","id":16810494,"avatar_url":"https://avatars0.githubusercontent.com/u/16810494?v=4","gravatar_id":"","url":"https://api.github.com/users/varunturlapati","html_url":"https://github.com/varunturlapati","followers_url":"https://api.github.com/users/varunturlapati/followers","following_url":"https://api.github.com/users/varunturlapati/following{/other_user}","gists_url":"https://api.github.com/users/varunturlapati/gists{/gist_id}","starred_url":"https://api.github.com/users/varunturlapati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varunturlapati/subscriptions","organizations_url":"https://api.github.com/users/varunturlapati/orgs","repos_url":"https://api.github.com/users/varunturlapati/repos","events_url":"https://api.github.com/users/varunturlapati/events{/privacy}","received_events_url":"https://api.github.com/users/varunturlapati/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/varunturlapati/torpedo","description":"A test suite to qualify storage providers for stateful containers running in a cluster.","fork":true,"url":"https://api.github.com/repos/varunturlapati/torpedo","forks_url":"https://api.github.com/repos/varunturlapati/torpedo/forks","keys_url":"https://api.github.com/repos/varunturlapati/torpedo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/varunturlapati/torpedo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/varunturlapati/torpedo/teams","hooks_url":"https://api.github.com/repos/varunturlapati/torpedo/hooks","issue_events_url":"https://api.github.com/repos/varunturlapati/torpedo/issues/events{/number}","events_url":"https://api.github.com/repos/varunturlapati/torpedo/events","assignees_url":"https://api.github.com/repos/varunturlapati/torpedo/assignees{/user}","branches_url":"https://api.github.com/repos/varunturlapati/torpedo/branches{/branch}","tags_url":"https://api.github.com/repos/varunturlapati/torpedo/tags","blobs_url":"https://api.github.com/repos/varunturlapati/torpedo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/varunturlapati/torpedo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/varunturlapati/torpedo/git/refs{/sha}","trees_url":"https://api.github.com/repos/varunturlapati/torpedo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/varunturlapati/torpedo/statuses/{sha}","languages_url":"https://api.github.com/repos/varunturlapati/torpedo/languages","stargazers_url":"https://api.github.com/repos/varunturlapati/torpedo/stargazers","contributors_url":"https://api.github.com/repos/varunturlapati/torpedo/contributors","subscribers_url":"https://api.github.com/repos/varunturlapati/torpedo/subscribers","subscription_url":"https://api.github.com/repos/varunturlapati/torpedo/subscription","commits_url":"https://api.github.com/repos/varunturlapati/torpedo/commits{/sha}","git_commits_url":"https://api.github.com/repos/varunturlapati/torpedo/git/commits{/sha}","comments_url":"https://api.github.com/repos/varunturlapati/torpedo/comments{/number}","issue_comment_url":"https://api.github.com/repos/varunturlapati/torpedo/issues/comments{/number}","contents_url":"https://api.github.com/repos/varunturlapati/torpedo/contents/{+path}","compare_url":"https://api.github.com/repos/varunturlapati/torpedo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/varunturlapati/torpedo/merges","archive_url":"https://api.github.com/repos/varunturlapati/torpedo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/varunturlapati/torpedo/downloads","issues_url":"https://api.github.com/repos/varunturlapati/torpedo/issues{/number}","pulls_url":"https://api.github.com/repos/varunturlapati/torpedo/pulls{/number}","milestones_url":"https://api.github.com/repos/varunturlapati/torpedo/milestones{/number}","notifications_url":"https://api.github.com/repos/varunturlapati/torpedo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/varunturlapati/torpedo/labels{/name}","releases_url":"https://api.github.com/repos/varunturlapati/torpedo/releases{/id}","deployments_url":"https://api.github.com/repos/varunturlapati/torpedo/deployments","created_at":"2017-09-16T00:19:13Z","updated_at":"2017-09-16T00:19:15Z","pushed_at":"2017-09-21T22:54:08Z","git_url":"git://github.com/varunturlapati/torpedo.git","ssh_url":"git@github.com:varunturlapati/torpedo.git","clone_url":"https://github.com/varunturlapati/torpedo.git","svn_url":"https://github.com/varunturlapati/torpedo","homepage":null,"size":22329,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"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":"master"}},"base":{"label":"portworx:master","ref":"master","sha":"a4fe34d78955466368043f5d8ec7e360dbfb6fb4","user":{"login":"portworx","id":12014092,"avatar_url":"https://avatars3.githubusercontent.com/u/12014092?v=4","gravatar_id":"","url":"https://api.github.com/users/portworx","html_url":"https://github.com/portworx","followers_url":"https://api.github.com/users/portworx/followers","following_url":"https://api.github.com/users/portworx/following{/other_user}","gists_url":"https://api.github.com/users/portworx/gists{/gist_id}","starred_url":"https://api.github.com/users/portworx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/portworx/subscriptions","organizations_url":"https://api.github.com/users/portworx/orgs","repos_url":"https://api.github.com/users/portworx/repos","events_url":"https://api.github.com/users/portworx/events{/privacy}","received_events_url":"https://api.github.com/users/portworx/received_events","type":"Organization","site_admin":false},"repo":{"id":92557685,"name":"torpedo","full_name":"portworx/torpedo","owner":{"login":"portworx","id":12014092,"avatar_url":"https://avatars3.githubusercontent.com/u/12014092?v=4","gravatar_id":"","url":"https://api.github.com/users/portworx","html_url":"https://github.com/portworx","followers_url":"https://api.github.com/users/portworx/followers","following_url":"https://api.github.com/users/portworx/following{/other_user}","gists_url":"https://api.github.com/users/portworx/gists{/gist_id}","starred_url":"https://api.github.com/users/portworx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/portworx/subscriptions","organizations_url":"https://api.github.com/users/portworx/orgs","repos_url":"https://api.github.com/users/portworx/repos","events_url":"https://api.github.com/users/portworx/events{/privacy}","received_events_url":"https://api.github.com/users/portworx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/portworx/torpedo","description":"A test suite to qualify storage providers for stateful containers running in a cluster.","fork":false,"url":"https://api.github.com/repos/portworx/torpedo","forks_url":"https://api.github.com/repos/portworx/torpedo/forks","keys_url":"https://api.github.com/repos/portworx/torpedo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/portworx/torpedo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/portworx/torpedo/teams","hooks_url":"https://api.github.com/repos/portworx/torpedo/hooks","issue_events_url":"https://api.github.com/repos/portworx/torpedo/issues/events{/number}","events_url":"https://api.github.com/repos/portworx/torpedo/events","assignees_url":"https://api.github.com/repos/portworx/torpedo/assignees{/user}","branches_url":"https://api.github.com/repos/portworx/torpedo/branches{/branch}","tags_url":"https://api.github.com/repos/portworx/torpedo/tags","blobs_url":"https://api.github.com/repos/portworx/torpedo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/portworx/torpedo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/portworx/torpedo/git/refs{/sha}","trees_url":"https://api.github.com/repos/portworx/torpedo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/portworx/torpedo/statuses/{sha}","languages_url":"https://api.github.com/repos/portworx/torpedo/languages","stargazers_url":"https://api.github.com/repos/portworx/torpedo/stargazers","contributors_url":"https://api.github.com/repos/portworx/torpedo/contributors","subscribers_url":"https://api.github.com/repos/portworx/torpedo/subscribers","subscription_url":"https://api.github.com/repos/portworx/torpedo/subscription","commits_url":"https://api.github.com/repos/portworx/torpedo/commits{/sha}","git_commits_url":"https://api.github.com/repos/portworx/torpedo/git/commits{/sha}","comments_url":"https://api.github.com/repos/portworx/torpedo/comments{/number}","issue_comment_url":"https://api.github.com/repos/portworx/torpedo/issues/comments{/number}","contents_url":"https://api.github.com/repos/portworx/torpedo/contents/{+path}","compare_url":"https://api.github.com/repos/portworx/torpedo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/portworx/torpedo/merges","archive_url":"https://api.github.com/repos/portworx/torpedo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/portworx/torpedo/downloads","issues_url":"https://api.github.com/repos/portworx/torpedo/issues{/number}","pulls_url":"https://api.github.com/repos/portworx/torpedo/pulls{/number}","milestones_url":"https://api.github.com/repos/portworx/torpedo/milestones{/number}","notifications_url":"https://api.github.com/repos/portworx/torpedo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/portworx/torpedo/labels{/name}","releases_url":"https://api.github.com/repos/portworx/torpedo/releases{/id}","deployments_url":"https://api.github.com/repos/portworx/torpedo/deployments","created_at":"2017-05-27T00:15:29Z","updated_at":"2017-09-22T03:59:59Z","pushed_at":"2017-09-22T02:25:44Z","git_url":"git://github.com/portworx/torpedo.git","ssh_url":"git@github.com:portworx/torpedo.git","clone_url":"https://github.com/portworx/torpedo.git","svn_url":"https://github.com/portworx/torpedo","homepage":null,"size":21979,"stargazers_count":4,"watchers_count":4,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":17,"forks":7,"open_issues":17,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/portworx/torpedo/pulls/34"},"html":{"href":"https://github.com/portworx/torpedo/pull/34"},"issue":{"href":"https://api.github.com/repos/portworx/torpedo/issues/34"},"comments":{"href":"https://api.github.com/repos/portworx/torpedo/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/portworx/torpedo/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/portworx/torpedo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/portworx/torpedo/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/portworx/torpedo/statuses/1c51afa68d7ef46685efa96ba9aeccaf774b974e"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"harsh-px"}}