{"action":"created","comment":{"url":"https://api.github.com/repos/StackStorm/st2/pulls/comments/93211692","pull_request_review_id":13733118,"id":93211692,"diff_hunk":"@@ -65,11 +66,14 @@ def validate_trigger_parameters(trigger_type_ref, parameters):\n     if not trigger_type_ref:\n         return None\n \n-    if trigger_type_ref not in SYSTEM_TRIGGER_TYPES:\n-        # Not a system trigger, skip validation for now\n+    trigger_type = triggers.get_trigger_type_db(trigger_type_ref)\n+    if trigger_type_ref in SYSTEM_TRIGGER_TYPES:\n+        parameters_schema = SYSTEM_TRIGGER_TYPES[trigger_type_ref]['parameters_schema']","path":"st2common/st2common/validators/api/reactor.py","position":16,"original_position":16,"commit_id":"ebac4b27d50a0b50233fcd3ec11e236df97a1199","original_commit_id":"ebac4b27d50a0b50233fcd3ec11e236df97a1199","user":{"login":"userlocalhost","id":469934,"avatar_url":"https://avatars.githubusercontent.com/u/469934?v=3","gravatar_id":"","url":"https://api.github.com/users/userlocalhost","html_url":"https://github.com/userlocalhost","followers_url":"https://api.github.com/users/userlocalhost/followers","following_url":"https://api.github.com/users/userlocalhost/following{/other_user}","gists_url":"https://api.github.com/users/userlocalhost/gists{/gist_id}","starred_url":"https://api.github.com/users/userlocalhost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/userlocalhost/subscriptions","organizations_url":"https://api.github.com/users/userlocalhost/orgs","repos_url":"https://api.github.com/users/userlocalhost/repos","events_url":"https://api.github.com/users/userlocalhost/events{/privacy}","received_events_url":"https://api.github.com/users/userlocalhost/received_events","type":"User","site_admin":false},"body":"> In addition to that, we also need some tests for rule creation with invalid parameters\r\n\r\nI had never realized that case, thank you. I'll cover it in the test.\r\n\r\n> I think we should have a single config option.\r\n\r\nSure, I'll correct the configuration parameter and make it translate to the `system` section because this flag will affect system wide.\r\n\r\n> We also need to document this new flag and behavior in the upgrade notes section of document (clarify how it works and affects the system).\r\n\r\nI got it. I'll make another PR to [Upgrade Notes](https://github.com/StackStorm/st2docs/blob/598d7f82e9fba0d8b199a4a5bb15509e1ed051b7/docs/source/upgrade_notes.rst) in st2docs.\r\n","created_at":"2016-12-20T10:42:01Z","updated_at":"2016-12-20T10:42:01Z","html_url":"https://github.com/StackStorm/st2/pull/3094#discussion_r93211692","pull_request_url":"https://api.github.com/repos/StackStorm/st2/pulls/3094","_links":{"self":{"href":"https://api.github.com/repos/StackStorm/st2/pulls/comments/93211692"},"html":{"href":"https://github.com/StackStorm/st2/pull/3094#discussion_r93211692"},"pull_request":{"href":"https://api.github.com/repos/StackStorm/st2/pulls/3094"}}},"pull_request":{"url":"https://api.github.com/repos/StackStorm/st2/pulls/3094","id":96551888,"html_url":"https://github.com/StackStorm/st2/pull/3094","diff_url":"https://github.com/StackStorm/st2/pull/3094.diff","patch_url":"https://github.com/StackStorm/st2/pull/3094.patch","issue_url":"https://api.github.com/repos/StackStorm/st2/issues/3094","number":3094,"state":"open","locked":false,"title":"added the function to verify that the payload format is complied with the schema of Trigger (#3077)","user":{"login":"userlocalhost","id":469934,"avatar_url":"https://avatars.githubusercontent.com/u/469934?v=3","gravatar_id":"","url":"https://api.github.com/users/userlocalhost","html_url":"https://github.com/userlocalhost","followers_url":"https://api.github.com/users/userlocalhost/followers","following_url":"https://api.github.com/users/userlocalhost/following{/other_user}","gists_url":"https://api.github.com/users/userlocalhost/gists{/gist_id}","starred_url":"https://api.github.com/users/userlocalhost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/userlocalhost/subscriptions","organizations_url":"https://api.github.com/users/userlocalhost/orgs","repos_url":"https://api.github.com/users/userlocalhost/repos","events_url":"https://api.github.com/users/userlocalhost/events{/privacy}","received_events_url":"https://api.github.com/users/userlocalhost/received_events","type":"User","site_admin":false},"body":"This adds the function to verify that the payload format is complied with the schema of specified Trigger.\r\nIn the past, the validation checking for payload format has never been, as mentioned in #3077.\r\n\r\nThe main changes of this patch are\r\n- adding the function to verify the payload which will be the trigger output is complied with the `payload_schema` of the corresponding Trigger.\r\n- adding the configuration parameter of `permit_invalid_payload` to permit dispatching trigger forcibly even if the payload doesn't match the Trigger's schema.\r\n\r\nThe former is the feature for the future implementation. And the later is the one for the backward compatibility.\r\nEven if there is a sensor that dispatch a payload which violate TriggerType, the SensorService only output warning message.\r\n\r\nSometime in near future, I hope that all trigger output is guaranteed that the format of payload is same with the `payload_schema` by this.\r\n\r\nThank you.","created_at":"2016-12-05T15:40:47Z","updated_at":"2016-12-20T10:42:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1bb0b05cf1cd2f4f88f82e43e9497f6e4e49e18","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/StackStorm/st2/pulls/3094/commits","review_comments_url":"https://api.github.com/repos/StackStorm/st2/pulls/3094/comments","review_comment_url":"https://api.github.com/repos/StackStorm/st2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/StackStorm/st2/issues/3094/comments","statuses_url":"https://api.github.com/repos/StackStorm/st2/statuses/ebac4b27d50a0b50233fcd3ec11e236df97a1199","head":{"label":"userlocalhost:feature/validation_check_for_dispatching_payload","ref":"feature/validation_check_for_dispatching_payload","sha":"ebac4b27d50a0b50233fcd3ec11e236df97a1199","user":{"login":"userlocalhost","id":469934,"avatar_url":"https://avatars.githubusercontent.com/u/469934?v=3","gravatar_id":"","url":"https://api.github.com/users/userlocalhost","html_url":"https://github.com/userlocalhost","followers_url":"https://api.github.com/users/userlocalhost/followers","following_url":"https://api.github.com/users/userlocalhost/following{/other_user}","gists_url":"https://api.github.com/users/userlocalhost/gists{/gist_id}","starred_url":"https://api.github.com/users/userlocalhost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/userlocalhost/subscriptions","organizations_url":"https://api.github.com/users/userlocalhost/orgs","repos_url":"https://api.github.com/users/userlocalhost/repos","events_url":"https://api.github.com/users/userlocalhost/events{/privacy}","received_events_url":"https://api.github.com/users/userlocalhost/received_events","type":"User","site_admin":false},"repo":{"id":73592516,"name":"st2","full_name":"userlocalhost/st2","owner":{"login":"userlocalhost","id":469934,"avatar_url":"https://avatars.githubusercontent.com/u/469934?v=3","gravatar_id":"","url":"https://api.github.com/users/userlocalhost","html_url":"https://github.com/userlocalhost","followers_url":"https://api.github.com/users/userlocalhost/followers","following_url":"https://api.github.com/users/userlocalhost/following{/other_user}","gists_url":"https://api.github.com/users/userlocalhost/gists{/gist_id}","starred_url":"https://api.github.com/users/userlocalhost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/userlocalhost/subscriptions","organizations_url":"https://api.github.com/users/userlocalhost/orgs","repos_url":"https://api.github.com/users/userlocalhost/repos","events_url":"https://api.github.com/users/userlocalhost/events{/privacy}","received_events_url":"https://api.github.com/users/userlocalhost/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/userlocalhost/st2","description":"StackStorm (aka \"IFTTT for Ops\") is event-driven automation commonly used for auto-remediation, security responses, facilitated troubleshooting, complex deployments, and more. Includes rules engine, workflow,1800+ integrations (see /st2contrib), native ChatOps and so forth.  Installer available at http://docs.stackstorm.com/install/index.html. Ping us on slack - https://stackstorm-community.slack.com/. ","fork":true,"url":"https://api.github.com/repos/userlocalhost/st2","forks_url":"https://api.github.com/repos/userlocalhost/st2/forks","keys_url":"https://api.github.com/repos/userlocalhost/st2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/userlocalhost/st2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/userlocalhost/st2/teams","hooks_url":"https://api.github.com/repos/userlocalhost/st2/hooks","issue_events_url":"https://api.github.com/repos/userlocalhost/st2/issues/events{/number}","events_url":"https://api.github.com/repos/userlocalhost/st2/events","assignees_url":"https://api.github.com/repos/userlocalhost/st2/assignees{/user}","branches_url":"https://api.github.com/repos/userlocalhost/st2/branches{/branch}","tags_url":"https://api.github.com/repos/userlocalhost/st2/tags","blobs_url":"https://api.github.com/repos/userlocalhost/st2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/userlocalhost/st2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/userlocalhost/st2/git/refs{/sha}","trees_url":"https://api.github.com/repos/userlocalhost/st2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/userlocalhost/st2/statuses/{sha}","languages_url":"https://api.github.com/repos/userlocalhost/st2/languages","stargazers_url":"https://api.github.com/repos/userlocalhost/st2/stargazers","contributors_url":"https://api.github.com/repos/userlocalhost/st2/contributors","subscribers_url":"https://api.github.com/repos/userlocalhost/st2/subscribers","subscription_url":"https://api.github.com/repos/userlocalhost/st2/subscription","commits_url":"https://api.github.com/repos/userlocalhost/st2/commits{/sha}","git_commits_url":"https://api.github.com/repos/userlocalhost/st2/git/commits{/sha}","comments_url":"https://api.github.com/repos/userlocalhost/st2/comments{/number}","issue_comment_url":"https://api.github.com/repos/userlocalhost/st2/issues/comments{/number}","contents_url":"https://api.github.com/repos/userlocalhost/st2/contents/{+path}","compare_url":"https://api.github.com/repos/userlocalhost/st2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/userlocalhost/st2/merges","archive_url":"https://api.github.com/repos/userlocalhost/st2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/userlocalhost/st2/downloads","issues_url":"https://api.github.com/repos/userlocalhost/st2/issues{/number}","pulls_url":"https://api.github.com/repos/userlocalhost/st2/pulls{/number}","milestones_url":"https://api.github.com/repos/userlocalhost/st2/milestones{/number}","notifications_url":"https://api.github.com/repos/userlocalhost/st2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/userlocalhost/st2/labels{/name}","releases_url":"https://api.github.com/repos/userlocalhost/st2/releases{/id}","deployments_url":"https://api.github.com/repos/userlocalhost/st2/deployments","created_at":"2016-11-13T03:09:09Z","updated_at":"2016-11-13T03:09:13Z","pushed_at":"2016-12-14T10:21:17Z","git_url":"git://github.com/userlocalhost/st2.git","ssh_url":"git@github.com:userlocalhost/st2.git","clone_url":"https://github.com/userlocalhost/st2.git","svn_url":"https://github.com/userlocalhost/st2","homepage":"http://www.stackstorm.com/","size":16904,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"StackStorm:master","ref":"master","sha":"d878a626c708a7f52404c8e6daa707f3faf8ab95","user":{"login":"StackStorm","id":4969009,"avatar_url":"https://avatars.githubusercontent.com/u/4969009?v=3","gravatar_id":"","url":"https://api.github.com/users/StackStorm","html_url":"https://github.com/StackStorm","followers_url":"https://api.github.com/users/StackStorm/followers","following_url":"https://api.github.com/users/StackStorm/following{/other_user}","gists_url":"https://api.github.com/users/StackStorm/gists{/gist_id}","starred_url":"https://api.github.com/users/StackStorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StackStorm/subscriptions","organizations_url":"https://api.github.com/users/StackStorm/orgs","repos_url":"https://api.github.com/users/StackStorm/repos","events_url":"https://api.github.com/users/StackStorm/events{/privacy}","received_events_url":"https://api.github.com/users/StackStorm/received_events","type":"Organization","site_admin":false},"repo":{"id":19051806,"name":"st2","full_name":"StackStorm/st2","owner":{"login":"StackStorm","id":4969009,"avatar_url":"https://avatars.githubusercontent.com/u/4969009?v=3","gravatar_id":"","url":"https://api.github.com/users/StackStorm","html_url":"https://github.com/StackStorm","followers_url":"https://api.github.com/users/StackStorm/followers","following_url":"https://api.github.com/users/StackStorm/following{/other_user}","gists_url":"https://api.github.com/users/StackStorm/gists{/gist_id}","starred_url":"https://api.github.com/users/StackStorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StackStorm/subscriptions","organizations_url":"https://api.github.com/users/StackStorm/orgs","repos_url":"https://api.github.com/users/StackStorm/repos","events_url":"https://api.github.com/users/StackStorm/events{/privacy}","received_events_url":"https://api.github.com/users/StackStorm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/StackStorm/st2","description":"StackStorm (aka \"IFTTT for Ops\") is event-driven automation commonly used for auto-remediation, security responses, facilitated troubleshooting, complex deployments, and more. Includes rules engine, workflow,1800+ integrations (see /st2contrib), native ChatOps and so forth.  Installer available at http://docs.stackstorm.com/install/index.html. Ping us on slack - https://stackstorm-community.slack.com/. ","fork":false,"url":"https://api.github.com/repos/StackStorm/st2","forks_url":"https://api.github.com/repos/StackStorm/st2/forks","keys_url":"https://api.github.com/repos/StackStorm/st2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StackStorm/st2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StackStorm/st2/teams","hooks_url":"https://api.github.com/repos/StackStorm/st2/hooks","issue_events_url":"https://api.github.com/repos/StackStorm/st2/issues/events{/number}","events_url":"https://api.github.com/repos/StackStorm/st2/events","assignees_url":"https://api.github.com/repos/StackStorm/st2/assignees{/user}","branches_url":"https://api.github.com/repos/StackStorm/st2/branches{/branch}","tags_url":"https://api.github.com/repos/StackStorm/st2/tags","blobs_url":"https://api.github.com/repos/StackStorm/st2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StackStorm/st2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StackStorm/st2/git/refs{/sha}","trees_url":"https://api.github.com/repos/StackStorm/st2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StackStorm/st2/statuses/{sha}","languages_url":"https://api.github.com/repos/StackStorm/st2/languages","stargazers_url":"https://api.github.com/repos/StackStorm/st2/stargazers","contributors_url":"https://api.github.com/repos/StackStorm/st2/contributors","subscribers_url":"https://api.github.com/repos/StackStorm/st2/subscribers","subscription_url":"https://api.github.com/repos/StackStorm/st2/subscription","commits_url":"https://api.github.com/repos/StackStorm/st2/commits{/sha}","git_commits_url":"https://api.github.com/repos/StackStorm/st2/git/commits{/sha}","comments_url":"https://api.github.com/repos/StackStorm/st2/comments{/number}","issue_comment_url":"https://api.github.com/repos/StackStorm/st2/issues/comments{/number}","contents_url":"https://api.github.com/repos/StackStorm/st2/contents/{+path}","compare_url":"https://api.github.com/repos/StackStorm/st2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StackStorm/st2/merges","archive_url":"https://api.github.com/repos/StackStorm/st2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StackStorm/st2/downloads","issues_url":"https://api.github.com/repos/StackStorm/st2/issues{/number}","pulls_url":"https://api.github.com/repos/StackStorm/st2/pulls{/number}","milestones_url":"https://api.github.com/repos/StackStorm/st2/milestones{/number}","notifications_url":"https://api.github.com/repos/StackStorm/st2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StackStorm/st2/labels{/name}","releases_url":"https://api.github.com/repos/StackStorm/st2/releases{/id}","deployments_url":"https://api.github.com/repos/StackStorm/st2/deployments","created_at":"2014-04-23T00:51:34Z","updated_at":"2016-12-20T09:59:08Z","pushed_at":"2016-12-20T10:28:43Z","git_url":"git://github.com/StackStorm/st2.git","ssh_url":"git@github.com:StackStorm/st2.git","clone_url":"https://github.com/StackStorm/st2.git","svn_url":"https://github.com/StackStorm/st2","homepage":"http://www.stackstorm.com/","size":17037,"stargazers_count":1722,"watchers_count":1722,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":205,"mirror_url":null,"open_issues_count":171,"forks":205,"open_issues":171,"watchers":1722,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/StackStorm/st2/pulls/3094"},"html":{"href":"https://github.com/StackStorm/st2/pull/3094"},"issue":{"href":"https://api.github.com/repos/StackStorm/st2/issues/3094"},"comments":{"href":"https://api.github.com/repos/StackStorm/st2/issues/3094/comments"},"review_comments":{"href":"https://api.github.com/repos/StackStorm/st2/pulls/3094/comments"},"review_comment":{"href":"https://api.github.com/repos/StackStorm/st2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/StackStorm/st2/pulls/3094/commits"},"statuses":{"href":"https://api.github.com/repos/StackStorm/st2/statuses/ebac4b27d50a0b50233fcd3ec11e236df97a1199"}}}}
{"actor":{"display_login":"userlocalhost"}}