)]}'
{"mistral/db/v2/sqlalchemy/models.py":[{"author":{"_account_id":9029,"name":"Moshe Elisha","email":"moshe.elisha@nokia.com","username":"MosheElisha"},"change_message_id":"1fab1bbc4ee2fa536fdfc1a0c035937eed6c3975","unresolved":false,"context_lines":[{"line_number":257,"context_line":"sa.Index("},{"line_number":258,"context_line":"    \u0027%s_task_execution_id\u0027 % ActionExecution.__tablename__,"},{"line_number":259,"context_line":"    \u0027task_execution_id\u0027"},{"line_number":260,"context_line":")"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"# Many-to-one for \u0027WorkflowExecution\u0027 and \u0027TaskExecution\u0027."},{"line_number":263,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"dada55a8_57a82a8c","line":260,"updated":"2016-07-26 20:17:55.000000000","message":"I know that MySQL InnoDB and MariaDV automatically create indexes for FK columns. According to the MariaDB docs (https://mariadb.com/kb/en/mariadb/foreign-keys/) - \"If MariaDB automatically creates an index for the foreign key (because it does not exist and is not explicitly created), its name will be index_name.\"\n\nI also understand that this should support also PostgreSQL and other.\nPlease just verify that there aren\u0027t two indexes on these columns in MariaDB and if so - I suggest we find a way to workaround that.","commit_id":"8ade6e556f5c53e8d323a4d75ff1bd37b6dfa89a"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"b9cf5dc66190fc12ab709f8c2219a6a3afef9408","unresolved":false,"context_lines":[{"line_number":257,"context_line":"sa.Index("},{"line_number":258,"context_line":"    \u0027%s_task_execution_id\u0027 % ActionExecution.__tablename__,"},{"line_number":259,"context_line":"    \u0027task_execution_id\u0027"},{"line_number":260,"context_line":")"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"# Many-to-one for \u0027WorkflowExecution\u0027 and \u0027TaskExecution\u0027."},{"line_number":263,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"dada55a8_61bf5ed0","line":260,"in_reply_to":"dada55a8_57a82a8c","updated":"2016-07-27 02:32:17.000000000","message":"This is OK. In case of MySQL this instruction is just ignored, MySQL creates an index with a different name, I checked that. But Postgres does not create indexes for referencing columns so this instruction is used.","commit_id":"8ade6e556f5c53e8d323a4d75ff1bd37b6dfa89a"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"9d25052711f527347760931efe7dd031e4c363f2","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"# Many-to-one for \u0027ActionExecution\u0027 and \u0027TaskExecution\u0027."},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"ActionExecution.task_execution_id \u003d sa.Column("},{"line_number":244,"context_line":"    sa.String(36),"},{"line_number":245,"context_line":"    sa.ForeignKey(TaskExecution.id, ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":246,"context_line":"    nullable\u003dTrue"},{"line_number":247,"context_line":")"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"TaskExecution.action_executions \u003d relationship("},{"line_number":250,"context_line":"    ActionExecution,"}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_95ca8619","line":247,"range":{"start_line":243,"start_character":0,"end_line":247,"end_character":1},"updated":"2016-08-01 14:29:47.000000000","message":"What is the reason for this being outside the ActionExecution class?","commit_id":"989d7f808974b30d935b04abdc12184a2b7f7a83"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"035f8f9e2335108fff768737c4a5dbf6347ec108","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"# Many-to-one for \u0027ActionExecution\u0027 and \u0027TaskExecution\u0027."},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"ActionExecution.task_execution_id \u003d sa.Column("},{"line_number":244,"context_line":"    sa.String(36),"},{"line_number":245,"context_line":"    sa.ForeignKey(TaskExecution.id, ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":246,"context_line":"    nullable\u003dTrue"},{"line_number":247,"context_line":")"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"TaskExecution.action_executions \u003d relationship("},{"line_number":250,"context_line":"    ActionExecution,"}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_7b59b934","line":247,"range":{"start_line":243,"start_character":0,"end_line":247,"end_character":1},"in_reply_to":"bacf61ea_95ca8619","updated":"2016-08-01 17:11:24.000000000","message":"Recursive references with Task execution. That\u0027s why most of the relationships are declared outside of model classes. If we don\u0027t want to care much about the order in which classes are declared we can just declare relationships outside of them.","commit_id":"989d7f808974b30d935b04abdc12184a2b7f7a83"}],"mistral/engine/default_engine.py":[{"author":{"_account_id":18238,"name":"Hardik Parekh","email":"hardik.parekh047@gmail.com","username":"hparekh"},"change_message_id":"d5994f6abd91cf5f2c1bf2a3688a5c6a7f416d7c","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    @u.log_exec(LOG)"},{"line_number":84,"context_line":"    @profiler.trace(\u0027engine-on-action-complete\u0027)"},{"line_number":85,"context_line":"    def on_action_complete(self, action_ex_id, result, wf_action\u003dFalse):"},{"line_number":86,"context_line":"        with db_api.transaction():"},{"line_number":87,"context_line":"            if wf_action:"},{"line_number":88,"context_line":"                action_ex \u003d db_api.get_workflow_execution(action_ex_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_61f803c4","line":85,"range":{"start_line":85,"start_character":33,"end_line":85,"end_character":45},"updated":"2016-08-01 10:32:07.000000000","message":"soft: Better to use just ex_id as it can be action execution id or child workflow id","commit_id":"79283f52b07ea572c6365e89fde8fa6d745d7188"},{"author":{"_account_id":18238,"name":"Hardik Parekh","email":"hardik.parekh047@gmail.com","username":"hparekh"},"change_message_id":"d5994f6abd91cf5f2c1bf2a3688a5c6a7f416d7c","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            else:"},{"line_number":90,"context_line":"                action_ex \u003d db_api.get_action_execution(action_ex_id)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"            task_ex \u003d action_ex.task_execution"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"            if task_ex:"},{"line_number":95,"context_line":"                wf_handler.lock_workflow_execution("},{"line_number":96,"context_line":"                    task_ex.workflow_execution_id"},{"line_number":97,"context_line":"                )"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"            action_handler.on_action_complete(action_ex, result)"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_817ed716","line":97,"range":{"start_line":92,"start_character":11,"end_line":97,"end_character":17},"updated":"2016-08-01 10:32:07.000000000","message":"I guess this block can be moved into \u0027if wf_action\u0027 condition No ?","commit_id":"79283f52b07ea572c6365e89fde8fa6d745d7188"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"ccb682acc71d981f64ee4026faa53ee3965f3fa2","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            else:"},{"line_number":90,"context_line":"                action_ex \u003d db_api.get_action_execution(action_ex_id)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"            task_ex \u003d action_ex.task_execution"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"            if task_ex:"},{"line_number":95,"context_line":"                wf_handler.lock_workflow_execution("},{"line_number":96,"context_line":"                    task_ex.workflow_execution_id"},{"line_number":97,"context_line":"                )"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"            action_handler.on_action_complete(action_ex, result)"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_6c5c617d","line":97,"range":{"start_line":92,"start_character":11,"end_line":97,"end_character":17},"in_reply_to":"bacf61ea_817ed716","updated":"2016-08-01 17:13:28.000000000","message":"No, this is not directly related to the case of a child workflow completion. It is related to whether an individual action was executed versus an action that belongs to some workflow.","commit_id":"79283f52b07ea572c6365e89fde8fa6d745d7188"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"9d25052711f527347760931efe7dd031e4c363f2","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    def on_action_complete(self, action_ex_id, result, wf_action\u003dFalse):"},{"line_number":86,"context_line":"        with db_api.transaction():"},{"line_number":87,"context_line":"            if wf_action:"},{"line_number":88,"context_line":"                action_ex \u003d db_api.get_workflow_execution(action_ex_id)"},{"line_number":89,"context_line":"            else:"},{"line_number":90,"context_line":"                action_ex \u003d db_api.get_action_execution(action_ex_id)"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_27d571e7","line":88,"range":{"start_line":88,"start_character":16,"end_line":88,"end_character":71},"updated":"2016-08-01 14:29:47.000000000","message":"Soft: I don\u0027t like the name \u0027action_ex\u0027 when it obliviously is workflow execution. IMO it should be renamed to just \u0027execution\u0027","commit_id":"989d7f808974b30d935b04abdc12184a2b7f7a83"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"035f8f9e2335108fff768737c4a5dbf6347ec108","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    def on_action_complete(self, action_ex_id, result, wf_action\u003dFalse):"},{"line_number":86,"context_line":"        with db_api.transaction():"},{"line_number":87,"context_line":"            if wf_action:"},{"line_number":88,"context_line":"                action_ex \u003d db_api.get_workflow_execution(action_ex_id)"},{"line_number":89,"context_line":"            else:"},{"line_number":90,"context_line":"                action_ex \u003d db_api.get_action_execution(action_ex_id)"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_e68a3063","line":88,"range":{"start_line":88,"start_character":16,"end_line":88,"end_character":71},"in_reply_to":"bacf61ea_27d571e7","updated":"2016-08-01 17:11:24.000000000","message":"Yeah, I know. I also thought about this many times. But from task perspective it\u0027s always associated with something and it would be convenient to have a general term for this something. In the previous model \"workflow\" was inherited from \"action\" because, in fact, it doesn\u0027t matter for a task what is used, it\u0027s kind of polymorphic (just a function with parameters). So eventually I decided to leave it under \"action_ex\" for now. To be honest, execution doesn\u0027t sound good to me because there\u0027s also \"task execution\" but it can\u0027t be here. I suggest we think about it more and address this issue separately.","commit_id":"989d7f808974b30d935b04abdc12184a2b7f7a83"}],"mistral/engine/policies.py":[{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"9d25052711f527347760931efe7dd031e4c363f2","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        \"\"\""},{"line_number":292,"context_line":"        super(RetryPolicy, self).after_task_complete(task_ex, task_spec)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"        # TODO(m4dcoder): If the task_ex.executions collection is not called,"},{"line_number":295,"context_line":"        # then the retry_no in the runtime_context of the task_ex will not"},{"line_number":296,"context_line":"        # be updated accurately. To be exact, the retry_no will be one"},{"line_number":297,"context_line":"        # iteration behind. task_ex.executions was originally called in"}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_27b4517e","line":294,"range":{"start_line":294,"start_character":33,"end_line":294,"end_character":51},"updated":"2016-08-01 14:29:47.000000000","message":"Soft: TODO should also be updated","commit_id":"989d7f808974b30d935b04abdc12184a2b7f7a83"}],"mistral/engine/tasks.py":[{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"bf4958ea6c3148fc443bee45d72e58313f3fed87","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        if not self.task_spec.get_keep_result():"},{"line_number":144,"context_line":"            # Destroy task result."},{"line_number":145,"context_line":"            for ex in self.task_ex.action_executions:"},{"line_number":146,"context_line":"                if hasattr(ex, \u0027output\u0027):"},{"line_number":147,"context_line":"                    ex.output \u003d {}"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_b604667e","line":145,"updated":"2016-07-28 20:24:38.000000000","message":"it\u0027s a bit confusing w/o going into the Task model to understand when task_ex.executions or task_ex.action_executions should be used...","commit_id":"79283f52b07ea572c6365e89fde8fa6d745d7188"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"344530809d145721a44942833d0bdb04ccb7ef31","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        if not self.task_spec.get_keep_result():"},{"line_number":144,"context_line":"            # Destroy task result."},{"line_number":145,"context_line":"            for ex in self.task_ex.action_executions:"},{"line_number":146,"context_line":"                if hasattr(ex, \u0027output\u0027):"},{"line_number":147,"context_line":"                    ex.output \u003d {}"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_d5590200","line":145,"in_reply_to":"bacf61ea_b604667e","updated":"2016-07-29 04:04:36.000000000","message":"task.executions is just \"either task.action_executions or task.workflow_executions\" depending on task type (whether it has \u0027action\u0027 or \u0027workflow\u0027 attribute).\n\nIn this particular case we should use exactly action_executions because we can\u0027t destroy a result of a nested workflow, otherwise it would be data integrity violation. The alternative is to destroy nested workflows completely with all their tasks and actions (the whole subgraph) but I don\u0027t think it\u0027s a good solution. In any case, we need to discuss it more widely.","commit_id":"79283f52b07ea572c6365e89fde8fa6d745d7188"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"fabbc7283f3f0ea18434380d0d43fad06852e8f5","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        if not self.task_spec.get_keep_result():"},{"line_number":144,"context_line":"            # Destroy task result."},{"line_number":145,"context_line":"            for ex in self.task_ex.action_executions:"},{"line_number":146,"context_line":"                if hasattr(ex, \u0027output\u0027):"},{"line_number":147,"context_line":"                    ex.output \u003d {}"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_158ff375","line":145,"in_reply_to":"bacf61ea_d5590200","updated":"2016-07-29 18:48:03.000000000","message":"Please include explanation such as above in the comments when task_ex.executions is not used and action_executions or workflow_executions are used instead.","commit_id":"79283f52b07ea572c6365e89fde8fa6d745d7188"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"bf4958ea6c3148fc443bee45d72e58313f3fed87","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        else:"},{"line_number":296,"context_line":"            execs \u003d filter("},{"line_number":297,"context_line":"                lambda e: e.accepted and e.state \u003d\u003d states.ERROR,"},{"line_number":298,"context_line":"                self.task_ex.executions"},{"line_number":299,"context_line":"            )"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        for ex in execs:"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_b62c664b","line":298,"updated":"2016-07-28 20:24:38.000000000","message":"it\u0027s a bit confusing w/o going into the Task model to understand when task_ex.executions or task_ex.action_executions should be used...","commit_id":"79283f52b07ea572c6365e89fde8fa6d745d7188"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"344530809d145721a44942833d0bdb04ccb7ef31","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        else:"},{"line_number":296,"context_line":"            execs \u003d filter("},{"line_number":297,"context_line":"                lambda e: e.accepted and e.state \u003d\u003d states.ERROR,"},{"line_number":298,"context_line":"                self.task_ex.executions"},{"line_number":299,"context_line":"            )"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        for ex in execs:"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_35697e8c","line":298,"in_reply_to":"bacf61ea_b62c664b","updated":"2016-07-29 04:04:36.000000000","message":"In this case it should be all child executions no matter if they are actions or workflows because we need to reset their \u0027accepted\u0027 flag which means whether we count a certain action/workflow when we calculate eventual task result. It works the same way for actions and workflows. That\u0027s why we use \u0027executions\u0027 here.","commit_id":"79283f52b07ea572c6365e89fde8fa6d745d7188"}],"mistral/engine/workflows.py":[{"author":{"_account_id":18238,"name":"Hardik Parekh","email":"hardik.parekh047@gmail.com","username":"hparekh"},"change_message_id":"d5994f6abd91cf5f2c1bf2a3688a5c6a7f416d7c","unresolved":false,"context_lines":[{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        result \u003d wf_utils.Result(error\u003derr_msg)"},{"line_number":356,"context_line":"    else:"},{"line_number":357,"context_line":"        # Should never get here."},{"line_number":358,"context_line":"        return"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    rpc.get_engine_client().on_action_complete("},{"line_number":361,"context_line":"        wf_ex.id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_01330715","line":358,"range":{"start_line":357,"start_character":8,"end_line":358,"end_character":14},"updated":"2016-08-01 10:32:07.000000000","message":"If this condition is unexpected, then raising exception is good rather than just return.","commit_id":"79283f52b07ea572c6365e89fde8fa6d745d7188"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"9d25052711f527347760931efe7dd031e4c363f2","unresolved":false,"context_lines":[{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        result \u003d wf_utils.Result(error\u003derr_msg)"},{"line_number":356,"context_line":"    else:"},{"line_number":357,"context_line":"        # Should never get here."},{"line_number":358,"context_line":"        return"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    rpc.get_engine_client().on_action_complete("}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_3db46033","line":357,"range":{"start_line":357,"start_character":8,"end_line":357,"end_character":32},"updated":"2016-08-01 14:29:47.000000000","message":"If python interpreter should never get here, is should raise an exception once it enter this else.","commit_id":"989d7f808974b30d935b04abdc12184a2b7f7a83"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"035f8f9e2335108fff768737c4a5dbf6347ec108","unresolved":false,"context_lines":[{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        result \u003d wf_utils.Result(error\u003derr_msg)"},{"line_number":356,"context_line":"    else:"},{"line_number":357,"context_line":"        # Should never get here."},{"line_number":358,"context_line":"        return"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    rpc.get_engine_client().on_action_complete("}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_c68c4cdc","line":357,"range":{"start_line":357,"start_character":8,"end_line":357,"end_character":32},"in_reply_to":"bacf61ea_3db46033","updated":"2016-08-01 17:11:24.000000000","message":"Ok, agree. I\u0027ll add it here.","commit_id":"989d7f808974b30d935b04abdc12184a2b7f7a83"}],"mistral/tests/unit/base.py":[{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"c41fd713b4cac20e63b49d7ec1bc4b34eaabb2bc","unresolved":false,"context_lines":[{"line_number":244,"context_line":""},{"line_number":245,"context_line":"            with mock.patch(\u0027mistral.services.security.get_project_id\u0027,"},{"line_number":246,"context_line":"                            new\u003dmock.MagicMock(return_value\u003dctx.project_id)):"},{"line_number":247,"context_line":"                with db_api.transaction():"},{"line_number":248,"context_line":"                    db_api.delete_event_triggers()"},{"line_number":249,"context_line":"                    db_api.delete_cron_triggers()"},{"line_number":250,"context_line":"                    db_api.delete_workflow_executions()"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_40ba9d24","line":247,"range":{"start_line":247,"start_character":21,"end_line":247,"end_character":27},"updated":"2016-07-28 14:04:15.000000000","message":"Just curious, why was the \u0027_v2\u0027 removed?","commit_id":"79283f52b07ea572c6365e89fde8fa6d745d7188"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"5836619ce041dd59081f4d8cd9ee9e2759b5e898","unresolved":false,"context_lines":[{"line_number":244,"context_line":""},{"line_number":245,"context_line":"            with mock.patch(\u0027mistral.services.security.get_project_id\u0027,"},{"line_number":246,"context_line":"                            new\u003dmock.MagicMock(return_value\u003dctx.project_id)):"},{"line_number":247,"context_line":"                with db_api.transaction():"},{"line_number":248,"context_line":"                    db_api.delete_event_triggers()"},{"line_number":249,"context_line":"                    db_api.delete_cron_triggers()"},{"line_number":250,"context_line":"                    db_api.delete_workflow_executions()"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_90b5fc32","line":247,"range":{"start_line":247,"start_character":21,"end_line":247,"end_character":27},"in_reply_to":"bacf61ea_40ba9d24","updated":"2016-07-28 14:19:40.000000000","message":"Because, in fact, v2 is no the only version we have and everywhere else we just use db_api. I just made this change for consistency.","commit_id":"79283f52b07ea572c6365e89fde8fa6d745d7188"}],"mistral/tests/unit/db/v2/test_sqlalchemy_db_api.py":[{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"9d25052711f527347760931efe7dd031e4c363f2","unresolved":false,"context_lines":[{"line_number":755,"context_line":"        self.assertIsNone(db_api.load_action_execution(\"not-existing-id\"))"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"    def test_update_action_execution(self):"},{"line_number":758,"context_line":"        with db_api.transaction():"},{"line_number":759,"context_line":"            created \u003d db_api.create_action_execution(ACTION_EXECS[0])"},{"line_number":760,"context_line":""},{"line_number":761,"context_line":"            self.assertIsNone(created.updated_at)"}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_1d76bc6f","line":758,"range":{"start_line":758,"start_character":8,"end_line":758,"end_character":33},"updated":"2016-08-01 14:29:47.000000000","message":"Why there is need to use transaction inside tests? Is it so that another tests does not wipe the DB?","commit_id":"989d7f808974b30d935b04abdc12184a2b7f7a83"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"035f8f9e2335108fff768737c4a5dbf6347ec108","unresolved":false,"context_lines":[{"line_number":755,"context_line":"        self.assertIsNone(db_api.load_action_execution(\"not-existing-id\"))"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"    def test_update_action_execution(self):"},{"line_number":758,"context_line":"        with db_api.transaction():"},{"line_number":759,"context_line":"            created \u003d db_api.create_action_execution(ACTION_EXECS[0])"},{"line_number":760,"context_line":""},{"line_number":761,"context_line":"            self.assertIsNone(created.updated_at)"}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_accf7954","line":758,"range":{"start_line":758,"start_character":8,"end_line":758,"end_character":33},"in_reply_to":"bacf61ea_1d76bc6f","updated":"2016-08-01 17:11:24.000000000","message":"Yeah, this is not transparent but the issue is in \"output\" attribute of ActionExecution model which is configured to load in deferred mode. If an instance of ActionExecution is not attached to any SQLAlchemy session that during comparison of two instances we get something like \n\"sqlalchemy.orm.exc.DetachedInstanceError: Parent instance \u003cActionExecution at 0x108c95780\u003e is not bound to a Session; deferred load operation of attribute \u0027output\u0027 cannot proceed\"\n\nwhich happens in \"self.assertEqual(updated, fetched)\"\n\nSo looks like previously there was a bug somewhere that make these tests work. Now it is fixed as a side effect of models refactoring.","commit_id":"989d7f808974b30d935b04abdc12184a2b7f7a83"}],"mistral/workflow/data_flow.py":[{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"bf4958ea6c3148fc443bee45d72e58313f3fed87","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"def get_task_execution_result(task_ex):"},{"line_number":67,"context_line":"    execs \u003d task_ex.executions"},{"line_number":68,"context_line":"    execs.sort("},{"line_number":69,"context_line":"        key\u003dlambda x: x.runtime_context.get(\u0027index\u0027)"},{"line_number":70,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_b6a106ac","line":67,"updated":"2016-07-28 20:24:38.000000000","message":"it\u0027s a bit confusing w/o going into the Task model to understand when task_ex.executions or task_ex.action_executions should be used...","commit_id":"79283f52b07ea572c6365e89fde8fa6d745d7188"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"344530809d145721a44942833d0bdb04ccb7ef31","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"def get_task_execution_result(task_ex):"},{"line_number":67,"context_line":"    execs \u003d task_ex.executions"},{"line_number":68,"context_line":"    execs.sort("},{"line_number":69,"context_line":"        key\u003dlambda x: x.runtime_context.get(\u0027index\u0027)"},{"line_number":70,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_551cf211","line":67,"in_reply_to":"bacf61ea_b6a106ac","updated":"2016-07-29 04:04:36.000000000","message":"Same as with \u0027accepted\u0027 flag. Here we must examine all child executions no matter if they are actions or workflows because we process their results in the same way.","commit_id":"79283f52b07ea572c6365e89fde8fa6d745d7188"}]}
