)]}'
{"mistral/engine/tasks.py":[{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"c6317d247e1ca4ceec4afc05aef03019ec5523b2","unresolved":false,"context_lines":[{"line_number":588,"context_line":"        find_error \u003d lambda x: x.accepted and x.state \u003d\u003d states.ERROR"},{"line_number":589,"context_line":"        find_cancelled \u003d lambda x: x.accepted and x.state \u003d\u003d states.CANCELLED"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"        if list(filter(find_cancelled, self.task_ex.executions)):"},{"line_number":592,"context_line":"            return states.CANCELLED"},{"line_number":593,"context_line":"        elif list(filter(find_error, self.task_ex.executions)):"},{"line_number":594,"context_line":"            return states.ERROR"},{"line_number":595,"context_line":"        else:"},{"line_number":596,"context_line":"            return states.SUCCESS"},{"line_number":597,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_44017337","line":594,"range":{"start_line":591,"start_character":0,"end_line":594,"end_character":31},"updated":"2016-12-15 14:37:32.000000000","message":"I\u0027m pretty sure that I had this discussion before, but I\u0027ll ask it anyway: Why we put CANCELLED state before the ERROR state? IMO it should be other way around.","commit_id":"17ba8c7aff319594f57dc9482bf89526868884ef"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"9b50d050efbe40cb112564b1dcdfaf8ceb1023b2","unresolved":false,"context_lines":[{"line_number":588,"context_line":"        find_error \u003d lambda x: x.accepted and x.state \u003d\u003d states.ERROR"},{"line_number":589,"context_line":"        find_cancelled \u003d lambda x: x.accepted and x.state \u003d\u003d states.CANCELLED"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"        if list(filter(find_cancelled, self.task_ex.executions)):"},{"line_number":592,"context_line":"            return states.CANCELLED"},{"line_number":593,"context_line":"        elif list(filter(find_error, self.task_ex.executions)):"},{"line_number":594,"context_line":"            return states.ERROR"},{"line_number":595,"context_line":"        else:"},{"line_number":596,"context_line":"            return states.SUCCESS"},{"line_number":597,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_8760dbd0","line":594,"range":{"start_line":591,"start_character":0,"end_line":594,"end_character":31},"in_reply_to":"1a6eadb0_44017337","updated":"2016-12-15 21:17:03.000000000","message":"We tried before in previous patch but it\u0027s causing other problems. Since this task didn\u0027t even complete due to partially cancelled action executions, we shouldn\u0027t assign it an error state. If we do that, it leads to on-error being triggered for the task which can be disastrous because the task is not technically completed.","commit_id":"17ba8c7aff319594f57dc9482bf89526868884ef"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"1e66e5f899a10c6921440ddee23bd1784248b719","unresolved":false,"context_lines":[{"line_number":588,"context_line":"        find_error \u003d lambda x: x.accepted and x.state \u003d\u003d states.ERROR"},{"line_number":589,"context_line":"        find_cancelled \u003d lambda x: x.accepted and x.state \u003d\u003d states.CANCELLED"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"        if list(filter(find_cancelled, self.task_ex.executions)):"},{"line_number":592,"context_line":"            return states.CANCELLED"},{"line_number":593,"context_line":"        elif list(filter(find_error, self.task_ex.executions)):"},{"line_number":594,"context_line":"            return states.ERROR"},{"line_number":595,"context_line":"        else:"},{"line_number":596,"context_line":"            return states.SUCCESS"},{"line_number":597,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_9e957434","line":594,"range":{"start_line":591,"start_character":0,"end_line":594,"end_character":31},"in_reply_to":"1a6eadb0_6abd3ad7","updated":"2016-12-16 07:16:03.000000000","message":"Yes, right. If there\u0027s any cancellations we should ignore errors. It just doesn\u0027t matter what\u0027s in error and what\u0027s in success if we do cancellation. Think of it from a different angle: cancellation is always done manually by users (unlike erroring) and because of this fact it has higher priority.","commit_id":"17ba8c7aff319594f57dc9482bf89526868884ef"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"c5712f9b5e012401d66ceca01c934b51e4df45b3","unresolved":false,"context_lines":[{"line_number":588,"context_line":"        find_error \u003d lambda x: x.accepted and x.state \u003d\u003d states.ERROR"},{"line_number":589,"context_line":"        find_cancelled \u003d lambda x: x.accepted and x.state \u003d\u003d states.CANCELLED"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"        if list(filter(find_cancelled, self.task_ex.executions)):"},{"line_number":592,"context_line":"            return states.CANCELLED"},{"line_number":593,"context_line":"        elif list(filter(find_error, self.task_ex.executions)):"},{"line_number":594,"context_line":"            return states.ERROR"},{"line_number":595,"context_line":"        else:"},{"line_number":596,"context_line":"            return states.SUCCESS"},{"line_number":597,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_6abd3ad7","line":594,"range":{"start_line":591,"start_character":0,"end_line":594,"end_character":31},"in_reply_to":"1a6eadb0_8760dbd0","updated":"2016-12-16 04:11:09.000000000","message":"Assigning the task an error state also leads to on-complete being triggered which in this case is clearly not completed because of the cancellation.","commit_id":"17ba8c7aff319594f57dc9482bf89526868884ef"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"c6317d247e1ca4ceec4afc05aef03019ec5523b2","unresolved":false,"context_lines":[{"line_number":622,"context_line":""},{"line_number":623,"context_line":"        return len(list(filter(f, self.task_ex.executions)))"},{"line_number":624,"context_line":""},{"line_number":625,"context_line":"    def _get_next_indexes(self):"},{"line_number":626,"context_line":"        capacity \u003d self._get_with_items_capacity()"},{"line_number":627,"context_line":"        count \u003d self._get_with_items_count()"},{"line_number":628,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_9f9cb2c1","line":625,"range":{"start_line":625,"start_character":4,"end_line":625,"end_character":32},"updated":"2016-12-15 14:37:32.000000000","message":"It would be worth do document it. To be honest, I have no idea what is happening inside this function.\n\nI\u0027m not saying that this patch should add a description to this function, but please leave a TODO.","commit_id":"17ba8c7aff319594f57dc9482bf89526868884ef"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"753060acc3776ff5f903312596ea88e9be37eba5","unresolved":false,"context_lines":[{"line_number":622,"context_line":""},{"line_number":623,"context_line":"        return len(list(filter(f, self.task_ex.executions)))"},{"line_number":624,"context_line":""},{"line_number":625,"context_line":"    def _get_next_indexes(self):"},{"line_number":626,"context_line":"        capacity \u003d self._get_with_items_capacity()"},{"line_number":627,"context_line":"        count \u003d self._get_with_items_count()"},{"line_number":628,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_011b5681","line":625,"range":{"start_line":625,"start_character":4,"end_line":625,"end_character":32},"in_reply_to":"1a6eadb0_9f9cb2c1","updated":"2016-12-20 01:35:11.000000000","message":"Agree :-)","commit_id":"17ba8c7aff319594f57dc9482bf89526868884ef"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"753060acc3776ff5f903312596ea88e9be37eba5","unresolved":false,"context_lines":[{"line_number":677,"context_line":"        runtime_ctx \u003d self.task_ex.runtime_context"},{"line_number":678,"context_line":"        with_items_spec \u003d self.task_spec.get_with_items()"},{"line_number":679,"context_line":""},{"line_number":680,"context_line":"        if with_items_spec and not runtime_ctx.get(self._WITH_ITEMS):"},{"line_number":681,"context_line":"            # Prepare current indexes and parallel limitation."},{"line_number":682,"context_line":"            runtime_ctx[self._WITH_ITEMS] \u003d {"},{"line_number":683,"context_line":"                self._CAPACITY: self._get_concurrency(),"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_9e58a158","line":680,"updated":"2016-12-20 01:35:11.000000000","message":"we are in WithItemTask, we don\u0027t need \u0027with_items_spec\u0027 actually.","commit_id":"17ba8c7aff319594f57dc9482bf89526868884ef"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a0e67b9eaf85621dd8d5aee7bd61b8d4d77a9450","unresolved":false,"context_lines":[{"line_number":677,"context_line":"        runtime_ctx \u003d self.task_ex.runtime_context"},{"line_number":678,"context_line":"        with_items_spec \u003d self.task_spec.get_with_items()"},{"line_number":679,"context_line":""},{"line_number":680,"context_line":"        if with_items_spec and not runtime_ctx.get(self._WITH_ITEMS):"},{"line_number":681,"context_line":"            # Prepare current indexes and parallel limitation."},{"line_number":682,"context_line":"            runtime_ctx[self._WITH_ITEMS] \u003d {"},{"line_number":683,"context_line":"                self._CAPACITY: self._get_concurrency(),"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_5d71a6a7","line":680,"in_reply_to":"1a6eadb0_470c7994","updated":"2016-12-20 06:13:40.000000000","message":"https://review.openstack.org/#/c/412761/","commit_id":"17ba8c7aff319594f57dc9482bf89526868884ef"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"7b99d053a826a886ec495b3941b308710a0f43a7","unresolved":false,"context_lines":[{"line_number":677,"context_line":"        runtime_ctx \u003d self.task_ex.runtime_context"},{"line_number":678,"context_line":"        with_items_spec \u003d self.task_spec.get_with_items()"},{"line_number":679,"context_line":""},{"line_number":680,"context_line":"        if with_items_spec and not runtime_ctx.get(self._WITH_ITEMS):"},{"line_number":681,"context_line":"            # Prepare current indexes and parallel limitation."},{"line_number":682,"context_line":"            runtime_ctx[self._WITH_ITEMS] \u003d {"},{"line_number":683,"context_line":"                self._CAPACITY: self._get_concurrency(),"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_470c7994","line":680,"in_reply_to":"1a6eadb0_9e58a158","updated":"2016-12-20 05:19:22.000000000","message":"Yeah, ok, I agree. Since it makes no harm is it ok to address it in a separate patch?","commit_id":"17ba8c7aff319594f57dc9482bf89526868884ef"}],"mistral/workflow/data_flow.py":[{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"c6317d247e1ca4ceec4afc05aef03019ec5523b2","unresolved":false,"context_lines":[{"line_number":173,"context_line":"    task_spec \u003d spec_parser.get_task_spec(task_ex.spec)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    if task_spec.get_with_items():"},{"line_number":176,"context_line":"        # TODO(rakhmerov): Smell: violation of \u0027with-items\u0027 encapsulation."},{"line_number":177,"context_line":"        with_items_ctx \u003d task_ex.runtime_context.get(\u0027with_items\u0027)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        if with_items_ctx and with_items_ctx.get(\u0027count\u0027) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_bf8ece2b","line":176,"range":{"start_line":176,"start_character":8,"end_line":176,"end_character":74},"updated":"2016-12-15 14:37:32.000000000","message":"Should there be a bug for it?","commit_id":"17ba8c7aff319594f57dc9482bf89526868884ef"}]}
