)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"6308500694c7d27403b2a2d93bd5f64f3c407b47","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"1a6eadb0_a8abf173","updated":"2016-12-15 17:04:58.000000000","message":"I think it might be useful at some point to draft out some very rough docs or examples of how this would be used. It would be useful from a reviewers point of view to see how this would work and it would also make sure the API looks decent. It could even take the form of a few example actions (I realise these wouldn\u0027t work yet, but I think it would be useful from a design perspective).","commit_id":"bbe618e19f9037bc38c802111bd0eb5d16ee293d"},{"author":{"_account_id":8532,"name":"Ryan Brady","email":"rbrady@redhat.com","username":"rbrady"},"change_message_id":"0b10cf40485cf12a3bbd5ac6711c3e2fd79a9cd0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"1a6eadb0_a804d117","in_reply_to":"1a6eadb0_a8abf173","updated":"2016-12-15 19:28:01.000000000","message":"Good idea!.  I added a copy of the current docs for custom actions but with the current namespace changes.  I will continue to improve this doc over time to include more complex action scenarios.","commit_id":"bbe618e19f9037bc38c802111bd0eb5d16ee293d"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"6308500694c7d27403b2a2d93bd5f64f3c407b47","unresolved":false,"context_lines":[{"line_number":13,"context_line":"mistral_lib.utils.threading."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The mistral_lib.api namespace was also removed in favor of"},{"line_number":16,"context_line":"following the python convention of using a namespace to denote"},{"line_number":17,"context_line":"private methods and considering all other methods public."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"The security and executions modules in mistral_lib.actions are"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a6eadb0_28a9a190","line":16,"updated":"2016-12-15 17:04:58.000000000","message":"s/namespace/underscore/ ?","commit_id":"bbe618e19f9037bc38c802111bd0eb5d16ee293d"},{"author":{"_account_id":8532,"name":"Ryan Brady","email":"rbrady@redhat.com","username":"rbrady"},"change_message_id":"0b10cf40485cf12a3bbd5ac6711c3e2fd79a9cd0","unresolved":false,"context_lines":[{"line_number":13,"context_line":"mistral_lib.utils.threading."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The mistral_lib.api namespace was also removed in favor of"},{"line_number":16,"context_line":"following the python convention of using a namespace to denote"},{"line_number":17,"context_line":"private methods and considering all other methods public."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"The security and executions modules in mistral_lib.actions are"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a6eadb0_e832490f","line":16,"in_reply_to":"1a6eadb0_28a9a190","updated":"2016-12-15 19:28:01.000000000","message":"thanks","commit_id":"bbe618e19f9037bc38c802111bd0eb5d16ee293d"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"6308500694c7d27403b2a2d93bd5f64f3c407b47","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The mistral_lib.api namespace was also removed in favor of"},{"line_number":16,"context_line":"following the python convention of using a namespace to denote"},{"line_number":17,"context_line":"private methods and considering all other methods public."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"The security and executions modules in mistral_lib.actions are"},{"line_number":20,"context_line":"intended to retrieve information from the context, but I have"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a6eadb0_4885fd04","line":17,"updated":"2016-12-15 17:04:58.000000000","message":"This makes sense to me, the \"api\" namespace always felt awkward.","commit_id":"bbe618e19f9037bc38c802111bd0eb5d16ee293d"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"e119f46ac82f931add8fb76839a1d0ca8626540e","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The mistral_lib.api namespace was also removed in favor of"},{"line_number":16,"context_line":"following the python convention of using a namespace to denote"},{"line_number":17,"context_line":"private methods and considering all other methods public."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"The security and executions modules in mistral_lib.actions are"},{"line_number":20,"context_line":"intended to retrieve information from the context, but I have"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a3905b3_5056ae5c","line":17,"in_reply_to":"1a6eadb0_4885fd04","updated":"2017-01-23 09:27:56.000000000","message":"I disagree with that. The python convention is about a different thing. It only regulates class level scope but doesn\u0027t say anything about package scope.\n\nThe reason I wanted to have \u0027api\u0027 in package names explicitly is that inside \u0027mistral_lib\u0027 we will have modules and classes that implement our own internal stuff (utils, implementations of some interfaces) and they will be a subject to change w/o any notice to our users. And we will also have modules and classes that users will be using to develop their stuff, e.g. actions and functions, by extending them. These classes can\u0027t change in non-backwards compatible manner. Hence all should clearly realize that these classes are exactly the API that they can safely use since it\u0027s stable.","commit_id":"bbe618e19f9037bc38c802111bd0eb5d16ee293d"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"5f975d258a3696f2640b8c104a8ffd13e589e719","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The mistral_lib.api namespace was also removed in favor of"},{"line_number":16,"context_line":"following the python convention of using a namespace to denote"},{"line_number":17,"context_line":"private methods and considering all other methods public."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"The security and executions modules in mistral_lib.actions are"},{"line_number":20,"context_line":"intended to retrieve information from the context, but I have"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a3905b3_b584080b","line":17,"in_reply_to":"5a3905b3_5056ae5c","updated":"2017-01-23 16:40:04.000000000","message":"This is exactly what the Python convention is for. See the oslo projects.\n\noslo.messaging considers all the drivers private, so they are under _drivers - https://github.com/openstack/oslo.messaging/tree/master/oslo_messaging/_drivers\n\noslo.config has this private file: https://github.com/openstack/oslo.config/blob/master/oslo_config/_list_opts.py","commit_id":"bbe618e19f9037bc38c802111bd0eb5d16ee293d"}],"doc/source/creating_custom_actions.rst":[{"author":{"_account_id":8532,"name":"Ryan Brady","email":"rbrady@redhat.com","username":"rbrady"},"change_message_id":"66a46d74c9e61bbf5124cb571c2747055ea39bff","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":" .. code-block:: python"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"    from mistral.actions import Action"},{"line_number":10,"context_line":"    from mistral.actions.types import Result"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    class RunnerAction(Action):"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ba2be162_6bdd0070","line":9,"range":{"start_line":9,"start_character":9,"end_line":9,"end_character":16},"updated":"2017-03-01 03:21:13.000000000","message":"typo: should say mistral_lib","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"02f0f3e01615444ffb3a2201e515c4f045ef3841","unresolved":false,"context_lines":[{"line_number":7,"context_line":" .. code-block:: python"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"    from mistral.actions import Action"},{"line_number":10,"context_line":"    from mistral.actions.types import Result"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    class RunnerAction(Action):"},{"line_number":13,"context_line":"        def __init__(self, param):"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da36d5c6_dacdcd5e","line":10,"updated":"2017-02-28 10:19:23.000000000","message":"Do we need the types namespace? Are there plans to have something other than Result?","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"f94b4d3557a69adda1aef385cf9f186969eea628","unresolved":false,"context_lines":[{"line_number":7,"context_line":" .. code-block:: python"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"    from mistral.actions import Action"},{"line_number":10,"context_line":"    from mistral.actions.types import Result"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    class RunnerAction(Action):"},{"line_number":13,"context_line":"        def __init__(self, param):"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ba2be162_3e125db5","line":10,"in_reply_to":"ba2be162_0bee4422","updated":"2017-03-01 08:33:26.000000000","message":"If you just imported it like you do with the Action class (in base.py) that is probably best. I just don\u0027t think \"types\" tells me anything useful but does mean I need two different imports. If they have references in the same place then you can just use \"from mistral_lib import actions\" and then use actions.Action and actions.Result","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"},{"author":{"_account_id":8532,"name":"Ryan Brady","email":"rbrady@redhat.com","username":"rbrady"},"change_message_id":"152a94a5085263d71e44d4aa62a67b414bfb56d9","unresolved":false,"context_lines":[{"line_number":7,"context_line":" .. code-block:: python"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"    from mistral.actions import Action"},{"line_number":10,"context_line":"    from mistral.actions.types import Result"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    class RunnerAction(Action):"},{"line_number":13,"context_line":"        def __init__(self, param):"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ba2be162_ab57df00","line":10,"in_reply_to":"ba2be162_3e125db5","updated":"2017-03-01 14:21:43.000000000","message":"Done","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"},{"author":{"_account_id":8532,"name":"Ryan Brady","email":"rbrady@redhat.com","username":"rbrady"},"change_message_id":"66a46d74c9e61bbf5124cb571c2747055ea39bff","unresolved":false,"context_lines":[{"line_number":7,"context_line":" .. code-block:: python"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"    from mistral.actions import Action"},{"line_number":10,"context_line":"    from mistral.actions.types import Result"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    class RunnerAction(Action):"},{"line_number":13,"context_line":"        def __init__(self, param):"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ba2be162_0bee4422","line":10,"in_reply_to":"da36d5c6_dacdcd5e","updated":"2017-03-01 03:21:13.000000000","message":"I\u0027m not sure.  The spec and previous implementation had defined this namespace.  Would you suggest moving the Result class to the base file or move to a top level namespace (e.g. mistral_lib.types)?","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"02f0f3e01615444ffb3a2201e515c4f045ef3841","unresolved":false,"context_lines":[{"line_number":28,"context_line":"   mistral.actions \u003d"},{"line_number":29,"context_line":"       example.runner \u003d my.mistral_plugins.somefile:RunnerAction"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"3. Reinstall Mistral if it was installed in system (not in virtualenv)."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"4. Run db-sync tool via either"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"da36d5c6_7a9ea108","line":31,"updated":"2017-02-28 10:19:23.000000000","message":"You need to install the project containing your action and restart Mistral I think. Mistral itself shouldn\u0027t need to be reinstalled.","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"},{"author":{"_account_id":8532,"name":"Ryan Brady","email":"rbrady@redhat.com","username":"rbrady"},"change_message_id":"66a46d74c9e61bbf5124cb571c2747055ea39bff","unresolved":false,"context_lines":[{"line_number":28,"context_line":"   mistral.actions \u003d"},{"line_number":29,"context_line":"       example.runner \u003d my.mistral_plugins.somefile:RunnerAction"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"3. Reinstall Mistral if it was installed in system (not in virtualenv)."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"4. Run db-sync tool via either"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"ba2be162_cbe42c3d","line":31,"in_reply_to":"da36d5c6_7a9ea108","updated":"2017-03-01 03:21:13.000000000","message":"Done","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"02f0f3e01615444ffb3a2201e515c4f045ef3841","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":" .. code-block:: console"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    $ mistral-db-manage --config-file \u003cpath-to-config\u003e populate"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"5. Now you can call the action ``example.runner``"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"da36d5c6_dad78dbd","line":43,"updated":"2017-02-28 10:19:23.000000000","message":"I think we should just document this version.","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"},{"author":{"_account_id":8532,"name":"Ryan Brady","email":"rbrady@redhat.com","username":"rbrady"},"change_message_id":"66a46d74c9e61bbf5124cb571c2747055ea39bff","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":" .. code-block:: console"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    $ mistral-db-manage --config-file \u003cpath-to-config\u003e populate"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"5. Now you can call the action ``example.runner``"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"ba2be162_6bc42092","line":43,"in_reply_to":"da36d5c6_dad78dbd","updated":"2017-03-01 03:21:13.000000000","message":"ack","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"}],"mistral_lib/actions/__init__.py":[{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"02f0f3e01615444ffb3a2201e515c4f045ef3841","unresolved":false,"context_lines":[{"line_number":14,"context_line":"# under the License."},{"line_number":15,"context_line":"from base import Action"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"__all__ \u003d [\u0027Action\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"da36d5c6_7a43016d","line":17,"updated":"2017-02-28 10:19:23.000000000","message":"Maybe add Result here too?","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"},{"author":{"_account_id":8532,"name":"Ryan Brady","email":"rbrady@redhat.com","username":"rbrady"},"change_message_id":"66a46d74c9e61bbf5124cb571c2747055ea39bff","unresolved":false,"context_lines":[{"line_number":14,"context_line":"# under the License."},{"line_number":15,"context_line":"from base import Action"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"__all__ \u003d [\u0027Action\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba2be162_eb3650b3","line":17,"in_reply_to":"da36d5c6_7a43016d","updated":"2017-03-01 03:21:13.000000000","message":"ack","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"b52b37e165beca3cb7c318bb8ab010508f9bde7c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 - Red Hat, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a30ddce_cbf01794","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"updated":"2017-03-10 10:52:43.000000000","message":"Soft: 2017","commit_id":"79e09ca32cfbd243ab5bf4b84cc60b89c0504632"},{"author":{"_account_id":8532,"name":"Ryan Brady","email":"rbrady@redhat.com","username":"rbrady"},"change_message_id":"be340cf0294c2e271aa8de6bea495b291ee51d7c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 - Red Hat, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a30ddce_c2335612","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"in_reply_to":"9a30ddce_cbf01794","updated":"2017-03-13 15:22:35.000000000","message":"Done","commit_id":"79e09ca32cfbd243ab5bf4b84cc60b89c0504632"}],"mistral_lib/actions/base.py":[{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"f1b9869136289969756b77725d1136499f03e391","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            override this method then the action will not receive access"},{"line_number":83,"context_line":"            to the context object."},{"line_number":84,"context_line":"        \"\"\""},{"line_number":85,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a30ddce_0f04847c","line":85,"updated":"2017-03-07 16:09:51.000000000","message":"How do you think the context should be passed in? The action construction? a parameter on the run method? something else?","commit_id":"54f582d8f3da34d13c146e9a679fe6af3133952d"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"607771a6c7570f030ce57877fa928944c5ef42b0","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    action classes may have any number of parameters defining action behavior."},{"line_number":32,"context_line":"    These parameters must correspond to parameters declared in action"},{"line_number":33,"context_line":"    specification (e.g. using DSL or others)."},{"line_number":34,"context_line":"    Action initializer may have a conventional argument with name"},{"line_number":35,"context_line":"    \"action_context\". If it presents then action factory will fill it with"},{"line_number":36,"context_line":"    a dictionary containing contextual information like execution identifier,"},{"line_number":37,"context_line":"    workbook name and other that may be needed for some specific action"},{"line_number":38,"context_line":"    implementations."},{"line_number":39,"context_line":"    \"\"\""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a22e58a_d4406a0a","line":38,"range":{"start_line":34,"start_character":4,"end_line":38,"end_character":20},"updated":"2017-03-14 08:20:17.000000000","message":"This part of the doc is already irrelevant since we explicitly added \u0027context\u0027 into run().","commit_id":"05d96f901008a39192bdbba859adebb601a7aa78"},{"author":{"_account_id":8532,"name":"Ryan Brady","email":"rbrady@redhat.com","username":"rbrady"},"change_message_id":"957a31db20183108c42d1176c43e8f005a53b908","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    action classes may have any number of parameters defining action behavior."},{"line_number":32,"context_line":"    These parameters must correspond to parameters declared in action"},{"line_number":33,"context_line":"    specification (e.g. using DSL or others)."},{"line_number":34,"context_line":"    Action initializer may have a conventional argument with name"},{"line_number":35,"context_line":"    \"action_context\". If it presents then action factory will fill it with"},{"line_number":36,"context_line":"    a dictionary containing contextual information like execution identifier,"},{"line_number":37,"context_line":"    workbook name and other that may be needed for some specific action"},{"line_number":38,"context_line":"    implementations."},{"line_number":39,"context_line":"    \"\"\""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a1ff146_27799430","line":38,"range":{"start_line":34,"start_character":4,"end_line":38,"end_character":20},"in_reply_to":"5a22e58a_d4406a0a","updated":"2017-03-14 14:19:10.000000000","message":"Done","commit_id":"05d96f901008a39192bdbba859adebb601a7aa78"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"607771a6c7570f030ce57877fa928944c5ef42b0","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    \"\"\""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    @abc.abstractmethod"},{"line_number":42,"context_line":"    def run(self, context):"},{"line_number":43,"context_line":"        \"\"\"Run action logic."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        :return: Result of the action. Note that for asynchronous actions"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a22e58a_7469768b","line":42,"range":{"start_line":42,"start_character":18,"end_line":42,"end_character":25},"updated":"2017-03-14 08:20:17.000000000","message":"Please add a short description of \u0027context\u0027 into the docstring.","commit_id":"05d96f901008a39192bdbba859adebb601a7aa78"},{"author":{"_account_id":8532,"name":"Ryan Brady","email":"rbrady@redhat.com","username":"rbrady"},"change_message_id":"957a31db20183108c42d1176c43e8f005a53b908","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    \"\"\""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    @abc.abstractmethod"},{"line_number":42,"context_line":"    def run(self, context):"},{"line_number":43,"context_line":"        \"\"\"Run action logic."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        :return: Result of the action. Note that for asynchronous actions"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a1ff146_67738c4e","line":42,"range":{"start_line":42,"start_character":18,"end_line":42,"end_character":25},"in_reply_to":"5a22e58a_7469768b","updated":"2017-03-14 14:19:10.000000000","message":"Done","commit_id":"05d96f901008a39192bdbba859adebb601a7aa78"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"79db0fc3e63303bea12bfe9fbcb1f1df8806fb38","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    def run(self, context):"},{"line_number":38,"context_line":"        \"\"\"Run action logic."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        :param context: a dictionary containing contextual information like"},{"line_number":41,"context_line":"        execution identifier, workbook name and other data that may be needed"},{"line_number":42,"context_line":"        for some specific action implementations."},{"line_number":43,"context_line":"        :return: Result of the action. Note that for asynchronous actions"},{"line_number":44,"context_line":"        it should always be None, however, if even it\u0027s not None it will be"},{"line_number":45,"context_line":"        ignored by a caller."}],"source_content_type":"text/x-python","patch_set":12,"id":"3a1ff146_8ee24302","line":42,"range":{"start_line":40,"start_character":24,"end_line":42,"end_character":49},"updated":"2017-03-15 07:19:52.000000000","message":"Looks good for now. An idea for the future: I think it\u0027d be cool to have a class Context (or ActionContext) with well defined and documented structure residing in mistral-lib too. And this doc could have a reference to this class so that users could go and easily see what\u0027s available in the context.","commit_id":"5764aec7aeb5a7838926165fa214b946b616cf16"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"6b42c1caae141f3e10612b7b57232ab7bfdd70b1","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        :param context: a dictionary containing contextual information like"},{"line_number":41,"context_line":"        execution identifier, workbook name and other data that may be needed"},{"line_number":42,"context_line":"        for some specific action implementations."},{"line_number":43,"context_line":"        :return: Result of the action. Note that for asynchronous actions"},{"line_number":44,"context_line":"        it should always be None, however, if even it\u0027s not None it will be"},{"line_number":45,"context_line":"        ignored by a caller."}],"source_content_type":"text/x-python","patch_set":12,"id":"3a1ff146_cf1d1268","line":42,"in_reply_to":"3a1ff146_8ee24302","updated":"2017-03-15 09:48:51.000000000","message":"+1, this would also be useful for testing as I could make a fake context using the class in mistral-lib. It would also allow us to change the context in Mistral (as it is internal) and only need to update the class in mistral-lib that abstracts it. Currently we expose an internal object.","commit_id":"5764aec7aeb5a7838926165fa214b946b616cf16"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"eb0558ad036c86f175e1de34bdde5538f869e19e","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        :param context: a dictionary containing contextual information like"},{"line_number":41,"context_line":"        execution identifier, workbook name and other data that may be needed"},{"line_number":42,"context_line":"        for some specific action implementations."},{"line_number":43,"context_line":"        :return: Result of the action. Note that for asynchronous actions"},{"line_number":44,"context_line":"        it should always be None, however, if even it\u0027s not None it will be"},{"line_number":45,"context_line":"        ignored by a caller."}],"source_content_type":"text/x-python","patch_set":12,"id":"3a1ff146_6faa5ed6","line":42,"in_reply_to":"3a1ff146_cf1d1268","updated":"2017-03-15 09:51:12.000000000","message":"I opened a bug for this: https://bugs.launchpad.net/mistral/+bug/1673017","commit_id":"5764aec7aeb5a7838926165fa214b946b616cf16"}],"mistral_lib/actions/execution.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"e119f46ac82f931add8fb76839a1d0ca8626540e","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    limitations under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"# TODO(rakhmerov): Add functions to get current execution info."},{"line_number":16,"context_line":"# TODO(rbrady): Replace these functions with calls to the context object"},{"line_number":17,"context_line":"#               The context object should be decorated with these values"},{"line_number":18,"context_line":"#               from mistral action/workflow internals when applicable."},{"line_number":19,"context_line":"# TODO(rbrady): remove this file"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def get_workflow_name():"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_508b0ec3","line":18,"range":{"start_line":16,"start_character":16,"end_line":18,"end_character":70},"updated":"2017-01-23 09:27:56.000000000","message":"Yes, these are just convenience methods so that we don\u0027t have to extract some thread-local context objects manually each time. But all of that info should be passed in advance over the network, deserialized and stored (I guess) in a thread-local storage before executing an action.","commit_id":"bbe618e19f9037bc38c802111bd0eb5d16ee293d"}],"mistral_lib/actions/types.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"b52b37e165beca3cb7c318bb8ab010508f9bde7c","unresolved":false,"context_lines":[{"line_number":15,"context_line":"# TODO(rakhmerov): Add necessary data types (and serializers, if needed)."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"class Result(object):"},{"line_number":19,"context_line":"    \"\"\"Explicit data structure containing a result of task execution.\"\"\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    def __init__(self, data\u003dNone, error\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a30ddce_ebf79b56","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":21},"updated":"2017-03-10 10:52:43.000000000","message":"Maybe it\u0027s ok now to move this class into mistral-lib in this form but pls take a look at mistral repo, this class has changed. It now extends MistralSerializable which is a part of a small serialization framework. This framework IMO should also move to mistral-lib since it\u0027s 100% generic and it depends only on oslo.serialization.","commit_id":"79e09ca32cfbd243ab5bf4b84cc60b89c0504632"},{"author":{"_account_id":8532,"name":"Ryan Brady","email":"rbrady@redhat.com","username":"rbrady"},"change_message_id":"be340cf0294c2e271aa8de6bea495b291ee51d7c","unresolved":false,"context_lines":[{"line_number":15,"context_line":"# TODO(rakhmerov): Add necessary data types (and serializers, if needed)."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"class Result(object):"},{"line_number":19,"context_line":"    \"\"\"Explicit data structure containing a result of task execution.\"\"\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    def __init__(self, data\u003dNone, error\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a30ddce_420f6636","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":21},"in_reply_to":"9a30ddce_ebf79b56","updated":"2017-03-13 15:22:35.000000000","message":"looking at the serialization code now.","commit_id":"79e09ca32cfbd243ab5bf4b84cc60b89c0504632"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"3d83384a43f40df704f6f6d34b485cc2c4d35b02","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    limitations under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from mistral import serialization"},{"line_number":18,"context_line":"from mistral import utils"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class Result(serialization.MistralSerializable):"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a22e58a_78aa401b","line":18,"updated":"2017-03-14 11:51:03.000000000","message":"Bad imports.","commit_id":"05d96f901008a39192bdbba859adebb601a7aa78"},{"author":{"_account_id":8532,"name":"Ryan Brady","email":"rbrady@redhat.com","username":"rbrady"},"change_message_id":"957a31db20183108c42d1176c43e8f005a53b908","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    limitations under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from mistral import serialization"},{"line_number":18,"context_line":"from mistral import utils"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class Result(serialization.MistralSerializable):"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a22e58a_5c95733e","line":18,"in_reply_to":"5a22e58a_78aa401b","updated":"2017-03-14 14:19:10.000000000","message":"Done","commit_id":"05d96f901008a39192bdbba859adebb601a7aa78"}],"mistral_lib/context.py":[{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"6308500694c7d27403b2a2d93bd5f64f3c407b47","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class MistralContext(BaseContext):"},{"line_number":51,"context_line":"    # Use set([...]) since set literals are not supported in Python 2.6."},{"line_number":52,"context_line":"    _elements \u003d set(["},{"line_number":53,"context_line":"        \"auth_uri\","},{"line_number":54,"context_line":"        \"auth_cacert\","}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_2881a1c3","line":51,"updated":"2016-12-15 17:04:58.000000000","message":"We don\u0027t support 2.6 now \\o/ so {...} would work if you want to make this neater.","commit_id":"bbe618e19f9037bc38c802111bd0eb5d16ee293d"},{"author":{"_account_id":8532,"name":"Ryan Brady","email":"rbrady@redhat.com","username":"rbrady"},"change_message_id":"0b10cf40485cf12a3bbd5ac6711c3e2fd79a9cd0","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class MistralContext(BaseContext):"},{"line_number":51,"context_line":"    # Use set([...]) since set literals are not supported in Python 2.6."},{"line_number":52,"context_line":"    _elements \u003d set(["},{"line_number":53,"context_line":"        \"auth_uri\","},{"line_number":54,"context_line":"        \"auth_cacert\","}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_5be940e5","line":51,"in_reply_to":"1a6eadb0_2881a1c3","updated":"2016-12-15 19:28:01.000000000","message":"Done","commit_id":"bbe618e19f9037bc38c802111bd0eb5d16ee293d"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"02f0f3e01615444ffb3a2201e515c4f045ef3841","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"da36d5c6_1a2cc5aa","updated":"2017-02-28 10:19:23.000000000","message":"Do we really need this file? The documentation you added doesn\u0027t show how this would work. I think we should remove it for now.","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"f94b4d3557a69adda1aef385cf9f186969eea628","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"ba2be162_b941073c","in_reply_to":"ba2be162_b006831e","updated":"2017-03-01 08:33:26.000000000","message":"right, but can we add it later? I really don\u0027t like adding code that isn\u0027t currently used.","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"},{"author":{"_account_id":8532,"name":"Ryan Brady","email":"rbrady@redhat.com","username":"rbrady"},"change_message_id":"152a94a5085263d71e44d4aa62a67b414bfb56d9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"ba2be162_cbaa53d4","in_reply_to":"ba2be162_b941073c","updated":"2017-03-01 14:21:43.000000000","message":"I need the code here so my patch to mistral-extra can depend on mistral-lib.  Mistral will also be updated to depend on mistral-lib and use this class.  Because it\u0027s cross repo dependencies, I don\u0027t see any other way.","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"},{"author":{"_account_id":8532,"name":"Ryan Brady","email":"rbrady@redhat.com","username":"rbrady"},"change_message_id":"66a46d74c9e61bbf5124cb571c2747055ea39bff","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"ba2be162_b006831e","in_reply_to":"da36d5c6_1a2cc5aa","updated":"2017-03-01 03:21:13.000000000","message":"The keystone utils file[1] removed from this patch set and intended to be moved to mistral-extra requires the context.  Because it\u0027s needed by multiple Mistral projects, it makes sense to me to have it in mistral-lib.","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"}],"mistral_lib/exceptions.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"e119f46ac82f931add8fb76839a1d0ca8626540e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 - Mirantis, Inc."},{"line_number":2,"context_line":"# Copyright 2015 - StackStorm, Inc."},{"line_number":3,"context_line":"# Copyright 2016 - Brocade Communications Systems, Inc."},{"line_number":4,"context_line":"# Copyright 2016 - Red Hat, Inc."}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_7b1f0b08","line":1,"updated":"2017-01-23 09:27:56.000000000","message":"So do you think we need to get rid of exceptions in \u0027mistral\u0027 repo completely in favor of using this module? Or you think we should have exceptions in two places?\n\nI\u0027m just wondering how convenient it will be for server-side development. Every time we need to add a new exception when developing on the server-side we\u0027ll have to push a commit to mistral-lib first and wait till it\u0027s merged. In this case we may also have issues with declaring dependencies in mistral\u0027s requirements.txt. We\u0027ll have to make it a range so that the latest changes get picked up once they are released (and btw, we\u0027ll have to be releasing it often unless we want to use a dependency on mistral-lib\u0027s git master branch).\n\nAnyway, I\u0027m not saying this is not right. I\u0027m thinking here with you.","commit_id":"bbe618e19f9037bc38c802111bd0eb5d16ee293d"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"b52b37e165beca3cb7c318bb8ab010508f9bde7c","unresolved":false,"context_lines":[{"line_number":16,"context_line":"#    limitations under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class MistralExceptionBase(Exception):"},{"line_number":20,"context_line":"    \"\"\"Base class for Mistral specific errors and exceptions."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    A common parent class to derive MistralError and MistralException"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a30ddce_6bb9eb78","line":19,"range":{"start_line":19,"start_character":6,"end_line":19,"end_character":26},"updated":"2017-03-10 10:52:43.000000000","message":"Good, it\u0027s better than what we have in mistral now. No duplications.","commit_id":"79e09ca32cfbd243ab5bf4b84cc60b89c0504632"}],"mistral_lib/utils/context.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"e119f46ac82f931add8fb76839a1d0ca8626540e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 - Mirantis, Inc."},{"line_number":2,"context_line":"# Copyright 2016 - Brocade Communications Systems, Inc."},{"line_number":3,"context_line":"# Copyright 2016 - Red Hat, Inc."},{"line_number":4,"context_line":"# All Rights Reserved."}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_16db3e50","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":1},"updated":"2017-01-23 09:27:56.000000000","message":"I didn\u0027t quite understand that myself but I am not sure that we need all the same things for extracting context. For example, why do we need a method extracting context from HTTP headers in mistral-lib and not in mistral? Only server-side can do it (since it receives HTTP requests), not sure we need to move it over here.\n\nI assumed that in mistral-lib we would have only simple wrapper methods that access context data passed here from the server-side. \u0027mistral-lib\u0027 is mostly a client-side kind of thing (not 100% sure again..).\n\nAnyway, let\u0027s discuss it here. This is something that I don\u0027t have clearly shaped in my head..","commit_id":"bbe618e19f9037bc38c802111bd0eb5d16ee293d"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"02f0f3e01615444ffb3a2201e515c4f045ef3841","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"da36d5c6_2eba2ac1","updated":"2017-02-28 10:19:23.000000000","message":"I find the inclusion of the context in mistral_lib somewhat strange. When I experimented with this I went down a different route. I had Mistral pass a context object to the action when it creates the instance. This means that Mistral would still own the context and everything surrounding it. We would just document the object that is given to the actions.\n\nIt would require a bit of a change in the API for actions - but only for actions that need the context.\n\nHaving Mistral pass something to the action class I think is a more \"normal\" plugin pattern. Imagine something like this.\n\n\n@actions.requires_context\nclass MyAction(actions.Action):\n    def __init__(self, ctx, param1, param2):\n        pass\n\nThe decorator tells mistral that the class needs the context to be added to the input params. The decorator is just one approach to doing this, but seems quite nice and simple.","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"},{"author":{"_account_id":8532,"name":"Ryan Brady","email":"rbrady@redhat.com","username":"rbrady"},"change_message_id":"66a46d74c9e61bbf5124cb571c2747055ea39bff","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"ba2be162_0bd80453","in_reply_to":"da36d5c6_2eba2ac1","updated":"2017-03-01 03:21:13.000000000","message":"Please see my other comment about context inclusion.  I\u0027m not against the idea of passing a context to actions, but it does seem like a larger change / more complex than a simple import.","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"}],"mistral_lib/utils/keystone.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"e119f46ac82f931add8fb76839a1d0ca8626540e","unresolved":false,"context_lines":[{"line_number":160,"context_line":"    return get_endpoint_for_project(\u0027keystone\u0027, service_type\u003d\u0027identity\u0027).url"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"def format_url(url_template, values):"},{"line_number":164,"context_line":"    # Since we can\u0027t use keystone module, we can do similar thing:"},{"line_number":165,"context_line":"    # see https://github.com/openstack/keystone/blob/master/keystone/"},{"line_number":166,"context_line":"    # catalog/core.py#L42-L60"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_16f17e01","line":163,"range":{"start_line":163,"start_character":4,"end_line":163,"end_character":14},"updated":"2017-01-23 09:27:56.000000000","message":"Strictly speaking, this method doesn\u0027t seem to be specific to keystone. It\u0027s just a string manipulation util.","commit_id":"bbe618e19f9037bc38c802111bd0eb5d16ee293d"}],"mistral_lib/utils/threading.py":[{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"02f0f3e01615444ffb3a2201e515c4f045ef3841","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"da36d5c6_cec34e37","updated":"2017-02-28 10:19:23.000000000","message":"as per my comment on the context, we can leave all of this in Mistral if we change the context passing approach.","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"},{"author":{"_account_id":8532,"name":"Ryan Brady","email":"rbrady@redhat.com","username":"rbrady"},"change_message_id":"66a46d74c9e61bbf5124cb571c2747055ea39bff","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"ba2be162_4bb91ce9","in_reply_to":"da36d5c6_cec34e37","updated":"2017-03-01 03:21:13.000000000","message":"This is only here because it\u0027s required in the context.","commit_id":"83d173c3c9dd45d85868d99f9c01148fcdcd7554"}]}
