)]}'
{"mistral/engine/policies.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"93b824698496a461d3f67b496ac179eb1919c1d5","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        state \u003d task_ex.state"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        if not states.is_completed(state):"},{"line_number":327,"context_line":"            return"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        policy_context \u003d runtime_context[context_key]"},{"line_number":330,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_285f8673","line":327,"range":{"start_line":326,"start_character":8,"end_line":327,"end_character":18},"updated":"2016-11-23 09:35:42.000000000","message":"This now looks confusing because the method is called \"after_task_complete\" and we\u0027re not supposed to have a non-terminal state here. I would change it to an assertion. Not necessarily in this patch.","commit_id":"98b0049888e6f1d13bf34b2080dea751fb7e5f62"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"93b824698496a461d3f67b496ac179eb1919c1d5","unresolved":false,"context_lines":[{"line_number":334,"context_line":"            retry_no \u003d policy_context[\u0027retry_no\u0027]"},{"line_number":335,"context_line":"            del policy_context[\u0027retry_no\u0027]"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        retries_remain \u003d retry_no + 1 \u003c\u003d self.count"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        stop_continue_flag \u003d (task_ex.state \u003d\u003d states.SUCCESS and"},{"line_number":340,"context_line":"                              not self._continue_on_clause)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_833cfc30","line":337,"range":{"start_line":337,"start_character":36,"end_line":337,"end_character":37},"updated":"2016-11-23 09:35:42.000000000","message":"I don\u0027t understand why we have \"+ 1\" here.\n\nFor example, let\u0027s assume that retry count is 3 and our task has just finished for the first time with a failure. \u0027retry_no\u0027 is 0 and \u0027retries_remain\u0027 should be 3 (no retries happened yet). It means that remaining retries is \u0027count - retry_no\u0027. In our case 3.\n\nNow, assume that we already made one retry. Then \u0027retry_no\u0027 will be 1 (incremented at line 354 and stored in the context). Remaining retries is 3 - 1 \u003d 2 which is OK. We know that 2 left.\n\nSame way if \u0027retry_no\u0027 is 3 then zero is left.\n\nNow if \u0027count\u0027 is 1 then for the first retry our \u0027retry_no\u0027 is zero again which means that we need to make one retry.\n\nAll of that shows that we need to continue only if \u0027retry_no \u003c self.count\u0027. Right? Why use \"+ 1\" here?","commit_id":"98b0049888e6f1d13bf34b2080dea751fb7e5f62"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"23113b73b385874c94ad1da86175b7c3dce99fcb","unresolved":false,"context_lines":[{"line_number":334,"context_line":"            retry_no \u003d policy_context[\u0027retry_no\u0027]"},{"line_number":335,"context_line":"            del policy_context[\u0027retry_no\u0027]"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        retries_remain \u003d retry_no + 1 \u003c\u003d self.count"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        stop_continue_flag \u003d (task_ex.state \u003d\u003d states.SUCCESS and"},{"line_number":340,"context_line":"                              not self._continue_on_clause)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_b7c13231","line":337,"range":{"start_line":337,"start_character":36,"end_line":337,"end_character":37},"in_reply_to":"5a74a57a_0cbf39d1","updated":"2016-11-23 10:22:14.000000000","message":"Although the result is the same 1 looks pointless, it doesn\u0027t express anything. Let\u0027s better use less elements than more.","commit_id":"98b0049888e6f1d13bf34b2080dea751fb7e5f62"},{"author":{"_account_id":20863,"name":"Sharat Sharma","email":"sharat.sharma@in.ibm.com","username":"sharat.sharma"},"change_message_id":"7899a4da6ac8b7563345d608a6ae996662d7ef26","unresolved":false,"context_lines":[{"line_number":334,"context_line":"            retry_no \u003d policy_context[\u0027retry_no\u0027]"},{"line_number":335,"context_line":"            del policy_context[\u0027retry_no\u0027]"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        retries_remain \u003d retry_no + 1 \u003c\u003d self.count"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        stop_continue_flag \u003d (task_ex.state \u003d\u003d states.SUCCESS and"},{"line_number":340,"context_line":"                              not self._continue_on_clause)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_0cbf39d1","line":337,"range":{"start_line":337,"start_character":36,"end_line":337,"end_character":37},"in_reply_to":"5a74a57a_833cfc30","updated":"2016-11-23 10:02:37.000000000","message":"retries_remain \u003d retry_no + 1 \u003c\u003d self.count and \nretries_remain \u003d retry_no \u003c self.count gives the same result i guess. So, I had chosen the former one. Should we change it to retries_remain \u003d retry_no \u003c self.count ?","commit_id":"98b0049888e6f1d13bf34b2080dea751fb7e5f62"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"4fa765efa63fd53e18751be2cdfee74e7b9e821b","unresolved":false,"context_lines":[{"line_number":334,"context_line":"            retry_no \u003d policy_context[\u0027retry_no\u0027]"},{"line_number":335,"context_line":"            del policy_context[\u0027retry_no\u0027]"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        retries_remain \u003d retry_no \u003c self.count"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        stop_continue_flag \u003d (task_ex.state \u003d\u003d states.SUCCESS and"},{"line_number":340,"context_line":"                              not self._continue_on_clause)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_71207d4a","line":337,"range":{"start_line":337,"start_character":8,"end_line":337,"end_character":46},"updated":"2016-11-23 13:43:53.000000000","message":"This still changes behavior - we need to agree if such change can be accepted.","commit_id":"2842415f09c3a6e64fc1a3ef63885f9622b1bdf1"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"6d62c2900c03b30ed2b89bb42bb1849dd1524955","unresolved":false,"context_lines":[{"line_number":334,"context_line":"            retry_no \u003d policy_context[\u0027retry_no\u0027]"},{"line_number":335,"context_line":"            del policy_context[\u0027retry_no\u0027]"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        retries_remain \u003d retry_no \u003c self.count"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        stop_continue_flag \u003d (task_ex.state \u003d\u003d states.SUCCESS and"},{"line_number":340,"context_line":"                              not self._continue_on_clause)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_a00af823","line":337,"range":{"start_line":337,"start_character":8,"end_line":337,"end_character":46},"in_reply_to":"5a74a57a_71207d4a","updated":"2016-11-29 07:54:01.000000000","message":"As agreed on yesterday meeting - we can merge it in this form.","commit_id":"2842415f09c3a6e64fc1a3ef63885f9622b1bdf1"}],"mistral/tests/unit/engine/test_policies.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"23113b73b385874c94ad1da86175b7c3dce99fcb","unresolved":false,"context_lines":[{"line_number":547,"context_line":"            task_ex \u003d wf_ex.task_executions[0]"},{"line_number":548,"context_line":""},{"line_number":549,"context_line":"        self.assertEqual("},{"line_number":550,"context_line":"            3,"},{"line_number":551,"context_line":"            task_ex.runtime_context[\"retry_task_policy\"][\"retry_no\"]"},{"line_number":552,"context_line":"        )"},{"line_number":553,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_37ed228c","line":550,"range":{"start_line":550,"start_character":12,"end_line":550,"end_character":13},"updated":"2016-11-23 10:22:14.000000000","message":"Yes, this now looks right. 3 is the count value with which the policy is configured. Makes more sense.\n\nThis was actually a semantical bug in general. Not only for the case when count is 1.\n\nNow we fixed it.","commit_id":"98b0049888e6f1d13bf34b2080dea751fb7e5f62"}]}
