)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"5fd8f0c6adc675867b7968591a8bddfc3720ead4","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement notification of execution events"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Introduce execution events and notification server and plugins for publishing these events for consumers. Event notification is defined per workflow execution and can be configured to notify on all the events or only for specific events."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I9820bdc4792a374dad9ad5310f84cd7aaddab8ca"},{"line_number":12,"context_line":"Implements: blueprint mistral-execution-event-subscription"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df140735_291ef46f","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":9},"updated":"2017-06-01 04:53:26.000000000","message":"nit: please limit lines to 80 chars","commit_id":"dff13ce266595d7f875af91180413666d1ae1f40"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"dab226f8a08f2caed539ff6256d59a1fbc315963","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement notification of execution events"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Introduce execution events and notification server and plugins for publishing these events for consumers. Event notification is defined per workflow execution and can be configured to notify on all the events or only for specific events."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I9820bdc4792a374dad9ad5310f84cd7aaddab8ca"},{"line_number":12,"context_line":"Implements: blueprint mistral-execution-event-subscription"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"ff82abbf_24d75a4e","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":71},"updated":"2017-11-22 19:10:05.000000000","message":"Soft: Please keep it within 80 characters.","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"}],"mistral/api/controllers/v2/execution.py":[{"author":{"_account_id":27008,"name":"Vitalii Solodilov","email":"Mcdkr@yandex.ru","username":"mcdoker18"},"change_message_id":"3ad6a75869d8d6132d59838b29aff27471315bb7","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            elif delta.get(\u0027state\u0027) \u003d\u003d states.RUNNING:"},{"line_number":176,"context_line":"                wf_ex \u003d rpc.get_engine_client().resume_workflow("},{"line_number":177,"context_line":"                    id,"},{"line_number":178,"context_line":"                    env\u003ddelta.get(\u0027env\u0027)"},{"line_number":179,"context_line":"                )"},{"line_number":180,"context_line":"            elif states.is_completed(delta.get(\u0027state\u0027)):"},{"line_number":181,"context_line":"                msg \u003d wf_ex.state_info if wf_ex.state_info else None"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa0c359_ee18af1e","line":178,"updated":"2018-02-24 22:03:55.000000000","message":"I think that we can override a notify params here.","commit_id":"3f48e24dc4948970105020140d8290788cca86c1"}],"mistral/api/controllers/v2/resources.py":[{"author":{"_account_id":27008,"name":"Vitalii Solodilov","email":"Mcdkr@yandex.ru","username":"mcdoker18"},"change_message_id":"9f34c84c2c9dd56e7e422a4da8aa68ff58a493e3","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            output\u003d{},"},{"line_number":276,"context_line":"            params\u003d{\u0027env\u0027: {\u0027k1\u0027: \u0027abc\u0027, \u0027k2\u0027: 123}},"},{"line_number":277,"context_line":"            notify\u003d{"},{"line_number":278,"context_line":"                \u0027type\u0027: \u0027webhook\u0027,"},{"line_number":279,"context_line":"                \u0027events\u0027: ["},{"line_number":280,"context_line":"                    \u0027WORKFLOW_SUCCEEDED\u0027"},{"line_number":281,"context_line":"                ],"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_5e99a7c1","line":278,"updated":"2017-10-25 09:25:30.000000000","message":"What do you think about this configuration? Every plugin process own events?\n{\n  \"notify\": [\n    {\n      \"type\": \"webhook\",\n      \"events\": [\"TASK_SUCCEEDED\"],\n      \"params\": {\n        \"url\": \"http://localhost:8080/mistral/notification\",\n        \"headers\": {\n          \"Content-Type\": \"application/json\",\n          \"X-Auth-Token\": \"123e4567-e89b-12d3-a456-426655442222\"\n        }\n      }\n    },\n    {\n      \"type\": \"message_queues\",\n      \"events\": [\"TASK_FAILED\", \"WORKFLOW_FAILED\"],\n      \"params\": {\n        \"topic_name\": \"failover_queue\",\n        \"rabbit_host\": \"rabbitmq\",\n        \"port\": \"5432\"\n      }\n    }\n  ]\n}","commit_id":"cb7b431b2307e0c6dbb2be82d9046182c590f222"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"1b8c9bb66b97bf586bc99a033509d3b61f13fc86","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            output\u003d{},"},{"line_number":276,"context_line":"            params\u003d{\u0027env\u0027: {\u0027k1\u0027: \u0027abc\u0027, \u0027k2\u0027: 123}},"},{"line_number":277,"context_line":"            notify\u003d{"},{"line_number":278,"context_line":"                \u0027type\u0027: \u0027webhook\u0027,"},{"line_number":279,"context_line":"                \u0027events\u0027: ["},{"line_number":280,"context_line":"                    \u0027WORKFLOW_SUCCEEDED\u0027"},{"line_number":281,"context_line":"                ],"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_670aa879","line":278,"in_reply_to":"3f4b6375_5e99a7c1","updated":"2017-11-03 03:39:51.000000000","message":"Done","commit_id":"cb7b431b2307e0c6dbb2be82d9046182c590f222"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"c68b9b4efca291f17abee027275d5743ab9365b0","unresolved":false,"context_lines":[{"line_number":290,"context_line":"                            \u0027TASK_FAILED\u0027,"},{"line_number":291,"context_line":"                            \u0027WORKFLOW_FAILED\u0027"},{"line_number":292,"context_line":"                        ],"},{"line_number":293,"context_line":"                        \u0027topic\u0027: \u0027failover_queue\u0027,"},{"line_number":294,"context_line":"                        \u0027backend\u0027: \u0027rabbitmq\u0027,"},{"line_number":295,"context_line":"                        \u0027host\u0027: \u0027127.0.0.1\u0027,"},{"line_number":296,"context_line":"                        \u0027port\u0027: 5432"},{"line_number":297,"context_line":"                    }"},{"line_number":298,"context_line":"                ]"},{"line_number":299,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_948d4d2c","line":296,"range":{"start_line":293,"start_character":24,"end_line":296,"end_character":36},"updated":"2017-12-13 09:47:36.000000000","message":"I guess these params are dynamic and will depend on \"type\"?","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"923384486dffb78afbc572fba1a04c4cb8bac549","unresolved":false,"context_lines":[{"line_number":290,"context_line":"                            \u0027TASK_FAILED\u0027,"},{"line_number":291,"context_line":"                            \u0027WORKFLOW_FAILED\u0027"},{"line_number":292,"context_line":"                        ],"},{"line_number":293,"context_line":"                        \u0027topic\u0027: \u0027failover_queue\u0027,"},{"line_number":294,"context_line":"                        \u0027backend\u0027: \u0027rabbitmq\u0027,"},{"line_number":295,"context_line":"                        \u0027host\u0027: \u0027127.0.0.1\u0027,"},{"line_number":296,"context_line":"                        \u0027port\u0027: 5432"},{"line_number":297,"context_line":"                    }"},{"line_number":298,"context_line":"                ]"},{"line_number":299,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_76abb188","line":296,"range":{"start_line":293,"start_character":24,"end_line":296,"end_character":36},"in_reply_to":"df87a7cf_948d4d2c","updated":"2018-01-03 23:26:54.000000000","message":"Yes, the params are dynamic and depends on the type (kwargs in the abstract method).","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"},{"author":{"_account_id":16511,"name":"Bob Haddleton","email":"bob.haddleton@nokia.com","username":"bobh"},"change_message_id":"f21d9028805f0adfad6de9707217e5cab1ab267a","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                        }"},{"line_number":308,"context_line":"                    },"},{"line_number":309,"context_line":"                    {"},{"line_number":310,"context_line":"                        \u0027type\u0027: \u0027queue\u0027,"},{"line_number":311,"context_line":"                        \u0027topic\u0027: \u0027failover_queue\u0027,"},{"line_number":312,"context_line":"                        \u0027backend\u0027: \u0027rabbitmq\u0027,"},{"line_number":313,"context_line":"                        \u0027host\u0027: \u0027127.0.0.1\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa0c359_88904aef","line":310,"updated":"2018-02-09 16:48:17.000000000","message":"So this information is provided by the user creating the execution?  It seems like it is exposing a lot of server configuration information to the client, and opens potential security holes.","commit_id":"b061cbb16ef1256c565cd98b4c4779feda6233c6"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"eeaee0a3c61b7c10ef4df73e9de244d6e8452106","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                        }"},{"line_number":308,"context_line":"                    },"},{"line_number":309,"context_line":"                    {"},{"line_number":310,"context_line":"                        \u0027type\u0027: \u0027queue\u0027,"},{"line_number":311,"context_line":"                        \u0027topic\u0027: \u0027failover_queue\u0027,"},{"line_number":312,"context_line":"                        \u0027backend\u0027: \u0027rabbitmq\u0027,"},{"line_number":313,"context_line":"                        \u0027host\u0027: \u0027127.0.0.1\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa0c359_f3af76e0","line":310,"in_reply_to":"3fa0c359_88904aef","updated":"2018-02-09 19:43:05.000000000","message":"These are just examples. It depends on the publisher implementation. The publisher can be written to pick up secrets from the configuration file instead of passing thru the clients.","commit_id":"b061cbb16ef1256c565cd98b4c4779feda6233c6"},{"author":{"_account_id":16511,"name":"Bob Haddleton","email":"bob.haddleton@nokia.com","username":"bobh"},"change_message_id":"41e56f82cf9e24b8f95ceeb3f3fbaaffafae989c","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                        }"},{"line_number":308,"context_line":"                    },"},{"line_number":309,"context_line":"                    {"},{"line_number":310,"context_line":"                        \u0027type\u0027: \u0027queue\u0027,"},{"line_number":311,"context_line":"                        \u0027topic\u0027: \u0027failover_queue\u0027,"},{"line_number":312,"context_line":"                        \u0027backend\u0027: \u0027rabbitmq\u0027,"},{"line_number":313,"context_line":"                        \u0027host\u0027: \u0027127.0.0.1\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa0c359_53a18a45","line":310,"in_reply_to":"3fa0c359_f3af76e0","updated":"2018-02-09 20:21:48.000000000","message":"Thanks - that makes sense.","commit_id":"b061cbb16ef1256c565cd98b4c4779feda6233c6"}],"mistral/cmd/launch.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"c68b9b4efca291f17abee027275d5743ab9365b0","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    \u0027engine\u0027: launch_engine,"},{"line_number":125,"context_line":"    \u0027executor\u0027: launch_executor,"},{"line_number":126,"context_line":"    \u0027event-engine\u0027: launch_event_engine,"},{"line_number":127,"context_line":"    \u0027notifier\u0027: launch_notifier"},{"line_number":128,"context_line":"}"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_4fb64c8d","line":127,"range":{"start_line":127,"start_character":16,"end_line":127,"end_character":31},"updated":"2017-12-13 09:47:36.000000000","message":"Why do we need a separate standalone component for notifier? Can you elaborate? I guess we decided that together but I\u0027d like to recall.","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"923384486dffb78afbc572fba1a04c4cb8bac549","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    \u0027engine\u0027: launch_engine,"},{"line_number":125,"context_line":"    \u0027executor\u0027: launch_executor,"},{"line_number":126,"context_line":"    \u0027event-engine\u0027: launch_event_engine,"},{"line_number":127,"context_line":"    \u0027notifier\u0027: launch_notifier"},{"line_number":128,"context_line":"}"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_d6e07dcf","line":127,"range":{"start_line":127,"start_character":16,"end_line":127,"end_character":31},"in_reply_to":"df87a7cf_4fb64c8d","updated":"2018-01-03 23:26:54.000000000","message":"The notifier server is implemented exactly like the executor server. The notifier function can either be executed in the engine locally or delegated to a notifier server. The notifier server is available to minimize the impact of  the notification traffic on the engine performance. So for a relatively distributed install with multiple nodes running many workflows, the notification traffic can be queued and delegated to the notifier server.","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"}],"mistral/config.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"5fd8f0c6adc675867b7968591a8bddfc3720ead4","unresolved":false,"context_lines":[{"line_number":321,"context_line":"ENGINE_GROUP \u003d \u0027engine\u0027"},{"line_number":322,"context_line":"EXECUTOR_GROUP \u003d \u0027executor\u0027"},{"line_number":323,"context_line":"EVENT_ENGINE_GROUP \u003d \u0027event_engine\u0027"},{"line_number":324,"context_line":"NOTIFICATION_GROUP \u003d \u0027notifier\u0027"},{"line_number":325,"context_line":"PECAN_GROUP \u003d \u0027pecan\u0027"},{"line_number":326,"context_line":"COORDINATION_GROUP \u003d \u0027coordination\u0027"},{"line_number":327,"context_line":"EXECUTION_EXPIRATION_POLICY_GROUP \u003d \u0027execution_expiration_policy\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"df140735_1c2c9097","line":324,"range":{"start_line":324,"start_character":0,"end_line":324,"end_character":12},"updated":"2017-06-01 04:53:26.000000000","message":"I think it should be NOTIFIER so that it\u0027s consistent with \u0027notifier\u0027.","commit_id":"dff13ce266595d7f875af91180413666d1ae1f40"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"c68b9b4efca291f17abee027275d5743ab9365b0","unresolved":false,"context_lines":[{"line_number":261,"context_line":"notifier_opts \u003d ["},{"line_number":262,"context_line":"    cfg.StrOpt("},{"line_number":263,"context_line":"        \u0027type\u0027,"},{"line_number":264,"context_line":"        choices\u003d[\u0027local\u0027, \u0027remote\u0027],"},{"line_number":265,"context_line":"        default\u003d\u0027remote\u0027,"},{"line_number":266,"context_line":"        help\u003d("},{"line_number":267,"context_line":"            \u0027Type of notifier. Use local to run the notifier within the \u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_4f65ebe0","line":264,"range":{"start_line":264,"start_character":16,"end_line":264,"end_character":35},"updated":"2017-12-13 09:47:36.000000000","message":"Ok, so. During my first attempt to review this patch I think I got the idea of \"local\" and \"remote\" notifier wrong.\n\nAs I understand now, the is essentially not a complete list of notification transports but rather a list of delegates that will be using plugins for specific notification transports. Right? Seems like we really need to distinguish these two cases, local and remote, because in case of remote notifier we need to involve all RPC machinery like we do with other components. And we need to provide the facility to run the service properly (using oslo.service etc.)\n\nInitially, I thought that we don\u0027t need to limit types of notifiers at this point at all and let just have notifier plugins implementing a certain interface. But maybe it really makes sense to do this separation because of the reason I mentioned above (RPC etc.).\n\n@Winson, can you comment on this?\n@Bob, what is your input?","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"923384486dffb78afbc572fba1a04c4cb8bac549","unresolved":false,"context_lines":[{"line_number":261,"context_line":"notifier_opts \u003d ["},{"line_number":262,"context_line":"    cfg.StrOpt("},{"line_number":263,"context_line":"        \u0027type\u0027,"},{"line_number":264,"context_line":"        choices\u003d[\u0027local\u0027, \u0027remote\u0027],"},{"line_number":265,"context_line":"        default\u003d\u0027remote\u0027,"},{"line_number":266,"context_line":"        help\u003d("},{"line_number":267,"context_line":"            \u0027Type of notifier. Use local to run the notifier within the \u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_5651cd61","line":264,"range":{"start_line":264,"start_character":16,"end_line":264,"end_character":35},"in_reply_to":"df87a7cf_4f65ebe0","updated":"2018-01-03 23:26:54.000000000","message":"The notifier server is implemented exactly like the executor server. The notifier function can either be executed in the engine locally or delegated to a remote notifier server. This option specifies whether to run the notifier function locally ore remotely. The actually list of notifier plugins to publish the event (i.e. publish to webhook, zaqar, or etc.) are defined separately and the abstract method of the notifier plugin will run locally or remotely depending on the option specified here.","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"}],"mistral/engine/default_engine.py":[{"author":{"_account_id":27008,"name":"Vitalii Solodilov","email":"Mcdkr@yandex.ru","username":"mcdoker18"},"change_message_id":"3ad6a75869d8d6132d59838b29aff27471315bb7","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            params[\u0027namespace\u0027] \u003d wf_namespace"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        if cfg.CONF.notifier.notify:"},{"line_number":48,"context_line":"            if \u0027notify\u0027 not in params or not params[\u0027notify\u0027]:"},{"line_number":49,"context_line":"                params[\u0027notify\u0027] \u003d []"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"            params[\u0027notify\u0027].extend(cfg.CONF.notifier.notify)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa0c359_cbd60550","line":48,"range":{"start_line":48,"start_character":15,"end_line":48,"end_character":61},"updated":"2018-02-24 22:03:55.000000000","message":"I think the `not params.get(\u0027notify\u0027)` is a lot more sense.","commit_id":"3f48e24dc4948970105020140d8290788cca86c1"}],"mistral/engine/tasks.py":[{"author":{"_account_id":16511,"name":"Bob Haddleton","email":"bob.haddleton@nokia.com","username":"bobh"},"change_message_id":"587716855181ee78b32f082eb9b1887ce67137f1","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            else event_options[\u0027ANY\u0027]"},{"line_number":86,"context_line":"        )"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        notifier_config \u003d self.task_ex.workflow_execution.notify"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        if not notifier_config:"},{"line_number":91,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_ac512e11","line":88,"updated":"2017-10-19 02:09:22.000000000","message":"This limits task notifications to workflow executions that have been created with the notify option.  The notification needs to be passed to the notifier so the plugins can decide what to do with it.","commit_id":"cb7b431b2307e0c6dbb2be82d9046182c590f222"},{"author":{"_account_id":16511,"name":"Bob Haddleton","email":"bob.haddleton@nokia.com","username":"bobh"},"change_message_id":"46a1ec518503b6ab6bba7852b5269a910a3a62af","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            else event_options[\u0027ANY\u0027]"},{"line_number":86,"context_line":"        )"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        notifier_config \u003d self.task_ex.workflow_execution.notify"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        if not notifier_config:"},{"line_number":91,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_d6a5be05","line":88,"in_reply_to":"3f4b6375_15670550","updated":"2017-10-23 13:18:21.000000000","message":"This seems to be adding a lot of config into the engine that would be better handled in the notifier plugin.  The engine should be responsible for sending the notification to the notifier, which forwards to the plugins.  The plugins can filter whatever they want based on their own configuration.","commit_id":"cb7b431b2307e0c6dbb2be82d9046182c590f222"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"3a36b975c7621bae04fbe00cbd64332153248e40","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            else event_options[\u0027ANY\u0027]"},{"line_number":86,"context_line":"        )"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        notifier_config \u003d self.task_ex.workflow_execution.notify"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        if not notifier_config:"},{"line_number":91,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_15670550","line":88,"in_reply_to":"3f4b6375_ac512e11","updated":"2017-10-20 00:29:09.000000000","message":"I will be adding a default notify section in the configuration in a separate commit. This commit is getting huge. In the PTG, we agree to support default config and workflow level override.","commit_id":"cb7b431b2307e0c6dbb2be82d9046182c590f222"},{"author":{"_account_id":16511,"name":"Bob Haddleton","email":"bob.haddleton@nokia.com","username":"bobh"},"change_message_id":"587716855181ee78b32f082eb9b1887ce67137f1","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        filtered_events \u003d notifier_config.get(\u0027events\u0027, [])"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        if filtered_events and event not in filtered_events:"},{"line_number":96,"context_line":"            return"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        notifier \u003d notif.get_notifier(cfg.CONF.notifier.type)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_2c3d3ebb","line":95,"range":{"start_line":95,"start_character":44,"end_line":95,"end_character":59},"updated":"2017-10-19 02:09:22.000000000","message":"The notifier plugins need to be able to do their own filtering","commit_id":"cb7b431b2307e0c6dbb2be82d9046182c590f222"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"3a36b975c7621bae04fbe00cbd64332153248e40","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        filtered_events \u003d notifier_config.get(\u0027events\u0027, [])"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        if filtered_events and event not in filtered_events:"},{"line_number":96,"context_line":"            return"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        notifier \u003d notif.get_notifier(cfg.CONF.notifier.type)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_754f59bd","line":95,"range":{"start_line":95,"start_character":44,"end_line":95,"end_character":59},"in_reply_to":"3f4b6375_2c3d3ebb","updated":"2017-10-20 00:29:09.000000000","message":"I disagree. We can\u0027t guarantee a 3rd party plugin to handle this correctly.","commit_id":"cb7b431b2307e0c6dbb2be82d9046182c590f222"},{"author":{"_account_id":16511,"name":"Bob Haddleton","email":"bob.haddleton@nokia.com","username":"bobh"},"change_message_id":"46a1ec518503b6ab6bba7852b5269a910a3a62af","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        filtered_events \u003d notifier_config.get(\u0027events\u0027, [])"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        if filtered_events and event not in filtered_events:"},{"line_number":96,"context_line":"            return"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        notifier \u003d notif.get_notifier(cfg.CONF.notifier.type)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_76aa8ad2","line":95,"range":{"start_line":95,"start_character":44,"end_line":95,"end_character":59},"in_reply_to":"3f4b6375_754f59bd","updated":"2017-10-23 13:18:21.000000000","message":"But the plugins need to determine what \"correctly\" means for their own needs.  It\u0027s not up to the engine to determine what the plugin\u0027s needs are.","commit_id":"cb7b431b2307e0c6dbb2be82d9046182c590f222"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"c68b9b4efca291f17abee027275d5743ab9365b0","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"TASK_EVENT_MAP \u003d {"},{"line_number":41,"context_line":"    states.RUNNING: {"},{"line_number":42,"context_line":"        \u0027ANY\u0027: events.TASK_LAUNCHED_EVENT,"},{"line_number":43,"context_line":"        \u0027IDLE\u0027: events.TASK_RESUMED_EVENT,"},{"line_number":44,"context_line":"        \u0027PAUSED\u0027: events.TASK_RESUMED_EVENT,"},{"line_number":45,"context_line":"        \u0027WAITING\u0027: events.TASK_RESUMED_EVENT"},{"line_number":46,"context_line":"    },"},{"line_number":47,"context_line":"    states.SUCCESS: {\u0027ANY\u0027: events.TASK_SUCCEEDED_EVENT},"},{"line_number":48,"context_line":"    states.ERROR: {\u0027ANY\u0027: events.TASK_FAILED_EVENT},"},{"line_number":49,"context_line":"    states.CANCELLED: {\u0027ANY\u0027: events.TASK_CANCELLED_EVENT},"},{"line_number":50,"context_line":"    states.PAUSED: {\u0027ANY\u0027: events.TASK_PAUSED_EVENT}"},{"line_number":51,"context_line":"}"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_6f7c6f72","line":51,"range":{"start_line":40,"start_character":0,"end_line":51,"end_character":1},"updated":"2017-12-13 09:47:36.000000000","message":"It feels to me that it\u0027d be better to consolidate these maps at one place, maybe just a separate module. Because it\u0027s kind of a cross-cutting concern (but not exactly though) that shouldn\u0027t appear too much in the main logic.","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"923384486dffb78afbc572fba1a04c4cb8bac549","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"TASK_EVENT_MAP \u003d {"},{"line_number":41,"context_line":"    states.RUNNING: {"},{"line_number":42,"context_line":"        \u0027ANY\u0027: events.TASK_LAUNCHED_EVENT,"},{"line_number":43,"context_line":"        \u0027IDLE\u0027: events.TASK_RESUMED_EVENT,"},{"line_number":44,"context_line":"        \u0027PAUSED\u0027: events.TASK_RESUMED_EVENT,"},{"line_number":45,"context_line":"        \u0027WAITING\u0027: events.TASK_RESUMED_EVENT"},{"line_number":46,"context_line":"    },"},{"line_number":47,"context_line":"    states.SUCCESS: {\u0027ANY\u0027: events.TASK_SUCCEEDED_EVENT},"},{"line_number":48,"context_line":"    states.ERROR: {\u0027ANY\u0027: events.TASK_FAILED_EVENT},"},{"line_number":49,"context_line":"    states.CANCELLED: {\u0027ANY\u0027: events.TASK_CANCELLED_EVENT},"},{"line_number":50,"context_line":"    states.PAUSED: {\u0027ANY\u0027: events.TASK_PAUSED_EVENT}"},{"line_number":51,"context_line":"}"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_766df102","line":51,"range":{"start_line":40,"start_character":0,"end_line":51,"end_character":1},"in_reply_to":"df87a7cf_6f7c6f72","updated":"2018-01-03 23:26:54.000000000","message":"Sure.","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"c68b9b4efca291f17abee027275d5743ab9365b0","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            else event_options[\u0027ANY\u0027]"},{"line_number":86,"context_line":"        )"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        notify_options \u003d self.task_ex.workflow_execution.params.get(\u0027notify\u0027)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        if not notify_options and not isinstance(notify_options, list):"},{"line_number":91,"context_line":"            return"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        for notify_option in notify_options:"},{"line_number":94,"context_line":"            if not isinstance(notify_option, dict):"},{"line_number":95,"context_line":"                continue"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_592c4201","line":93,"range":{"start_line":88,"start_character":8,"end_line":93,"end_character":43},"updated":"2017-12-13 09:47:36.000000000","message":"This code means that we\u0027ll be notifying about workflow executions where we set this param \"notify\". We need to have a chance to notify about all events. How about having a config option to enable event notifications by default?\n\nHowever, in case if we want to notify by default we need to come up with some more sophisticated subscription mechanism. We need to store subscribers somewhere in DB so that we know whom and how to notify. It\u0027s a pretty big design change but I think we really need it.","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"923384486dffb78afbc572fba1a04c4cb8bac549","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            else event_options[\u0027ANY\u0027]"},{"line_number":86,"context_line":"        )"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        notify_options \u003d self.task_ex.workflow_execution.params.get(\u0027notify\u0027)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        if not notify_options and not isinstance(notify_options, list):"},{"line_number":91,"context_line":"            return"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        for notify_option in notify_options:"},{"line_number":94,"context_line":"            if not isinstance(notify_option, dict):"},{"line_number":95,"context_line":"                continue"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_162a658f","line":93,"range":{"start_line":88,"start_character":8,"end_line":93,"end_character":43},"in_reply_to":"df87a7cf_592c4201","updated":"2018-01-03 23:26:54.000000000","message":"I plan to add a config section to define default notifiers for all events. Notifier \u003d\u003d event publishers to me (not event subscribers). We just need to publish the events. I don\u0027t think we need to care who the subscribers are. So we only need to care about the publishing endpoints (i.e. which webhook API or which zaqar queue and the credentials to use for publishing the events there). The notify option on workflow execution allows for an event publisher to be specified one time or dynamically. I don\u0027t think we need a separate DB structure. It may be nice which I can see but not necessary. Since it\u0027s nice to have, I would defer that to a separate patch or blueprint.","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"c68b9b4efca291f17abee027275d5743ab9365b0","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            if not isinstance(notify_option, dict):"},{"line_number":95,"context_line":"                continue"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"            filtered_events \u003d notify_option.get(\u0027events\u0027, [])"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"            if filtered_events and event not in filtered_events:"},{"line_number":100,"context_line":"                continue"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"            notifier \u003d notif.get_notifier(cfg.CONF.notifier.type)"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_2f7c271f","line":100,"range":{"start_line":97,"start_character":12,"end_line":100,"end_character":24},"updated":"2017-12-13 09:47:36.000000000","message":"Based on the previous comment, it\u0027s too early here to do any filtering. Engine should just notify about all events and then it\u0027s up to the notifier what and how to deliver notifications. The only thing I would check here is that if notifications are enabled at all. I assume someone might disable them for resource/performance reasons. Let\u0027s add a config option for that. Or just \"none\" value for notifier type option.","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"923384486dffb78afbc572fba1a04c4cb8bac549","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            if not isinstance(notify_option, dict):"},{"line_number":95,"context_line":"                continue"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"            filtered_events \u003d notify_option.get(\u0027events\u0027, [])"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"            if filtered_events and event not in filtered_events:"},{"line_number":100,"context_line":"                continue"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"            notifier \u003d notif.get_notifier(cfg.CONF.notifier.type)"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_b94daa73","line":100,"range":{"start_line":97,"start_character":12,"end_line":100,"end_character":24},"in_reply_to":"df87a7cf_2f7c271f","updated":"2018-01-03 23:26:54.000000000","message":"If this is a source of contention, I can live with it moving down to the notifier plugins and letting the plugins decide.","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"},{"author":{"_account_id":16511,"name":"Bob Haddleton","email":"bob.haddleton@nokia.com","username":"bobh"},"change_message_id":"f21d9028805f0adfad6de9707217e5cab1ab267a","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        notifier \u003d notif.get_notifier(cfg.CONF.notifier.type)"},{"line_number":71,"context_line":"        event \u003d events.identify_task_event(old_task_state, new_task_state)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        for notify_option in notify_options:"},{"line_number":74,"context_line":"            if not isinstance(notify_option, dict):"},{"line_number":75,"context_line":"                continue"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa0c359_3b4ffe6b","line":73,"updated":"2018-02-09 16:48:17.000000000","message":"Considering the number of places that this method is called, it would reduce the load on the engine/executor to send one notification of the event to the notifier service, along with all of the notify_options, and let the notifier service spin through all of the required notifications.","commit_id":"b061cbb16ef1256c565cd98b4c4779feda6233c6"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"8e2ec9d8bbd1a5bba1f2e2ad5741cc6c256d86e2","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        notifier \u003d notif.get_notifier(cfg.CONF.notifier.type)"},{"line_number":71,"context_line":"        event \u003d events.identify_task_event(old_task_state, new_task_state)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        for notify_option in notify_options:"},{"line_number":74,"context_line":"            if not isinstance(notify_option, dict):"},{"line_number":75,"context_line":"                continue"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa0c359_59852bce","line":73,"in_reply_to":"3fa0c359_3b4ffe6b","updated":"2018-02-09 22:35:20.000000000","message":"Done","commit_id":"b061cbb16ef1256c565cd98b4c4779feda6233c6"},{"author":{"_account_id":27008,"name":"Vitalii Solodilov","email":"Mcdkr@yandex.ru","username":"mcdoker18"},"change_message_id":"3ad6a75869d8d6132d59838b29aff27471315bb7","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    def notify(self, old_task_state, new_task_state):"},{"line_number":65,"context_line":"        publishers \u003d self.wf_ex.params.get(\u0027notify\u0027)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        if not publishers and not isinstance(publishers, list):"},{"line_number":68,"context_line":"            return"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        notifier \u003d notif.get_notifier(cfg.CONF.notifier.type)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa0c359_2ee8d7df","line":67,"updated":"2018-02-24 22:03:55.000000000","message":"I don\u0027t understand the condition. \nIf a notify params will be string or dict, but not a array then notifier will be called.\nAnyway why don\u0027t we check it in the api layer?\nIMHO, the best solution is publisher will be like an Action. I mean has strictly input parameters and name. And api layer checks and raises a exception if user will pass wrong input\\not existed publisher.\nRight now if user will pass wrong a notify parameter then he knows about it only in a runtime.","commit_id":"3f48e24dc4948970105020140d8290788cca86c1"}],"mistral/engine/workflows.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"5fd8f0c6adc675867b7968591a8bddfc3720ead4","unresolved":false,"context_lines":[{"line_number":365,"context_line":""},{"line_number":366,"context_line":"        # Publish event."},{"line_number":367,"context_line":"        if self.wf_ex.notify:"},{"line_number":368,"context_line":"            rpc.get_notification_client().notify("},{"line_number":369,"context_line":"                self.wf_ex.id,"},{"line_number":370,"context_line":"                self.wf_ex.to_dict(),"},{"line_number":371,"context_line":"                events.WORKFLOW_SUCCEEDED_EVENT,"}],"source_content_type":"text/x-python","patch_set":1,"id":"df140735_3c85145b","line":368,"range":{"start_line":368,"start_character":20,"end_line":368,"end_character":32},"updated":"2017-06-01 04:53:26.000000000","message":"again, I think it should be \"notifier\"","commit_id":"dff13ce266595d7f875af91180413666d1ae1f40"},{"author":{"_account_id":16511,"name":"Bob Haddleton","email":"bob.haddleton@nokia.com","username":"bobh"},"change_message_id":"587716855181ee78b32f082eb9b1887ce67137f1","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        filtered_events \u003d self.wf_ex.notify.get(\u0027events\u0027, [])"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        if filtered_events and event not in filtered_events:"},{"line_number":73,"context_line":"            return"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        notifier \u003d notif.get_notifier(cfg.CONF.notifier.type)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_4cae3ae8","line":72,"updated":"2017-10-19 02:09:22.000000000","message":"Event plugins need to be able to filter the events","commit_id":"cb7b431b2307e0c6dbb2be82d9046182c590f222"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"3a36b975c7621bae04fbe00cbd64332153248e40","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        filtered_events \u003d self.wf_ex.notify.get(\u0027events\u0027, [])"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        if filtered_events and event not in filtered_events:"},{"line_number":73,"context_line":"            return"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        notifier \u003d notif.get_notifier(cfg.CONF.notifier.type)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_f5d0e9cb","line":72,"in_reply_to":"3f4b6375_4cae3ae8","updated":"2017-10-20 00:29:09.000000000","message":"I disagree. We can\u0027t guarantee a 3rd party plugin to handle this correctly.","commit_id":"cb7b431b2307e0c6dbb2be82d9046182c590f222"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"c68b9b4efca291f17abee027275d5743ab9365b0","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            self.wf_spec \u003d None"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def notify(self, event):"},{"line_number":67,"context_line":"        notify_options \u003d self.wf_ex.params.get(\u0027notify\u0027)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if not notify_options and not isinstance(notify_options, list):"},{"line_number":70,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_4f1deb0d","line":67,"range":{"start_line":67,"start_character":8,"end_line":67,"end_character":56},"updated":"2017-12-13 09:47:36.000000000","message":"Same thought about notifying by default w/o having to specify this \"notify\" parameter.","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"923384486dffb78afbc572fba1a04c4cb8bac549","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            self.wf_spec \u003d None"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def notify(self, event):"},{"line_number":67,"context_line":"        notify_options \u003d self.wf_ex.params.get(\u0027notify\u0027)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if not notify_options and not isinstance(notify_options, list):"},{"line_number":70,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_3604494a","line":67,"range":{"start_line":67,"start_character":8,"end_line":67,"end_character":56},"in_reply_to":"df87a7cf_4f1deb0d","updated":"2018-01-03 23:26:54.000000000","message":"I plan to add a config section to specify default notifier in additional to this list here.","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"},{"author":{"_account_id":16511,"name":"Bob Haddleton","email":"bob.haddleton@nokia.com","username":"bobh"},"change_message_id":"f21d9028805f0adfad6de9707217e5cab1ab267a","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        notifier \u003d notif.get_notifier(cfg.CONF.notifier.type)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        for notify_option in notify_options:"},{"line_number":76,"context_line":"            if not isinstance(notify_option, dict):"},{"line_number":77,"context_line":"                continue"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa0c359_1b7322b3","line":75,"updated":"2018-02-09 16:48:17.000000000","message":"Same comment as in tasks.notify()","commit_id":"b061cbb16ef1256c565cd98b4c4779feda6233c6"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"8e2ec9d8bbd1a5bba1f2e2ad5741cc6c256d86e2","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        notifier \u003d notif.get_notifier(cfg.CONF.notifier.type)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        for notify_option in notify_options:"},{"line_number":76,"context_line":"            if not isinstance(notify_option, dict):"},{"line_number":77,"context_line":"                continue"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa0c359_f96d1732","line":75,"in_reply_to":"3fa0c359_1b7322b3","updated":"2018-02-09 22:35:20.000000000","message":"Done","commit_id":"b061cbb16ef1256c565cd98b4c4779feda6233c6"},{"author":{"_account_id":27008,"name":"Vitalii Solodilov","email":"Mcdkr@yandex.ru","username":"mcdoker18"},"change_message_id":"3ad6a75869d8d6132d59838b29aff27471315bb7","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    def notify(self, event):"},{"line_number":68,"context_line":"        publishers \u003d self.wf_ex.params.get(\u0027notify\u0027)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        if not publishers and not isinstance(publishers, list):"},{"line_number":71,"context_line":"            return"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        notifier \u003d notif.get_notifier(cfg.CONF.notifier.type)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa0c359_4ee3e305","line":70,"updated":"2018-02-24 22:03:55.000000000","message":"the same","commit_id":"3f48e24dc4948970105020140d8290788cca86c1"}],"mistral/notification/base.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"5fd8f0c6adc675867b7968591a8bddfc3720ead4","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    \"\"\"Notifier interface.\"\"\""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    @abc.abstractmethod"},{"line_number":52,"context_line":"    def notify(self, ex_id, data, event, timestamp, **kwargs):"},{"line_number":53,"context_line":"        raise NotImplementedError()"}],"source_content_type":"text/x-python","patch_set":1,"id":"df140735_1cd6d050","line":52,"range":{"start_line":52,"start_character":21,"end_line":52,"end_character":26},"updated":"2017-06-01 04:53:26.000000000","message":"I would call it more precisely: wf_ex_id. Or you assume that we can notify about events happening with tasks and actions too?","commit_id":"dff13ce266595d7f875af91180413666d1ae1f40"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"5fd8f0c6adc675867b7968591a8bddfc3720ead4","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    \"\"\"Notifier interface.\"\"\""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    @abc.abstractmethod"},{"line_number":52,"context_line":"    def notify(self, ex_id, data, event, timestamp, **kwargs):"},{"line_number":53,"context_line":"        raise NotImplementedError()"}],"source_content_type":"text/x-python","patch_set":1,"id":"df140735_dccf38ae","line":52,"range":{"start_line":52,"start_character":8,"end_line":52,"end_character":14},"updated":"2017-06-01 04:53:26.000000000","message":"We need to add a docstring moving forward too.","commit_id":"dff13ce266595d7f875af91180413666d1ae1f40"}],"mistral/notification/events.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"5fd8f0c6adc675867b7968591a8bddfc3720ead4","unresolved":false,"context_lines":[{"line_number":15,"context_line":"WORKFLOW_SUCCEEDED_EVENT \u003d \u0027WORKFLOW_SUCCEEDED\u0027"},{"line_number":16,"context_line":"WORKFLOW_FAILED_EVENT \u003d \u0027WORKFLOW_FAILED\u0027"},{"line_number":17,"context_line":"WORKFLOW_CANCELLED_EVENT \u003d \u0027WORKFLOW_CANCELLED\u0027"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"EVENTS \u003d ["},{"line_number":20,"context_line":"    WORKFLOW_SUCCEEDED_EVENT,"},{"line_number":21,"context_line":"    WORKFLOW_FAILED_EVENT,"}],"source_content_type":"text/x-python","patch_set":1,"id":"df140735_3c38749e","line":18,"updated":"2017-06-01 04:53:26.000000000","message":"We\u0027ll also need WORKFLOW_PAUSED and WORKFLOW_RESUMED.\n\nAlso if we decide to have notifications configured per workflow definition (not execution) we\u0027ll need WORKFLOW_STARTED (or if we want it to match the state WORKFLOW_RUNNING).","commit_id":"dff13ce266595d7f875af91180413666d1ae1f40"}],"mistral/notification/notification_server.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"5fd8f0c6adc675867b7968591a8bddfc3720ead4","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    def start(self):"},{"line_number":38,"context_line":"        super(NotificationServer, self).start()"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        db_api.setup_db()"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        if self._setup_profiler:"},{"line_number":43,"context_line":"            profiler_utils.setup(\u0027mistral-notifier\u0027, cfg.CONF.notifier.host)"}],"source_content_type":"text/x-python","patch_set":1,"id":"df140735_1c3b709c","line":40,"range":{"start_line":40,"start_character":8,"end_line":40,"end_character":25},"updated":"2017-06-01 04:53:26.000000000","message":"I think we don\u0027t need to init DB in the notifier. It doesn\u0027t work with DB directly.","commit_id":"dff13ce266595d7f875af91180413666d1ae1f40"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"5fd8f0c6adc675867b7968591a8bddfc3720ead4","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        if self._rpc_server:"},{"line_number":58,"context_line":"            self._rpc_server.stop(graceful)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def notify(self, rpc_ctx, ex_id, data, event, timestamp, **kwargs):"},{"line_number":61,"context_line":"        notifier_name \u003d kwargs.pop(\u0027type\u0027, None)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        if not notifier_name:"}],"source_content_type":"text/x-python","patch_set":1,"id":"df140735_5c50c8d4","line":60,"range":{"start_line":60,"start_character":30,"end_line":60,"end_character":35},"updated":"2017-06-01 04:53:26.000000000","message":"Same comment about wf_ex_id as in base.py.","commit_id":"dff13ce266595d7f875af91180413666d1ae1f40"}],"mistral/notification/webhook.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"5fd8f0c6adc675867b7968591a8bddfc3720ead4","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        url \u003d kwargs.get(\u0027url\u0027)"},{"line_number":31,"context_line":"        headers \u003d kwargs.get(\u0027headers\u0027, {})"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        resp \u003d requests.post(url, data\u003djson.dumps(data), headers\u003dheaders)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"        if resp.status_code not in [http_client.OK, http_client.CREATED]:"},{"line_number":36,"context_line":"            raise Exception(resp.text)"}],"source_content_type":"text/x-python","patch_set":1,"id":"df140735_1c6490b8","line":33,"range":{"start_line":33,"start_character":24,"end_line":33,"end_character":28},"updated":"2017-06-01 04:53:26.000000000","message":"Should it always be POST? I assume one may want to call other methods too.","commit_id":"dff13ce266595d7f875af91180413666d1ae1f40"}],"mistral/notifiers/base.py":[{"author":{"_account_id":16511,"name":"Bob Haddleton","email":"bob.haddleton@nokia.com","username":"bobh"},"change_message_id":"587716855181ee78b32f082eb9b1887ce67137f1","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    global _NOTIFIER_PLUGINS"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    if not _NOTIFIER_PLUGINS.get(plugin_name):"},{"line_number":55,"context_line":"        mgr \u003d driver.DriverManager("},{"line_number":56,"context_line":"            \u0027mistral.notifiers.plugins\u0027,"},{"line_number":57,"context_line":"            plugin_name,"},{"line_number":58,"context_line":"            invoke_on_load\u003dTrue"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_0c91629a","line":55,"range":{"start_line":55,"start_character":21,"end_line":55,"end_character":34},"updated":"2017-10-19 02:09:22.000000000","message":"This allows only one plugin - ExtensionManager would allow for multiple notification plugins to all process the same notification","commit_id":"cb7b431b2307e0c6dbb2be82d9046182c590f222"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"3a36b975c7621bae04fbe00cbd64332153248e40","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    global _NOTIFIER_PLUGINS"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    if not _NOTIFIER_PLUGINS.get(plugin_name):"},{"line_number":55,"context_line":"        mgr \u003d driver.DriverManager("},{"line_number":56,"context_line":"            \u0027mistral.notifiers.plugins\u0027,"},{"line_number":57,"context_line":"            plugin_name,"},{"line_number":58,"context_line":"            invoke_on_load\u003dTrue"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_95d775c0","line":55,"range":{"start_line":55,"start_character":21,"end_line":55,"end_character":34},"in_reply_to":"3f4b6375_0c91629a","updated":"2017-10-20 00:29:09.000000000","message":"This is a factory method. If we want multiple notifiers per events, it\u0027ll be outside of this method. I will add support for it in a separate patch. This patch is getting huge.","commit_id":"cb7b431b2307e0c6dbb2be82d9046182c590f222"},{"author":{"_account_id":27008,"name":"Vitalii Solodilov","email":"Mcdkr@yandex.ru","username":"mcdoker18"},"change_message_id":"9d258337952e9ea0d9d56816588fd5e437e232fb","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    \"\"\"Notifier plugin interface.\"\"\""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @abc.abstractmethod"},{"line_number":80,"context_line":"    def notify(self, ex_id, data, event, timestamp, **kwargs):"},{"line_number":81,"context_line":"        raise NotImplementedError()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_d06906f9","line":80,"updated":"2017-10-25 09:11:27.000000000","message":"Maybe add auth_ctx to parameters?","commit_id":"cb7b431b2307e0c6dbb2be82d9046182c590f222"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"1b8c9bb66b97bf586bc99a033509d3b61f13fc86","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    \"\"\"Notifier plugin interface.\"\"\""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @abc.abstractmethod"},{"line_number":80,"context_line":"    def notify(self, ex_id, data, event, timestamp, **kwargs):"},{"line_number":81,"context_line":"        raise NotImplementedError()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_8767e44d","line":80,"in_reply_to":"3f4b6375_d06906f9","updated":"2017-11-03 03:39:51.000000000","message":"This makes sense. I probably prefer this to be follow up in a different patch from someone who is actually using the auth_ctx. Right now, none of my \"real\" integration tests for my uses cases require me to use the auth_ctx. I don\u0027t want to pass security data by default w/o someone actually using and testing.","commit_id":"cb7b431b2307e0c6dbb2be82d9046182c590f222"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"c68b9b4efca291f17abee027275d5743ab9365b0","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    \"\"\"Notifier interface.\"\"\""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @abc.abstractmethod"},{"line_number":71,"context_line":"    def notify(self, ex_id, data, event, timestamp, **kwargs):"},{"line_number":72,"context_line":"        raise NotImplementedError()"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_12ececf1","line":71,"range":{"start_line":71,"start_character":21,"end_line":71,"end_character":26},"updated":"2017-12-13 09:47:36.000000000","message":"So now this \"ex_id\" may be an id of any type of execution: workflow, task or action. I wonder, if we need to make a more clear separation. For example, if we\u0027re registering an event about action execution then information (at least IDs) about corresponding task execution and workflow execution is also relevant. I\u0027d like to have access to it somehow as a receiver of such a notification.","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"ab7fb03c38fd27758128bab6521dcc2d7de0207d","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    \"\"\"Notifier interface.\"\"\""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @abc.abstractmethod"},{"line_number":71,"context_line":"    def notify(self, ex_id, data, event, timestamp, **kwargs):"},{"line_number":72,"context_line":"        raise NotImplementedError()"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa0c359_a901d3b1","line":71,"range":{"start_line":71,"start_character":21,"end_line":71,"end_character":26},"in_reply_to":"9f91af0f_168ee5cf","updated":"2018-02-18 10:26:26.000000000","message":"Yeah, that\u0027s fine. I just wonder if it would be useful to also know a workflow execution ID in case when a consumer of the event got a notification about a task execution event. You know what I mean? Of course, the consumer can get more details by making another request to the Mistral API but that doesn\u0027t feel good to me. Maybe we could make it more consistent with https://github.com/openstack/mistral-lib/blob/master/mistral_lib/actions/context.py#L64","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"923384486dffb78afbc572fba1a04c4cb8bac549","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    \"\"\"Notifier interface.\"\"\""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @abc.abstractmethod"},{"line_number":71,"context_line":"    def notify(self, ex_id, data, event, timestamp, **kwargs):"},{"line_number":72,"context_line":"        raise NotImplementedError()"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_168ee5cf","line":71,"range":{"start_line":71,"start_character":21,"end_line":71,"end_character":26},"in_reply_to":"df87a7cf_12ececf1","updated":"2018-01-03 23:26:54.000000000","message":"Yes, ex_id can be the ID of workflow, task, or action execution. The event (prefix with WORKFLOW, TASK, etc.) tells the type of ex_id.","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"c68b9b4efca291f17abee027275d5743ab9365b0","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":76,"context_line":"class NotifierPlugin(object):"},{"line_number":77,"context_line":"    \"\"\"Notifier plugin interface.\"\"\""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @abc.abstractmethod"},{"line_number":80,"context_line":"    def notify(self, ex_id, data, event, timestamp, **kwargs):"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_2f3d072c","line":77,"range":{"start_line":76,"start_character":6,"end_line":77,"end_character":35},"updated":"2017-12-13 09:47:36.000000000","message":"I can guess what it is but it\u0027s confusing if I just look at the code here. Would you please add more information here and probably call the class differently? We need to clearly understand what this entity is responsible for.","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"923384486dffb78afbc572fba1a04c4cb8bac549","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":76,"context_line":"class NotifierPlugin(object):"},{"line_number":77,"context_line":"    \"\"\"Notifier plugin interface.\"\"\""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @abc.abstractmethod"},{"line_number":80,"context_line":"    def notify(self, ex_id, data, event, timestamp, **kwargs):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_b6be1963","line":77,"range":{"start_line":76,"start_character":6,"end_line":77,"end_character":35},"in_reply_to":"df87a7cf_2f3d072c","updated":"2018-01-03 23:26:54.000000000","message":"Ok. Any suggestions on naming?","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"}],"mistral/notifiers/default_notifier.py":[{"author":{"_account_id":16511,"name":"Bob Haddleton","email":"bob.haddleton@nokia.com","username":"bobh"},"change_message_id":"587716855181ee78b32f082eb9b1887ce67137f1","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    \"\"\"Local notifier that process notification request.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def notify(self, ex_id, data, event, timestamp, **kwargs):"},{"line_number":27,"context_line":"        notifier_plugin_name \u003d kwargs.pop(\u0027type\u0027, None)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"        if not notifier_plugin_name:"},{"line_number":30,"context_line":"            LOG.error(\u0027Notification plugin type is not specified.\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_ecef26ae","line":27,"updated":"2017-10-19 02:09:22.000000000","message":"Setting the plugin name from the execution parameters doesn\u0027t allow for more general notification extensions","commit_id":"cb7b431b2307e0c6dbb2be82d9046182c590f222"},{"author":{"_account_id":16511,"name":"Bob Haddleton","email":"bob.haddleton@nokia.com","username":"bobh"},"change_message_id":"46a1ec518503b6ab6bba7852b5269a910a3a62af","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    \"\"\"Local notifier that process notification request.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def notify(self, ex_id, data, event, timestamp, **kwargs):"},{"line_number":27,"context_line":"        notifier_plugin_name \u003d kwargs.pop(\u0027type\u0027, None)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"        if not notifier_plugin_name:"},{"line_number":30,"context_line":"            LOG.error(\u0027Notification plugin type is not specified.\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_96f986c9","line":27,"in_reply_to":"3f4b6375_d5d5edba","updated":"2017-10-23 13:18:21.000000000","message":"My recollection of the PTG discussion is that we agreed on a general implementation that allowed the plugins to decide what they need based on the information available in the context.  Elsewhere you mentioned configuring the plugin in a config file, so why would it need to be exposed to the user via the notify input?","commit_id":"cb7b431b2307e0c6dbb2be82d9046182c590f222"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"3a36b975c7621bae04fbe00cbd64332153248e40","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    \"\"\"Local notifier that process notification request.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def notify(self, ex_id, data, event, timestamp, **kwargs):"},{"line_number":27,"context_line":"        notifier_plugin_name \u003d kwargs.pop(\u0027type\u0027, None)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"        if not notifier_plugin_name:"},{"line_number":30,"context_line":"            LOG.error(\u0027Notification plugin type is not specified.\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_d5d5edba","line":27,"in_reply_to":"3f4b6375_ecef26ae","updated":"2017-10-20 00:29:09.000000000","message":"In PTG, we agree to support a default notifier config + workflow level override. Where else would we specify the notification plugin name?","commit_id":"cb7b431b2307e0c6dbb2be82d9046182c590f222"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"5a723d1cc3fb5adfdcf107ec910ddd3248427f19","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                publisher.publish(ex_id, data, event, timestamp, **params)"},{"line_number":40,"context_line":"            except Exception:"},{"line_number":41,"context_line":"                LOG.exception("},{"line_number":42,"context_line":"                    \u0027Unable to process event for publisher \"%s\".\u0027,"},{"line_number":43,"context_line":"                    publisher_name"},{"line_number":44,"context_line":"                )"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa0c359_54ac6934","line":43,"range":{"start_line":42,"start_character":20,"end_line":43,"end_character":34},"updated":"2018-02-17 12:56:37.000000000","message":"Not so critical but I\u0027d also suggest we print info about the event.","commit_id":"0e6199ff6a10c6969c624d230822e5e64bfa7c1b"}],"mistral/notifiers/notification_events.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"c68b9b4efca291f17abee027275d5743ab9365b0","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    See the License for the specific language governing permissions and"},{"line_number":13,"context_line":"#    limitations under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"WORKFLOW_LAUNCHED_EVENT \u003d \u0027WORKFLOW_LAUNCHED\u0027"},{"line_number":16,"context_line":"WORKFLOW_SUCCEEDED_EVENT \u003d \u0027WORKFLOW_SUCCEEDED\u0027"},{"line_number":17,"context_line":"WORKFLOW_FAILED_EVENT \u003d \u0027WORKFLOW_FAILED\u0027"},{"line_number":18,"context_line":"WORKFLOW_CANCELLED_EVENT \u003d \u0027WORKFLOW_CANCELLED\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_ef907ff0","line":15,"range":{"start_line":15,"start_character":17,"end_line":15,"end_character":23},"updated":"2017-12-13 09:47:36.000000000","message":"I would omit this suffix because we always know from the context that we\u0027re dealing with event types.","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"923384486dffb78afbc572fba1a04c4cb8bac549","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    See the License for the specific language governing permissions and"},{"line_number":13,"context_line":"#    limitations under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"WORKFLOW_LAUNCHED_EVENT \u003d \u0027WORKFLOW_LAUNCHED\u0027"},{"line_number":16,"context_line":"WORKFLOW_SUCCEEDED_EVENT \u003d \u0027WORKFLOW_SUCCEEDED\u0027"},{"line_number":17,"context_line":"WORKFLOW_FAILED_EVENT \u003d \u0027WORKFLOW_FAILED\u0027"},{"line_number":18,"context_line":"WORKFLOW_CANCELLED_EVENT \u003d \u0027WORKFLOW_CANCELLED\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_36b20996","line":15,"range":{"start_line":15,"start_character":17,"end_line":15,"end_character":23},"in_reply_to":"df87a7cf_ef907ff0","updated":"2018-01-03 23:26:54.000000000","message":"Sure.","commit_id":"b2147b25287f38417ac0faafd4855e34af489d53"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"5a723d1cc3fb5adfdcf107ec910ddd3248427f19","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        \u0027ANY\u0027: TASK_LAUNCHED,"},{"line_number":55,"context_line":"        \u0027IDLE\u0027: TASK_RESUMED,"},{"line_number":56,"context_line":"        \u0027PAUSED\u0027: TASK_RESUMED,"},{"line_number":57,"context_line":"        \u0027WAITING\u0027: TASK_RESUMED"},{"line_number":58,"context_line":"    },"},{"line_number":59,"context_line":"    states.SUCCESS: {\u0027ANY\u0027: TASK_SUCCEEDED},"},{"line_number":60,"context_line":"    states.ERROR: {\u0027ANY\u0027: TASK_FAILED},"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa0c359_94baf16b","line":57,"range":{"start_line":57,"start_character":8,"end_line":57,"end_character":31},"updated":"2018-02-17 12:56:37.000000000","message":"WAITING is now used for join tasks for that are not triggered yet (not all preconditions are met) so this may not be 100% accurate to say that the task was resumed when it switched from WAITING to RUNNING because \u0027resumed\u0027 initially meant the transition from PAUSED to RUNNING. But maybe it\u0027s still ok to use this term. Just something to think about..","commit_id":"0e6199ff6a10c6969c624d230822e5e64bfa7c1b"}],"mistral/notifiers/notification_server.py":[{"author":{"_account_id":16511,"name":"Bob Haddleton","email":"bob.haddleton@nokia.com","username":"bobh"},"change_message_id":"f21d9028805f0adfad6de9707217e5cab1ab267a","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            data,"},{"line_number":76,"context_line":"            utils.cut(kwargs)"},{"line_number":77,"context_line":"        )"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        self.notifier.notify(ex_id, data, event, timestamp, **kwargs)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa0c359_bbdc6ee4","line":78,"updated":"2018-02-09 16:48:17.000000000","message":"Maybe move the for loop from tasks/workflows.notify() to here so it is out of the mainline code?  Also wold reduce RPC traffic when there are multiple notifiers configured.","commit_id":"b061cbb16ef1256c565cd98b4c4779feda6233c6"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"8e2ec9d8bbd1a5bba1f2e2ad5741cc6c256d86e2","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            data,"},{"line_number":76,"context_line":"            utils.cut(kwargs)"},{"line_number":77,"context_line":"        )"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        self.notifier.notify(ex_id, data, event, timestamp, **kwargs)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa0c359_196b231e","line":78,"in_reply_to":"3fa0c359_bbdc6ee4","updated":"2018-02-09 22:35:20.000000000","message":"Moved the loop to the default_notifier.","commit_id":"b061cbb16ef1256c565cd98b4c4779feda6233c6"}],"mistral/notifiers/plugins/webhook.py":[{"author":{"_account_id":27008,"name":"Vitalii Solodilov","email":"Mcdkr@yandex.ru","username":"mcdoker18"},"change_message_id":"9d258337952e9ea0d9d56816588fd5e437e232fb","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        url \u003d kwargs.get(\u0027url\u0027)"},{"line_number":31,"context_line":"        headers \u003d kwargs.get(\u0027headers\u0027, {})"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        resp \u003d requests.post(url, data\u003djson.dumps(data), headers\u003dheaders)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"        if resp.status_code not in [http_client.OK, http_client.CREATED]:"},{"line_number":36,"context_line":"            raise Exception(resp.text)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_3005fa14","line":33,"updated":"2017-10-25 09:11:27.000000000","message":"I think we should pass event to data or headers. I like the data variant.","commit_id":"cb7b431b2307e0c6dbb2be82d9046182c590f222"}],"mistral/notifiers/publishers/noop.py":[{"author":{"_account_id":27008,"name":"Vitalii Solodilov","email":"Mcdkr@yandex.ru","username":"mcdoker18"},"change_message_id":"3ad6a75869d8d6132d59838b29aff27471315bb7","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def publish(self, ex_id, data, event, timestamp, **kwargs):"},{"line_number":26,"context_line":"        LOG.info("},{"line_number":27,"context_line":"            \u0027The event %s for %s is published by the \u0027"},{"line_number":28,"context_line":"            \u0027noop notification publisher.\u0027,"},{"line_number":29,"context_line":"            event,"},{"line_number":30,"context_line":"            ex_id"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa0c359_2ed1b723","line":27,"updated":"2018-02-24 22:03:55.000000000","message":"It is publisher for a testing purpose. Why don\u0027t we log all of method parameters?","commit_id":"3f48e24dc4948970105020140d8290788cca86c1"}],"mistral/notifiers/publishers/webhook.py":[{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"a6dff75d07a5e42c172568410da767e4284f2789","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        resp \u003d requests.post(url, data\u003djson.dumps(data), headers\u003dheaders)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"        if resp.status_code not in [http_client.OK, http_client.CREATED]:"},{"line_number":36,"context_line":"            raise Exception(resp.text)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa0c359_c32d13a9","line":35,"range":{"start_line":35,"start_character":35,"end_line":35,"end_character":71},"updated":"2018-02-22 20:32:22.000000000","message":"Wouldn\u0027t any 2XX status code be okay?","commit_id":"0e6199ff6a10c6969c624d230822e5e64bfa7c1b"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"91163b6450c48f7694f8b8fe17e0dccfaa69eb30","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        resp \u003d requests.post(url, data\u003djson.dumps(data), headers\u003dheaders)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"        if resp.status_code not in [http_client.OK, http_client.CREATED]:"},{"line_number":36,"context_line":"            raise Exception(resp.text)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa0c359_e7dd5441","line":35,"range":{"start_line":35,"start_character":35,"end_line":35,"end_character":71},"in_reply_to":"3fa0c359_a7f50ccd","updated":"2018-02-22 20:41:54.000000000","message":"Sure, sorry - I didn\u0027t mean to submit that comment. It had been sitting as a draft.","commit_id":"0e6199ff6a10c6969c624d230822e5e64bfa7c1b"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"3c65d1747a215a6c8dea452ca4095be66f9c11a7","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        resp \u003d requests.post(url, data\u003djson.dumps(data), headers\u003dheaders)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"        if resp.status_code not in [http_client.OK, http_client.CREATED]:"},{"line_number":36,"context_line":"            raise Exception(resp.text)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa0c359_a7f50ccd","line":35,"range":{"start_line":35,"start_character":35,"end_line":35,"end_character":71},"in_reply_to":"3fa0c359_c32d13a9","updated":"2018-02-22 20:36:59.000000000","message":"Not really. Most webhook returns 200 or 201. This is also a very simple plugin to demonstrate feature. If there are other cases that need to be handled, I prefer it be follow up with a concrete webhook with that use case.","commit_id":"0e6199ff6a10c6969c624d230822e5e64bfa7c1b"}],"mistral/rpc/clients.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"5a723d1cc3fb5adfdcf107ec910ddd3248427f19","unresolved":false,"context_lines":[{"line_number":421,"context_line":"                publishers\u003dpublishers"},{"line_number":422,"context_line":"            )"},{"line_number":423,"context_line":"        except Exception:"},{"line_number":424,"context_line":"            LOG.exception(\u0027Unable to send notification.\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa0c359_b4628d15","line":424,"range":{"start_line":424,"start_character":27,"end_line":424,"end_character":57},"updated":"2018-02-17 12:56:37.000000000","message":"Maybe we need to specify more info here too.","commit_id":"0e6199ff6a10c6969c624d230822e5e64bfa7c1b"}],"mistral/tests/unit/test_launcher.py":[{"author":{"_account_id":27008,"name":"Vitalii Solodilov","email":"Mcdkr@yandex.ru","username":"mcdoker18"},"change_message_id":"3ad6a75869d8d6132d59838b29aff27471315bb7","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        api_workers \u003d api_server.workers"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        self._await(lambda: len(svr_proc_mgr.children.keys()) \u003d\u003d api_workers)"},{"line_number":51,"context_line":"        self._await(lambda: len(svr_thrd_mgr.services.services) \u003d\u003d 4)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def test_launch_process(self):"},{"line_number":54,"context_line":"        eventlet.spawn(launch.launch_any, [\u0027api\u0027])"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa0c359_6ea81f8b","line":51,"updated":"2018-02-24 22:03:55.000000000","message":"I don\u0027t like hardcode. `len(launch.LAUNCH_OPTIONS)`","commit_id":"3f48e24dc4948970105020140d8290788cca86c1"}],"setup.cfg":[{"author":{"_account_id":27008,"name":"Vitalii Solodilov","email":"Mcdkr@yandex.ru","username":"mcdoker18"},"change_message_id":"3ad6a75869d8d6132d59838b29aff27471315bb7","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    remote \u003d mistral.notifiers.remote_notifier:RemoteNotifier"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"mistral.notification.publishers \u003d"},{"line_number":83,"context_line":"    webhook \u003d mistral.notifiers.publishers.webhook:WebhookPublisher"},{"line_number":84,"context_line":"    noop \u003d mistral.notifiers.publishers.noop:NoopPublisher"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"mistral.expression.functions \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":14,"id":"3fa0c359_4e1e830c","line":83,"updated":"2018-02-24 22:03:55.000000000","message":"Maybe do we add the \u0027std\u0027 prefix?","commit_id":"3f48e24dc4948970105020140d8290788cca86c1"}]}
