)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"6c360b3142d4d368c75e7af5d103045bce8fbd3d","unresolved":false,"context_lines":[{"line_number":14,"context_line":"of data can return from this function, so it should be used carefully"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I452175bfb60636ed8de9b2b1ceab615359765964"},{"line_number":17,"context_line":"Implements: yaql-tasks-function"},{"line_number":18,"context_line":"Implements: yaql-errors-function"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a74a57a_9b028a3d","line":18,"range":{"start_line":17,"start_character":0,"end_line":18,"end_character":32},"updated":"2016-11-23 17:31:05.000000000","message":"should be:\nImplements: blueprint yaql-tasks-function\nImplements: blueprint yaql-errors-function","commit_id":"0e6740df75fe25c4bedeeffd2926949240b01159"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"b47012e4ccd922f2b4df2f8d64b5251abafc0262","unresolved":false,"context_lines":[{"line_number":10,"context_line":"filter. For example only task in state ERROR from the current execution."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It is very useful for debugging, but also very expensive, since it might"},{"line_number":13,"context_line":"require multiple DB queries. In addition it is impotent to remember a lot"},{"line_number":14,"context_line":"of data can return from this function, so it should be used carefully"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I452175bfb60636ed8de9b2b1ceab615359765964"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5a74a57a_80dd2ee2","line":13,"range":{"start_line":13,"start_character":47,"end_line":13,"end_character":55},"updated":"2016-11-28 11:30:54.000000000","message":"Soft: \u0027important\u0027?","commit_id":"9a572106a2c1918d2e81d89917fa4e2bcb0e6f7c"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"1b745b0edb1cf9a1901b1c70a8f54e01ce252a5d","unresolved":false,"context_lines":[{"line_number":10,"context_line":"filter. For example only task in state ERROR from the current execution."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It is very useful for debugging, but also very expensive, since it might"},{"line_number":13,"context_line":"require multiple DB queries. In addition it is impotent to remember a lot"},{"line_number":14,"context_line":"of data can return from this function, so it should be used carefully"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I452175bfb60636ed8de9b2b1ceab615359765964"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5a74a57a_06d7764b","line":13,"range":{"start_line":13,"start_character":47,"end_line":13,"end_character":55},"in_reply_to":"5a74a57a_80dd2ee2","updated":"2016-11-28 12:01:46.000000000","message":"damn autocorrect. I think I just died.","commit_id":"9a572106a2c1918d2e81d89917fa4e2bcb0e6f7c"}],"mistral/tests/unit/engine/test_tasks_function.py":[{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"af1d4b3b8a11fbfc7a4416e37976273e49d3308a","unresolved":false,"context_lines":[{"line_number":32,"context_line":"name: wb"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"workflows:"},{"line_number":35,"context_line":"  test_expressions:"},{"line_number":36,"context_line":"    type: direct"},{"line_number":37,"context_line":"    input:"},{"line_number":38,"context_line":"      - wf1_wx_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_c4fd3fb2","line":35,"range":{"start_line":35,"start_character":2,"end_line":35,"end_character":18},"updated":"2016-11-29 10:42:57.000000000","message":"should probably be renamed too.","commit_id":"3c76bdd5e190382fc91ca512ec224e5a2b2f8f5e"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"342b4386e6752c1d13ddb476a3d23e3c2d8cd56e","unresolved":false,"context_lines":[{"line_number":32,"context_line":"name: wb"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"workflows:"},{"line_number":35,"context_line":"  test_expressions:"},{"line_number":36,"context_line":"    type: direct"},{"line_number":37,"context_line":"    input:"},{"line_number":38,"context_line":"      - wf1_wx_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_6251880e","line":35,"range":{"start_line":35,"start_character":2,"end_line":35,"end_character":18},"in_reply_to":"5a74a57a_c4fd3fb2","updated":"2016-11-30 08:46:39.000000000","message":"Yeah, but it\u0027s not that critical as a file name IMO.","commit_id":"3c76bdd5e190382fc91ca512ec224e5a2b2f8f5e"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"af1d4b3b8a11fbfc7a4416e37976273e49d3308a","unresolved":false,"context_lines":[{"line_number":196,"context_line":"\"\"\""},{"line_number":197,"context_line":""},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"class WorkflowWithExpressionsTest(base.EngineTestCase):"},{"line_number":200,"context_line":"    def setUp(self):"},{"line_number":201,"context_line":"        super(WorkflowWithExpressionsTest, self).setUp()"},{"line_number":202,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_64238b56","line":199,"range":{"start_line":199,"start_character":6,"end_line":199,"end_character":33},"updated":"2016-11-29 10:42:57.000000000","message":"same","commit_id":"3c76bdd5e190382fc91ca512ec224e5a2b2f8f5e"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"342b4386e6752c1d13ddb476a3d23e3c2d8cd56e","unresolved":false,"context_lines":[{"line_number":196,"context_line":"\"\"\""},{"line_number":197,"context_line":""},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"class WorkflowWithExpressionsTest(base.EngineTestCase):"},{"line_number":200,"context_line":"    def setUp(self):"},{"line_number":201,"context_line":"        super(WorkflowWithExpressionsTest, self).setUp()"},{"line_number":202,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_826dc4ce","line":199,"range":{"start_line":199,"start_character":6,"end_line":199,"end_character":33},"in_reply_to":"5a74a57a_64238b56","updated":"2016-11-30 08:46:39.000000000","message":"Yes, please.","commit_id":"3c76bdd5e190382fc91ca512ec224e5a2b2f8f5e"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"af1d4b3b8a11fbfc7a4416e37976273e49d3308a","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        if expected_tasks_count:"},{"line_number":218,"context_line":"            self.assertEqual(expected_tasks_count, len(published))"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def test_tasks_expressions(self):"},{"line_number":221,"context_line":"        wb_service.create_workbook_v2(WORKBOOK_WITH_EXPRESSIONS)"},{"line_number":222,"context_line":"        # Start helping workflow executions."},{"line_number":223,"context_line":"        wf1_ex \u003d self.engine.start_workflow(\u0027wb.wf1_top_lvl\u0027, {})"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_e48a3b1a","line":220,"range":{"start_line":220,"start_character":8,"end_line":220,"end_character":30},"updated":"2016-11-29 10:42:57.000000000","message":"same","commit_id":"3c76bdd5e190382fc91ca512ec224e5a2b2f8f5e"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"718d457e289f3af8dedf3c3ef3e296ad20113a3a","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"# Use the set_default method to set value otherwise in certain test cases"},{"line_number":24,"context_line":"# the change in value is not permanent."},{"line_number":25,"context_line":"cfg.CONF.set_default(\u0027auth_enable\u0027, False, group\u003d\u0027pecan\u0027)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"WORKBOOK_WITH_EXPRESSIONS \u003d \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_2bde6d3f","line":25,"range":{"start_line":25,"start_character":0,"end_line":25,"end_character":57},"updated":"2016-12-02 09:13:45.000000000","message":"I\u0027m not sure if this is safe behavior. It would change the value of \u0027auth_enable\u0027 field for *all* the tests.","commit_id":"eb6c0513c64608e24819eeb26dc9c3c2b63f073b"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"be6815f65b32e2f5bcca16f1915f9cff4ac88966","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"# Use the set_default method to set value otherwise in certain test cases"},{"line_number":24,"context_line":"# the change in value is not permanent."},{"line_number":25,"context_line":"cfg.CONF.set_default(\u0027auth_enable\u0027, False, group\u003d\u0027pecan\u0027)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"WORKBOOK_WITH_EXPRESSIONS \u003d \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_71fa12bf","line":25,"in_reply_to":"3a71b18c_2bde6d3f","updated":"2016-12-02 09:35:08.000000000","message":"We already have it here: https://github.com/openstack/mistral/blob/6e6461f9bfb8e24ca60ba1708151dadfdd143e99/mistral/tests/unit/api/base.py#L28\n\nAlso, it is done here, but never reset (no tearDown). https://github.com/openstack/mistral/blob/ef4161ce6d10ffb2d3589313391e41673eba66f5/mistral/tests/unit/api/test_auth.py#L71","commit_id":"eb6c0513c64608e24819eeb26dc9c3c2b63f073b"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"26f355959fb240e9b4054e36a3d5fab5e88f7f89","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"# Use the set_default method to set value otherwise in certain test cases"},{"line_number":24,"context_line":"# the change in value is not permanent."},{"line_number":25,"context_line":"cfg.CONF.set_default(\u0027auth_enable\u0027, False, group\u003d\u0027pecan\u0027)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"WORKBOOK_WITH_EXPRESSIONS \u003d \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_43b70d86","line":25,"in_reply_to":"3a71b18c_71fa12bf","updated":"2016-12-02 10:00:18.000000000","message":"OK, then","commit_id":"eb6c0513c64608e24819eeb26dc9c3c2b63f073b"}],"mistral/tests/unit/engine/test_workflow_with_expressions.py":[{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"b47012e4ccd922f2b4df2f8d64b5251abafc0262","unresolved":false,"context_lines":[{"line_number":242,"context_line":"             \"wf5_wx_id\": wf5_ex.id}"},{"line_number":243,"context_line":"        )"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        id \u003d execution.id"},{"line_number":246,"context_line":"        self.await_workflow_success(id)"},{"line_number":247,"context_line":"        execution \u003d db_api.get_workflow_execution(id)"},{"line_number":248,"context_line":"        self.assertEqual(states.SUCCESS, execution.state)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_cb2f4786","line":245,"range":{"start_line":245,"start_character":8,"end_line":245,"end_character":10},"updated":"2016-11-28 11:30:54.000000000","message":"\u0027id\u0027 is a name of built-in function. Please change it since it may interfere with underlying code in the future.","commit_id":"9a572106a2c1918d2e81d89917fa4e2bcb0e6f7c"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"1b745b0edb1cf9a1901b1c70a8f54e01ce252a5d","unresolved":false,"context_lines":[{"line_number":242,"context_line":"             \"wf5_wx_id\": wf5_ex.id}"},{"line_number":243,"context_line":"        )"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        id \u003d execution.id"},{"line_number":246,"context_line":"        self.await_workflow_success(id)"},{"line_number":247,"context_line":"        execution \u003d db_api.get_workflow_execution(id)"},{"line_number":248,"context_line":"        self.assertEqual(states.SUCCESS, execution.state)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_a6bc0207","line":245,"range":{"start_line":245,"start_character":8,"end_line":245,"end_character":10},"in_reply_to":"5a74a57a_cb2f4786","updated":"2016-11-28 12:01:46.000000000","message":"Done","commit_id":"9a572106a2c1918d2e81d89917fa4e2bcb0e6f7c"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf955835dd03e4e2ca1f00a5631ec7bdbb9c17f5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 - Nokia, Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"#    you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_a03d982c","line":1,"range":{"start_line":1,"start_character":1,"end_line":1,"end_character":2},"updated":"2016-11-29 07:53:20.000000000","message":"I would call this file differently. You called it based on the idea that you have a workflow with expressions. But we have workflows with expressions all over the code. I would call it based on what you\u0027re testing. May be \"test_tasks_function\"?","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"95a1c6a377ff4436d010393144f27c9566cdba10","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 - Nokia, Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"#    you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_7adb2c7c","line":1,"range":{"start_line":1,"start_character":1,"end_line":1,"end_character":2},"in_reply_to":"5a74a57a_a03d982c","updated":"2016-11-29 10:20:12.000000000","message":"Done","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"}],"mistral/tests/unit/expressions/test_jinja_expression.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf955835dd03e4e2ca1f00a5631ec7bdbb9c17f5","unresolved":false,"context_lines":[{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    @mock.patch(\u0027mistral.db.v2.api.get_task_executions\u0027)"},{"line_number":212,"context_line":"    @mock.patch(\u0027mistral.workflow.data_flow.get_task_execution_result\u0027)"},{"line_number":213,"context_line":"    def test_filter_tasks_without_taskexecution(self, task_execution_result,"},{"line_number":214,"context_line":"                                                task_executions):"},{"line_number":215,"context_line":"        task \u003d mock.MagicMock(return_value\u003d{})"},{"line_number":216,"context_line":"        task_executions.return_value \u003d [task]"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_a0003835","line":213,"range":{"start_line":213,"start_character":37,"end_line":213,"end_character":39},"updated":"2016-11-29 07:53:20.000000000","message":"Seems like an underscore is missing between these two chars.","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"95a1c6a377ff4436d010393144f27c9566cdba10","unresolved":false,"context_lines":[{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    @mock.patch(\u0027mistral.db.v2.api.get_task_executions\u0027)"},{"line_number":212,"context_line":"    @mock.patch(\u0027mistral.workflow.data_flow.get_task_execution_result\u0027)"},{"line_number":213,"context_line":"    def test_filter_tasks_without_taskexecution(self, task_execution_result,"},{"line_number":214,"context_line":"                                                task_executions):"},{"line_number":215,"context_line":"        task \u003d mock.MagicMock(return_value\u003d{})"},{"line_number":216,"context_line":"        task_executions.return_value \u003d [task]"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_5a4e703b","line":213,"range":{"start_line":213,"start_character":37,"end_line":213,"end_character":39},"in_reply_to":"5a74a57a_a0003835","updated":"2016-11-29 10:20:12.000000000","message":"I copied it from somewhere (I\u0027ll fix it there too).\nIf you like a different name for this function, just let me know.","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"}],"mistral/tests/unit/expressions/test_yaql_expression.py":[{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"b47012e4ccd922f2b4df2f8d64b5251abafc0262","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                                                task_executions):"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        task_execution_result.return_value \u003d \u0027task_execution_result\u0027"},{"line_number":146,"context_line":"        task \u003d type(\"obj\", (object,), {"},{"line_number":147,"context_line":"            \u0027id\u0027: \u0027id\u0027,"},{"line_number":148,"context_line":"            \u0027name\u0027: \u0027name\u0027,"},{"line_number":149,"context_line":"            \u0027published\u0027: \u0027published\u0027,"},{"line_number":150,"context_line":"            \u0027result\u0027: task_execution_result(),"},{"line_number":151,"context_line":"            \u0027spec\u0027: \u0027spec\u0027,"},{"line_number":152,"context_line":"            \u0027state\u0027: \u0027state\u0027,"},{"line_number":153,"context_line":"            \u0027state_info\u0027: \u0027state_info\u0027,"},{"line_number":154,"context_line":"            \u0027type\u0027: \u0027type\u0027,"},{"line_number":155,"context_line":"            \u0027workflow_execution_id\u0027: \u0027workflow_execution_id\u0027"},{"line_number":156,"context_line":"        })()"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        task_executions.return_value \u003d [task]"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_eba243ad","line":156,"range":{"start_line":146,"start_character":0,"end_line":156,"end_character":12},"updated":"2016-11-28 11:30:54.000000000","message":"Why you didn\u0027t use mock for this?","commit_id":"9a572106a2c1918d2e81d89917fa4e2bcb0e6f7c"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"d2ed8b43c848cbb60c7bb59e3ccb1c614b7eb60f","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                                                task_executions):"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        task_execution_result.return_value \u003d \u0027task_execution_result\u0027"},{"line_number":146,"context_line":"        task \u003d type(\"obj\", (object,), {"},{"line_number":147,"context_line":"            \u0027id\u0027: \u0027id\u0027,"},{"line_number":148,"context_line":"            \u0027name\u0027: \u0027name\u0027,"},{"line_number":149,"context_line":"            \u0027published\u0027: \u0027published\u0027,"},{"line_number":150,"context_line":"            \u0027result\u0027: task_execution_result(),"},{"line_number":151,"context_line":"            \u0027spec\u0027: \u0027spec\u0027,"},{"line_number":152,"context_line":"            \u0027state\u0027: \u0027state\u0027,"},{"line_number":153,"context_line":"            \u0027state_info\u0027: \u0027state_info\u0027,"},{"line_number":154,"context_line":"            \u0027type\u0027: \u0027type\u0027,"},{"line_number":155,"context_line":"            \u0027workflow_execution_id\u0027: \u0027workflow_execution_id\u0027"},{"line_number":156,"context_line":"        })()"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        task_executions.return_value \u003d [task]"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_b3b8b876","line":156,"range":{"start_line":146,"start_character":0,"end_line":156,"end_character":12},"in_reply_to":"5a74a57a_13adec87","updated":"2016-11-28 15:02:32.000000000","message":"OK.","commit_id":"9a572106a2c1918d2e81d89917fa4e2bcb0e6f7c"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"7ff8a0ffc1eff65dd5013ef974e22187da861413","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                                                task_executions):"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        task_execution_result.return_value \u003d \u0027task_execution_result\u0027"},{"line_number":146,"context_line":"        task \u003d type(\"obj\", (object,), {"},{"line_number":147,"context_line":"            \u0027id\u0027: \u0027id\u0027,"},{"line_number":148,"context_line":"            \u0027name\u0027: \u0027name\u0027,"},{"line_number":149,"context_line":"            \u0027published\u0027: \u0027published\u0027,"},{"line_number":150,"context_line":"            \u0027result\u0027: task_execution_result(),"},{"line_number":151,"context_line":"            \u0027spec\u0027: \u0027spec\u0027,"},{"line_number":152,"context_line":"            \u0027state\u0027: \u0027state\u0027,"},{"line_number":153,"context_line":"            \u0027state_info\u0027: \u0027state_info\u0027,"},{"line_number":154,"context_line":"            \u0027type\u0027: \u0027type\u0027,"},{"line_number":155,"context_line":"            \u0027workflow_execution_id\u0027: \u0027workflow_execution_id\u0027"},{"line_number":156,"context_line":"        })()"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        task_executions.return_value \u003d [task]"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_13adec87","line":156,"range":{"start_line":146,"start_character":0,"end_line":156,"end_character":12},"in_reply_to":"5a74a57a_a69de267","updated":"2016-11-28 15:00:01.000000000","message":"also, when using mocks, yaql converts the MagicMock objects to empty lists and I get the next exception:\nhttp://paste.openstack.org/show/590676/","commit_id":"9a572106a2c1918d2e81d89917fa4e2bcb0e6f7c"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"1b745b0edb1cf9a1901b1c70a8f54e01ce252a5d","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                                                task_executions):"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        task_execution_result.return_value \u003d \u0027task_execution_result\u0027"},{"line_number":146,"context_line":"        task \u003d type(\"obj\", (object,), {"},{"line_number":147,"context_line":"            \u0027id\u0027: \u0027id\u0027,"},{"line_number":148,"context_line":"            \u0027name\u0027: \u0027name\u0027,"},{"line_number":149,"context_line":"            \u0027published\u0027: \u0027published\u0027,"},{"line_number":150,"context_line":"            \u0027result\u0027: task_execution_result(),"},{"line_number":151,"context_line":"            \u0027spec\u0027: \u0027spec\u0027,"},{"line_number":152,"context_line":"            \u0027state\u0027: \u0027state\u0027,"},{"line_number":153,"context_line":"            \u0027state_info\u0027: \u0027state_info\u0027,"},{"line_number":154,"context_line":"            \u0027type\u0027: \u0027type\u0027,"},{"line_number":155,"context_line":"            \u0027workflow_execution_id\u0027: \u0027workflow_execution_id\u0027"},{"line_number":156,"context_line":"        })()"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        task_executions.return_value \u003d [task]"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_a69de267","line":156,"range":{"start_line":146,"start_character":0,"end_line":156,"end_character":12},"in_reply_to":"5a74a57a_eba243ad","updated":"2016-11-28 12:01:46.000000000","message":"I wanted this object to be returned by something else I mocked, task_executions in line 158. and what happens after it is returned a new object is built, and that is what I tested in line 170.","commit_id":"9a572106a2c1918d2e81d89917fa4e2bcb0e6f7c"}],"mistral/utils/expression_utils.py":[{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"b47012e4ccd922f2b4df2f8d64b5251abafc0262","unresolved":false,"context_lines":[{"line_number":143,"context_line":"    return convert_to_user_model(task_ex)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"def _should_pass_filter(t, state, flat):"},{"line_number":147,"context_line":"    # start from assuming all is true, check only if needed"},{"line_number":148,"context_line":"    state_match \u003d True"},{"line_number":149,"context_line":"    flat_match \u003d True"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_6b8b93c3","line":146,"range":{"start_line":146,"start_character":4,"end_line":146,"end_character":23},"updated":"2016-11-28 11:30:54.000000000","message":"Could you explain what is a purpose of this function? I see where it is used in a code bellow, but still I don\u0027t understand what \u0027flat\u0027 parameter do.","commit_id":"9a572106a2c1918d2e81d89917fa4e2bcb0e6f7c"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"1b745b0edb1cf9a1901b1c70a8f54e01ce252a5d","unresolved":false,"context_lines":[{"line_number":143,"context_line":"    return convert_to_user_model(task_ex)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"def _should_pass_filter(t, state, flat):"},{"line_number":147,"context_line":"    # start from assuming all is true, check only if needed"},{"line_number":148,"context_line":"    state_match \u003d True"},{"line_number":149,"context_line":"    flat_match \u003d True"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_313f4e88","line":146,"range":{"start_line":146,"start_character":4,"end_line":146,"end_character":23},"in_reply_to":"5a74a57a_6b8b93c3","updated":"2016-11-28 12:01:46.000000000","message":"the new tasks function has arguments, so that the user will be able to request only tasks with a given state or only \"flat\" tasks. this functions make sure only tasks that match what the user requested will be returned.\n\nflat is a Boolean.\nfrom the spec (https://github.com/openstack/mistral-specs/blob/master/specs/ocata/approved/yaql-tasks-function.rst):\n  flat (optional. Default: false) - if true, only list the tasks that match at least one of the next conditions:\n    * tasks of type action\n    * tasks of type workflow, that also have a different state than the one of the nested workflow execution that was executed because of the task.\n\nthe second condition is so a user will be able to get only the root causes of an error in mistral even when the error cause was during a publish. it is tested in line 413 (wf4_top_lvl) in mistral/tests/unit/engine/test_workflow_with_expressions.py.","commit_id":"9a572106a2c1918d2e81d89917fa4e2bcb0e6f7c"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf955835dd03e4e2ca1f00a5631ec7bdbb9c17f5","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    if flat:"},{"line_number":155,"context_line":"        is_action \u003d t[\u0027type\u0027] \u003d\u003d utils.ACTION_TASK_TYPE"},{"line_number":156,"context_line":"        if not is_action:"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"            nested_execs \u003d db_api.get_workflow_executions("},{"line_number":159,"context_line":"                task_execution_id\u003dt.id"},{"line_number":160,"context_line":"            )"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_a5876ab3","line":157,"updated":"2016-11-29 07:53:20.000000000","message":"I\u0027d remove this line and insert it before \u0027if\u0027.","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"95a1c6a377ff4436d010393144f27c9566cdba10","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    if flat:"},{"line_number":155,"context_line":"        is_action \u003d t[\u0027type\u0027] \u003d\u003d utils.ACTION_TASK_TYPE"},{"line_number":156,"context_line":"        if not is_action:"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"            nested_execs \u003d db_api.get_workflow_executions("},{"line_number":159,"context_line":"                task_execution_id\u003dt.id"},{"line_number":160,"context_line":"            )"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_1a5798ca","line":157,"in_reply_to":"5a74a57a_a5876ab3","updated":"2016-11-29 10:20:12.000000000","message":"Done","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf955835dd03e4e2ca1f00a5631ec7bdbb9c17f5","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            nested_execs \u003d db_api.get_workflow_executions("},{"line_number":159,"context_line":"                task_execution_id\u003dt.id"},{"line_number":160,"context_line":"            )"},{"line_number":161,"context_line":"            for n in nested_execs:"},{"line_number":162,"context_line":"                flat_match \u003d flat_match and n.state !\u003d t.state"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    return state_match and flat_match"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_e58de2d3","line":161,"range":{"start_line":161,"start_character":12,"end_line":161,"end_character":15},"updated":"2016-11-29 07:53:20.000000000","message":"I\u0027d insert a blank line before \u0027for\u0027.","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"95a1c6a377ff4436d010393144f27c9566cdba10","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            nested_execs \u003d db_api.get_workflow_executions("},{"line_number":159,"context_line":"                task_execution_id\u003dt.id"},{"line_number":160,"context_line":"            )"},{"line_number":161,"context_line":"            for n in nested_execs:"},{"line_number":162,"context_line":"                flat_match \u003d flat_match and n.state !\u003d t.state"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    return state_match and flat_match"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_5a759061","line":161,"range":{"start_line":161,"start_character":12,"end_line":161,"end_character":15},"in_reply_to":"5a74a57a_e58de2d3","updated":"2016-11-29 10:20:12.000000000","message":"Done","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf955835dd03e4e2ca1f00a5631ec7bdbb9c17f5","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"def _get_tasks_from_db(workflow_execution_id\u003dNone, recursive\u003dFalse, state\u003dNone,"},{"line_number":168,"context_line":"                       leaves\u003dFalse):"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    db_task_exs \u003d []"},{"line_number":171,"context_line":"    nested_task_exs \u003d []"},{"line_number":172,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_05cade1a","line":169,"updated":"2016-11-29 07:53:20.000000000","message":"I would remove this line.","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"95a1c6a377ff4436d010393144f27c9566cdba10","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"def _get_tasks_from_db(workflow_execution_id\u003dNone, recursive\u003dFalse, state\u003dNone,"},{"line_number":168,"context_line":"                       leaves\u003dFalse):"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    db_task_exs \u003d []"},{"line_number":171,"context_line":"    nested_task_exs \u003d []"},{"line_number":172,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_5dc74a95","line":169,"in_reply_to":"5a74a57a_05cade1a","updated":"2016-11-29 10:20:12.000000000","message":"Done","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf955835dd03e4e2ca1f00a5631ec7bdbb9c17f5","unresolved":false,"context_lines":[{"line_number":167,"context_line":"def _get_tasks_from_db(workflow_execution_id\u003dNone, recursive\u003dFalse, state\u003dNone,"},{"line_number":168,"context_line":"                       leaves\u003dFalse):"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    db_task_exs \u003d []"},{"line_number":171,"context_line":"    nested_task_exs \u003d []"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    kwargs \u003d {}"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_e5dfa2d3","line":170,"range":{"start_line":170,"start_character":4,"end_line":170,"end_character":15},"updated":"2016-11-29 07:53:20.000000000","message":"\"task_exs\" or \"task_execs\" is enough.","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"95a1c6a377ff4436d010393144f27c9566cdba10","unresolved":false,"context_lines":[{"line_number":167,"context_line":"def _get_tasks_from_db(workflow_execution_id\u003dNone, recursive\u003dFalse, state\u003dNone,"},{"line_number":168,"context_line":"                       leaves\u003dFalse):"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    db_task_exs \u003d []"},{"line_number":171,"context_line":"    nested_task_exs \u003d []"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    kwargs \u003d {}"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_d32d0bff","line":170,"range":{"start_line":170,"start_character":4,"end_line":170,"end_character":15},"in_reply_to":"5a74a57a_e5dfa2d3","updated":"2016-11-29 10:20:12.000000000","message":"Done","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf955835dd03e4e2ca1f00a5631ec7bdbb9c17f5","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    nested_task_exs \u003d []"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    kwargs \u003d {}"},{"line_number":174,"context_line":"    if workflow_execution_id:"},{"line_number":175,"context_line":"        kwargs[\u0027workflow_execution_id\u0027] \u003d workflow_execution_id"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    # we can\u0027t add state to query if we want to filter by workflow_execution_id"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_85050e47","line":174,"range":{"start_line":174,"start_character":4,"end_line":174,"end_character":6},"updated":"2016-11-29 07:53:20.000000000","message":"We usually insert a blank line before all control structures like \u0027if\u0027, \u0027for\u0027, \u0027try\u0027 (except if they follow one after another like in lines 190-192)","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"95a1c6a377ff4436d010393144f27c9566cdba10","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    nested_task_exs \u003d []"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    kwargs \u003d {}"},{"line_number":174,"context_line":"    if workflow_execution_id:"},{"line_number":175,"context_line":"        kwargs[\u0027workflow_execution_id\u0027] \u003d workflow_execution_id"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    # we can\u0027t add state to query if we want to filter by workflow_execution_id"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_9d6ba284","line":174,"range":{"start_line":174,"start_character":4,"end_line":174,"end_character":6},"in_reply_to":"5a74a57a_85050e47","updated":"2016-11-29 10:20:12.000000000","message":"Done","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf955835dd03e4e2ca1f00a5631ec7bdbb9c17f5","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    if workflow_execution_id:"},{"line_number":175,"context_line":"        kwargs[\u0027workflow_execution_id\u0027] \u003d workflow_execution_id"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    # we can\u0027t add state to query if we want to filter by workflow_execution_id"},{"line_number":178,"context_line":"    # recursively. There might be a workflow_execution in one state with a"},{"line_number":179,"context_line":"    # nested workflow execution that has a task in the desired state"},{"line_number":180,"context_line":"    # until we have an optimization for queering all workflow executions"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_2550ba31","line":177,"range":{"start_line":177,"start_character":6,"end_line":177,"end_character":7},"updated":"2016-11-29 07:53:20.000000000","message":"All comments should start with capital and end with a period (as normal English sentences).","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"95a1c6a377ff4436d010393144f27c9566cdba10","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    if workflow_execution_id:"},{"line_number":175,"context_line":"        kwargs[\u0027workflow_execution_id\u0027] \u003d workflow_execution_id"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    # we can\u0027t add state to query if we want to filter by workflow_execution_id"},{"line_number":178,"context_line":"    # recursively. There might be a workflow_execution in one state with a"},{"line_number":179,"context_line":"    # nested workflow execution that has a task in the desired state"},{"line_number":180,"context_line":"    # until we have an optimization for queering all workflow executions"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_5dd10a22","line":177,"range":{"start_line":177,"start_character":6,"end_line":177,"end_character":7},"in_reply_to":"5a74a57a_2550ba31","updated":"2016-11-29 10:20:12.000000000","message":"Done","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf955835dd03e4e2ca1f00a5631ec7bdbb9c17f5","unresolved":false,"context_lines":[{"line_number":178,"context_line":"    # recursively. There might be a workflow_execution in one state with a"},{"line_number":179,"context_line":"    # nested workflow execution that has a task in the desired state"},{"line_number":180,"context_line":"    # until we have an optimization for queering all workflow executions"},{"line_number":181,"context_line":"    # under a given top level workflow execution, this is the way to go"},{"line_number":182,"context_line":"    if state and not (workflow_execution_id and recursive):"},{"line_number":183,"context_line":"        kwargs[\u0027state\u0027] \u003d state"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_453a16e8","line":181,"updated":"2016-11-29 07:53:20.000000000","message":"Missing period.","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"95a1c6a377ff4436d010393144f27c9566cdba10","unresolved":false,"context_lines":[{"line_number":178,"context_line":"    # recursively. There might be a workflow_execution in one state with a"},{"line_number":179,"context_line":"    # nested workflow execution that has a task in the desired state"},{"line_number":180,"context_line":"    # until we have an optimization for queering all workflow executions"},{"line_number":181,"context_line":"    # under a given top level workflow execution, this is the way to go"},{"line_number":182,"context_line":"    if state and not (workflow_execution_id and recursive):"},{"line_number":183,"context_line":"        kwargs[\u0027state\u0027] \u003d state"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_9dc72263","line":181,"in_reply_to":"5a74a57a_453a16e8","updated":"2016-11-29 10:20:12.000000000","message":"Done","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf955835dd03e4e2ca1f00a5631ec7bdbb9c17f5","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    db_task_exs.extend(db_api.get_task_executions(**kwargs))"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    # if it is not recursive no need to check nested workflows"},{"line_number":188,"context_line":"    # if there is no workflow execution id, we already have all we need,"},{"line_number":189,"context_line":"    # doing more queries will just create duplication in the results"},{"line_number":190,"context_line":"    if recursive and workflow_execution_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_6059c034","line":187,"range":{"start_line":187,"start_character":6,"end_line":187,"end_character":7},"updated":"2016-11-29 07:53:20.000000000","message":"Same. Needs to start with a capital and end with a period.\n\nPlease fix it for all the comments in the file.","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"95a1c6a377ff4436d010393144f27c9566cdba10","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    db_task_exs.extend(db_api.get_task_executions(**kwargs))"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    # if it is not recursive no need to check nested workflows"},{"line_number":188,"context_line":"    # if there is no workflow execution id, we already have all we need,"},{"line_number":189,"context_line":"    # doing more queries will just create duplication in the results"},{"line_number":190,"context_line":"    if recursive and workflow_execution_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_1daa3285","line":187,"range":{"start_line":187,"start_character":6,"end_line":187,"end_character":7},"in_reply_to":"5a74a57a_6059c034","updated":"2016-11-29 10:20:12.000000000","message":"Done","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf955835dd03e4e2ca1f00a5631ec7bdbb9c17f5","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        for t in db_task_exs:"},{"line_number":192,"context_line":"            if t.type \u003d\u003d utils.WORKFLOW_TASK_TYPE:"},{"line_number":193,"context_line":"                # get nested workflow execution that matches the task"},{"line_number":194,"context_line":"                nested_workflow_executions \u003d db_api.get_workflow_executions("},{"line_number":195,"context_line":"                    task_execution_id\u003dt.id"},{"line_number":196,"context_line":"                )"},{"line_number":197,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_a0ad98ea","line":194,"range":{"start_line":194,"start_character":16,"end_line":194,"end_character":42},"updated":"2016-11-29 07:53:20.000000000","message":"Usually we shorten it so that it would be called \"nested_wf_execs\"","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"95a1c6a377ff4436d010393144f27c9566cdba10","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        for t in db_task_exs:"},{"line_number":192,"context_line":"            if t.type \u003d\u003d utils.WORKFLOW_TASK_TYPE:"},{"line_number":193,"context_line":"                # get nested workflow execution that matches the task"},{"line_number":194,"context_line":"                nested_workflow_executions \u003d db_api.get_workflow_executions("},{"line_number":195,"context_line":"                    task_execution_id\u003dt.id"},{"line_number":196,"context_line":"                )"},{"line_number":197,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_736b571e","line":194,"range":{"start_line":194,"start_character":16,"end_line":194,"end_character":42},"in_reply_to":"5a74a57a_a0ad98ea","updated":"2016-11-29 10:20:12.000000000","message":"I think this is a little more readable. What do you think?","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf955835dd03e4e2ca1f00a5631ec7bdbb9c17f5","unresolved":false,"context_lines":[{"line_number":221,"context_line":"def tasks_(context, workflow_execution_id\u003dNone, recursive\u003dFalse, state\u003dNone,"},{"line_number":222,"context_line":"           leaves\u003dFalse):"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    db_task_exs \u003d _get_tasks_from_db("},{"line_number":225,"context_line":"        workflow_execution_id,"},{"line_number":226,"context_line":"        recursive,"},{"line_number":227,"context_line":"        state,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_a56bea1c","line":224,"range":{"start_line":224,"start_character":4,"end_line":224,"end_character":15},"updated":"2016-11-29 07:53:20.000000000","message":"I think \u0027task_exs\u0027 is enough. We know that all execution objects are from DB.","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"95a1c6a377ff4436d010393144f27c9566cdba10","unresolved":false,"context_lines":[{"line_number":221,"context_line":"def tasks_(context, workflow_execution_id\u003dNone, recursive\u003dFalse, state\u003dNone,"},{"line_number":222,"context_line":"           leaves\u003dFalse):"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    db_task_exs \u003d _get_tasks_from_db("},{"line_number":225,"context_line":"        workflow_execution_id,"},{"line_number":226,"context_line":"        recursive,"},{"line_number":227,"context_line":"        state,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_4e378e4c","line":224,"range":{"start_line":224,"start_character":4,"end_line":224,"end_character":15},"in_reply_to":"5a74a57a_a56bea1c","updated":"2016-11-29 10:20:12.000000000","message":"Done","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf955835dd03e4e2ca1f00a5631ec7bdbb9c17f5","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        leaves"},{"line_number":229,"context_line":"    )"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    task_exs \u003d [convert_to_user_model(t) for t in db_task_exs]"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    return task_exs"},{"line_number":234,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_e54882b5","line":231,"range":{"start_line":231,"start_character":4,"end_line":231,"end_character":14},"updated":"2016-11-29 07:53:20.000000000","message":"I would suggest we just return the result immediately w/o having an additional variable.","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"95a1c6a377ff4436d010393144f27c9566cdba10","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        leaves"},{"line_number":229,"context_line":"    )"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    task_exs \u003d [convert_to_user_model(t) for t in db_task_exs]"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    return task_exs"},{"line_number":234,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_6e29aae5","line":231,"range":{"start_line":231,"start_character":4,"end_line":231,"end_character":14},"in_reply_to":"5a74a57a_e54882b5","updated":"2016-11-29 10:20:12.000000000","message":"Done","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"}],"mistral/workbook/v2/tasks.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf955835dd03e4e2ca1f00a5631ec7bdbb9c17f5","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def get_type(self):"},{"line_number":224,"context_line":"        if self._workflow:"},{"line_number":225,"context_line":"            return utils.WORKFLOW_TASK_TYPE"},{"line_number":226,"context_line":"        return utils.ACTION_TASK_TYPE"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_001bac81","line":225,"range":{"start_line":225,"start_character":19,"end_line":225,"end_character":43},"updated":"2016-11-29 07:53:20.000000000","message":"Why did you move these two constants into utils? To me this module seems the best place because it\u0027s related with the schema. Whereas \u0027mistral/utils\u0027 is just a module with common utils. It shouldn\u0027t know anything about our data.","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"95a1c6a377ff4436d010393144f27c9566cdba10","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def get_type(self):"},{"line_number":224,"context_line":"        if self._workflow:"},{"line_number":225,"context_line":"            return utils.WORKFLOW_TASK_TYPE"},{"line_number":226,"context_line":"        return utils.ACTION_TASK_TYPE"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_3028f532","line":225,"range":{"start_line":225,"start_character":19,"end_line":225,"end_character":43},"in_reply_to":"5a74a57a_001bac81","updated":"2016-11-29 10:20:12.000000000","message":"I moved it, because before I did, I tried importing it to mistral/utils/expression_utils.py, and it caused problems (from mistral.workbook.v2 import tasks).\n\nFor example the test I added (test_tasks_expressions in mistral/tests/unit/engine/test_workflow_with_expressions.py) fails and I can\u0027t parse workflows/workbooks. The error is weird, but I\u0027m pretty sure it is related to the import.\n\nSee exception here: http://paste.openstack.org/show/590758/\n\nI was thinking it is probably better to have this string hard-coded only in one place and after trying some places, this is the one that worked.\n\nObviously, I\u0027m open to suggestions.","commit_id":"2b5fdc0cdabd944c03f34659c17c9172b17dc76e"}]}
