StackStorm / orquesta

Orquesta is a graph based workflow engine for StackStorm. Questions? https://github.com/StackStorm/st2/discussions
https://docs.stackstorm.com/orquesta/
Apache License 2.0
98 stars 39 forks source link

Disable action notify triggers when action is executed under workflow context #234

Closed khushboobhatia01 closed 3 years ago

blag commented 3 years ago

Can you write a better description for this?

khushboobhatia01 commented 3 years ago

Why is this change necessary? --> We have notification configured as part of workflows and action. And an action can be executed directly or by a workflow. This leads to notifications getting triggered multiple times.

What is the downside if this change is not implemented? -> Our rules engine and notifier pods have been running at 100% utilisation because of number of executions across fleet (workflow). Disabling action triggers when ran under workflow context will help us reduce load.

Are there any potential security implications for changing this? -> I don't think so.

khushboobhatia01 commented 3 years ago

https://docs.stackstorm.com/chatops/notifications.html#how-do-i-setup-notifications-for-orquesta Specifying notify parameter as [] doesn't work. https://github.com/StackStorm/st2/blob/master/st2common/st2common/services/workflows.py#L789 I guess this is where it filters the tasks and set notify parameter of live action. However, this is overridden when we request action at https://github.com/StackStorm/st2/blob/master/st2common/st2common/services/workflows.py#L802 by https://github.com/StackStorm/st2/blob/master/st2common/st2common/services/action.py#L134. There seems to be some bug.