)]}'
{"mistral/engine/policies.py":[{"author":{"_account_id":7700,"name":"Nikolay Mahotkin","email":"nikolay.makhotkin@gmail.com","username":"nmakhotkin"},"change_message_id":"76c5e04ac6df6acbbfb64ba487551329eec14a27","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        # iteration behind. task_ex.executions was originally called in"},{"line_number":279,"context_line":"        # get_task_execution_result but it was refactored to use"},{"line_number":280,"context_line":"        # db_api.get_action_executions to support session-less use cases."},{"line_number":281,"context_line":"        action_ex \u003d task_ex.executions  # noqa"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        context_key \u003d \u0027retry_task_policy\u0027"},{"line_number":284,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_43e8d07c","line":281,"updated":"2015-10-06 08:45:01.000000000","message":"I don\u0027t see any relationship between calling task_ex.executions and retry policy. Could you please explain, how come runtime context will not be updated?","commit_id":"6c9caa972d73e604ada6dcfafa8d95afc7342901"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf6bb44e2f6637713e2284dd45fe1d5bccde6d41","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        # iteration behind. task_ex.executions was originally called in"},{"line_number":279,"context_line":"        # get_task_execution_result but it was refactored to use"},{"line_number":280,"context_line":"        # db_api.get_action_executions to support session-less use cases."},{"line_number":281,"context_line":"        action_ex \u003d task_ex.executions  # noqa"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        context_key \u003d \u0027retry_task_policy\u0027"},{"line_number":284,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_5db0b3f4","line":281,"updated":"2015-10-06 07:44:50.000000000","message":"We need to keep in mind that this is ok only as a temporary solution. The reason is that we should understand the root of the problem and fix it. Generally, transactions are design in a way that they shouldn\u0027t dead lock.","commit_id":"6c9caa972d73e604ada6dcfafa8d95afc7342901"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"363ccf9815515b88cee19a6c08065a8219b105d8","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        # iteration behind. task_ex.executions was originally called in"},{"line_number":279,"context_line":"        # get_task_execution_result but it was refactored to use"},{"line_number":280,"context_line":"        # db_api.get_action_executions to support session-less use cases."},{"line_number":281,"context_line":"        action_ex \u003d task_ex.executions  # noqa"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        context_key \u003d \u0027retry_task_policy\u0027"},{"line_number":284,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_c8362603","line":281,"in_reply_to":"7a2fa921_43e8d07c","updated":"2015-10-06 17:02:49.000000000","message":"Nikolay, I already explained to Renat in my weekly meeting. Basically, if task_ex.executions is not accessed here, then the runtime_context dict is not updated correctly. To be exact, the retry_no will be 1 iteration behind (i.e. if we expect retry_no to be 3, it will be 2). I have no idea why this is happening and I already spent enough time on it troubleshooting. So the suggestion from Renat is to be a TODO here and post a bug on launchpad.","commit_id":"6c9caa972d73e604ada6dcfafa8d95afc7342901"}],"mistral/tests/unit/engine/test_policies.py":[{"author":{"_account_id":7700,"name":"Nikolay Mahotkin","email":"nikolay.makhotkin@gmail.com","username":"nmakhotkin"},"change_message_id":"76c5e04ac6df6acbbfb64ba487551329eec14a27","unresolved":false,"context_lines":[{"line_number":673,"context_line":"        task_ex \u003d wf_ex.task_executions[0]"},{"line_number":674,"context_line":""},{"line_number":675,"context_line":"        self.assertEqual("},{"line_number":676,"context_line":"            2,"},{"line_number":677,"context_line":"            task_ex.runtime_context[\u0027retry_task_policy\u0027][\u0027retry_no\u0027]"},{"line_number":678,"context_line":"        )"},{"line_number":679,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_e3747cfe","line":676,"updated":"2015-10-06 08:45:01.000000000","message":"Here we should have \u0027retry_no\u0027 value 3.","commit_id":"6c9caa972d73e604ada6dcfafa8d95afc7342901"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf6bb44e2f6637713e2284dd45fe1d5bccde6d41","unresolved":false,"context_lines":[{"line_number":679,"context_line":""},{"line_number":680,"context_line":"    @mock.patch.object("},{"line_number":681,"context_line":"        std_actions.EchoAction,"},{"line_number":682,"context_line":"        \u0027run\u0027,"},{"line_number":683,"context_line":"        mock.Mock(side_effect\u003d[exc.ActionException(), \"mocked result\"])"},{"line_number":684,"context_line":"    )"},{"line_number":685,"context_line":"    def test_retry_policy_succeed_after_failure(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_fd3f3f23","line":682,"updated":"2015-10-06 07:44:50.000000000","message":"Do I understand correctly that this makes the action fail just once? Because if it will be failing every time it gets called then it means this test is incorrect: action would just fail 3 times in a row and the workflow would fail.","commit_id":"6c9caa972d73e604ada6dcfafa8d95afc7342901"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"53166bbd2bb0cfbe7356a794163c17169829cbbc","unresolved":false,"context_lines":[{"line_number":679,"context_line":""},{"line_number":680,"context_line":"    @mock.patch.object("},{"line_number":681,"context_line":"        std_actions.EchoAction,"},{"line_number":682,"context_line":"        \u0027run\u0027,"},{"line_number":683,"context_line":"        mock.Mock(side_effect\u003d[exc.ActionException(), \"mocked result\"])"},{"line_number":684,"context_line":"    )"},{"line_number":685,"context_line":"    def test_retry_policy_succeed_after_failure(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_4e355744","line":682,"in_reply_to":"7a2fa921_fd3f3f23","updated":"2015-10-06 09:00:26.000000000","message":"Ooh, ok. I see now that the first iteration will fail and the second one will succeed.\n\nOk.","commit_id":"6c9caa972d73e604ada6dcfafa8d95afc7342901"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf6bb44e2f6637713e2284dd45fe1d5bccde6d41","unresolved":false,"context_lines":[{"line_number":715,"context_line":"        wf_ex \u003d db_api.get_workflow_execution(wf_ex.id)"},{"line_number":716,"context_line":"        task_ex \u003d wf_ex.task_executions[0]"},{"line_number":717,"context_line":""},{"line_number":718,"context_line":"        self.assertEqual("},{"line_number":719,"context_line":"            {\u0027retry_no\u0027: 1},"},{"line_number":720,"context_line":"            task_ex.runtime_context[\u0027retry_task_policy\u0027]"},{"line_number":721,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_ddd84320","line":718,"updated":"2015-10-06 07:44:50.000000000","message":"It must be assertDictEqual().","commit_id":"6c9caa972d73e604ada6dcfafa8d95afc7342901"},{"author":{"_account_id":7700,"name":"Nikolay Mahotkin","email":"nikolay.makhotkin@gmail.com","username":"nmakhotkin"},"change_message_id":"76c5e04ac6df6acbbfb64ba487551329eec14a27","unresolved":false,"context_lines":[{"line_number":716,"context_line":"        task_ex \u003d wf_ex.task_executions[0]"},{"line_number":717,"context_line":""},{"line_number":718,"context_line":"        self.assertEqual("},{"line_number":719,"context_line":"            {\u0027retry_no\u0027: 1},"},{"line_number":720,"context_line":"            task_ex.runtime_context[\u0027retry_task_policy\u0027]"},{"line_number":721,"context_line":"        )"},{"line_number":722,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_c3770001","line":719,"updated":"2015-10-06 08:45:01.000000000","message":"If retry_context has \u0027retry_no\u0027 1 after 1 iteration, then it will have \u0027retry_no\u0027 3 after 3 iterations (the check at line 676). Maybe I misunderstand something.","commit_id":"6c9caa972d73e604ada6dcfafa8d95afc7342901"},{"author":{"_account_id":7700,"name":"Nikolay Mahotkin","email":"nikolay.makhotkin@gmail.com","username":"nmakhotkin"},"change_message_id":"bbf88760522881c2d5fb3bb0621113728f90c3a8","unresolved":false,"context_lines":[{"line_number":716,"context_line":"        task_ex \u003d wf_ex.task_executions[0]"},{"line_number":717,"context_line":""},{"line_number":718,"context_line":"        self.assertEqual("},{"line_number":719,"context_line":"            {\u0027retry_no\u0027: 1},"},{"line_number":720,"context_line":"            task_ex.runtime_context[\u0027retry_task_policy\u0027]"},{"line_number":721,"context_line":"        )"},{"line_number":722,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_0e40bfa4","line":719,"in_reply_to":"7a2fa921_c3770001","updated":"2015-10-06 09:00:46.000000000","message":"Take my words back, here 2 iterations in retry (1 fail, 1 success)","commit_id":"6c9caa972d73e604ada6dcfafa8d95afc7342901"}]}
