{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/43569432","id":43569432,"diff_hunk":"@@ -107,3 +127,79 @@ func BenchmarkReplicationControllerConversion(b *testing.B) {\n \t\tb.Fatalf(\"Incorrect conversion: expected %v, got %v\", replicationController, *result)\n \t}\n }\n+\n+// TestSelectableFieldLabelConversions verifies that each resource have field\n+// label conversion defined for each its selectable field.\n+func TestSelectableFieldLabelConversions(t *testing.T) {\n+\tkindFields := []struct {\n+\t\tapiVersion      string\n+\t\tkind            string\n+\t\tnamespaceScoped bool\n+\t\tfields          labels.Set\n+\t\t// labelMap maps deprecated labels to their canonical names\n+\t\tlabelMap map[string]string\n+\t}{\n+\t\t{testapi.Default.Version(), \"LimitRange\", true, labels.Set(limitrange.LimitRangeToSelectableFields(&api.LimitRange{})), nil},\n+\t\t{testapi.Default.Version(), \"Namespace\", false, namespace.NamespaceToSelectableFields(&api.Namespace{}), map[string]string{\"name\": \"metadata.name\"}},\n+\t\t{testapi.Default.Version(), \"Node\", false, labels.Set(node.NodeToSelectableFields(&api.Node{})), nil},\n+\t\t{testapi.Default.Version(), \"PersistentVolume\", false, persistentvolume.PersistentVolumeToSelectableFields(&api.PersistentVolume{}), map[string]string{\"name\": \"metadata.name\"}},\n+\t\t{testapi.Default.Version(), \"PersistentVolumeClaim\", true, persistentvolumeclaim.PersistentVolumeClaimToSelectableFields(&api.PersistentVolumeClaim{}), map[string]string{\"name\": \"metadata.name\"}},\n+\t\t{testapi.Default.Version(), \"Pod\", true, labels.Set(pod.PodToSelectableFields(&api.Pod{})), nil},\n+\t\t{testapi.Default.Version(), \"PodTemplate\", true, labels.Set(podtemplate.PodTemplateToSelectableFields(&api.PodTemplate{})), nil},\n+\t\t{testapi.Default.Version(), \"ReplicationController\", true, labels.Set(controller.ControllerToSelectableFields(&api.ReplicationController{})), nil},\n+\t\t{testapi.Default.Version(), \"ResourceQuota\", true, resourcequota.ResourceQuotaToSelectableFields(&api.ResourceQuota{}), nil},\n+\t\t{testapi.Default.Version(), \"Secret\", true, secret.SelectableFields(&api.Secret{}), nil},\n+\t\t{testapi.Default.Version(), \"ServiceAccount\", true, serviceaccount.SelectableFields(&api.ServiceAccount{}), nil},\n+\n+\t\t{testapi.Extensions.Version(), \"Autoscaler\", true, labels.Set(horizontalpodautoscaler.AutoscalerToSelectableFields(&extensions.HorizontalPodAutoscaler{})), nil},\n+\t\t{testapi.Extensions.Version(), \"DaemonSet\", true, labels.Set(daemonset.DaemonSetToSelectableFields(&extensions.DaemonSet{})), nil},\n+\t\t{testapi.Extensions.Version(), \"Deployment\", true, labels.Set(deployment.DeploymentToSelectableFields(&extensions.Deployment{})), nil},\n+\t\t{testapi.Extensions.Version(), \"Ingress\", true, labels.Set(ingress.IngressToSelectableFields(&extensions.Ingress{})), nil},\n+\t\t{testapi.Extensions.Version(), \"Job\", true, labels.Set(job.JobToSelectableFields(&extensions.Job{})), nil},\n+\t\t{testapi.Extensions.Version(), \"ThirdPartyResource\", true, thirdpartyresource.SelectableFields(&extensions.ThirdPartyResource{}), nil},\n+\t\t{testapi.Extensions.Version(), \"ThirdPartyResourceData\", true, thirdpartyresourcedata.SelectableFields(&extensions.ThirdPartyResourceData{}), nil},\n+\t}","path":"pkg/api/conversion_test.go","position":62,"original_position":62,"commit_id":"8507f4aaeb0702b2c2306bb0d0e49f6807a58fd7","original_commit_id":"8507f4aaeb0702b2c2306bb0d0e49f6807a58fd7","user":{"login":"feihujiang","id":2322270,"avatar_url":"https://avatars.githubusercontent.com/u/2322270?v=3","gravatar_id":"","url":"https://api.github.com/users/feihujiang","html_url":"https://github.com/feihujiang","followers_url":"https://api.github.com/users/feihujiang/followers","following_url":"https://api.github.com/users/feihujiang/following{/other_user}","gists_url":"https://api.github.com/users/feihujiang/gists{/gist_id}","starred_url":"https://api.github.com/users/feihujiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feihujiang/subscriptions","organizations_url":"https://api.github.com/users/feihujiang/orgs","repos_url":"https://api.github.com/users/feihujiang/repos","events_url":"https://api.github.com/users/feihujiang/events{/privacy}","received_events_url":"https://api.github.com/users/feihujiang/received_events","type":"User","site_admin":false},"body":"No Endpoints and Event test?","created_at":"2015-10-31T08:01:17Z","updated_at":"2015-10-31T08:01:17Z","html_url":"https://github.com/kubernetes/kubernetes/pull/16509#discussion_r43569432","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16509","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/43569432"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/16509#discussion_r43569432"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16509"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16509","id":49166116,"html_url":"https://github.com/kubernetes/kubernetes/pull/16509","diff_url":"https://github.com/kubernetes/kubernetes/pull/16509.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/16509.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/16509","number":16509,"state":"open","locked":false,"title":"Add missing field label conversions for Namespace","user":{"login":"miminar","id":1478803,"avatar_url":"https://avatars.githubusercontent.com/u/1478803?v=3","gravatar_id":"","url":"https://api.github.com/users/miminar","html_url":"https://github.com/miminar","followers_url":"https://api.github.com/users/miminar/followers","following_url":"https://api.github.com/users/miminar/following{/other_user}","gists_url":"https://api.github.com/users/miminar/gists{/gist_id}","starred_url":"https://api.github.com/users/miminar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miminar/subscriptions","organizations_url":"https://api.github.com/users/miminar/orgs","repos_url":"https://api.github.com/users/miminar/repos","events_url":"https://api.github.com/users/miminar/events{/privacy}","received_events_url":"https://api.github.com/users/miminar/received_events","type":"User","site_admin":false},"body":"Missing field labels in conversion functions:\r\n- \"name\"\r\n- \"metadata.name\"\r\n- \"metadata.namespace\"\r\n\r\nResolves #16501\r\nFollow-up to #15766","created_at":"2015-10-29T16:41:01Z","updated_at":"2015-10-31T08:01:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e884829e4ebbc5bf7db30f3270376a9cd9af22b0","assignee":{"login":"eparis","id":8093535,"avatar_url":"https://avatars.githubusercontent.com/u/8093535?v=3","gravatar_id":"","url":"https://api.github.com/users/eparis","html_url":"https://github.com/eparis","followers_url":"https://api.github.com/users/eparis/followers","following_url":"https://api.github.com/users/eparis/following{/other_user}","gists_url":"https://api.github.com/users/eparis/gists{/gist_id}","starred_url":"https://api.github.com/users/eparis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eparis/subscriptions","organizations_url":"https://api.github.com/users/eparis/orgs","repos_url":"https://api.github.com/users/eparis/repos","events_url":"https://api.github.com/users/eparis/events{/privacy}","received_events_url":"https://api.github.com/users/eparis/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16509/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16509/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/16509/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/8507f4aaeb0702b2c2306bb0d0e49f6807a58fd7","head":{"label":"miminar:namespace_field_conv","ref":"namespace_field_conv","sha":"8507f4aaeb0702b2c2306bb0d0e49f6807a58fd7","user":{"login":"miminar","id":1478803,"avatar_url":"https://avatars.githubusercontent.com/u/1478803?v=3","gravatar_id":"","url":"https://api.github.com/users/miminar","html_url":"https://github.com/miminar","followers_url":"https://api.github.com/users/miminar/followers","following_url":"https://api.github.com/users/miminar/following{/other_user}","gists_url":"https://api.github.com/users/miminar/gists{/gist_id}","starred_url":"https://api.github.com/users/miminar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miminar/subscriptions","organizations_url":"https://api.github.com/users/miminar/orgs","repos_url":"https://api.github.com/users/miminar/repos","events_url":"https://api.github.com/users/miminar/events{/privacy}","received_events_url":"https://api.github.com/users/miminar/received_events","type":"User","site_admin":false},"repo":{"id":45193677,"name":"kubernetes","full_name":"miminar/kubernetes","owner":{"login":"miminar","id":1478803,"avatar_url":"https://avatars.githubusercontent.com/u/1478803?v=3","gravatar_id":"","url":"https://api.github.com/users/miminar","html_url":"https://github.com/miminar","followers_url":"https://api.github.com/users/miminar/followers","following_url":"https://api.github.com/users/miminar/following{/other_user}","gists_url":"https://api.github.com/users/miminar/gists{/gist_id}","starred_url":"https://api.github.com/users/miminar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miminar/subscriptions","organizations_url":"https://api.github.com/users/miminar/orgs","repos_url":"https://api.github.com/users/miminar/repos","events_url":"https://api.github.com/users/miminar/events{/privacy}","received_events_url":"https://api.github.com/users/miminar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/miminar/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/miminar/kubernetes","forks_url":"https://api.github.com/repos/miminar/kubernetes/forks","keys_url":"https://api.github.com/repos/miminar/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/miminar/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/miminar/kubernetes/teams","hooks_url":"https://api.github.com/repos/miminar/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/miminar/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/miminar/kubernetes/events","assignees_url":"https://api.github.com/repos/miminar/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/miminar/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/miminar/kubernetes/tags","blobs_url":"https://api.github.com/repos/miminar/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/miminar/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/miminar/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/miminar/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/miminar/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/miminar/kubernetes/languages","stargazers_url":"https://api.github.com/repos/miminar/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/miminar/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/miminar/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/miminar/kubernetes/subscription","commits_url":"https://api.github.com/repos/miminar/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/miminar/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/miminar/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/miminar/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/miminar/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/miminar/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/miminar/kubernetes/merges","archive_url":"https://api.github.com/repos/miminar/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/miminar/kubernetes/downloads","issues_url":"https://api.github.com/repos/miminar/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/miminar/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/miminar/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/miminar/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/miminar/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/miminar/kubernetes/releases{/id}","created_at":"2015-10-29T15:50:52Z","updated_at":"2015-10-29T15:51:10Z","pushed_at":"2015-10-30T16:52:56Z","git_url":"git://github.com/miminar/kubernetes.git","ssh_url":"git@github.com:miminar/kubernetes.git","clone_url":"https://github.com/miminar/kubernetes.git","svn_url":"https://github.com/miminar/kubernetes","homepage":"http://kubernetes.io","size":132696,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"887b9dd78a594b5d7695cd81a9f2638eb05b40bc","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}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-10-31T06:23:13Z","pushed_at":"2015-10-31T07:38:39Z","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":524627,"stargazers_count":10971,"watchers_count":10971,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2824,"mirror_url":null,"open_issues_count":2119,"forks":2824,"open_issues":2119,"watchers":10971,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16509"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/16509"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/16509"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/16509/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16509/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16509/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/8507f4aaeb0702b2c2306bb0d0e49f6807a58fd7"}}}}