{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/88649691","pull_request_review_id":9217620,"id":88649691,"diff_hunk":"@@ -100,23 +117,42 @@ func (m *ThirdPartyResourceServer) HasThirdPartyResource(rsrc *extensions.ThirdP\n \tpath := extensionsrest.MakeThirdPartyPath(group)\n \tm.thirdPartyResourcesLock.Lock()\n \tdefer m.thirdPartyResourcesLock.Unlock()\n-\tentry := m.thirdPartyResources[path]\n-\tif entry == nil {\n+\ttpg := m.thirdPartyResources[path]\n+\tif tpg == nil {\n \t\treturn false, nil\n \t}\n \tplural, _ := meta.KindToResource(unversioned.GroupVersionKind{\n \t\tGroup:   group,\n \t\tVersion: rsrc.Versions[0].Name,\n \t\tKind:    kind,\n \t})\n-\t_, found := entry.storage[plural.Resource]\n-\treturn found, nil\n+\tfor _, version := range rsrc.Versions {\n+\t\tentry, _ := tpg.versionedEntry[version.Name]\n+\t\tif entry == nil {\n+\t\t\treturn false, nil\n+\t\t}\n+\t\t_, found := entry.storage[plural.Resource]\n+\t\tif !found {\n+\t\t\treturn false, nil\n+\t\t}\n+\t}\n+\treturn true, nil\n }\n \n func (m *ThirdPartyResourceServer) removeThirdPartyStorage(path, resource string) error {","path":"pkg/master/thirdparty/thirdparty.go","position":98,"original_position":98,"commit_id":"ccb1fb49d5d163020a8de1ad259b78870fa7a2c7","original_commit_id":"ccb1fb49d5d163020a8de1ad259b78870fa7a2c7","user":{"login":"liggitt","id":980082,"avatar_url":"https://avatars.githubusercontent.com/u/980082?v=3","gravatar_id":"","url":"https://api.github.com/users/liggitt","html_url":"https://github.com/liggitt","followers_url":"https://api.github.com/users/liggitt/followers","following_url":"https://api.github.com/users/liggitt/following{/other_user}","gists_url":"https://api.github.com/users/liggitt/gists{/gist_id}","starred_url":"https://api.github.com/users/liggitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liggitt/subscriptions","organizations_url":"https://api.github.com/users/liggitt/orgs","repos_url":"https://api.github.com/users/liggitt/repos","events_url":"https://api.github.com/users/liggitt/events{/privacy}","received_events_url":"https://api.github.com/users/liggitt/received_events","type":"User","site_admin":false},"body":"Can we change the signature so we get the info we need without string parsing?","created_at":"2016-11-18T12:37:36Z","updated_at":"2016-11-18T12:37:36Z","html_url":"https://github.com/kubernetes/kubernetes/pull/36977#discussion_r88649691","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/36977","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/88649691"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/36977#discussion_r88649691"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/36977"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/36977","id":94107746,"html_url":"https://github.com/kubernetes/kubernetes/pull/36977","diff_url":"https://github.com/kubernetes/kubernetes/pull/36977.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/36977.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/36977","number":36977,"state":"open","locked":false,"title":"thirdpartyresource add multiple version support","user":{"login":"AdoHe","id":1555564,"avatar_url":"https://avatars.githubusercontent.com/u/1555564?v=3","gravatar_id":"","url":"https://api.github.com/users/AdoHe","html_url":"https://github.com/AdoHe","followers_url":"https://api.github.com/users/AdoHe/followers","following_url":"https://api.github.com/users/AdoHe/following{/other_user}","gists_url":"https://api.github.com/users/AdoHe/gists{/gist_id}","starred_url":"https://api.github.com/users/AdoHe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdoHe/subscriptions","organizations_url":"https://api.github.com/users/AdoHe/orgs","repos_url":"https://api.github.com/users/AdoHe/repos","events_url":"https://api.github.com/users/AdoHe/events{/privacy}","received_events_url":"https://api.github.com/users/AdoHe/received_events","type":"User","site_admin":false},"body":"\n\n<!-- Reviewable:start -->\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/36977)\n<!-- Reviewable:end -->\n","created_at":"2016-11-17T06:08:50Z","updated_at":"2016-11-18T12:39:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ace70ac354d770afbf7b0889d74d3c6b1b8b7546","assignee":{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars.githubusercontent.com/u/1163175?v=3","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false},"assignees":[{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars.githubusercontent.com/u/1163175?v=3","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/36977/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/36977/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/36977/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/ccb1fb49d5d163020a8de1ad259b78870fa7a2c7","head":{"label":"AdoHe:tpr","ref":"tpr","sha":"ccb1fb49d5d163020a8de1ad259b78870fa7a2c7","user":{"login":"AdoHe","id":1555564,"avatar_url":"https://avatars.githubusercontent.com/u/1555564?v=3","gravatar_id":"","url":"https://api.github.com/users/AdoHe","html_url":"https://github.com/AdoHe","followers_url":"https://api.github.com/users/AdoHe/followers","following_url":"https://api.github.com/users/AdoHe/following{/other_user}","gists_url":"https://api.github.com/users/AdoHe/gists{/gist_id}","starred_url":"https://api.github.com/users/AdoHe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdoHe/subscriptions","organizations_url":"https://api.github.com/users/AdoHe/orgs","repos_url":"https://api.github.com/users/AdoHe/repos","events_url":"https://api.github.com/users/AdoHe/events{/privacy}","received_events_url":"https://api.github.com/users/AdoHe/received_events","type":"User","site_admin":false},"repo":{"id":49691929,"name":"kubernetes","full_name":"AdoHe/kubernetes","owner":{"login":"AdoHe","id":1555564,"avatar_url":"https://avatars.githubusercontent.com/u/1555564?v=3","gravatar_id":"","url":"https://api.github.com/users/AdoHe","html_url":"https://github.com/AdoHe","followers_url":"https://api.github.com/users/AdoHe/followers","following_url":"https://api.github.com/users/AdoHe/following{/other_user}","gists_url":"https://api.github.com/users/AdoHe/gists{/gist_id}","starred_url":"https://api.github.com/users/AdoHe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdoHe/subscriptions","organizations_url":"https://api.github.com/users/AdoHe/orgs","repos_url":"https://api.github.com/users/AdoHe/repos","events_url":"https://api.github.com/users/AdoHe/events{/privacy}","received_events_url":"https://api.github.com/users/AdoHe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AdoHe/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/AdoHe/kubernetes","forks_url":"https://api.github.com/repos/AdoHe/kubernetes/forks","keys_url":"https://api.github.com/repos/AdoHe/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AdoHe/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AdoHe/kubernetes/teams","hooks_url":"https://api.github.com/repos/AdoHe/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/AdoHe/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/AdoHe/kubernetes/events","assignees_url":"https://api.github.com/repos/AdoHe/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/AdoHe/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/AdoHe/kubernetes/tags","blobs_url":"https://api.github.com/repos/AdoHe/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AdoHe/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AdoHe/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/AdoHe/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AdoHe/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/AdoHe/kubernetes/languages","stargazers_url":"https://api.github.com/repos/AdoHe/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/AdoHe/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/AdoHe/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/AdoHe/kubernetes/subscription","commits_url":"https://api.github.com/repos/AdoHe/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/AdoHe/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/AdoHe/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/AdoHe/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/AdoHe/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/AdoHe/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AdoHe/kubernetes/merges","archive_url":"https://api.github.com/repos/AdoHe/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AdoHe/kubernetes/downloads","issues_url":"https://api.github.com/repos/AdoHe/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/AdoHe/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/AdoHe/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/AdoHe/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AdoHe/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/AdoHe/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/AdoHe/kubernetes/deployments","created_at":"2016-01-15T02:46:21Z","updated_at":"2016-01-15T02:46:31Z","pushed_at":"2016-11-18T12:00:11Z","git_url":"git://github.com/AdoHe/kubernetes.git","ssh_url":"git@github.com:AdoHe/kubernetes.git","clone_url":"https://github.com/AdoHe/kubernetes.git","svn_url":"https://github.com/AdoHe/kubernetes","homepage":"http://kubernetes.io","size":350864,"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":"3932d127e5a1db3e0d77a72c21c36948e6a31e92","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":"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":"2016-11-18T11:08:38Z","pushed_at":"2016-11-18T12:38:44Z","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":632881,"stargazers_count":18492,"watchers_count":18492,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6099,"mirror_url":null,"open_issues_count":5250,"forks":6099,"open_issues":5250,"watchers":18492,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/36977"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/36977"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/36977"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/36977/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/36977/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/36977/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/ccb1fb49d5d163020a8de1ad259b78870fa7a2c7"}}}}
{"actor":{"display_login":"liggitt"}}