)]}'
{"ceilometer/collector/dispatcher/database.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a58e630075f96149a095fea16c28a8331f64698d","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        if not isinstance(events, list):"},{"line_number":76,"context_line":"            events \u003d [events]"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        # Let the database decide if this event is a dup"},{"line_number":79,"context_line":"        # (possible on retries) based on unique message_id."},{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            self.storage_conn.record_events(events)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASn%2F%2Fpvo%3D","line":78,"updated":"2013-09-01 13:16:23.000000000","message":"Is it necessary for this part of the code to even know there was duplicate data? If we\u0027re not treating the exception as an actual error, it seems like we could just let the storage system deal with the duplicate and not address the case here at all.\n\nIf down the road, as you say in an earlier comment, we add \"deal letter\" handling, then record_events() would need to return the duplicates so we can process them, so we won\u0027t want to treat it as an exception case.\n\nEither way, I think we can remove the use of the sqlalchemy-specific exception here.","commit_id":"c41d50e16ce596b75d6f9eabef053c3780d375dd"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"bf9aee7ebe1894c46c603037e05288403d1c65d7","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        if not isinstance(events, list):"},{"line_number":76,"context_line":"            events \u003d [events]"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        # Let the database decide if this event is a dup"},{"line_number":79,"context_line":"        # (possible on retries) based on unique message_id."},{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            self.storage_conn.record_events(events)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASn%2F%2Fl%2BI%3D","line":78,"in_reply_to":"AAAASn%2F%2Fpvo%3D","updated":"2013-09-03 00:47:14.000000000","message":"Perhaps returning a list of duplicates all the way to the calling function is the best way to deal with this right now. Otherwise we get into other issues if we were to actually try to save more than one event anyway. I\u0027ll change to do that. \n\nThe exception isn\u0027t meant to be sqlalchemy specific. The sqlalchemy exception is IntegrityError, but the openstack.common code catches and rewraps. Similar handling should be done for nosql solutions at some point so that DBDuplicateEntry is returned regardless of the backend. \n\nhttps://github.com/openstack/ceilometer/blob/master/ceilometer/openstack/common/db/sqlalchemy/session.py#L435\n\nRegardless, this will now get pushed down into record_events anyway due to the above refactoring. \n\nThanks!","commit_id":"c41d50e16ce596b75d6f9eabef053c3780d375dd"}],"ceilometer/collector/dispatcher/file.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"632443d3aaa0f459db2f896def98b079a0a9e194","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    def record_events(self, events):"},{"line_number":84,"context_line":"        if self.log:"},{"line_number":85,"context_line":"            self.log.info(events)"},{"line_number":86,"context_line":"        return []  # List of events causing problems."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2Fezw%3D","line":86,"updated":"2013-09-04 10:13:46.000000000","message":"I don\u0027t understand this comment.","commit_id":"316e9ab9bb48e93f2c1fc8637a07003c284e90ce"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"2b4cc18ee4b42677ddf0a0cc4c5763ae20b17ed4","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    def record_events(self, events):"},{"line_number":84,"context_line":"        if self.log:"},{"line_number":85,"context_line":"            self.log.info(events)"},{"line_number":86,"context_line":"        return []  # List of events causing problems."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FdKI%3D","line":86,"in_reply_to":"AAAASn%2F%2FeHw%3D","updated":"2013-09-04 15:28:08.000000000","message":"Yes sorry, I actually understand it reading the next file :)","commit_id":"316e9ab9bb48e93f2c1fc8637a07003c284e90ce"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"336b4e52051f468b76c50e8115e1f470d592577c","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    def record_events(self, events):"},{"line_number":84,"context_line":"        if self.log:"},{"line_number":85,"context_line":"            self.log.info(events)"},{"line_number":86,"context_line":"        return []  # List of events causing problems."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FeHw%3D","line":86,"in_reply_to":"AAAASn%2F%2Fezw%3D","updated":"2013-09-04 12:55:04.000000000","message":"all the dispatchers have to return a list of offending events ... which will always be empty for the file dispatcher.","commit_id":"316e9ab9bb48e93f2c1fc8637a07003c284e90ce"}],"ceilometer/collector/service.py":[{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"10cd5c57c66172e36b10e8736fef8152bfcfb05b","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        # Only store non-None value traits ..."},{"line_number":233,"context_line":"        traits \u003d [trait for trait in all_traits if trait.value is not None]"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        event \u003d models.Event(message_id, event_name, when, traits)"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        exc_info \u003d None"},{"line_number":238,"context_line":"        for dispatcher in self.dispatcher_manager:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAASn%2F%2FzHw%3D","line":235,"updated":"2013-08-29 13:07:04.000000000","message":"This makes a lot of sense to me, given the api wants to filter based on event_id. Do you want to remove message_id as a trait now?","commit_id":"7a8fc6a63e1767b2f04606366cee3cac7791d302"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"b8e39bdb99da08c45116e58139d08240913bad9d","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        # Only store non-None value traits ..."},{"line_number":233,"context_line":"        traits \u003d [trait for trait in all_traits if trait.value is not None]"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        event \u003d models.Event(message_id, event_name, when, traits)"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        exc_info \u003d None"},{"line_number":238,"context_line":"        for dispatcher in self.dispatcher_manager:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAASn%2F%2FzA0%3D","line":235,"in_reply_to":"AAAASn%2F%2FzHw%3D","updated":"2013-08-29 13:35:44.000000000","message":"Yeah, I think we can remove that trait.","commit_id":"7a8fc6a63e1767b2f04606366cee3cac7791d302"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"66cbfe1f0772661dfbeb7d565171f377729c32f6","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        for dispatcher in self.dispatcher_manager:"},{"line_number":238,"context_line":"            try:"},{"line_number":239,"context_line":"                dispatcher.obj.record_events(event)"},{"line_number":240,"context_line":"            except dbexc.DBDuplicateEntry:"},{"line_number":241,"context_line":"                # Let the database decide if this event is a dup"},{"line_number":242,"context_line":"                # (possible on retries) based on unique message_id."},{"line_number":243,"context_line":"                # If it is, stop processing"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2Fu7s%3D","line":240,"updated":"2013-08-30 08:43:45.000000000","message":"1. I think this should be in the dispatcher storing events, not in the collector service directly\n\n2. I am not sure using this exception type, which seems really SQL DB related is a good idea.","commit_id":"2b4ac0f15420f187b359065b4160c2110de5c5e7"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"457953ef9b53278b46c623b458048d614a8c1d69","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        for dispatcher in self.dispatcher_manager:"},{"line_number":238,"context_line":"            try:"},{"line_number":239,"context_line":"                dispatcher.obj.record_events(event)"},{"line_number":240,"context_line":"            except dbexc.DBDuplicateEntry:"},{"line_number":241,"context_line":"                # Let the database decide if this event is a dup"},{"line_number":242,"context_line":"                # (possible on retries) based on unique message_id."},{"line_number":243,"context_line":"                # If it is, stop processing"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2Ft6I%3D","line":240,"in_reply_to":"AAAASn%2F%2Ft9g%3D","updated":"2013-08-30 19:01:31.000000000","message":"Actually, that does bring up another good point. \n\nAll dispatchers will run even if one raises since they\u0027re doing a map(). The last exception is re-raised. Which, in and of itself, might be reason enough to move it into the dispatcher. Last-raise-wins might not be best for this. \n\nI\u0027ll move it into the dispatcher.","commit_id":"2b4ac0f15420f187b359065b4160c2110de5c5e7"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"c581818962710abfbb3ad651f7d48500c87e82b1","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        for dispatcher in self.dispatcher_manager:"},{"line_number":238,"context_line":"            try:"},{"line_number":239,"context_line":"                dispatcher.obj.record_events(event)"},{"line_number":240,"context_line":"            except dbexc.DBDuplicateEntry:"},{"line_number":241,"context_line":"                # Let the database decide if this event is a dup"},{"line_number":242,"context_line":"                # (possible on retries) based on unique message_id."},{"line_number":243,"context_line":"                # If it is, stop processing"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FuC0%3D","line":240,"in_reply_to":"AAAASn%2F%2Fu7s%3D","updated":"2013-08-30 14:03:42.000000000","message":"Good feedback jd and I did have to consider those points. \n\n1. What determines a duplicate should be left to the dispatcher, which is why they should throw the duplicate entry exception. It may not just be the index constraint making this determination. \n\nOtherwise I was thinking we\u0027d just end up with a lot of copy paste code in the dispatchers. \n\n(this point is a little yagni, but it was going through my head anyway:) down the road, we may want to consider dead-letter support for duplicate/rejected messages, so keeping this in one place would make that easier. (dead-letter is a separate queue that can be analyzed later via manual inspection)\n\nEither way, I can see your point and can change it if it\u0027s really an issue for anyone.\n\n2. Originally I had created my own exception for duplicate and was catching/rethrowing as you suggest, but this effort is already dealt with in the db common code, so I reverted to their way of doing it. It should be db agnostic due to where it lives (openstack.common.db)","commit_id":"2b4ac0f15420f187b359065b4160c2110de5c5e7"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"b3078e454309a066b32beea4d8e047c115f43395","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        for dispatcher in self.dispatcher_manager:"},{"line_number":238,"context_line":"            try:"},{"line_number":239,"context_line":"                dispatcher.obj.record_events(event)"},{"line_number":240,"context_line":"            except dbexc.DBDuplicateEntry:"},{"line_number":241,"context_line":"                # Let the database decide if this event is a dup"},{"line_number":242,"context_line":"                # (possible on retries) based on unique message_id."},{"line_number":243,"context_line":"                # If it is, stop processing"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2Ft9g%3D","line":240,"in_reply_to":"AAAASn%2F%2FuC0%3D","updated":"2013-08-30 14:28:57.000000000","message":"I don\u0027t think the mechanism should be just about DuplicateEntry. There can be a lot of reason to ack the message anyway. If a dispatcher wants to record only events starting with \u0027foobar\u0027, there\u0027s no point in it to raise DBDuplicateEntry to indicate that \"Oh btw you can ack it\". Especially considering that with this code, if ANY dispatcher raises a DuplicateEntry, you\u0027re going to stop right away. So dispatcher order matters; that also sounds bad. :)","commit_id":"2b4ac0f15420f187b359065b4160c2110de5c5e7"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"632443d3aaa0f459db2f896def98b079a0a9e194","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        for dispatcher in self.dispatcher_manager:"},{"line_number":247,"context_line":"            problem_events.extend(dispatcher.obj.record_events(event))"},{"line_number":248,"context_line":"        for problem, bad_event in problem_events:"},{"line_number":249,"context_line":"            if problem \u003d\u003d models.Event.DUPLICATE:"},{"line_number":250,"context_line":"                # Message was a duplicate. Ack() it to eat it."},{"line_number":251,"context_line":"                pass"},{"line_number":252,"context_line":"            elif problem \u003d\u003d models.Event.UNKNOWN_PROBLEM:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2Fes8%3D","line":249,"updated":"2013-09-04 10:13:46.000000000","message":"I don\u0027t think you need to have this DUPLICATE value since you\u0027re just doing nothing. There\u0027s no point in doing that. Just return… nothing! :)","commit_id":"316e9ab9bb48e93f2c1fc8637a07003c284e90ce"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"2b4cc18ee4b42677ddf0a0cc4c5763ae20b17ed4","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        for dispatcher in self.dispatcher_manager:"},{"line_number":247,"context_line":"            problem_events.extend(dispatcher.obj.record_events(event))"},{"line_number":248,"context_line":"        for problem, bad_event in problem_events:"},{"line_number":249,"context_line":"            if problem \u003d\u003d models.Event.DUPLICATE:"},{"line_number":250,"context_line":"                # Message was a duplicate. Ack() it to eat it."},{"line_number":251,"context_line":"                pass"},{"line_number":252,"context_line":"            elif problem \u003d\u003d models.Event.UNKNOWN_PROBLEM:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FdKA%3D","line":249,"in_reply_to":"AAAASn%2F%2FeHU%3D","updated":"2013-09-04 15:28:08.000000000","message":"I\u0027d vote for removal! :)","commit_id":"316e9ab9bb48e93f2c1fc8637a07003c284e90ce"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"336b4e52051f468b76c50e8115e1f470d592577c","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        for dispatcher in self.dispatcher_manager:"},{"line_number":247,"context_line":"            problem_events.extend(dispatcher.obj.record_events(event))"},{"line_number":248,"context_line":"        for problem, bad_event in problem_events:"},{"line_number":249,"context_line":"            if problem \u003d\u003d models.Event.DUPLICATE:"},{"line_number":250,"context_line":"                # Message was a duplicate. Ack() it to eat it."},{"line_number":251,"context_line":"                pass"},{"line_number":252,"context_line":"            elif problem \u003d\u003d models.Event.UNKNOWN_PROBLEM:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FeHU%3D","line":249,"in_reply_to":"AAAASn%2F%2Fes8%3D","updated":"2013-09-04 12:55:04.000000000","message":"yeah, I debated that. Figured explicit was better than implicit, but I can easily remove it.","commit_id":"316e9ab9bb48e93f2c1fc8637a07003c284e90ce"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"6dd60f80bf107d519b6f462204732c550ea6e4af","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        problem_events \u003d []"},{"line_number":244,"context_line":"        for dispatcher in self.dispatcher_manager:"},{"line_number":245,"context_line":"            problem_events.extend(dispatcher.obj.record_events(event))"},{"line_number":246,"context_line":"        if models.Event.UNKNOWN_PROBLEM in [x[0] for x in problem_events]:"},{"line_number":247,"context_line":"            # Don\u0027t ack the message, raise to requeue it"},{"line_number":248,"context_line":"            # if ack_on_error \u003d False"},{"line_number":249,"context_line":"            raise UnableToSaveEventException()"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2FdG4%3D","line":246,"updated":"2013-09-04 15:30:38.000000000","message":"Correct me if I\u0027m wrong, but I think it\u0027ll be faster:\n\nif any(x[0] \u003d\u003d models.Event.UNKNOWN_PROBLEM for x in problem_events)","commit_id":"a4bca3760bb93ac5757240a5aaa515a9681999a9"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"c4fa58f8bd637108ec5d52dad0d192b6f1a36e4c","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        for dispatcher in self.dispatcher_manager:"},{"line_number":245,"context_line":"            problem_events.extend(dispatcher.obj.record_events(event))"},{"line_number":246,"context_line":"        if models.Event.UNKNOWN_PROBLEM in [x[0] for x in problem_events]:"},{"line_number":247,"context_line":"            # Don\u0027t ack the message, raise to requeue it"},{"line_number":248,"context_line":"            # if ack_on_error \u003d False"},{"line_number":249,"context_line":"            raise UnableToSaveEventException()"},{"line_number":250,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2FdSk%3D","line":247,"updated":"2013-09-04 15:28:02.000000000","message":"Are we ever going to have more than one event at a time? This will nack all of them, even if some are not dupes, right?","commit_id":"a4bca3760bb93ac5757240a5aaa515a9681999a9"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"c157d8f25600090fc5c424e41e9821e83db8c5ad","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        for dispatcher in self.dispatcher_manager:"},{"line_number":245,"context_line":"            problem_events.extend(dispatcher.obj.record_events(event))"},{"line_number":246,"context_line":"        if models.Event.UNKNOWN_PROBLEM in [x[0] for x in problem_events]:"},{"line_number":247,"context_line":"            # Don\u0027t ack the message, raise to requeue it"},{"line_number":248,"context_line":"            # if ack_on_error \u003d False"},{"line_number":249,"context_line":"            raise UnableToSaveEventException()"},{"line_number":250,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2FdEU%3D","line":247,"in_reply_to":"AAAASn%2F%2FdSk%3D","updated":"2013-09-04 15:34:53.000000000","message":"Not in the foreseeable future from oslo.common.rpc, I reckon. The issue comes down to this:\n\n... will any other \"service\" want to publish events in batches (heat, for example)? If so, they\u0027ll need this mechanism of returning a list of troublesome events. If not, we should stop fooling ourselves and rename record_events(plural) to record_event(single) and make life easier on ourselves. \n\nWe\u0027ll still have the problem of multiple dispatchers raising exceptions and last-raise-wins though.","commit_id":"a4bca3760bb93ac5757240a5aaa515a9681999a9"}],"ceilometer/storage/impl_sqlalchemy.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"632443d3aaa0f459db2f896def98b079a0a9e194","unresolved":false,"context_lines":[{"line_number":719,"context_line":"                    event \u003d self._record_event(session, event_model)"},{"line_number":720,"context_line":"                    session.flush()"},{"line_number":721,"context_line":"            except dbexc.DBDuplicateEntry:"},{"line_number":722,"context_line":"                problem_events.append((api_models.Event.DUPLICATE,"},{"line_number":723,"context_line":"                                       event_model))"},{"line_number":724,"context_line":"            except Exception as e:"},{"line_number":725,"context_line":"                LOG.exception(\u0027Failed to record event: %s\u0027, e)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2Fes4%3D","line":722,"updated":"2013-09-04 10:13:46.000000000","message":"You could also just pass.","commit_id":"316e9ab9bb48e93f2c1fc8637a07003c284e90ce"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"2b4cc18ee4b42677ddf0a0cc4c5763ae20b17ed4","unresolved":false,"context_lines":[{"line_number":719,"context_line":"                    event \u003d self._record_event(session, event_model)"},{"line_number":720,"context_line":"                    session.flush()"},{"line_number":721,"context_line":"            except dbexc.DBDuplicateEntry:"},{"line_number":722,"context_line":"                problem_events.append((api_models.Event.DUPLICATE,"},{"line_number":723,"context_line":"                                       event_model))"},{"line_number":724,"context_line":"            except Exception as e:"},{"line_number":725,"context_line":"                LOG.exception(\u0027Failed to record event: %s\u0027, e)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FdJk%3D","line":722,"in_reply_to":"AAAASn%2F%2FeG4%3D","updated":"2013-09-04 15:28:08.000000000","message":"In this case just log it?","commit_id":"316e9ab9bb48e93f2c1fc8637a07003c284e90ce"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"336b4e52051f468b76c50e8115e1f470d592577c","unresolved":false,"context_lines":[{"line_number":719,"context_line":"                    event \u003d self._record_event(session, event_model)"},{"line_number":720,"context_line":"                    session.flush()"},{"line_number":721,"context_line":"            except dbexc.DBDuplicateEntry:"},{"line_number":722,"context_line":"                problem_events.append((api_models.Event.DUPLICATE,"},{"line_number":723,"context_line":"                                       event_model))"},{"line_number":724,"context_line":"            except Exception as e:"},{"line_number":725,"context_line":"                LOG.exception(\u0027Failed to record event: %s\u0027, e)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FeG4%3D","line":722,"in_reply_to":"AAAASn%2F%2Fes4%3D","updated":"2013-09-04 12:55:04.000000000","message":"We should track why it was a problem event so the service can deal with it later.","commit_id":"316e9ab9bb48e93f2c1fc8637a07003c284e90ce"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"632443d3aaa0f459db2f896def98b079a0a9e194","unresolved":false,"context_lines":[{"line_number":723,"context_line":"                                       event_model))"},{"line_number":724,"context_line":"            except Exception as e:"},{"line_number":725,"context_line":"                LOG.exception(\u0027Failed to record event: %s\u0027, e)"},{"line_number":726,"context_line":"                problem_events.append((api_models.Event.UNKNOWN_PROBLEM,"},{"line_number":727,"context_line":"                                       event_model))"},{"line_number":728,"context_line":"            events.append(event)"},{"line_number":729,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2Fess%3D","line":726,"updated":"2013-09-04 10:13:46.000000000","message":"I think it would be better to just let the exception raise to the caller anyway.","commit_id":"316e9ab9bb48e93f2c1fc8637a07003c284e90ce"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"2b4cc18ee4b42677ddf0a0cc4c5763ae20b17ed4","unresolved":false,"context_lines":[{"line_number":723,"context_line":"                                       event_model))"},{"line_number":724,"context_line":"            except Exception as e:"},{"line_number":725,"context_line":"                LOG.exception(\u0027Failed to record event: %s\u0027, e)"},{"line_number":726,"context_line":"                problem_events.append((api_models.Event.UNKNOWN_PROBLEM,"},{"line_number":727,"context_line":"                                       event_model))"},{"line_number":728,"context_line":"            events.append(event)"},{"line_number":729,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FdIM%3D","line":726,"in_reply_to":"AAAASn%2F%2FeGk%3D","updated":"2013-09-04 15:28:08.000000000","message":"I don\u0027t think you are actually using stevedore here nor in the loop used in service.py.","commit_id":"316e9ab9bb48e93f2c1fc8637a07003c284e90ce"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"336b4e52051f468b76c50e8115e1f470d592577c","unresolved":false,"context_lines":[{"line_number":723,"context_line":"                                       event_model))"},{"line_number":724,"context_line":"            except Exception as e:"},{"line_number":725,"context_line":"                LOG.exception(\u0027Failed to record event: %s\u0027, e)"},{"line_number":726,"context_line":"                problem_events.append((api_models.Event.UNKNOWN_PROBLEM,"},{"line_number":727,"context_line":"                                       event_model))"},{"line_number":728,"context_line":"            events.append(event)"},{"line_number":729,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FeGk%3D","line":726,"in_reply_to":"AAAASn%2F%2Fess%3D","updated":"2013-09-04 12:55:04.000000000","message":"If we raise, stevedore does last-raise-wins ... which is not what we want. We need to track each failure so we can deal with it where the message is processed.","commit_id":"316e9ab9bb48e93f2c1fc8637a07003c284e90ce"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"5243828fcba2451653ca1d64d392a5a2748dc34a","unresolved":false,"context_lines":[{"line_number":719,"context_line":"                    event \u003d self._record_event(session, event_model)"},{"line_number":720,"context_line":"                    session.flush()"},{"line_number":721,"context_line":"            except dbexc.DBDuplicateEntry:"},{"line_number":722,"context_line":"                problem_events.append((api_models.Event.DUPLICATE,"},{"line_number":723,"context_line":"                                       event_model))"},{"line_number":724,"context_line":"            except Exception as e:"},{"line_number":725,"context_line":"                LOG.exception(\u0027Failed to record event: %s\u0027, e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAASn%2F%2Fc5E%3D","line":722,"updated":"2013-09-04 16:08:25.000000000","message":"I think you could just pass here anyway that would simplify the code.","commit_id":"5f35319dfaa463d8d08b8ac1733b80a474cb86ab"}],"ceilometer/storage/models.py":[{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"10cd5c57c66172e36b10e8736fef8152bfcfb05b","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    def __init__(self, message_id, event_name, generated, traits):"},{"line_number":52,"context_line":"        \"\"\"Create a new event."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        :param message_id:  Unique ID for the message this event"},{"line_number":55,"context_line":"                            stemmed from. This is different than"},{"line_number":56,"context_line":"                            the Event ID, which comes from the"},{"line_number":57,"context_line":"                            underlying storage system."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAASn%2F%2FzHk%3D","line":54,"updated":"2013-08-29 13:07:04.000000000","message":"change to event_id?","commit_id":"7a8fc6a63e1767b2f04606366cee3cac7791d302"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"b8e39bdb99da08c45116e58139d08240913bad9d","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    def __init__(self, message_id, event_name, generated, traits):"},{"line_number":52,"context_line":"        \"\"\"Create a new event."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        :param message_id:  Unique ID for the message this event"},{"line_number":55,"context_line":"                            stemmed from. This is different than"},{"line_number":56,"context_line":"                            the Event ID, which comes from the"},{"line_number":57,"context_line":"                            underlying storage system."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAASn%2F%2FzAw%3D","line":54,"in_reply_to":"AAAASn%2F%2FzHk%3D","updated":"2013-08-29 13:35:44.000000000","message":"The event_id is the id assigned by the db. The message_id comes from the source system.","commit_id":"7a8fc6a63e1767b2f04606366cee3cac7791d302"}],"ceilometer/storage/sqlalchemy/migrate_repo/versions/013_add_event_message_id.py":[{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"10cd5c57c66172e36b10e8736fef8152bfcfb05b","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from ceilometer.storage.sqlalchemy import models"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def upgrade(migrate_engine):"},{"line_number":23,"context_line":"    meta \u003d sqlalchemy.MetaData(bind\u003dmigrate_engine)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    event \u003d sqlalchemy.Table(\u0027event\u0027, meta, autoload\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAASn%2F%2FzHM%3D","line":22,"updated":"2013-08-29 13:07:04.000000000","message":"don\u0027t you need to search through the trait table and find the message_id trait for each event, and set that as event.message_id?","commit_id":"7a8fc6a63e1767b2f04606366cee3cac7791d302"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"b8e39bdb99da08c45116e58139d08240913bad9d","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from ceilometer.storage.sqlalchemy import models"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def upgrade(migrate_engine):"},{"line_number":23,"context_line":"    meta \u003d sqlalchemy.MetaData(bind\u003dmigrate_engine)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    event \u003d sqlalchemy.Table(\u0027event\u0027, meta, autoload\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAASn%2F%2FzAk%3D","line":22,"in_reply_to":"AAAASn%2F%2FzHM%3D","updated":"2013-08-29 13:35:44.000000000","message":"damn you and your rational thought. Yup, will add. :)","commit_id":"7a8fc6a63e1767b2f04606366cee3cac7791d302"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"10cd5c57c66172e36b10e8736fef8152bfcfb05b","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    index.create(bind\u003dmigrate_engine)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def downgrade(migrate_engine):"},{"line_number":37,"context_line":"    meta \u003d sqlalchemy.MetaData(bind\u003dmigrate_engine)"},{"line_number":38,"context_line":"    event \u003d sqlalchemy.Table(\u0027event\u0027, meta, autoload\u003dTrue)"},{"line_number":39,"context_line":"    message_id \u003d sqlalchemy.Column(\u0027message_id\u0027, sqlalchemy.String(50))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAASn%2F%2FzHE%3D","line":36,"updated":"2013-08-29 13:07:04.000000000","message":"similarly, shouldn\u0027t this create a new trait called message_id?","commit_id":"7a8fc6a63e1767b2f04606366cee3cac7791d302"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"b8e39bdb99da08c45116e58139d08240913bad9d","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    index.create(bind\u003dmigrate_engine)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def downgrade(migrate_engine):"},{"line_number":37,"context_line":"    meta \u003d sqlalchemy.MetaData(bind\u003dmigrate_engine)"},{"line_number":38,"context_line":"    event \u003d sqlalchemy.Table(\u0027event\u0027, meta, autoload\u003dTrue)"},{"line_number":39,"context_line":"    message_id \u003d sqlalchemy.Column(\u0027message_id\u0027, sqlalchemy.String(50))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAASn%2F%2FzAg%3D","line":36,"in_reply_to":"AAAASn%2F%2FzHE%3D","updated":"2013-08-29 13:35:44.000000000","message":"again. rats.","commit_id":"7a8fc6a63e1767b2f04606366cee3cac7791d302"},{"author":{"_account_id":5678,"name":"John Herndon","email":"john.herndon@hp.com","username":"john-herndon"},"change_message_id":"f3edd9fba26c984e9a5328461a7909fc5141c31e","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    meta \u003d sqlalchemy.MetaData(bind\u003dmigrate_engine)"},{"line_number":54,"context_line":"    event \u003d sqlalchemy.Table(\u0027event\u0027, meta, autoload\u003dTrue)"},{"line_number":55,"context_line":"    message_id \u003d sqlalchemy.Column(\u0027message_id\u0027, sqlalchemy.String(50))"},{"line_number":56,"context_line":"    event.drop_column(message_id)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    cons \u003d UniqueConstraint(\u0027message_id\u0027, table\u003devent)"},{"line_number":59,"context_line":"    cons.drop()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2Fwxg%3D","line":56,"updated":"2013-08-29 22:07:56.000000000","message":"still missing the downgrade code?","commit_id":"2b4ac0f15420f187b359065b4160c2110de5c5e7"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"70a39c32e4a0586afb9c8cd99d629418307c95d1","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    meta \u003d sqlalchemy.MetaData(bind\u003dmigrate_engine)"},{"line_number":54,"context_line":"    event \u003d sqlalchemy.Table(\u0027event\u0027, meta, autoload\u003dTrue)"},{"line_number":55,"context_line":"    message_id \u003d sqlalchemy.Column(\u0027message_id\u0027, sqlalchemy.String(50))"},{"line_number":56,"context_line":"    event.drop_column(message_id)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    cons \u003d UniqueConstraint(\u0027message_id\u0027, table\u003devent)"},{"line_number":59,"context_line":"    cons.drop()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2Fv1E%3D","line":56,"in_reply_to":"AAAASn%2F%2Fwxg%3D","updated":"2013-08-30 02:54:03.000000000","message":"Well, the downgrade is dropping the column and I have a comment above saying that I\u0027m leaving the message_id trait in there since it\u0027ll make downgrade easier and having the extra few traits won\u0027t hurt anyone. \n\nAnd, realistically, there likely aren\u0027t many CM deployments that would really care at this point.","commit_id":"2b4ac0f15420f187b359065b4160c2110de5c5e7"}],"tests/collector/dispatcher/test_db.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a58e630075f96149a095fea16c28a8331f64698d","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from ceilometer.tests import base as tests_base"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class FakeStorage(object):"},{"line_number":32,"context_line":"    def __init__(self, should_raise):"},{"line_number":33,"context_line":"        self.should_raise \u003d should_raise"},{"line_number":34,"context_line":"        self.obj \u003d self"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASn%2F%2FpwM%3D","line":31,"updated":"2013-09-01 13:16:23.000000000","message":"This could just be a mock with side_effect \u003d dbexc.DBDuplicateEntry, couldn\u0027t it?","commit_id":"c41d50e16ce596b75d6f9eabef053c3780d375dd"}]}
