{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/32875496","id":32875496,"diff_hunk":"@@ -35,53 +36,176 @@ import (\n \t. \"github.com/onsi/gomega\"\n )\n \n-// version applies to upgrades; kube-push always pushes local binaries.\n-const version = \"latest_ci\"\n+const (\n+\t// version applies to upgrades; kube-push always pushes local binaries.\n+\tversion    = \"latest_ci\"\n+\tversionURL = \"https://storage.googleapis.com/kubernetes-release/%s/%s.txt\"\n+)\n+\n+// realVersion turns a version constant--one accepted by cluster/gce/upgrade.sh--\n+// into a deployable version string.\n+//\n+// NOTE: KEEP THIS LIST UP-TO-DATE WITH THE CODE BELOW.\n+// The version strings supported are:\n+// - \"latest_stable\"   (returns a string like \"0.18.2\")\n+// - \"latest_release\"  (returns a string like \"0.19.1\")\n+// - \"latest_ci\"       (returns a string like \"0.19.1-669-gabac8c8\")\n+func realVersion(s string) (string, error) {\n+\tbucket, file := \"\", \"\"\n+\tswitch s {\n+\t// NOTE: IF YOU CHANGE THE FOLLOWING LIST, ALSO UPDATE cluster/gce/upgrade.sh\n+\tcase \"latest_stable\":\n+\t\tbucket, file = \"release\", \"stable\"\n+\tcase \"latest_release\":\n+\t\tbucket, file = \"release\", \"latest\"\n+\tcase \"latest_ci\":\n+\t\tbucket, file = \"ci\", \"latest\"\n+\tdefault:\n+\t\treturn \"\", fmt.Errorf(\"version %s is not supported\", s)\n+\t}\n+\n+\turl := fmt.Sprintf(versionURL, bucket, file)\n+\tvar v string\n+\tLogf(\"Fetching version from %s\", url)\n+\tc := &http.Client{Timeout: 2 * time.Second}\n+\tif err := wait.Poll(poll, singleCallTimeout, func() (bool, error) {\n+\t\tr, err := c.Get(url)\n+\t\tif err != nil {\n+\t\t\tLogf(\"Error reaching %s: %v\", url, err)\n+\t\t\treturn false, nil\n+\t\t}\n+\t\tif r.StatusCode != http.StatusOK {\n+\t\t\tLogf(\"Bad response; status: %d, response: %v\", r.StatusCode, r)\n+\t\t\treturn false, nil\n+\t\t}\n+\t\tdefer r.Body.Close()\n+\t\tb, err := ioutil.ReadAll(r.Body)\n+\t\tif err != nil {\n+\t\t\tLogf(\"Could not read response body: %v\", err)\n+\t\t\treturn false, nil\n+\t\t}\n+\t\tv = strings.TrimSpace(string(b))\n+\t\treturn true, nil\n+\t}); err != nil {\n+\t\treturn \"\", fmt.Errorf(\"failed to fetch real version from %s\", url)\n+\t}\n+\t// Versions start with \"v\", so remove that.\n+\treturn v[1:], nil\n+}\n \n // The following upgrade functions are passed into the framework below and used\n // to do the actual upgrades.\n+var masterUpgrade = func(v string) error {\n+\tvar err error\n+\tp := testContext.Provider\n+\tswitch p {","path":"test/e2e/cluster_upgrade.go","position":76,"original_position":76,"commit_id":"d9b21de3c175f10e48ad18822aa32696bf397039","original_commit_id":"d9b21de3c175f10e48ad18822aa32696bf397039","user":{"login":"roberthbailey","id":7751204,"avatar_url":"https://avatars.githubusercontent.com/u/7751204?v=3","gravatar_id":"","url":"https://api.github.com/users/roberthbailey","html_url":"https://github.com/roberthbailey","followers_url":"https://api.github.com/users/roberthbailey/followers","following_url":"https://api.github.com/users/roberthbailey/following{/other_user}","gists_url":"https://api.github.com/users/roberthbailey/gists{/gist_id}","starred_url":"https://api.github.com/users/roberthbailey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roberthbailey/subscriptions","organizations_url":"https://api.github.com/users/roberthbailey/orgs","repos_url":"https://api.github.com/users/roberthbailey/repos","events_url":"https://api.github.com/users/roberthbailey/events{/privacy}","received_events_url":"https://api.github.com/users/roberthbailey/received_events","type":"User","site_admin":false},"body":"no need for the extra variable p, just do switch testContext.Provider {","created_at":"2015-06-19T22:41:07Z","updated_at":"2015-06-19T22:41:07Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10133#discussion_r32875496","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10133","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/32875496"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10133#discussion_r32875496"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10133"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10133","id":38154018,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10133","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10133.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10133.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10133","number":10133,"state":"open","locked":false,"title":"GKE upgrade tests","user":{"login":"mbforbes","id":1170062,"avatar_url":"https://avatars.githubusercontent.com/u/1170062?v=3","gravatar_id":"","url":"https://api.github.com/users/mbforbes","html_url":"https://github.com/mbforbes","followers_url":"https://api.github.com/users/mbforbes/followers","following_url":"https://api.github.com/users/mbforbes/following{/other_user}","gists_url":"https://api.github.com/users/mbforbes/gists{/gist_id}","starred_url":"https://api.github.com/users/mbforbes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbforbes/subscriptions","organizations_url":"https://api.github.com/users/mbforbes/orgs","repos_url":"https://api.github.com/users/mbforbes/repos","events_url":"https://api.github.com/users/mbforbes/events{/privacy}","received_events_url":"https://api.github.com/users/mbforbes/received_events","type":"User","site_admin":false},"body":"GKE node (#7914) and master (#8081) upgrade tests. Adds support for running `cluster_upgrade.go` with the GKE provider.\r\n\r\nFinal TODOs after this to close those issues are:\r\n- verify software version really changed after upgrade\r\n- setup jenkins jobs to run all of these; ensure they're green\r\n\r\nAfter that, our next TODOs are:\r\n- test volumes, persistent volumes, and secrets\r\n- some refactoring, cleanup, and consistency (I sprinkled TODOs in the code for these things)\r\n\r\n+cc @mikedanese @zmerlynn @quinton-hoole @ixdy ","created_at":"2015-06-19T22:33:05Z","updated_at":"2015-06-19T22:41:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f67847c70f0209f9b08480c2d5afb5a911fd562","assignee":{"login":"roberthbailey","id":7751204,"avatar_url":"https://avatars.githubusercontent.com/u/7751204?v=3","gravatar_id":"","url":"https://api.github.com/users/roberthbailey","html_url":"https://github.com/roberthbailey","followers_url":"https://api.github.com/users/roberthbailey/followers","following_url":"https://api.github.com/users/roberthbailey/following{/other_user}","gists_url":"https://api.github.com/users/roberthbailey/gists{/gist_id}","starred_url":"https://api.github.com/users/roberthbailey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roberthbailey/subscriptions","organizations_url":"https://api.github.com/users/roberthbailey/orgs","repos_url":"https://api.github.com/users/roberthbailey/repos","events_url":"https://api.github.com/users/roberthbailey/events{/privacy}","received_events_url":"https://api.github.com/users/roberthbailey/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10133/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10133/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10133/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/d9b21de3c175f10e48ad18822aa32696bf397039","head":{"label":"mbforbes:gkeLivingUpgrade","ref":"gkeLivingUpgrade","sha":"d9b21de3c175f10e48ad18822aa32696bf397039","user":{"login":"mbforbes","id":1170062,"avatar_url":"https://avatars.githubusercontent.com/u/1170062?v=3","gravatar_id":"","url":"https://api.github.com/users/mbforbes","html_url":"https://github.com/mbforbes","followers_url":"https://api.github.com/users/mbforbes/followers","following_url":"https://api.github.com/users/mbforbes/following{/other_user}","gists_url":"https://api.github.com/users/mbforbes/gists{/gist_id}","starred_url":"https://api.github.com/users/mbforbes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbforbes/subscriptions","organizations_url":"https://api.github.com/users/mbforbes/orgs","repos_url":"https://api.github.com/users/mbforbes/repos","events_url":"https://api.github.com/users/mbforbes/events{/privacy}","received_events_url":"https://api.github.com/users/mbforbes/received_events","type":"User","site_admin":false},"repo":{"id":23891576,"name":"kubernetes","full_name":"mbforbes/kubernetes","owner":{"login":"mbforbes","id":1170062,"avatar_url":"https://avatars.githubusercontent.com/u/1170062?v=3","gravatar_id":"","url":"https://api.github.com/users/mbforbes","html_url":"https://github.com/mbforbes","followers_url":"https://api.github.com/users/mbforbes/followers","following_url":"https://api.github.com/users/mbforbes/following{/other_user}","gists_url":"https://api.github.com/users/mbforbes/gists{/gist_id}","starred_url":"https://api.github.com/users/mbforbes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbforbes/subscriptions","organizations_url":"https://api.github.com/users/mbforbes/orgs","repos_url":"https://api.github.com/users/mbforbes/repos","events_url":"https://api.github.com/users/mbforbes/events{/privacy}","received_events_url":"https://api.github.com/users/mbforbes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbforbes/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/mbforbes/kubernetes","forks_url":"https://api.github.com/repos/mbforbes/kubernetes/forks","keys_url":"https://api.github.com/repos/mbforbes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbforbes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbforbes/kubernetes/teams","hooks_url":"https://api.github.com/repos/mbforbes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/mbforbes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/mbforbes/kubernetes/events","assignees_url":"https://api.github.com/repos/mbforbes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/mbforbes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/mbforbes/kubernetes/tags","blobs_url":"https://api.github.com/repos/mbforbes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbforbes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbforbes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbforbes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbforbes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/mbforbes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/mbforbes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/mbforbes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/mbforbes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/mbforbes/kubernetes/subscription","commits_url":"https://api.github.com/repos/mbforbes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbforbes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbforbes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbforbes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbforbes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/mbforbes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbforbes/kubernetes/merges","archive_url":"https://api.github.com/repos/mbforbes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbforbes/kubernetes/downloads","issues_url":"https://api.github.com/repos/mbforbes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/mbforbes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/mbforbes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/mbforbes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbforbes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/mbforbes/kubernetes/releases{/id}","created_at":"2014-09-10T20:45:41Z","updated_at":"2015-04-24T19:28:40Z","pushed_at":"2015-06-19T22:31:24Z","git_url":"git://github.com/mbforbes/kubernetes.git","ssh_url":"git@github.com:mbforbes/kubernetes.git","clone_url":"https://github.com/mbforbes/kubernetes.git","svn_url":"https://github.com/mbforbes/kubernetes","homepage":null,"size":75968,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"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":"GoogleCloudPlatform:master","ref":"master","sha":"b964f3c91134c2c0bab8e20adf4bc4efd56bcf0b","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-06-19T21:03:36Z","pushed_at":"2015-06-19T22:36:39Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":"http://kubernetes.io","size":295184,"stargazers_count":8515,"watchers_count":8515,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1828,"mirror_url":null,"open_issues_count":1405,"forks":1828,"open_issues":1405,"watchers":8515,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10133"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10133"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10133"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10133/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10133/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10133/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/d9b21de3c175f10e48ad18822aa32696bf397039"}}}}