)]}'
{"mistral/config.py":[{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"b32462d9567d5aaafa18f0570977d2724adc4827","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    ),"},{"line_number":187,"context_line":"    cfg.StrOpt("},{"line_number":188,"context_line":"        \u0027event_definitions_cfg_file\u0027,"},{"line_number":189,"context_line":"        default\u003d\u0027event_definitions.yaml\u0027,"},{"line_number":190,"context_line":"        help\u003d\u0027Configuration file for event definitions.\u0027"},{"line_number":191,"context_line":"    ),"},{"line_number":192,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_5249c08d","line":189,"updated":"2016-08-31 13:29:57.000000000","message":"Shouldn\u0027t this be an absolute path, like \"/etc/mistral/event_definitions.yaml\"?","commit_id":"150083e0096813b203dd6a52fbef10eff6ece0c8"}],"mistral/services/event_engine.py":[{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"b32462d9567d5aaafa18f0570977d2724adc4827","unresolved":false,"context_lines":[{"line_number":33,"context_line":"EVENT_CONTEXT \u003d \u0027context\u0027"},{"line_number":34,"context_line":"EVENT_TYPE \u003d \u0027type\u0027"},{"line_number":35,"context_line":"EVENT_PAYLOAD \u003d \u0027payload\u0027"},{"line_number":36,"context_line":"EVENT_METADATA \u003d \u0027metadata\u0027"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class EventEngine(coordination.Service):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_12f2d89a","side":"PARENT","line":36,"updated":"2016-08-31 13:29:57.000000000","message":"Wouldn\u0027t it still make sense to define the keys as constants like this?","commit_id":"00626992e78156033dea787b96c7f3655c5c56e6"},{"author":{"_account_id":18238,"name":"Hardik Parekh","email":"hardik.parekh047@gmail.com","username":"hparekh"},"change_message_id":"69756138b0f60dd38e3727b50d3756ce3f1c6a9e","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                    )"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"                LOG.error(errmsg)"},{"line_number":99,"context_line":"                raise"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        self.definitions \u003d [EventDefinition(event_def)"},{"line_number":102,"context_line":"                            for event_def in reversed(definition_cfg)]"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_e8e32ad7","line":99,"range":{"start_line":99,"start_character":16,"end_line":99,"end_character":21},"updated":"2016-08-30 06:45:00.000000000","message":"Agree, Please raise some meaningful exception","commit_id":"150083e0096813b203dd6a52fbef10eff6ece0c8"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"6b17e6b35d96c71b98ef7859a7c322485bc105f3","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                    )"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"                LOG.error(errmsg)"},{"line_number":99,"context_line":"                raise"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        self.definitions \u003d [EventDefinition(event_def)"},{"line_number":102,"context_line":"                            for event_def in reversed(definition_cfg)]"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_f2887b73","line":99,"range":{"start_line":99,"start_character":16,"end_line":99,"end_character":21},"updated":"2016-08-30 05:05:01.000000000","message":"How about raising a some meaningful exception here?","commit_id":"150083e0096813b203dd6a52fbef10eff6ece0c8"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"b32462d9567d5aaafa18f0570977d2724adc4827","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    def convert(self, event_type, event):"},{"line_number":105,"context_line":"        edef \u003d None"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        for d in self.definitions:"},{"line_number":108,"context_line":"            if d.match_type(event_type):"},{"line_number":109,"context_line":"                edef \u003d d"},{"line_number":110,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_f87395e5","line":107,"updated":"2016-08-31 13:29:57.000000000","message":"This looks slooow. I would think about building the definitions into something like a Trie structure in the future to ensure fast lookups.\n\nIn the meantime, I\u0027d suggest breaking this loop out into a separate method get_event_definition() with a big TODO comment.","commit_id":"150083e0096813b203dd6a52fbef10eff6ece0c8"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"26e84fe13be5af7bd84759c115fbae0c893773b8","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    def convert(self, event_type, event):"},{"line_number":105,"context_line":"        edef \u003d None"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        for d in self.definitions:"},{"line_number":108,"context_line":"            if d.match_type(event_type):"},{"line_number":109,"context_line":"                edef \u003d d"},{"line_number":110,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a89bdaa_2a961093","line":107,"in_reply_to":"fa7ab95a_f87395e5","updated":"2016-09-07 09:22:43.000000000","message":"Yeah, I agree. We need to ideally have an indexed search here in the future. But I guess, for now it\u0027s ok if we really put a TODO comment.","commit_id":"150083e0096813b203dd6a52fbef10eff6ece0c8"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"b32462d9567d5aaafa18f0570977d2724adc4827","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            LOG.debug(\u0027No event definition found for type: %s, use default \u0027"},{"line_number":114,"context_line":"                      \u0027settings instead.\u0027, event_type)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"            return expressions.evaluate_recursively(DEFAULT_PROPERTIES, event)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        return edef.convert(event)"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_93598a91","line":116,"updated":"2016-08-31 13:29:57.000000000","message":"You could avoid this special case by creating an EventDefinition from the default properties, and maybe even inserting it at the end of the list with a match type of \"*\".","commit_id":"150083e0096813b203dd6a52fbef10eff6ece0c8"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"6b17e6b35d96c71b98ef7859a7c322485bc105f3","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        self.lock \u003d threading.Lock()"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        LOG.debug(\u0027Loading notification definitions.\u0027)"},{"line_number":141,"context_line":"        self.notification_converter \u003d NotificationsConverter()"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        self._start_handler()"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_529847c0","line":140,"range":{"start_line":140,"start_character":8,"end_line":140,"end_character":11},"updated":"2016-08-30 05:05:01.000000000","message":"Soft: I would add a blank line after debug statement.","commit_id":"150083e0096813b203dd6a52fbef10eff6ece0c8"}]}
