Skip to content

Commit 7bdd2a2

Browse files
authored
Merge pull request #361 from StackStorm/trigger_validation_changes
Documentation for trigger validation changes
2 parents 6eb0bb6 + a93a579 commit 7bdd2a2

2 files changed

Lines changed: 31 additions & 9 deletions

File tree

docs/source/_includes/internal_trigger_types.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
Action
44
~~~~~~
55

6-
+---------------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------+
7-
| Reference | Description | Properties |
8-
+===========================+==============================================================+==========================================================================================+
9-
| st2.generic.actiontrigger | Trigger encapsulating the completion of an action execution. | status, start_timestamp, parameters, action_name, result, execution_id |
10-
+---------------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------+
11-
| st2.generic.notifytrigger | Notification trigger. | status, start_timestamp, channel, action_ref, data, message, execution_id, end_timestamp |
12-
+---------------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------+
13-
| st2.action.file_writen | Trigger encapsulating action file being written on disk. | content, host_info, ref, file_path |
14-
+---------------------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------+
6+
+---------------------------+--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
7+
| Reference | Description | Properties |
8+
+===========================+==============================================================+=============================================================================================================+
9+
| st2.generic.actiontrigger | Trigger encapsulating the completion of an action execution. | status, start_timestamp, result, parameters, action_ref, runner_ref, execution_id, action_name |
10+
+---------------------------+--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
11+
| st2.generic.notifytrigger | Notification trigger. | status, data, start_timestamp, channel, route, action_ref, message, runner_ref, execution_id, end_timestamp |
12+
+---------------------------+--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
13+
| st2.action.file_writen | Trigger encapsulating action file being written on disk. | host_info, ref, file_path |
14+
+---------------------------+--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
1515

1616
Key Value Pair
1717
~~~~~~~~~~~~~~

docs/source/upgrade_notes.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,28 @@
33
Upgrade Notes
44
=============
55

6+
|st2| in development
7+
--------------------
8+
9+
* Additional validation has been introduced for triggers.
10+
11+
1. Trigger payload is now validated against the trigger ``payload_schema`` schema when
12+
dispatching a trigger inside the sensor.
13+
14+
Validation is only performed if ``system.validate_trigger_parameters`` config option is
15+
enabled (it's disabled by default) and if trigger object defines ``parameters_schema``
16+
attribute.
17+
18+
2. Trigger parameters are now validated for non-system (user-defined) triggers when creating
19+
a rule.
20+
21+
Validation is only performed if ``system.validate_trigger_parameters`` config option is
22+
enabled (it's disabled by default) and if trigger object defines ``parameters_schema``
23+
attribute.
24+
25+
Both of those configuration options are disabled by default for now, but they will be enabled
26+
by default (with an option to opt-out) in a future major |st2| release.
27+
628
|st2| v2.1
729
----------
830

0 commit comments

Comments
 (0)