{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/52621357","id":52621357,"diff_hunk":"@@ -114,22 +114,24 @@ func IsEnabledVersion(v unversioned.GroupVersion) bool {\n \treturn found\n }\n \n-// EnabledVersions returns all enabled versions.\n-func EnabledVersions() (ret []unversioned.GroupVersion) {\n-\tfor v := range enabledVersions {\n-\t\tret = append(ret, v)\n+// EnabledVersions returns all enabled versions.  Groups are randomly ordered, but versions within groups\n+// are priority order from best to worst\n+func EnabledVersions() []unversioned.GroupVersion {\n+\tret := []unversioned.GroupVersion{}\n+\tfor _, groupMeta := range groupMetaMap {\n+\t\tret = append(ret, groupMeta.GroupVersions...)","path":"pkg/apimachinery/registered/registered.go","position":13,"original_position":13,"commit_id":"085ae94abcf501040c0306e86ffa486c9cfd70dc","original_commit_id":"9e5de9097b9bf7050bdb5974b4420cc5e7c1bcd1","user":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"body":"> Hrm, ok, so this is a behavior change for ordering, I think after discussion we said this might break rest mapper because it relies on extensions/v1beta1.pods to come after v1.pods\r\n\r\nThat discussion was related to a different pull where I explicitly called out the change in the description: https://github.com/kubernetes/kubernetes/pull/20829  This has never had an ordering guarantee before.","created_at":"2016-02-11T16:01:06Z","updated_at":"2016-02-11T16:01:06Z","html_url":"https://github.com/kubernetes/kubernetes/pull/20846#discussion_r52621357","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20846","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/52621357"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/20846#discussion_r52621357"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20846"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20846","id":58661844,"html_url":"https://github.com/kubernetes/kubernetes/pull/20846","diff_url":"https://github.com/kubernetes/kubernetes/pull/20846.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/20846.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20846","number":20846,"state":"open","locked":false,"title":"fix group mapping and encoding order","user":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"body":"This makes the order of `EnabledVersions` predictable and then makes use of that order for the `JSONEncoder` method to give a stable and proper ordering.\r\n\r\nWithout this, `edit` breaks on multiple versions.","created_at":"2016-02-08T20:23:23Z","updated_at":"2016-02-11T16:01:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96654908dc1f716de3df37afa1c52e655482e57e","assignee":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20846/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20846/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20846/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/085ae94abcf501040c0306e86ffa486c9cfd70dc","head":{"label":"deads2k:fix-groupmapping-order","ref":"fix-groupmapping-order","sha":"085ae94abcf501040c0306e86ffa486c9cfd70dc","user":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"repo":{"id":24939417,"name":"kubernetes","full_name":"deads2k/kubernetes","owner":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/deads2k/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/deads2k/kubernetes","forks_url":"https://api.github.com/repos/deads2k/kubernetes/forks","keys_url":"https://api.github.com/repos/deads2k/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deads2k/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deads2k/kubernetes/teams","hooks_url":"https://api.github.com/repos/deads2k/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/deads2k/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/deads2k/kubernetes/events","assignees_url":"https://api.github.com/repos/deads2k/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/deads2k/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/deads2k/kubernetes/tags","blobs_url":"https://api.github.com/repos/deads2k/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deads2k/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deads2k/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/deads2k/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deads2k/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/deads2k/kubernetes/languages","stargazers_url":"https://api.github.com/repos/deads2k/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/deads2k/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/deads2k/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/deads2k/kubernetes/subscription","commits_url":"https://api.github.com/repos/deads2k/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/deads2k/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/deads2k/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/deads2k/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/deads2k/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/deads2k/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deads2k/kubernetes/merges","archive_url":"https://api.github.com/repos/deads2k/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deads2k/kubernetes/downloads","issues_url":"https://api.github.com/repos/deads2k/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/deads2k/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/deads2k/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/deads2k/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deads2k/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/deads2k/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/deads2k/kubernetes/deployments","created_at":"2014-10-08T12:24:01Z","updated_at":"2016-01-11T16:12:51Z","pushed_at":"2016-02-10T18:50:49Z","git_url":"git://github.com/deads2k/kubernetes.git","ssh_url":"git@github.com:deads2k/kubernetes.git","clone_url":"https://github.com/deads2k/kubernetes.git","svn_url":"https://github.com/deads2k/kubernetes","homepage":null,"size":160799,"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":"a6a0392b03810513058f953b764ff9d98bdc48ce","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-02-11T14:43:24Z","pushed_at":"2016-02-11T15:44:33Z","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":323030,"stargazers_count":12615,"watchers_count":12615,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3591,"mirror_url":null,"open_issues_count":2842,"forks":3591,"open_issues":2842,"watchers":12615,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20846"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/20846"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/20846"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/20846/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20846/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20846/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/085ae94abcf501040c0306e86ffa486c9cfd70dc"}}}}