{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/perf-tests/pulls/comments/199412773","pull_request_review_id":133521874,"id":199412773,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTQxMjc3Mw==","diff_hunk":"@@ -0,0 +1,148 @@\n+/*\n+Copyright 2018 The Kubernetes Authors.\n+\n+Licensed under the Apache License, Version 2.0 (the \"License\");\n+you may not use this file except in compliance with the License.\n+You may obtain a copy of the License at\n+\n+    http://www.apache.org/licenses/LICENSE-2.0\n+\n+Unless required by applicable law or agreed to in writing, software\n+distributed under the License is distributed on an \"AS IS\" BASIS,\n+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+See the License for the specific language governing permissions and\n+limitations under the License.\n+*/\n+\n+package validation\n+\n+import (\n+\t\"k8s.io/apimachinery/pkg/util/validation/field\"\n+\t\"k8s.io/perf-tests/clusterloader2/api\"\n+)\n+\n+// VerifyConfig does simple validation for config and all included structures.\n+// Returns error is any condition is not satisfied.\n+func VerifyConfig(c *api.Config) field.ErrorList {\n+\tallErrs := field.ErrorList{}\n+\tfldPath := field.NewPath(\".\")\n+\tif c.AutomanagedNamespaces < 0 {\n+\t\tallErrs = append(allErrs, field.Invalid(fldPath, \"automanagedNamespaces\", \"must be non-negative\"))\n+\t}\n+\tfor i, tuningSet := range c.TuningSets {\n+\t\tallErrs = append(allErrs, verifyTuningSet(&tuningSet, fldPath.Child(\"tuningSets\").Index(i))...)\n+\t}\n+\tfor i, step := range c.Steps {\n+\t\tallErrs = append(allErrs, verifyStep(&step, fldPath.Child(\"steps\").Index(i))...)\n+\t}\n+\treturn allErrs\n+}\n+\n+// verifyStep requires to either Phases or Measurements be non-empty,","path":"clusterloader2/api/validation/validation.go","position":41,"original_position":41,"commit_id":"c626ba7eb11a057017851891fa57be2458e1a7d8","original_commit_id":"c626ba7eb11a057017851891fa57be2458e1a7d8","user":{"login":"wojtek-t","id":10743879,"node_id":"MDQ6VXNlcjEwNzQzODc5","avatar_url":"https://avatars3.githubusercontent.com/u/10743879?v=4","gravatar_id":"","url":"https://api.github.com/users/wojtek-t","html_url":"https://github.com/wojtek-t","followers_url":"https://api.github.com/users/wojtek-t/followers","following_url":"https://api.github.com/users/wojtek-t/following{/other_user}","gists_url":"https://api.github.com/users/wojtek-t/gists{/gist_id}","starred_url":"https://api.github.com/users/wojtek-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wojtek-t/subscriptions","organizations_url":"https://api.github.com/users/wojtek-t/orgs","repos_url":"https://api.github.com/users/wojtek-t/repos","events_url":"https://api.github.com/users/wojtek-t/events{/privacy}","received_events_url":"https://api.github.com/users/wojtek-t/received_events","type":"User","site_admin":false},"body":"This is private function and this comment describes what the code does (which is a bad practice if the code is simple enough, which is the case here).\r\n\r\nPlease drop this comment (as well as other such comments for private functions).","created_at":"2018-07-02T08:01:52Z","updated_at":"2018-07-02T08:05:39Z","html_url":"https://github.com/kubernetes/perf-tests/pull/142#discussion_r199412773","pull_request_url":"https://api.github.com/repos/kubernetes/perf-tests/pulls/142","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/perf-tests/pulls/comments/199412773"},"html":{"href":"https://github.com/kubernetes/perf-tests/pull/142#discussion_r199412773"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/perf-tests/pulls/142"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/perf-tests/pulls/142","id":197430861,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3NDMwODYx","html_url":"https://github.com/kubernetes/perf-tests/pull/142","diff_url":"https://github.com/kubernetes/perf-tests/pull/142.diff","patch_url":"https://github.com/kubernetes/perf-tests/pull/142.patch","issue_url":"https://api.github.com/repos/kubernetes/perf-tests/issues/142","number":142,"state":"open","locked":false,"title":"ClusterLoader: Adding api validation","user":{"login":"krzysied","id":25119199,"node_id":"MDQ6VXNlcjI1MTE5MTk5","avatar_url":"https://avatars2.githubusercontent.com/u/25119199?v=4","gravatar_id":"","url":"https://api.github.com/users/krzysied","html_url":"https://github.com/krzysied","followers_url":"https://api.github.com/users/krzysied/followers","following_url":"https://api.github.com/users/krzysied/following{/other_user}","gists_url":"https://api.github.com/users/krzysied/gists{/gist_id}","starred_url":"https://api.github.com/users/krzysied/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzysied/subscriptions","organizations_url":"https://api.github.com/users/krzysied/orgs","repos_url":"https://api.github.com/users/krzysied/repos","events_url":"https://api.github.com/users/krzysied/events{/privacy}","received_events_url":"https://api.github.com/users/krzysied/received_events","type":"User","site_admin":false},"body":"Adding validation for the new clusterloader api structures. Tests included.","created_at":"2018-06-26T13:52:53Z","updated_at":"2018-07-02T08:05:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2a8e87fc488a577a775704c3d01b095c583772ab","assignee":{"login":"wojtek-t","id":10743879,"node_id":"MDQ6VXNlcjEwNzQzODc5","avatar_url":"https://avatars3.githubusercontent.com/u/10743879?v=4","gravatar_id":"","url":"https://api.github.com/users/wojtek-t","html_url":"https://github.com/wojtek-t","followers_url":"https://api.github.com/users/wojtek-t/followers","following_url":"https://api.github.com/users/wojtek-t/following{/other_user}","gists_url":"https://api.github.com/users/wojtek-t/gists{/gist_id}","starred_url":"https://api.github.com/users/wojtek-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wojtek-t/subscriptions","organizations_url":"https://api.github.com/users/wojtek-t/orgs","repos_url":"https://api.github.com/users/wojtek-t/repos","events_url":"https://api.github.com/users/wojtek-t/events{/privacy}","received_events_url":"https://api.github.com/users/wojtek-t/received_events","type":"User","site_admin":false},"assignees":[{"login":"wojtek-t","id":10743879,"node_id":"MDQ6VXNlcjEwNzQzODc5","avatar_url":"https://avatars3.githubusercontent.com/u/10743879?v=4","gravatar_id":"","url":"https://api.github.com/users/wojtek-t","html_url":"https://github.com/wojtek-t","followers_url":"https://api.github.com/users/wojtek-t/followers","following_url":"https://api.github.com/users/wojtek-t/following{/other_user}","gists_url":"https://api.github.com/users/wojtek-t/gists{/gist_id}","starred_url":"https://api.github.com/users/wojtek-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wojtek-t/subscriptions","organizations_url":"https://api.github.com/users/wojtek-t/orgs","repos_url":"https://api.github.com/users/wojtek-t/repos","events_url":"https://api.github.com/users/wojtek-t/events{/privacy}","received_events_url":"https://api.github.com/users/wojtek-t/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"shyamjvs","id":4333971,"node_id":"MDQ6VXNlcjQzMzM5NzE=","avatar_url":"https://avatars3.githubusercontent.com/u/4333971?v=4","gravatar_id":"","url":"https://api.github.com/users/shyamjvs","html_url":"https://github.com/shyamjvs","followers_url":"https://api.github.com/users/shyamjvs/followers","following_url":"https://api.github.com/users/shyamjvs/following{/other_user}","gists_url":"https://api.github.com/users/shyamjvs/gists{/gist_id}","starred_url":"https://api.github.com/users/shyamjvs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shyamjvs/subscriptions","organizations_url":"https://api.github.com/users/shyamjvs/orgs","repos_url":"https://api.github.com/users/shyamjvs/repos","events_url":"https://api.github.com/users/shyamjvs/events{/privacy}","received_events_url":"https://api.github.com/users/shyamjvs/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":492296491,"node_id":"MDU6TGFiZWw0OTIyOTY0OTE=","url":"https://api.github.com/repos/kubernetes/perf-tests/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":764010528,"node_id":"MDU6TGFiZWw3NjQwMTA1Mjg=","url":"https://api.github.com/repos/kubernetes/perf-tests/labels/size/L","name":"size/L","color":"ee9900","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/perf-tests/pulls/142/commits","review_comments_url":"https://api.github.com/repos/kubernetes/perf-tests/pulls/142/comments","review_comment_url":"https://api.github.com/repos/kubernetes/perf-tests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/perf-tests/issues/142/comments","statuses_url":"https://api.github.com/repos/kubernetes/perf-tests/statuses/c626ba7eb11a057017851891fa57be2458e1a7d8","head":{"label":"krzysied:cluster_loader_validation","ref":"cluster_loader_validation","sha":"c626ba7eb11a057017851891fa57be2458e1a7d8","user":{"login":"krzysied","id":25119199,"node_id":"MDQ6VXNlcjI1MTE5MTk5","avatar_url":"https://avatars2.githubusercontent.com/u/25119199?v=4","gravatar_id":"","url":"https://api.github.com/users/krzysied","html_url":"https://github.com/krzysied","followers_url":"https://api.github.com/users/krzysied/followers","following_url":"https://api.github.com/users/krzysied/following{/other_user}","gists_url":"https://api.github.com/users/krzysied/gists{/gist_id}","starred_url":"https://api.github.com/users/krzysied/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzysied/subscriptions","organizations_url":"https://api.github.com/users/krzysied/orgs","repos_url":"https://api.github.com/users/krzysied/repos","events_url":"https://api.github.com/users/krzysied/events{/privacy}","received_events_url":"https://api.github.com/users/krzysied/received_events","type":"User","site_admin":false},"repo":{"id":128908558,"node_id":"MDEwOlJlcG9zaXRvcnkxMjg5MDg1NTg=","name":"perf-tests","full_name":"krzysied/perf-tests","owner":{"login":"krzysied","id":25119199,"node_id":"MDQ6VXNlcjI1MTE5MTk5","avatar_url":"https://avatars2.githubusercontent.com/u/25119199?v=4","gravatar_id":"","url":"https://api.github.com/users/krzysied","html_url":"https://github.com/krzysied","followers_url":"https://api.github.com/users/krzysied/followers","following_url":"https://api.github.com/users/krzysied/following{/other_user}","gists_url":"https://api.github.com/users/krzysied/gists{/gist_id}","starred_url":"https://api.github.com/users/krzysied/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzysied/subscriptions","organizations_url":"https://api.github.com/users/krzysied/orgs","repos_url":"https://api.github.com/users/krzysied/repos","events_url":"https://api.github.com/users/krzysied/events{/privacy}","received_events_url":"https://api.github.com/users/krzysied/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/krzysied/perf-tests","description":"Performance tests and benchmarks","fork":true,"url":"https://api.github.com/repos/krzysied/perf-tests","forks_url":"https://api.github.com/repos/krzysied/perf-tests/forks","keys_url":"https://api.github.com/repos/krzysied/perf-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/krzysied/perf-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/krzysied/perf-tests/teams","hooks_url":"https://api.github.com/repos/krzysied/perf-tests/hooks","issue_events_url":"https://api.github.com/repos/krzysied/perf-tests/issues/events{/number}","events_url":"https://api.github.com/repos/krzysied/perf-tests/events","assignees_url":"https://api.github.com/repos/krzysied/perf-tests/assignees{/user}","branches_url":"https://api.github.com/repos/krzysied/perf-tests/branches{/branch}","tags_url":"https://api.github.com/repos/krzysied/perf-tests/tags","blobs_url":"https://api.github.com/repos/krzysied/perf-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/krzysied/perf-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/krzysied/perf-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/krzysied/perf-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/krzysied/perf-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/krzysied/perf-tests/languages","stargazers_url":"https://api.github.com/repos/krzysied/perf-tests/stargazers","contributors_url":"https://api.github.com/repos/krzysied/perf-tests/contributors","subscribers_url":"https://api.github.com/repos/krzysied/perf-tests/subscribers","subscription_url":"https://api.github.com/repos/krzysied/perf-tests/subscription","commits_url":"https://api.github.com/repos/krzysied/perf-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/krzysied/perf-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/krzysied/perf-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/krzysied/perf-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/krzysied/perf-tests/contents/{+path}","compare_url":"https://api.github.com/repos/krzysied/perf-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/krzysied/perf-tests/merges","archive_url":"https://api.github.com/repos/krzysied/perf-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/krzysied/perf-tests/downloads","issues_url":"https://api.github.com/repos/krzysied/perf-tests/issues{/number}","pulls_url":"https://api.github.com/repos/krzysied/perf-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/krzysied/perf-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/krzysied/perf-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/krzysied/perf-tests/labels{/name}","releases_url":"https://api.github.com/repos/krzysied/perf-tests/releases{/id}","deployments_url":"https://api.github.com/repos/krzysied/perf-tests/deployments","created_at":"2018-04-10T09:33:00Z","updated_at":"2018-04-10T09:33:03Z","pushed_at":"2018-06-29T15:10:20Z","git_url":"git://github.com/krzysied/perf-tests.git","ssh_url":"git@github.com:krzysied/perf-tests.git","clone_url":"https://github.com/krzysied/perf-tests.git","svn_url":"https://github.com/krzysied/perf-tests","homepage":null,"size":49774,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"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","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"c7862385b0df58380e5e6c5221debdd122a63e8b","user":{"login":"kubernetes","id":13629408,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjI5NDA4","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":68769911,"node_id":"MDEwOlJlcG9zaXRvcnk2ODc2OTkxMQ==","name":"perf-tests","full_name":"kubernetes/perf-tests","owner":{"login":"kubernetes","id":13629408,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjI5NDA4","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/perf-tests","description":"Performance tests and benchmarks","fork":false,"url":"https://api.github.com/repos/kubernetes/perf-tests","forks_url":"https://api.github.com/repos/kubernetes/perf-tests/forks","keys_url":"https://api.github.com/repos/kubernetes/perf-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/perf-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/perf-tests/teams","hooks_url":"https://api.github.com/repos/kubernetes/perf-tests/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/perf-tests/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/perf-tests/events","assignees_url":"https://api.github.com/repos/kubernetes/perf-tests/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/perf-tests/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/perf-tests/tags","blobs_url":"https://api.github.com/repos/kubernetes/perf-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/perf-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/perf-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/perf-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/perf-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/perf-tests/languages","stargazers_url":"https://api.github.com/repos/kubernetes/perf-tests/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/perf-tests/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/perf-tests/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/perf-tests/subscription","commits_url":"https://api.github.com/repos/kubernetes/perf-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/perf-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/perf-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/perf-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/perf-tests/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/perf-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/perf-tests/merges","archive_url":"https://api.github.com/repos/kubernetes/perf-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/perf-tests/downloads","issues_url":"https://api.github.com/repos/kubernetes/perf-tests/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/perf-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/perf-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/perf-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/perf-tests/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/perf-tests/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/perf-tests/deployments","created_at":"2016-09-21T01:59:44Z","updated_at":"2018-06-29T11:03:25Z","pushed_at":"2018-06-29T15:10:21Z","git_url":"git://github.com/kubernetes/perf-tests.git","ssh_url":"git@github.com:kubernetes/perf-tests.git","clone_url":"https://github.com/kubernetes/perf-tests.git","svn_url":"https://github.com/kubernetes/perf-tests","homepage":null,"size":49770,"stargazers_count":99,"watchers_count":99,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":67,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":67,"open_issues":12,"watchers":99,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/perf-tests/pulls/142"},"html":{"href":"https://github.com/kubernetes/perf-tests/pull/142"},"issue":{"href":"https://api.github.com/repos/kubernetes/perf-tests/issues/142"},"comments":{"href":"https://api.github.com/repos/kubernetes/perf-tests/issues/142/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/perf-tests/pulls/142/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/perf-tests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/perf-tests/pulls/142/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/perf-tests/statuses/c626ba7eb11a057017851891fa57be2458e1a7d8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"wojtek-t"}}