{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/187716114","pull_request_review_id":119559148,"id":187716114,"diff_hunk":"@@ -5219,6 +5219,12 @@ runTests() {\n \n     output_message=$(kubectl auth can-i list jobs.batch/bar -n foo --quiet 2>&1 \"${kube_flags[@]}\")\n     kube::test::if_empty_string \"${output_message}\"\n+    \n+    output_message=$(kubectl auth can-i get pods --subresource=log 2>&1 \"${kube_flags[@]}\"; echo $?)","path":"hack/make-rules/test-cmd-util.sh","position":5,"original_position":5,"commit_id":"9fa269a5e5e8ce6e8359f70bb1020d18eba1cd8f","original_commit_id":"9fa269a5e5e8ce6e8359f70bb1020d18eba1cd8f","user":{"login":"soltysh","id":576341,"avatar_url":"https://avatars2.githubusercontent.com/u/576341?v=4","gravatar_id":"","url":"https://api.github.com/users/soltysh","html_url":"https://github.com/soltysh","followers_url":"https://api.github.com/users/soltysh/followers","following_url":"https://api.github.com/users/soltysh/following{/other_user}","gists_url":"https://api.github.com/users/soltysh/gists{/gist_id}","starred_url":"https://api.github.com/users/soltysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soltysh/subscriptions","organizations_url":"https://api.github.com/users/soltysh/orgs","repos_url":"https://api.github.com/users/soltysh/repos","events_url":"https://api.github.com/users/soltysh/events{/privacy}","received_events_url":"https://api.github.com/users/soltysh/received_events","type":"User","site_admin":false},"body":"This is still not testing your particular change. Can you add a test for your case, iow. one that will return non-zero when not allowed?","created_at":"2018-05-11T19:48:38Z","updated_at":"2018-05-11T19:48:42Z","html_url":"https://github.com/kubernetes/kubernetes/pull/59579#discussion_r187716114","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/59579","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/187716114"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/59579#discussion_r187716114"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/59579"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/59579","id":168009572,"html_url":"https://github.com/kubernetes/kubernetes/pull/59579","diff_url":"https://github.com/kubernetes/kubernetes/pull/59579.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/59579.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/59579","number":59579,"state":"open","locked":false,"title":"Add exit code 1 on not allowed to kubectl auth can-i","user":{"login":"fbac","id":11076521,"avatar_url":"https://avatars1.githubusercontent.com/u/11076521?v=4","gravatar_id":"","url":"https://api.github.com/users/fbac","html_url":"https://github.com/fbac","followers_url":"https://api.github.com/users/fbac/followers","following_url":"https://api.github.com/users/fbac/following{/other_user}","gists_url":"https://api.github.com/users/fbac/gists{/gist_id}","starred_url":"https://api.github.com/users/fbac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbac/subscriptions","organizations_url":"https://api.github.com/users/fbac/orgs","repos_url":"https://api.github.com/users/fbac/repos","events_url":"https://api.github.com/users/fbac/events{/privacy}","received_events_url":"https://api.github.com/users/fbac/received_events","type":"User","site_admin":false},"body":"What this PR does / why we need it:\r\nkubectl auth can-i verb resource always returns 0 status, even if the user can't <verb> <resource>\r\n\r\nWith this commit, kubectl will return exit code 1 when a verb is not allowed. It doesn't affect quiet option.\r\n\r\nRelease note:\r\n```release-note\r\nFix kubectl auth can-i exit code. It will return 1 if the user is not allowed and 0 if it's allowed.\r\n```\r\n\r\n","created_at":"2018-02-08T15:48:46Z","updated_at":"2018-05-11T19:48:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"769943b0c6a9c4c5ac06293a07b2dcb55061cad6","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ghodss","id":5209643,"avatar_url":"https://avatars3.githubusercontent.com/u/5209643?v=4","gravatar_id":"","url":"https://api.github.com/users/ghodss","html_url":"https://github.com/ghodss","followers_url":"https://api.github.com/users/ghodss/followers","following_url":"https://api.github.com/users/ghodss/following{/other_user}","gists_url":"https://api.github.com/users/ghodss/gists{/gist_id}","starred_url":"https://api.github.com/users/ghodss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghodss/subscriptions","organizations_url":"https://api.github.com/users/ghodss/orgs","repos_url":"https://api.github.com/users/ghodss/repos","events_url":"https://api.github.com/users/ghodss/events{/privacy}","received_events_url":"https://api.github.com/users/ghodss/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":477397086,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":200149833,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note","name":"release-note","color":"c2e0c6","default":false},{"id":357119284,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/auth","name":"sig/auth","color":"d2b48c","default":false},{"id":253450793,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/XS","name":"size/XS","color":"009900","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/59579/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/59579/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/59579/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/9fa269a5e5e8ce6e8359f70bb1020d18eba1cd8f","head":{"label":"fbac:kubectl-cani-exitcode","ref":"kubectl-cani-exitcode","sha":"9fa269a5e5e8ce6e8359f70bb1020d18eba1cd8f","user":{"login":"fbac","id":11076521,"avatar_url":"https://avatars1.githubusercontent.com/u/11076521?v=4","gravatar_id":"","url":"https://api.github.com/users/fbac","html_url":"https://github.com/fbac","followers_url":"https://api.github.com/users/fbac/followers","following_url":"https://api.github.com/users/fbac/following{/other_user}","gists_url":"https://api.github.com/users/fbac/gists{/gist_id}","starred_url":"https://api.github.com/users/fbac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbac/subscriptions","organizations_url":"https://api.github.com/users/fbac/orgs","repos_url":"https://api.github.com/users/fbac/repos","events_url":"https://api.github.com/users/fbac/events{/privacy}","received_events_url":"https://api.github.com/users/fbac/received_events","type":"User","site_admin":false},"repo":{"id":111802787,"name":"kubernetes","full_name":"fbac/kubernetes","owner":{"login":"fbac","id":11076521,"avatar_url":"https://avatars1.githubusercontent.com/u/11076521?v=4","gravatar_id":"","url":"https://api.github.com/users/fbac","html_url":"https://github.com/fbac","followers_url":"https://api.github.com/users/fbac/followers","following_url":"https://api.github.com/users/fbac/following{/other_user}","gists_url":"https://api.github.com/users/fbac/gists{/gist_id}","starred_url":"https://api.github.com/users/fbac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbac/subscriptions","organizations_url":"https://api.github.com/users/fbac/orgs","repos_url":"https://api.github.com/users/fbac/repos","events_url":"https://api.github.com/users/fbac/events{/privacy}","received_events_url":"https://api.github.com/users/fbac/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fbac/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":true,"url":"https://api.github.com/repos/fbac/kubernetes","forks_url":"https://api.github.com/repos/fbac/kubernetes/forks","keys_url":"https://api.github.com/repos/fbac/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fbac/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fbac/kubernetes/teams","hooks_url":"https://api.github.com/repos/fbac/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/fbac/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/fbac/kubernetes/events","assignees_url":"https://api.github.com/repos/fbac/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/fbac/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/fbac/kubernetes/tags","blobs_url":"https://api.github.com/repos/fbac/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fbac/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fbac/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/fbac/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fbac/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/fbac/kubernetes/languages","stargazers_url":"https://api.github.com/repos/fbac/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/fbac/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/fbac/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/fbac/kubernetes/subscription","commits_url":"https://api.github.com/repos/fbac/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/fbac/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/fbac/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/fbac/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/fbac/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/fbac/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fbac/kubernetes/merges","archive_url":"https://api.github.com/repos/fbac/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fbac/kubernetes/downloads","issues_url":"https://api.github.com/repos/fbac/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/fbac/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/fbac/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/fbac/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fbac/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/fbac/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/fbac/kubernetes/deployments","created_at":"2017-11-23T11:43:55Z","updated_at":"2018-05-11T08:25:32Z","pushed_at":"2018-05-11T14:41:29Z","git_url":"git://github.com/fbac/kubernetes.git","ssh_url":"git@github.com:fbac/kubernetes.git","clone_url":"https://github.com/fbac/kubernetes.git","svn_url":"https://github.com/fbac/kubernetes","homepage":"http://kubernetes.io","size":553173,"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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"b617748f7b2ad5ab1ac91d9c6b9e1a5be80219f1","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-11T19:39:25Z","pushed_at":"2018-05-11T19:35:48Z","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":776754,"stargazers_count":36174,"watchers_count":36174,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12748,"mirror_url":null,"archived":false,"open_issues_count":3303,"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":12748,"open_issues":3303,"watchers":36174,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/59579"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/59579"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/59579"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/59579/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/59579/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/59579/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/9fa269a5e5e8ce6e8359f70bb1020d18eba1cd8f"}},"author_association":"NONE"}}
{"actor":{"display_login":"soltysh"}}