{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/191585175","pull_request_review_id":124185574,"id":191585175,"diff_hunk":"@@ -158,3 +180,29 @@ func DeleteManagedInstanceGroup(zone string) error {\n \t}\n \treturn nil\n }\n+\n+func parseInstanceTemplateName(gcloudOutput string) (string, error) {\n+\tconst templateNameField = \"INSTANCE_TEMPLATE\"\n+\n+\tlines := strings.Split(gcloudOutput, \"\\n\")\n+\tif len(lines) <= 1 { // Empty output or only contains column names\n+\t\treturn \"\", fmt.Errorf(\"the list is empty\")\n+\t}\n+\n+\t// Otherwise, there should be exactly 1 entry, i.e. 2 lines\n+\tfieldNames := strings.Fields(lines[0])\n+\tinstanceTemplateColumn := 0\n+\tfor fieldNames[instanceTemplateColumn] != templateNameField &&","path":"test/e2e/framework/google_compute.go","position":45,"original_position":45,"commit_id":"18a439974feff15dd1be5cf50892c2c081d099db","original_commit_id":"18a439974feff15dd1be5cf50892c2c081d099db","user":{"login":"msau42","id":24448061,"avatar_url":"https://avatars3.githubusercontent.com/u/24448061?v=4","gravatar_id":"","url":"https://api.github.com/users/msau42","html_url":"https://github.com/msau42","followers_url":"https://api.github.com/users/msau42/followers","following_url":"https://api.github.com/users/msau42/following{/other_user}","gists_url":"https://api.github.com/users/msau42/gists{/gist_id}","starred_url":"https://api.github.com/users/msau42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msau42/subscriptions","organizations_url":"https://api.github.com/users/msau42/orgs","repos_url":"https://api.github.com/users/msau42/repos","events_url":"https://api.github.com/users/msau42/events{/privacy}","received_events_url":"https://api.github.com/users/msau42/received_events","type":"User","site_admin":false},"body":"length should be checked first to prevent an out of bounds dereference.","created_at":"2018-05-29T21:49:02Z","updated_at":"2018-05-29T21:49:57Z","html_url":"https://github.com/kubernetes/kubernetes/pull/64480#discussion_r191585175","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/64480","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/191585175"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/64480#discussion_r191585175"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/64480"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/64480","id":191276870,"html_url":"https://github.com/kubernetes/kubernetes/pull/64480","diff_url":"https://github.com/kubernetes/kubernetes/pull/64480.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/64480.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/64480","number":64480,"state":"open","locked":false,"title":"Modified regional PD test to fetch template name from GCE","user":{"login":"verult","id":1689416,"avatar_url":"https://avatars1.githubusercontent.com/u/1689416?v=4","gravatar_id":"","url":"https://api.github.com/users/verult","html_url":"https://github.com/verult","followers_url":"https://api.github.com/users/verult/followers","following_url":"https://api.github.com/users/verult/following{/other_user}","gists_url":"https://api.github.com/users/verult/gists{/gist_id}","starred_url":"https://api.github.com/users/verult/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verult/subscriptions","organizations_url":"https://api.github.com/users/verult/orgs","repos_url":"https://api.github.com/users/verult/repos","events_url":"https://api.github.com/users/verult/events{/privacy}","received_events_url":"https://api.github.com/users/verult/received_events","type":"User","site_admin":false},"body":"<!--  Thanks for sending a pull request!  Here are some tips for you:\r\n1. If this is your first time, read our contributor guidelines https://git.k8s.io/community/contributors/guide#your-first-contribution and developer guide https://git.k8s.io/community/contributors/devel/development.md#development-guide\r\n2. If you want *faster* PR reviews, read how: https://git.k8s.io/community/contributors/guide/pull-requests.md#best-practices-for-faster-reviews\r\n3. Follow the instructions for writing a release note: https://git.k8s.io/community/contributors/guide/release-notes.md\r\n4. If the PR is unfinished, see how to mark it: https://git.k8s.io/community/contributors/guide/pull-requests.md#marking-unfinished-pull-requests\r\n-->\r\n\r\n**What this PR does / why we need it**: Previously, the regional PD failover e2e test assumes a specific relationship between the names of an instance group and its corresponding template. It turns out to not always hold true for different types of clusters. Instead, the test should fetch the correct template name by calling out to GCE.\r\n\r\n**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:\r\nPart of #59988\r\n\r\nNeed to cherry pick this back to 1.10 along with #64223 \r\n\r\n**Release note**:\r\n<!--  Write your release note:\r\n1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string \"action required\".\r\n2. If no release note is required, just write \"NONE\".\r\n-->\r\n```release-note\r\nNONE\r\n```\r\n\r\n/assign @saad-ali @wojtek-t \r\n/sig storage","created_at":"2018-05-29T21:36:04Z","updated_at":"2018-05-29T21:49:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d713c67fd4f8dcf5513dd18c22eb560e942bb736","assignee":{"login":"saad-ali","id":10052848,"avatar_url":"https://avatars1.githubusercontent.com/u/10052848?v=4","gravatar_id":"","url":"https://api.github.com/users/saad-ali","html_url":"https://github.com/saad-ali","followers_url":"https://api.github.com/users/saad-ali/followers","following_url":"https://api.github.com/users/saad-ali/following{/other_user}","gists_url":"https://api.github.com/users/saad-ali/gists{/gist_id}","starred_url":"https://api.github.com/users/saad-ali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saad-ali/subscriptions","organizations_url":"https://api.github.com/users/saad-ali/orgs","repos_url":"https://api.github.com/users/saad-ali/repos","events_url":"https://api.github.com/users/saad-ali/events{/privacy}","received_events_url":"https://api.github.com/users/saad-ali/received_events","type":"User","site_admin":false},"assignees":[{"login":"saad-ali","id":10052848,"avatar_url":"https://avatars1.githubusercontent.com/u/10052848?v=4","gravatar_id":"","url":"https://api.github.com/users/saad-ali","html_url":"https://github.com/saad-ali","followers_url":"https://api.github.com/users/saad-ali/followers","following_url":"https://api.github.com/users/saad-ali/following{/other_user}","gists_url":"https://api.github.com/users/saad-ali/gists{/gist_id}","starred_url":"https://api.github.com/users/saad-ali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saad-ali/subscriptions","organizations_url":"https://api.github.com/users/saad-ali/orgs","repos_url":"https://api.github.com/users/saad-ali/repos","events_url":"https://api.github.com/users/saad-ali/events{/privacy}","received_events_url":"https://api.github.com/users/saad-ali/received_events","type":"User","site_admin":false},{"login":"wojtek-t","id":10743879,"avatar_url":"https://avatars3.githubusercontent.com/u/10743879?v=4","gravatar_id":"","url":"https://api.github.com/users/wojtek-t","html_url":"https://github.com/wojtek-t","followers_url":"https://api.github.com/users/wojtek-t/followers","following_url":"https://api.github.com/users/wojtek-t/following{/other_user}","gists_url":"https://api.github.com/users/wojtek-t/gists{/gist_id}","starred_url":"https://api.github.com/users/wojtek-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wojtek-t/subscriptions","organizations_url":"https://api.github.com/users/wojtek-t/orgs","repos_url":"https://api.github.com/users/wojtek-t/repos","events_url":"https://api.github.com/users/wojtek-t/events{/privacy}","received_events_url":"https://api.github.com/users/wojtek-t/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"vishh","id":7063592,"avatar_url":"https://avatars2.githubusercontent.com/u/7063592?v=4","gravatar_id":"","url":"https://api.github.com/users/vishh","html_url":"https://github.com/vishh","followers_url":"https://api.github.com/users/vishh/followers","following_url":"https://api.github.com/users/vishh/following{/other_user}","gists_url":"https://api.github.com/users/vishh/gists{/gist_id}","starred_url":"https://api.github.com/users/vishh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishh/subscriptions","organizations_url":"https://api.github.com/users/vishh/orgs","repos_url":"https://api.github.com/users/vishh/repos","events_url":"https://api.github.com/users/vishh/events{/privacy}","received_events_url":"https://api.github.com/users/vishh/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":477397086,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":349530249,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note-none","name":"release-note-none","color":"c2e0c6","default":false},{"id":169428334,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/storage","name":"sig/storage","color":"d2b48c","default":false},{"id":253450934,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/M","name":"size/M","color":"eebb00","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/64480/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/64480/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/64480/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/18a439974feff15dd1be5cf50892c2c081d099db","head":{"label":"verult:repd-ig-fix","ref":"repd-ig-fix","sha":"18a439974feff15dd1be5cf50892c2c081d099db","user":{"login":"verult","id":1689416,"avatar_url":"https://avatars1.githubusercontent.com/u/1689416?v=4","gravatar_id":"","url":"https://api.github.com/users/verult","html_url":"https://github.com/verult","followers_url":"https://api.github.com/users/verult/followers","following_url":"https://api.github.com/users/verult/following{/other_user}","gists_url":"https://api.github.com/users/verult/gists{/gist_id}","starred_url":"https://api.github.com/users/verult/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verult/subscriptions","organizations_url":"https://api.github.com/users/verult/orgs","repos_url":"https://api.github.com/users/verult/repos","events_url":"https://api.github.com/users/verult/events{/privacy}","received_events_url":"https://api.github.com/users/verult/received_events","type":"User","site_admin":false},"repo":{"id":88203879,"name":"kubernetes","full_name":"verult/kubernetes","owner":{"login":"verult","id":1689416,"avatar_url":"https://avatars1.githubusercontent.com/u/1689416?v=4","gravatar_id":"","url":"https://api.github.com/users/verult","html_url":"https://github.com/verult","followers_url":"https://api.github.com/users/verult/followers","following_url":"https://api.github.com/users/verult/following{/other_user}","gists_url":"https://api.github.com/users/verult/gists{/gist_id}","starred_url":"https://api.github.com/users/verult/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verult/subscriptions","organizations_url":"https://api.github.com/users/verult/orgs","repos_url":"https://api.github.com/users/verult/repos","events_url":"https://api.github.com/users/verult/events{/privacy}","received_events_url":"https://api.github.com/users/verult/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/verult/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":true,"url":"https://api.github.com/repos/verult/kubernetes","forks_url":"https://api.github.com/repos/verult/kubernetes/forks","keys_url":"https://api.github.com/repos/verult/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/verult/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/verult/kubernetes/teams","hooks_url":"https://api.github.com/repos/verult/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/verult/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/verult/kubernetes/events","assignees_url":"https://api.github.com/repos/verult/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/verult/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/verult/kubernetes/tags","blobs_url":"https://api.github.com/repos/verult/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/verult/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/verult/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/verult/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/verult/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/verult/kubernetes/languages","stargazers_url":"https://api.github.com/repos/verult/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/verult/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/verult/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/verult/kubernetes/subscription","commits_url":"https://api.github.com/repos/verult/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/verult/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/verult/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/verult/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/verult/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/verult/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/verult/kubernetes/merges","archive_url":"https://api.github.com/repos/verult/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/verult/kubernetes/downloads","issues_url":"https://api.github.com/repos/verult/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/verult/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/verult/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/verult/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/verult/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/verult/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/verult/kubernetes/deployments","created_at":"2017-04-13T20:30:00Z","updated_at":"2018-03-15T22:00:54Z","pushed_at":"2018-05-29T21:36:42Z","git_url":"git://github.com/verult/kubernetes.git","ssh_url":"git@github.com:verult/kubernetes.git","clone_url":"https://github.com/verult/kubernetes.git","svn_url":"https://github.com/verult/kubernetes","homepage":"http://kubernetes.io","size":560300,"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,"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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"10b9fd3a01f37b9a6f1ce636edcbd9c7332414cd","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2018-05-29T20:38:23Z","pushed_at":"2018-05-29T21:46:22Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":781355,"stargazers_count":36946,"watchers_count":36946,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12970,"mirror_url":null,"archived":false,"open_issues_count":3271,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":12970,"open_issues":3271,"watchers":36946,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/64480"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/64480"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/64480"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/64480/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/64480/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/64480/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/18a439974feff15dd1be5cf50892c2c081d099db"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"msau42"}}