)]}'
{"mistral/db/v2/sqlalchemy/api.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"00198a7f603f61a72894beb3699f1d0ef69bb106","unresolved":false,"context_lines":[{"line_number":909,"context_line":""},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"def is_mysql_max_depth_error(e):"},{"line_number":912,"context_line":"    MYSQL \u003d \".*3008.*Foreign key cascade delete\" \\"},{"line_number":913,"context_line":"            \"/update exceeds max depth of 15.*\""},{"line_number":914,"context_line":"    return re.match(MYSQL, str(e))"},{"line_number":915,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_d7477a76","line":912,"range":{"start_line":912,"start_character":4,"end_line":912,"end_character":9},"updated":"2019-06-13 10:11:22.000000000","message":"I\u0027d suggest we call it something like \"mysql_pattern\" or just \"pattern\", because anyway it has a very limited scope.","commit_id":"88a0f7514fdb8277d227dc46c06fd761c2bd33a0"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"aaa481c2121c97de30edc72b1f82a02011674554","unresolved":false,"context_lines":[{"line_number":909,"context_line":""},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"def is_mysql_max_depth_error(e):"},{"line_number":912,"context_line":"    MYSQL \u003d \".*3008.*Foreign key cascade delete\" \\"},{"line_number":913,"context_line":"            \"/update exceeds max depth of 15.*\""},{"line_number":914,"context_line":"    return re.match(MYSQL, str(e))"},{"line_number":915,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_25ab4075","line":912,"range":{"start_line":912,"start_character":4,"end_line":912,"end_character":9},"in_reply_to":"9fb8cfa7_d7477a76","updated":"2019-06-13 12:50:38.000000000","message":"Done","commit_id":"88a0f7514fdb8277d227dc46c06fd761c2bd33a0"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"00198a7f603f61a72894beb3699f1d0ef69bb106","unresolved":false,"context_lines":[{"line_number":915,"context_line":""},{"line_number":916,"context_line":""},{"line_number":917,"context_line":"def is_mariadb_max_depth_error(e):"},{"line_number":918,"context_line":"    MARIADB \u003d \".*Got error 193.*ON DELETE CASCADE.*\""},{"line_number":919,"context_line":"    return re.match(MARIADB, str(e))"},{"line_number":920,"context_line":""},{"line_number":921,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_975d8248","line":918,"range":{"start_line":918,"start_character":4,"end_line":918,"end_character":11},"updated":"2019-06-13 10:11:22.000000000","message":"Same","commit_id":"88a0f7514fdb8277d227dc46c06fd761c2bd33a0"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"aaa481c2121c97de30edc72b1f82a02011674554","unresolved":false,"context_lines":[{"line_number":915,"context_line":""},{"line_number":916,"context_line":""},{"line_number":917,"context_line":"def is_mariadb_max_depth_error(e):"},{"line_number":918,"context_line":"    MARIADB \u003d \".*Got error 193.*ON DELETE CASCADE.*\""},{"line_number":919,"context_line":"    return re.match(MARIADB, str(e))"},{"line_number":920,"context_line":""},{"line_number":921,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_45a674ad","line":918,"range":{"start_line":918,"start_character":4,"end_line":918,"end_character":11},"in_reply_to":"9fb8cfa7_975d8248","updated":"2019-06-13 12:50:38.000000000","message":"Done","commit_id":"88a0f7514fdb8277d227dc46c06fd761c2bd33a0"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"00198a7f603f61a72894beb3699f1d0ef69bb106","unresolved":false,"context_lines":[{"line_number":936,"context_line":""},{"line_number":937,"context_line":"    sub_wf_ex_ids \u003d [i[0] for i in query.all()]"},{"line_number":938,"context_line":""},{"line_number":939,"context_line":"    for wf_ex_id in sub_wf_ex_ids:"},{"line_number":940,"context_line":"        delete_workflow_execution(wf_ex_id)"},{"line_number":941,"context_line":""},{"line_number":942,"context_line":"    delete_workflow_execution(id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_7a15533f","line":939,"range":{"start_line":939,"start_character":8,"end_line":939,"end_character":33},"updated":"2019-06-13 10:11:22.000000000","message":"I wonder, do we need to make sure if the ids of subworkflows are ordered properly? Starting from the inner most subworkflow and ending by the most outer one? Or DB transaction already takes care of ordering?","commit_id":"88a0f7514fdb8277d227dc46c06fd761c2bd33a0"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"aaa481c2121c97de30edc72b1f82a02011674554","unresolved":false,"context_lines":[{"line_number":936,"context_line":""},{"line_number":937,"context_line":"    sub_wf_ex_ids \u003d [i[0] for i in query.all()]"},{"line_number":938,"context_line":""},{"line_number":939,"context_line":"    for wf_ex_id in sub_wf_ex_ids:"},{"line_number":940,"context_line":"        delete_workflow_execution(wf_ex_id)"},{"line_number":941,"context_line":""},{"line_number":942,"context_line":"    delete_workflow_execution(id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_40b2e24a","line":939,"range":{"start_line":939,"start_character":8,"end_line":939,"end_character":33},"in_reply_to":"9fb8cfa7_7a15533f","updated":"2019-06-13 12:50:38.000000000","message":"The query returns the direct subworkflows only. I think these can be deleted in any order. If any of them are still too deep, then the same procedure will be repeated a level deeper in that section of the execution tree.","commit_id":"88a0f7514fdb8277d227dc46c06fd761c2bd33a0"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"ddc141395bf7c12f8ea2e69bdafe7fb2db459711","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        models.WorkflowExecution.task_execution_id \u003d\u003d models.TaskExecution.id"},{"line_number":933,"context_line":"    ).filter("},{"line_number":934,"context_line":"        models.TaskExecution.workflow_execution_id \u003d\u003d id"},{"line_number":935,"context_line":"    )"},{"line_number":936,"context_line":""},{"line_number":937,"context_line":"    sub_wf_ex_ids \u003d [i[0] for i in query.all()]"},{"line_number":938,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_e4368151","line":935,"updated":"2019-06-13 19:44:39.000000000","message":"As far as I understand this query returns just the id of the penultimate execution in the hierarchy. Is that exactly what you wanted?","commit_id":"9b60e9f21bca87a53d6614b5beec2e3c7ee213f0"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"2a635950aba7b06b58956497f106a8daaf6e875f","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        models.WorkflowExecution.task_execution_id \u003d\u003d models.TaskExecution.id"},{"line_number":933,"context_line":"    ).filter("},{"line_number":934,"context_line":"        models.TaskExecution.workflow_execution_id \u003d\u003d id"},{"line_number":935,"context_line":"    )"},{"line_number":936,"context_line":""},{"line_number":937,"context_line":"    sub_wf_ex_ids \u003d [i[0] for i in query.all()]"},{"line_number":938,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_1076663f","line":935,"in_reply_to":"9fb8cfa7_4ae98fe3","updated":"2019-06-14 08:08:19.000000000","message":"Hmmm, just checked it on my lab with mysql backend...\nI\u0027ve created an execution with your test workflow and started it. After that I tried to delete the whole hierarchy.\nWithout your patch I got:\nhttp://paste.openstack.org/show/752917/\nBut with this patch there was another error:\nhttp://paste.openstack.org/show/752918/\nAnd the error log:\nhttp://paste.openstack.org/show/752916/\nMy mysql version is 5.7.26 and PyMySQL is 0.9.3\n\nCan you please check what exactly happens there?","commit_id":"9b60e9f21bca87a53d6614b5beec2e3c7ee213f0"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"ae90cb69b6dd7e10fca1f956f7abf33829c042e7","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        models.WorkflowExecution.task_execution_id \u003d\u003d models.TaskExecution.id"},{"line_number":933,"context_line":"    ).filter("},{"line_number":934,"context_line":"        models.TaskExecution.workflow_execution_id \u003d\u003d id"},{"line_number":935,"context_line":"    )"},{"line_number":936,"context_line":""},{"line_number":937,"context_line":"    sub_wf_ex_ids \u003d [i[0] for i in query.all()]"},{"line_number":938,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_4ae98fe3","line":935,"in_reply_to":"9fb8cfa7_e4368151","updated":"2019-06-14 05:00:35.000000000","message":"No, it returns all the direct subworkflow executions of the workflow execution that failed to delete. There is no selection for the depth, all subs are treated equal.","commit_id":"9b60e9f21bca87a53d6614b5beec2e3c7ee213f0"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"ddc141395bf7c12f8ea2e69bdafe7fb2db459711","unresolved":false,"context_lines":[{"line_number":937,"context_line":"    sub_wf_ex_ids \u003d [i[0] for i in query.all()]"},{"line_number":938,"context_line":""},{"line_number":939,"context_line":"    for wf_ex_id in sub_wf_ex_ids:"},{"line_number":940,"context_line":"        delete_workflow_execution(wf_ex_id)"},{"line_number":941,"context_line":""},{"line_number":942,"context_line":"    delete_workflow_execution(id)"},{"line_number":943,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_e48441d5","line":940,"updated":"2019-06-13 19:44:39.000000000","message":"Because sub_wf_ex_ids always contains just one item, here you remove the penultimate and the last workflow executions. What will happen if the hierarchy has more than 17 levels?","commit_id":"9b60e9f21bca87a53d6614b5beec2e3c7ee213f0"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"ae90cb69b6dd7e10fca1f956f7abf33829c042e7","unresolved":false,"context_lines":[{"line_number":937,"context_line":"    sub_wf_ex_ids \u003d [i[0] for i in query.all()]"},{"line_number":938,"context_line":""},{"line_number":939,"context_line":"    for wf_ex_id in sub_wf_ex_ids:"},{"line_number":940,"context_line":"        delete_workflow_execution(wf_ex_id)"},{"line_number":941,"context_line":""},{"line_number":942,"context_line":"    delete_workflow_execution(id)"},{"line_number":943,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_0aef17e9","line":940,"in_reply_to":"9fb8cfa7_e48441d5","updated":"2019-06-14 05:00:35.000000000","message":"No, it will contain as many items as many sub workflows are there in the given workflow.","commit_id":"9b60e9f21bca87a53d6614b5beec2e3c7ee213f0"}],"mistral/tests/unit/db/v2/test_sqlalchemy_db_api.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"29d131a6841e67d42676f023441cf2efd7c1e849","unresolved":false,"context_lines":[{"line_number":3390,"context_line":""},{"line_number":3391,"context_line":"        def assert_subworkflows(expected):"},{"line_number":3392,"context_line":"            self.assertListEqual("},{"line_number":3393,"context_line":"                expected, db_api._get_all_direct_subworkflows(\u0027root\u0027)"},{"line_number":3394,"context_line":"            )"},{"line_number":3395,"context_line":""},{"line_number":3396,"context_line":"        wex(\u0027root\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_4e361eea","line":3393,"updated":"2019-06-20 09:03:08.000000000","message":"There\u0027s an ordering issue here. We need to compare them ignoring order. That\u0027s why the PG test keeps failing.","commit_id":"c8eece4827d5bc3394183bd35757769ccc08a34c"}],"mistral/tests/unit/engine/test_subworkflows.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"00198a7f603f61a72894beb3699f1d0ef69bb106","unresolved":false,"context_lines":[{"line_number":501,"context_line":"        self.assertEqual(0, len(db_api.get_action_executions()))"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"    def test_cascade_delete_deep(self):"},{"line_number":504,"context_line":"        wf_text \u003d \"\"\""},{"line_number":505,"context_line":"        version: 2.0"},{"line_number":506,"context_line":""},{"line_number":507,"context_line":"        wf:"},{"line_number":508,"context_line":"          input:"},{"line_number":509,"context_line":"            - level"},{"line_number":510,"context_line":"          tasks:"},{"line_number":511,"context_line":"            initial:"},{"line_number":512,"context_line":"              action: std.noop"},{"line_number":513,"context_line":"              on-success:"},{"line_number":514,"context_line":"                - recurse: \u003c% $.level \u003e 0 %\u003e"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"            recurse:"},{"line_number":517,"context_line":"              workflow: wf"},{"line_number":518,"context_line":"              input:"},{"line_number":519,"context_line":"                level: \u003c% $.level - 1 %\u003e"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        \"\"\""},{"line_number":522,"context_line":""},{"line_number":523,"context_line":"        wf_service.create_workflows(wf_text)"},{"line_number":524,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_7a3eb3c1","line":521,"range":{"start_line":504,"start_character":8,"end_line":521,"end_character":11},"updated":"2019-06-13 10:11:22.000000000","message":"I love this kind of approach to testing :) No need to create a hard-coded huge workflow.","commit_id":"88a0f7514fdb8277d227dc46c06fd761c2bd33a0"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"ddc141395bf7c12f8ea2e69bdafe7fb2db459711","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        self.assertEqual(0, len(db_api.get_task_executions()))"},{"line_number":501,"context_line":"        self.assertEqual(0, len(db_api.get_action_executions()))"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"    def test_cascade_delete_deep(self):"},{"line_number":504,"context_line":"        wf_text \u003d \"\"\""},{"line_number":505,"context_line":"        version: 2.0"},{"line_number":506,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_69a6eaad","line":503,"updated":"2019-06-13 19:44:39.000000000","message":"\"delete_workflow_execution_recurse\" isn\u0027t called during this test. You just call regular \"delete_workflow_execution\" and it deletes all 8 nested workflows.\nTo correct this test you can either raise the related exception explicetly, or increase the nesting level to 16.","commit_id":"9b60e9f21bca87a53d6614b5beec2e3c7ee213f0"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"ae90cb69b6dd7e10fca1f956f7abf33829c042e7","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        self.assertEqual(0, len(db_api.get_task_executions()))"},{"line_number":501,"context_line":"        self.assertEqual(0, len(db_api.get_action_executions()))"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"    def test_cascade_delete_deep(self):"},{"line_number":504,"context_line":"        wf_text \u003d \"\"\""},{"line_number":505,"context_line":"        version: 2.0"},{"line_number":506,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_ead88353","line":503,"in_reply_to":"9fb8cfa7_69a6eaad","updated":"2019-06-14 05:00:35.000000000","message":"It is not possible to test this without mocking out stuff. The test calls the recursive function in the MySQL test. SQLight doesn\u0027t have this issue, only MySQL, and probably PG at even much higher nesting levels. I see no point in mocking the API when the error happens only with MySQL and it\u0027s easy to reproduce that.\nThe nesting level is already at 17. RootWF-\u003eRecurse7-\u003eSubWF7-\u003eRecurse6-\u003eSubWF6-\u003eRecurse5-\u003eSubWF5-\u003eRecurse4-\u003eSubWF4-\u003eRecurse3-\u003eSubWF3-\u003eRecurse2-\u003eSubWF2-\u003eRecurse1-\u003eSubWF1-\u003eInitial-\u003eActionEx\nI know, this is mindf*ck. :)","commit_id":"9b60e9f21bca87a53d6614b5beec2e3c7ee213f0"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"2a635950aba7b06b58956497f106a8daaf6e875f","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        self.assertEqual(0, len(db_api.get_task_executions()))"},{"line_number":501,"context_line":"        self.assertEqual(0, len(db_api.get_action_executions()))"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"    def test_cascade_delete_deep(self):"},{"line_number":504,"context_line":"        wf_text \u003d \"\"\""},{"line_number":505,"context_line":"        version: 2.0"},{"line_number":506,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_70cd6283","line":503,"in_reply_to":"9fb8cfa7_ead88353","updated":"2019-06-14 08:08:19.000000000","message":"Yeah, just check it :) test is fine","commit_id":"9b60e9f21bca87a53d6614b5beec2e3c7ee213f0"}]}
