{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/21694","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/21694/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/21694/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/21694/events","html_url":"https://github.com/kubernetes/kubernetes/pull/21694","id":135498638,"number":21694,"title":"Fix kubectl sort-by metadata issue.","user":{"login":"aveshagarwal","id":3596412,"avatar_url":"https://avatars.githubusercontent.com/u/3596412?v=3","gravatar_id":"","url":"https://api.github.com/users/aveshagarwal","html_url":"https://github.com/aveshagarwal","followers_url":"https://api.github.com/users/aveshagarwal/followers","following_url":"https://api.github.com/users/aveshagarwal/following{/other_user}","gists_url":"https://api.github.com/users/aveshagarwal/gists{/gist_id}","starred_url":"https://api.github.com/users/aveshagarwal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aveshagarwal/subscriptions","organizations_url":"https://api.github.com/users/aveshagarwal/orgs","repos_url":"https://api.github.com/users/aveshagarwal/repos","events_url":"https://api.github.com/users/aveshagarwal/events{/privacy}","received_events_url":"https://api.github.com/users/aveshagarwal/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cla:%20yes","name":"cla: yes","color":"bfe5bf"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/lgtm","name":"lgtm","color":"15dd18"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/ok-to-merge","name":"ok-to-merge","color":"fbca04"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/S","name":"size/S","color":"77bb00"}],"state":"open","locked":false,"assignee":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"milestone":null,"comments":31,"created_at":"2016-02-22T18:19:07Z","updated_at":"2016-03-01T15:49:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/21694","html_url":"https://github.com/kubernetes/kubernetes/pull/21694","diff_url":"https://github.com/kubernetes/kubernetes/pull/21694.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/21694.patch"},"body":"Internal types are not supposed to have json metadata (though in kubernetes\r\nthey do) as it is true with openshift types. That means sort-by must work\r\non versioned objects for sorting, otherwise it produces \"error: metadata\r\nis not found\" error if it sorts internal types without json metadata.\r\n\r\nThis PR converts internal types objects to versioned objects and sort-by\r\nsorts them correctly without medata error, and then it prints\r\ncorresponding internal objects in sorted order."},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/190778966","html_url":"https://github.com/kubernetes/kubernetes/pull/21694#issuecomment-190778966","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/21694","id":190778966,"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},"created_at":"2016-03-01T15:49:26Z","updated_at":"2016-03-01T15:49:26Z","body":"this is obscure enough that it deserves at least one test, I think"}}