{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/50599435","id":50599435,"diff_hunk":"@@ -944,18 +945,47 @@ func (dm *DockerManager) podInfraContainerChanged(pod *api.Pod, podInfraContaine\n \treturn podInfraContainerStatus.Hash != kubecontainer.HashContainer(expectedPodInfraContainer), nil\n }\n \n-type dockerVersion docker.APIVersion\n+// dockerVersion implementes kubecontainer.Version interface by implementing\n+// Compare() and String() (which is implemented by the underlying semver.Version)\n+// TODO: this code is the same as rktVersion and may make sense to be moved to\n+// somewhere shared.\n+type dockerVersion struct {\n+\t*semver.Version\n+}\n+\n+func newDockerVersion(version string) (dockerVersion, error) {\n+\tsem, err := semver.NewVersion(version)\n+\tif err != nil {\n+\t\treturn dockerVersion{}, err\n+\t}\n+\treturn dockerVersion{sem}, nil\n+}\n+\n+func (r dockerVersion) Compare(other string) (int, error) {\n+\tv, err := semver.NewVersion(other)\n+\tif err != nil {\n+\t\treturn -1, err","path":"pkg/kubelet/dockertools/manager.go","position":32,"original_position":32,"commit_id":"fff8a7c371dfe2eec98f0f7c51372c4eb2c04635","original_commit_id":"fff8a7c371dfe2eec98f0f7c51372c4eb2c04635","user":{"login":"timothysc","id":169553,"avatar_url":"https://avatars.githubusercontent.com/u/169553?v=3","gravatar_id":"","url":"https://api.github.com/users/timothysc","html_url":"https://github.com/timothysc","followers_url":"https://api.github.com/users/timothysc/followers","following_url":"https://api.github.com/users/timothysc/following{/other_user}","gists_url":"https://api.github.com/users/timothysc/gists{/gist_id}","starred_url":"https://api.github.com/users/timothysc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothysc/subscriptions","organizations_url":"https://api.github.com/users/timothysc/orgs","repos_url":"https://api.github.com/users/timothysc/repos","events_url":"https://api.github.com/users/timothysc/events{/privacy}","received_events_url":"https://api.github.com/users/timothysc/received_events","type":"User","site_admin":false},"body":"I don't know the semantics of Compare operation, but returning -1 on the error seems kind of odd to me, but meh. ","created_at":"2016-01-22T22:24:32Z","updated_at":"2016-01-22T22:24:32Z","html_url":"https://github.com/kubernetes/kubernetes/pull/20020#discussion_r50599435","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20020","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/50599435"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/20020#discussion_r50599435"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20020"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20020","id":56943162,"html_url":"https://github.com/kubernetes/kubernetes/pull/20020","diff_url":"https://github.com/kubernetes/kubernetes/pull/20020.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/20020.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20020","number":20020,"state":"open","locked":false,"title":"kubelet: Update engine version parsing to handle semantic versioning","user":{"login":"krobertson","id":1809,"avatar_url":"https://avatars.githubusercontent.com/u/1809?v=3","gravatar_id":"","url":"https://api.github.com/users/krobertson","html_url":"https://github.com/krobertson","followers_url":"https://api.github.com/users/krobertson/followers","following_url":"https://api.github.com/users/krobertson/following{/other_user}","gists_url":"https://api.github.com/users/krobertson/gists{/gist_id}","starred_url":"https://api.github.com/users/krobertson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krobertson/subscriptions","organizations_url":"https://api.github.com/users/krobertson/orgs","repos_url":"https://api.github.com/users/krobertson/repos","events_url":"https://api.github.com/users/krobertson/events{/privacy}","received_events_url":"https://api.github.com/users/krobertson/received_events","type":"User","site_admin":false},"body":"This updates the dockertools.dockerVersion to use a semantic versioning\r\nlibrary to more gracefully support engine versions which include\r\nadditional version fields.\r\n\r\nPreviously, go-dockerclient's APIVersion struct was use which only\r\nhandles plain numeric x.y.z version strings. With #19675, the library\r\nwas now used on the Docker engine string, however it is possible for the\r\nengine string to include include additional information for beta, rc, or\r\ndistro specific builds.\r\n\r\nThis PR also enables the TestDockerRuntimeVersion test which was\r\npreviously just a FIXME and updates it to pass, and be used to test the\r\nversion string that cause #20005.\r\n\r\nThis negates the need for fsouza/go-dockerclient#451, since even with\r\nthat change, if a user was running Docker 1.10.0-rc1, this would cause\r\nthe kubelet to report it as simply 1.10.0.","created_at":"2016-01-22T21:20:12Z","updated_at":"2016-01-22T22:24:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"973ac2adf6de16b049b23fffc444ed2f194f4a74","assignee":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20020/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20020/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20020/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/fff8a7c371dfe2eec98f0f7c51372c4eb2c04635","head":{"label":"apcera:cleanup-docker-engine-check","ref":"cleanup-docker-engine-check","sha":"fff8a7c371dfe2eec98f0f7c51372c4eb2c04635","user":{"login":"apcera","id":1637964,"avatar_url":"https://avatars.githubusercontent.com/u/1637964?v=3","gravatar_id":"","url":"https://api.github.com/users/apcera","html_url":"https://github.com/apcera","followers_url":"https://api.github.com/users/apcera/followers","following_url":"https://api.github.com/users/apcera/following{/other_user}","gists_url":"https://api.github.com/users/apcera/gists{/gist_id}","starred_url":"https://api.github.com/users/apcera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apcera/subscriptions","organizations_url":"https://api.github.com/users/apcera/orgs","repos_url":"https://api.github.com/users/apcera/repos","events_url":"https://api.github.com/users/apcera/events{/privacy}","received_events_url":"https://api.github.com/users/apcera/received_events","type":"Organization","site_admin":false},"repo":{"id":49239207,"name":"kubernetes","full_name":"apcera/kubernetes","owner":{"login":"apcera","id":1637964,"avatar_url":"https://avatars.githubusercontent.com/u/1637964?v=3","gravatar_id":"","url":"https://api.github.com/users/apcera","html_url":"https://github.com/apcera","followers_url":"https://api.github.com/users/apcera/followers","following_url":"https://api.github.com/users/apcera/following{/other_user}","gists_url":"https://api.github.com/users/apcera/gists{/gist_id}","starred_url":"https://api.github.com/users/apcera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apcera/subscriptions","organizations_url":"https://api.github.com/users/apcera/orgs","repos_url":"https://api.github.com/users/apcera/repos","events_url":"https://api.github.com/users/apcera/events{/privacy}","received_events_url":"https://api.github.com/users/apcera/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apcera/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/apcera/kubernetes","forks_url":"https://api.github.com/repos/apcera/kubernetes/forks","keys_url":"https://api.github.com/repos/apcera/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apcera/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apcera/kubernetes/teams","hooks_url":"https://api.github.com/repos/apcera/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/apcera/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/apcera/kubernetes/events","assignees_url":"https://api.github.com/repos/apcera/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/apcera/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/apcera/kubernetes/tags","blobs_url":"https://api.github.com/repos/apcera/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apcera/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apcera/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/apcera/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apcera/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/apcera/kubernetes/languages","stargazers_url":"https://api.github.com/repos/apcera/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/apcera/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/apcera/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/apcera/kubernetes/subscription","commits_url":"https://api.github.com/repos/apcera/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/apcera/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/apcera/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/apcera/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/apcera/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/apcera/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apcera/kubernetes/merges","archive_url":"https://api.github.com/repos/apcera/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apcera/kubernetes/downloads","issues_url":"https://api.github.com/repos/apcera/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/apcera/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/apcera/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/apcera/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apcera/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/apcera/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/apcera/kubernetes/deployments","created_at":"2016-01-08T00:25:16Z","updated_at":"2016-01-12T00:08:37Z","pushed_at":"2016-01-22T21:19:25Z","git_url":"git://github.com/apcera/kubernetes.git","ssh_url":"git@github.com:apcera/kubernetes.git","clone_url":"https://github.com/apcera/kubernetes.git","svn_url":"https://github.com/apcera/kubernetes","homepage":"http://kubernetes.io","size":153205,"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":"kubernetes:master","ref":"master","sha":"0b00928c74e9236b102eb34ac50ef0690c31d9fe","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","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://avatars.githubusercontent.com/u/13629408?v=3","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":"Container Cluster Manager from Google","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":"2016-01-22T21:25:22Z","pushed_at":"2016-01-22T22:21:42Z","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":308357,"stargazers_count":12293,"watchers_count":12293,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3462,"mirror_url":null,"open_issues_count":2828,"forks":3462,"open_issues":2828,"watchers":12293,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20020"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/20020"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/20020"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/20020/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20020/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20020/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/fff8a7c371dfe2eec98f0f7c51372c4eb2c04635"}}}}