{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/190517808","pull_request_review_id":122908235,"id":190517808,"diff_hunk":"@@ -42,30 +42,7 @@ import (\n )\n \n func instantiateCustomResource(t *testing.T, instanceToCreate *unstructured.Unstructured, client dynamic.ResourceInterface, definition *apiextensionsv1beta1.CustomResourceDefinition) (*unstructured.Unstructured, error) {\n-\tcreatedInstance, err := client.Create(instanceToCreate)\n-\tif err != nil {\n-\t\tt.Logf(\"%#v\", createdInstance)\n-\t\treturn nil, err\n-\t}\n-\tcreatedObjectMeta, err := meta.Accessor(createdInstance)\n-\tif err != nil {\n-\t\tt.Fatal(err)\n-\t}\n-\t// it should have a UUID\n-\tif len(createdObjectMeta.GetUID()) == 0 {\n-\t\tt.Errorf(\"missing uuid: %#v\", createdInstance)\n-\t}\n-\tcreatedTypeMeta, err := meta.TypeAccessor(createdInstance)\n-\tif err != nil {\n-\t\tt.Fatal(err)\n-\t}\n-\tif e, a := definition.Spec.Group+\"/\"+definition.Spec.Version, createdTypeMeta.GetAPIVersion(); e != a {\n-\t\tt.Errorf(\"expected %v, got %v\", e, a)\n-\t}\n-\tif e, a := definition.Spec.Names.Kind, createdTypeMeta.GetKind(); e != a {\n-\t\tt.Errorf(\"expected %v, got %v\", e, a)\n-\t}\n-\treturn createdInstance, nil\n+\treturn instantiateVersionedCustomResource(t, instanceToCreate, client, definition, definition.Spec.Versions[0].Name)","path":"staging/src/k8s.io/apiextensions-apiserver/test/integration/registration_test.go","position":28,"original_position":28,"commit_id":"b22b3dca9cd5875e2cafdc41e70e325f7c80f20a","original_commit_id":"b22b3dca9cd5875e2cafdc41e70e325f7c80f20a","user":{"login":"sttts","id":730123,"avatar_url":"https://avatars0.githubusercontent.com/u/730123?v=4","gravatar_id":"","url":"https://api.github.com/users/sttts","html_url":"https://github.com/sttts","followers_url":"https://api.github.com/users/sttts/followers","following_url":"https://api.github.com/users/sttts/following{/other_user}","gists_url":"https://api.github.com/users/sttts/gists{/gist_id}","starred_url":"https://api.github.com/users/sttts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sttts/subscriptions","organizations_url":"https://api.github.com/users/sttts/orgs","repos_url":"https://api.github.com/users/sttts/repos","events_url":"https://api.github.com/users/sttts/events{/privacy}","received_events_url":"https://api.github.com/users/sttts/received_events","type":"User","site_admin":false},"body":"Leaving it as it is for now. Cannot come up with a less ugly variant.","created_at":"2018-05-24T09:18:50Z","updated_at":"2018-05-24T09:18:50Z","html_url":"https://github.com/kubernetes/kubernetes/pull/64204#discussion_r190517808","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/64204","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/190517808"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/64204#discussion_r190517808"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/64204"}},"in_reply_to_id":190428245},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/64204","id":190001034,"html_url":"https://github.com/kubernetes/kubernetes/pull/64204","diff_url":"https://github.com/kubernetes/kubernetes/pull/64204.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/64204.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/64204","number":64204,"state":"open","locked":false,"title":"apiextensions: unify mono- and multi-versioned test helpers","user":{"login":"sttts","id":730123,"avatar_url":"https://avatars0.githubusercontent.com/u/730123?v=4","gravatar_id":"","url":"https://api.github.com/users/sttts","html_url":"https://github.com/sttts","followers_url":"https://api.github.com/users/sttts/followers","following_url":"https://api.github.com/users/sttts/following{/other_user}","gists_url":"https://api.github.com/users/sttts/gists{/gist_id}","starred_url":"https://api.github.com/users/sttts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sttts/subscriptions","organizations_url":"https://api.github.com/users/sttts/orgs","repos_url":"https://api.github.com/users/sttts/repos","events_url":"https://api.github.com/users/sttts/events{/privacy}","received_events_url":"https://api.github.com/users/sttts/received_events","type":"User","site_admin":false},"body":"The mono-versioned helpers are a special case of the multi-versioned ones.\r\n\r\nFixes part of https://github.com/kubernetes/kubernetes/issues/64136.","created_at":"2018-05-23T14:43:37Z","updated_at":"2018-05-24T09:18:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c2c6ec30e3dede8812f4c63d161b2cd1d1ba038a","assignee":{"login":"mbohlool","id":1613024,"avatar_url":"https://avatars3.githubusercontent.com/u/1613024?v=4","gravatar_id":"","url":"https://api.github.com/users/mbohlool","html_url":"https://github.com/mbohlool","followers_url":"https://api.github.com/users/mbohlool/followers","following_url":"https://api.github.com/users/mbohlool/following{/other_user}","gists_url":"https://api.github.com/users/mbohlool/gists{/gist_id}","starred_url":"https://api.github.com/users/mbohlool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbohlool/subscriptions","organizations_url":"https://api.github.com/users/mbohlool/orgs","repos_url":"https://api.github.com/users/mbohlool/repos","events_url":"https://api.github.com/users/mbohlool/events{/privacy}","received_events_url":"https://api.github.com/users/mbohlool/received_events","type":"User","site_admin":false},"assignees":[{"login":"mbohlool","id":1613024,"avatar_url":"https://avatars3.githubusercontent.com/u/1613024?v=4","gravatar_id":"","url":"https://api.github.com/users/mbohlool","html_url":"https://github.com/mbohlool","followers_url":"https://api.github.com/users/mbohlool/followers","following_url":"https://api.github.com/users/mbohlool/following{/other_user}","gists_url":"https://api.github.com/users/mbohlool/gists{/gist_id}","starred_url":"https://api.github.com/users/mbohlool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbohlool/subscriptions","organizations_url":"https://api.github.com/users/mbohlool/orgs","repos_url":"https://api.github.com/users/mbohlool/repos","events_url":"https://api.github.com/users/mbohlool/events{/privacy}","received_events_url":"https://api.github.com/users/mbohlool/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"mikedanese","id":1787169,"avatar_url":"https://avatars3.githubusercontent.com/u/1787169?v=4","gravatar_id":"","url":"https://api.github.com/users/mikedanese","html_url":"https://github.com/mikedanese","followers_url":"https://api.github.com/users/mikedanese/followers","following_url":"https://api.github.com/users/mikedanese/following{/other_user}","gists_url":"https://api.github.com/users/mikedanese/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedanese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedanese/subscriptions","organizations_url":"https://api.github.com/users/mikedanese/orgs","repos_url":"https://api.github.com/users/mikedanese/repos","events_url":"https://api.github.com/users/mikedanese/events{/privacy}","received_events_url":"https://api.github.com/users/mikedanese/received_events","type":"User","site_admin":false},{"login":"enisoc","id":6733629,"avatar_url":"https://avatars3.githubusercontent.com/u/6733629?v=4","gravatar_id":"","url":"https://api.github.com/users/enisoc","html_url":"https://github.com/enisoc","followers_url":"https://api.github.com/users/enisoc/followers","following_url":"https://api.github.com/users/enisoc/following{/other_user}","gists_url":"https://api.github.com/users/enisoc/gists{/gist_id}","starred_url":"https://api.github.com/users/enisoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enisoc/subscriptions","organizations_url":"https://api.github.com/users/enisoc/orgs","repos_url":"https://api.github.com/users/enisoc/repos","events_url":"https://api.github.com/users/enisoc/events{/privacy}","received_events_url":"https://api.github.com/users/enisoc/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":414883982,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/approved","name":"approved","color":"0ffa16","default":false},{"id":477397086,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":349530249,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note-none","name":"release-note-none","color":"c2e0c6","default":false},{"id":253451057,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/XL","name":"size/XL","color":"ee5500","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/64204/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/64204/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/64204/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/b22b3dca9cd5875e2cafdc41e70e325f7c80f20a","head":{"label":"sttts:sttts-unify-NewNoxuInstance","ref":"sttts-unify-NewNoxuInstance","sha":"b22b3dca9cd5875e2cafdc41e70e325f7c80f20a","user":{"login":"sttts","id":730123,"avatar_url":"https://avatars0.githubusercontent.com/u/730123?v=4","gravatar_id":"","url":"https://api.github.com/users/sttts","html_url":"https://github.com/sttts","followers_url":"https://api.github.com/users/sttts/followers","following_url":"https://api.github.com/users/sttts/following{/other_user}","gists_url":"https://api.github.com/users/sttts/gists{/gist_id}","starred_url":"https://api.github.com/users/sttts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sttts/subscriptions","organizations_url":"https://api.github.com/users/sttts/orgs","repos_url":"https://api.github.com/users/sttts/repos","events_url":"https://api.github.com/users/sttts/events{/privacy}","received_events_url":"https://api.github.com/users/sttts/received_events","type":"User","site_admin":false},"repo":{"id":36099048,"name":"kubernetes","full_name":"sttts/kubernetes","owner":{"login":"sttts","id":730123,"avatar_url":"https://avatars0.githubusercontent.com/u/730123?v=4","gravatar_id":"","url":"https://api.github.com/users/sttts","html_url":"https://github.com/sttts","followers_url":"https://api.github.com/users/sttts/followers","following_url":"https://api.github.com/users/sttts/following{/other_user}","gists_url":"https://api.github.com/users/sttts/gists{/gist_id}","starred_url":"https://api.github.com/users/sttts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sttts/subscriptions","organizations_url":"https://api.github.com/users/sttts/orgs","repos_url":"https://api.github.com/users/sttts/repos","events_url":"https://api.github.com/users/sttts/events{/privacy}","received_events_url":"https://api.github.com/users/sttts/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sttts/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/sttts/kubernetes","forks_url":"https://api.github.com/repos/sttts/kubernetes/forks","keys_url":"https://api.github.com/repos/sttts/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sttts/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sttts/kubernetes/teams","hooks_url":"https://api.github.com/repos/sttts/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/sttts/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/sttts/kubernetes/events","assignees_url":"https://api.github.com/repos/sttts/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/sttts/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/sttts/kubernetes/tags","blobs_url":"https://api.github.com/repos/sttts/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sttts/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sttts/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/sttts/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sttts/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/sttts/kubernetes/languages","stargazers_url":"https://api.github.com/repos/sttts/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/sttts/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/sttts/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/sttts/kubernetes/subscription","commits_url":"https://api.github.com/repos/sttts/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/sttts/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/sttts/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/sttts/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/sttts/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/sttts/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sttts/kubernetes/merges","archive_url":"https://api.github.com/repos/sttts/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sttts/kubernetes/downloads","issues_url":"https://api.github.com/repos/sttts/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/sttts/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/sttts/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/sttts/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sttts/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/sttts/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/sttts/kubernetes/deployments","created_at":"2015-05-22T23:09:55Z","updated_at":"2018-03-01T11:10:46Z","pushed_at":"2018-05-24T09:05:36Z","git_url":"git://github.com/sttts/kubernetes.git","ssh_url":"git@github.com:sttts/kubernetes.git","clone_url":"https://github.com/sttts/kubernetes.git","svn_url":"https://github.com/sttts/kubernetes","homepage":null,"size":621706,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"65a819338a640faf6ddee9d6eea4559a20106c56","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","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://avatars2.githubusercontent.com/u/13629408?v=4","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":"2018-05-24T08:56:01Z","pushed_at":"2018-05-24T09:13:28Z","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":780305,"stargazers_count":36715,"watchers_count":36715,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12908,"mirror_url":null,"archived":false,"open_issues_count":3254,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":12908,"open_issues":3254,"watchers":36715,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/64204"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/64204"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/64204"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/64204/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/64204/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/64204/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/b22b3dca9cd5875e2cafdc41e70e325f7c80f20a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sttts"}}