{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-cli/pulls/comments/167307006","pull_request_review_id":95515404,"id":167307006,"diff_hunk":"@@ -597,9 +605,12 @@ def _is_poller(obj):\n     return False\n \n \n-def _merge_kwargs(patch_kwargs, base_kwargs):\n+def _merge_kwargs(patch_kwargs, base_kwargs, supported_kwargs=None):\n     merged_kwargs = base_kwargs.copy()\n     merged_kwargs.update(patch_kwargs)\n+    unrecognized_kwargs = [x for x in merged_kwargs if x not in (supported_kwargs or CLI_COMMON_KWARGS)]","path":"src/azure-cli-core/azure/cli/core/commands/__init__.py","position":36,"original_position":36,"commit_id":"15d4f7b17bd69430b21f0f305ea480e5db95a0ed","original_commit_id":"15d4f7b17bd69430b21f0f305ea480e5db95a0ed","user":{"login":"tjprescott","id":5723682,"avatar_url":"https://avatars2.githubusercontent.com/u/5723682?v=4","gravatar_id":"","url":"https://api.github.com/users/tjprescott","html_url":"https://github.com/tjprescott","followers_url":"https://api.github.com/users/tjprescott/followers","following_url":"https://api.github.com/users/tjprescott/following{/other_user}","gists_url":"https://api.github.com/users/tjprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/tjprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjprescott/subscriptions","organizations_url":"https://api.github.com/users/tjprescott/orgs","repos_url":"https://api.github.com/users/tjprescott/repos","events_url":"https://api.github.com/users/tjprescott/events{/privacy}","received_events_url":"https://api.github.com/users/tjprescott/received_events","type":"User","site_admin":false},"body":"If the user passes nothing, supported_kwargs is None, so it will use the CLI_COMMAND_KWARGS as a fallback. If the user passes either CLI_COMMAND_KWARGS or CLI_PARAM_KWARGS, the definitions of those includes the CLI_COMMON_KWARGS. See lines 31-36.","created_at":"2018-02-09T18:23:24Z","updated_at":"2018-02-09T18:23:24Z","html_url":"https://github.com/Azure/azure-cli/pull/5518#discussion_r167307006","pull_request_url":"https://api.github.com/repos/Azure/azure-cli/pulls/5518","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/comments/167307006"},"html":{"href":"https://github.com/Azure/azure-cli/pull/5518#discussion_r167307006"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/5518"}},"in_reply_to_id":167296718},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-cli/pulls/5518","id":168046610,"html_url":"https://github.com/Azure/azure-cli/pull/5518","diff_url":"https://github.com/Azure/azure-cli/pull/5518.diff","patch_url":"https://github.com/Azure/azure-cli/pull/5518.patch","issue_url":"https://api.github.com/repos/Azure/azure-cli/issues/5518","number":5518,"state":"open","locked":false,"title":"Improve core error handling","user":{"login":"tjprescott","id":5723682,"avatar_url":"https://avatars2.githubusercontent.com/u/5723682?v=4","gravatar_id":"","url":"https://api.github.com/users/tjprescott","html_url":"https://github.com/tjprescott","followers_url":"https://api.github.com/users/tjprescott/followers","following_url":"https://api.github.com/users/tjprescott/following{/other_user}","gists_url":"https://api.github.com/users/tjprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/tjprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjprescott/subscriptions","organizations_url":"https://api.github.com/users/tjprescott/orgs","repos_url":"https://api.github.com/users/tjprescott/repos","events_url":"https://api.github.com/users/tjprescott/events{/privacy}","received_events_url":"https://api.github.com/users/tjprescott/received_events","type":"User","site_admin":false},"body":"This PR does two things:\r\n\r\n1. Fixes #5055. Now, when any of the command authoring commands that accept kwargs are invoked, the supplied kwargs will be validated and any errors will be raised instead of silently ignored.\r\n\r\n2. Similiarly, this fixes an issue in the test base when using the `self.kwargs` feature so that kwarg mis-spellings in commands raise an actionable error instead of manifesting in strange, hard-to-diagnose ways.\r\n\r\n---\r\n\r\nThis checklist is used to make sure that common guidelines for a pull request are followed.\r\n\r\n### General Guidelines\r\n\r\n- [N/A] The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see [Modifying change log](https://github.com/Azure/azure-cli/tree/master/doc/authoring_command_modules#modify-change-log)).\r\n\r\n### Command Guidelines\r\n\r\n- [N/A] Each command and parameter has a meaningful description.\r\n- [N/A] Each new command has a test.\r\n\r\n(see [Authoring Command Modules](https://github.com/Azure/azure-cli/tree/master/doc/authoring_command_modules))\r\n","created_at":"2018-02-08T18:06:10Z","updated_at":"2018-02-09T18:23:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e545750553ac704436f3c1e1719475be53b42cfe","assignee":null,"assignees":[],"requested_reviewers":[{"login":"derekbekoe","id":16448634,"avatar_url":"https://avatars3.githubusercontent.com/u/16448634?v=4","gravatar_id":"","url":"https://api.github.com/users/derekbekoe","html_url":"https://github.com/derekbekoe","followers_url":"https://api.github.com/users/derekbekoe/followers","following_url":"https://api.github.com/users/derekbekoe/following{/other_user}","gists_url":"https://api.github.com/users/derekbekoe/gists{/gist_id}","starred_url":"https://api.github.com/users/derekbekoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekbekoe/subscriptions","organizations_url":"https://api.github.com/users/derekbekoe/orgs","repos_url":"https://api.github.com/users/derekbekoe/repos","events_url":"https://api.github.com/users/derekbekoe/events{/privacy}","received_events_url":"https://api.github.com/users/derekbekoe/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":520601343,"url":"https://api.github.com/repos/Azure/azure-cli/labels/Core","name":"Core","color":"d4c5f9","default":false},{"id":420278506,"url":"https://api.github.com/repos/Azure/azure-cli/labels/Test","name":"Test","color":"006b75","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-cli/pulls/5518/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-cli/pulls/5518/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-cli/issues/5518/comments","statuses_url":"https://api.github.com/repos/Azure/azure-cli/statuses/15d4f7b17bd69430b21f0f305ea480e5db95a0ed","head":{"label":"tjprescott:UnrecognizedKwargs","ref":"UnrecognizedKwargs","sha":"15d4f7b17bd69430b21f0f305ea480e5db95a0ed","user":{"login":"tjprescott","id":5723682,"avatar_url":"https://avatars2.githubusercontent.com/u/5723682?v=4","gravatar_id":"","url":"https://api.github.com/users/tjprescott","html_url":"https://github.com/tjprescott","followers_url":"https://api.github.com/users/tjprescott/followers","following_url":"https://api.github.com/users/tjprescott/following{/other_user}","gists_url":"https://api.github.com/users/tjprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/tjprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjprescott/subscriptions","organizations_url":"https://api.github.com/users/tjprescott/orgs","repos_url":"https://api.github.com/users/tjprescott/repos","events_url":"https://api.github.com/users/tjprescott/events{/privacy}","received_events_url":"https://api.github.com/users/tjprescott/received_events","type":"User","site_admin":false},"repo":{"id":64678451,"name":"azure-cli","full_name":"tjprescott/azure-cli","owner":{"login":"tjprescott","id":5723682,"avatar_url":"https://avatars2.githubusercontent.com/u/5723682?v=4","gravatar_id":"","url":"https://api.github.com/users/tjprescott","html_url":"https://github.com/tjprescott","followers_url":"https://api.github.com/users/tjprescott/followers","following_url":"https://api.github.com/users/tjprescott/following{/other_user}","gists_url":"https://api.github.com/users/tjprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/tjprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjprescott/subscriptions","organizations_url":"https://api.github.com/users/tjprescott/orgs","repos_url":"https://api.github.com/users/tjprescott/repos","events_url":"https://api.github.com/users/tjprescott/events{/privacy}","received_events_url":"https://api.github.com/users/tjprescott/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tjprescott/azure-cli","description":"Command-line tools for Azure.","fork":true,"url":"https://api.github.com/repos/tjprescott/azure-cli","forks_url":"https://api.github.com/repos/tjprescott/azure-cli/forks","keys_url":"https://api.github.com/repos/tjprescott/azure-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tjprescott/azure-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tjprescott/azure-cli/teams","hooks_url":"https://api.github.com/repos/tjprescott/azure-cli/hooks","issue_events_url":"https://api.github.com/repos/tjprescott/azure-cli/issues/events{/number}","events_url":"https://api.github.com/repos/tjprescott/azure-cli/events","assignees_url":"https://api.github.com/repos/tjprescott/azure-cli/assignees{/user}","branches_url":"https://api.github.com/repos/tjprescott/azure-cli/branches{/branch}","tags_url":"https://api.github.com/repos/tjprescott/azure-cli/tags","blobs_url":"https://api.github.com/repos/tjprescott/azure-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tjprescott/azure-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tjprescott/azure-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/tjprescott/azure-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tjprescott/azure-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/tjprescott/azure-cli/languages","stargazers_url":"https://api.github.com/repos/tjprescott/azure-cli/stargazers","contributors_url":"https://api.github.com/repos/tjprescott/azure-cli/contributors","subscribers_url":"https://api.github.com/repos/tjprescott/azure-cli/subscribers","subscription_url":"https://api.github.com/repos/tjprescott/azure-cli/subscription","commits_url":"https://api.github.com/repos/tjprescott/azure-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/tjprescott/azure-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/tjprescott/azure-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/tjprescott/azure-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/tjprescott/azure-cli/contents/{+path}","compare_url":"https://api.github.com/repos/tjprescott/azure-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tjprescott/azure-cli/merges","archive_url":"https://api.github.com/repos/tjprescott/azure-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tjprescott/azure-cli/downloads","issues_url":"https://api.github.com/repos/tjprescott/azure-cli/issues{/number}","pulls_url":"https://api.github.com/repos/tjprescott/azure-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/tjprescott/azure-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/tjprescott/azure-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tjprescott/azure-cli/labels{/name}","releases_url":"https://api.github.com/repos/tjprescott/azure-cli/releases{/id}","deployments_url":"https://api.github.com/repos/tjprescott/azure-cli/deployments","created_at":"2016-08-01T15:24:25Z","updated_at":"2016-08-01T15:24:28Z","pushed_at":"2018-02-08T23:05:47Z","git_url":"git://github.com/tjprescott/azure-cli.git","ssh_url":"git@github.com:tjprescott/azure-cli.git","clone_url":"https://github.com/tjprescott/azure-cli.git","svn_url":"https://github.com/tjprescott/azure-cli","homepage":null,"size":36689,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Azure:dev","ref":"dev","sha":"074a237d4da85c6ba569d23bd56602e4079dd192","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":51040886,"name":"azure-cli","full_name":"Azure/azure-cli","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-cli","description":"Command-line tools for Azure.","fork":false,"url":"https://api.github.com/repos/Azure/azure-cli","forks_url":"https://api.github.com/repos/Azure/azure-cli/forks","keys_url":"https://api.github.com/repos/Azure/azure-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-cli/teams","hooks_url":"https://api.github.com/repos/Azure/azure-cli/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-cli/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-cli/events","assignees_url":"https://api.github.com/repos/Azure/azure-cli/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-cli/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-cli/tags","blobs_url":"https://api.github.com/repos/Azure/azure-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-cli/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-cli/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-cli/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-cli/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-cli/subscription","commits_url":"https://api.github.com/repos/Azure/azure-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-cli/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-cli/merges","archive_url":"https://api.github.com/repos/Azure/azure-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-cli/downloads","issues_url":"https://api.github.com/repos/Azure/azure-cli/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-cli/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-cli/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-cli/deployments","created_at":"2016-02-04T00:21:51Z","updated_at":"2018-02-09T15:37:57Z","pushed_at":"2018-02-09T18:21:20Z","git_url":"git://github.com/Azure/azure-cli.git","ssh_url":"git@github.com:Azure/azure-cli.git","clone_url":"https://github.com/Azure/azure-cli.git","svn_url":"https://github.com/Azure/azure-cli","homepage":null,"size":36292,"stargazers_count":662,"watchers_count":662,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":381,"mirror_url":null,"archived":false,"open_issues_count":623,"license":null,"forks":381,"open_issues":623,"watchers":662,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/5518"},"html":{"href":"https://github.com/Azure/azure-cli/pull/5518"},"issue":{"href":"https://api.github.com/repos/Azure/azure-cli/issues/5518"},"comments":{"href":"https://api.github.com/repos/Azure/azure-cli/issues/5518/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/5518/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/5518/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-cli/statuses/15d4f7b17bd69430b21f0f305ea480e5db95a0ed"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"tjprescott"}}