)]}'
{"monasca_notification/notification.py":[{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"b770d5696c9c1aacd3ca4aa6eb3779a729439bd8","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        \"\"\""},{"line_number":53,"context_line":"        self.address \u003d address"},{"line_number":54,"context_line":"        self.name \u003d name"},{"line_number":55,"context_line":"        self.src_partition \u003d src_partition"},{"line_number":56,"context_line":"        self.src_offset \u003d src_offset"},{"line_number":57,"context_line":"        self.type \u003d ntype"},{"line_number":58,"context_line":"        self.retry_count \u003d retry_count"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_104fa5bf","line":55,"updated":"2015-02-09 21:02:51.000000000","message":"At some point you should remove src_partition and src_offset. I doubt they are used anymore","commit_id":"9f0e65028f325d73596e7a24124b4087d7b25324"}],"monasca_notification/processors/kafka_producer.py":[{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"b770d5696c9c1aacd3ca4aa6eb3779a729439bd8","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            try:"},{"line_number":52,"context_line":"                responses \u003d self._producer.send(topic, key, message.to_json())"},{"line_number":53,"context_line":"            except Exception:"},{"line_number":54,"context_line":"                log.exception(\"error publishing message to kafka\")"},{"line_number":55,"context_line":"                continue"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"            published_to_kafka +\u003d 1"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_309f4961","line":54,"updated":"2015-02-09 21:02:51.000000000","message":"In the future, it would be nice to have a counter for the number of messages we threw away","commit_id":"9f0e65028f325d73596e7a24124b4087d7b25324"}],"monasca_notification/processors/notification_processor.py":[{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"b770d5696c9c1aacd3ca4aa6eb3779a729439bd8","unresolved":false,"context_lines":[{"line_number":35,"context_line":"             If all notifications fail the alarm partition/offset are added to the the finished queue"},{"line_number":36,"context_line":"        \"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        invalid_type_count \u003d self.statsd.get_counter(name\u003d\u0027invalid_type_count\u0027)"},{"line_number":39,"context_line":"        sent_failed_count \u003d self.statsd.get_counter(name\u003d\u0027sent_failed_count\u0027)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        sent, failed, invalid \u003d notifiers.send_notifications(notifications)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_d070adde","line":38,"updated":"2015-02-09 21:02:51.000000000","message":"Seems like there should be one for the number of sent notifications but maybe that is somewhere else","commit_id":"9f0e65028f325d73596e7a24124b4087d7b25324"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"eeda36d0882d4886ed71ca4a0e7c25712c32a3e1","unresolved":false,"context_lines":[{"line_number":35,"context_line":"             If all notifications fail the alarm partition/offset are added to the the finished queue"},{"line_number":36,"context_line":"        \"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        invalid_type_count \u003d self.statsd.get_counter(name\u003d\u0027invalid_type_count\u0027)"},{"line_number":39,"context_line":"        sent_failed_count \u003d self.statsd.get_counter(name\u003d\u0027sent_failed_count\u0027)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        sent, failed, invalid \u003d notifiers.send_notifications(notifications)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_532f6788","line":38,"in_reply_to":"da86d52c_d070adde","updated":"2015-02-09 21:08:26.000000000","message":"The sent count is inside the notifiers.send_notifications method and is broken out by notification type.  I\u0027ve wondered if we also want to break the invalid and failed out by type as well.  If we do pushing those down to the send_notifications method would make sense.","commit_id":"9f0e65028f325d73596e7a24124b4087d7b25324"}],"monasca_notification/retry_engine.py":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"4db7862c8c668abd6fb22c01da2bbb0f6ff8d688","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            if wait_duration \u003e 0:"},{"line_number":75,"context_line":"                time.sleep(wait_duration)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"            log.info(\"retry failed {} with name {} at {}\".format(ntype, name, addr))"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"            sent, failed \u003d self._notifier.send([notification])"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_32cc1289","line":77,"updated":"2015-02-06 02:52:53.000000000","message":"I\u0027m a little confused about why we would log at this point and if you do want to log, should this be a log.debug?","commit_id":"2ef4fab2b96e34d0f1db0de26e7d2468cbc238dd"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"f74287ff272d4727179ce205c4e366e202acaf5d","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            if wait_duration \u003e 0:"},{"line_number":75,"context_line":"                time.sleep(wait_duration)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"            log.info(\"retry failed {} with name {} at {}\".format(ntype, name, addr))"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"            sent, failed \u003d self._notifier.send([notification])"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_a98254c5","line":77,"in_reply_to":"da86d52c_32cc1289","updated":"2015-02-06 04:34:32.000000000","message":"There\u0027s no other indication that a retry was attempted if it succeedes.  I suppose in the case of success we don\u0027t really care.  This does bring up a concern I had though.  When there are multiple notification or retry engines running on one machine making sense out of the log can be quite hard since most of the logging gets interleaved with another process.  Is it worthwhile to add some unique tagging, pid perhaps, to the log entries so we can connect a sequence of log messages from one process into one coherent stream?","commit_id":"2ef4fab2b96e34d0f1db0de26e7d2468cbc238dd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"dcde7d12aab787304565178ec98afad08c4931aa","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            if wait_duration \u003e 0:"},{"line_number":75,"context_line":"                time.sleep(wait_duration)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"            log.info(\"retry failed {} with name {} at {}\".format(ntype, name, addr))"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"            sent, failed \u003d self._notifier.send([notification])"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_e0ac52ef","line":77,"in_reply_to":"da86d52c_a98254c5","updated":"2015-02-06 13:25:34.000000000","message":"I think that is a good point. Although, we don\u0027t have any standards on doing that today and we aren\u0027t logging a pid in all our other log statements. So, I probably wouldn\u0027t add a pid here, as we aren\u0027t doing that anywhere else.","commit_id":"2ef4fab2b96e34d0f1db0de26e7d2468cbc238dd"},{"author":{"_account_id":11094,"name":"Tim Kuhlman","email":"timothy.kuhlman@canonical.com","username":"kuhlmant"},"change_message_id":"5e4f5b3b55aceb6dabe7080dfde6a95f7ef67d14","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            if wait_duration \u003e 0:"},{"line_number":75,"context_line":"                time.sleep(wait_duration)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"            log.info(\"retry failed {} with name {} at {}\".format(ntype, name, addr))"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"            sent, failed \u003d self._notifier.send([notification])"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_883d78df","line":77,"in_reply_to":"da86d52c_e0ac52ef","updated":"2015-02-06 15:25:00.000000000","message":"An option is to log to another file, ie /var/log/monasca/notification-retry.log","commit_id":"2ef4fab2b96e34d0f1db0de26e7d2468cbc238dd"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"e04710b5773fd97bdda9e9302db22878416f2aa6","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            if failed:"},{"line_number":85,"context_line":"                notification.retry_count +\u003d 1"},{"line_number":86,"context_line":"                notification.notification_timestamp \u003d time.time()"},{"line_number":87,"context_line":"                if notification.retry_count \u003c 5:"},{"line_number":88,"context_line":"                    log.info(\"retry failed for {} with name {} \""},{"line_number":89,"context_line":"                             \"at {}.  \""},{"line_number":90,"context_line":"                             \"Saving for later retry.\".format(ntype, name, addr))"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_203da02b","line":87,"updated":"2015-02-05 22:57:39.000000000","message":"I\u0027m surprised this isn\u0027t configurable","commit_id":"2ef4fab2b96e34d0f1db0de26e7d2468cbc238dd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"4db7862c8c668abd6fb22c01da2bbb0f6ff8d688","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            if failed:"},{"line_number":85,"context_line":"                notification.retry_count +\u003d 1"},{"line_number":86,"context_line":"                notification.notification_timestamp \u003d time.time()"},{"line_number":87,"context_line":"                if notification.retry_count \u003c 5:"},{"line_number":88,"context_line":"                    log.info(\"retry failed for {} with name {} \""},{"line_number":89,"context_line":"                             \"at {}.  \""},{"line_number":90,"context_line":"                             \"Saving for later retry.\".format(ntype, name, addr))"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_72704a40","line":87,"updated":"2015-02-06 02:52:53.000000000","message":"Yes, agree.","commit_id":"2ef4fab2b96e34d0f1db0de26e7d2468cbc238dd"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"f74287ff272d4727179ce205c4e366e202acaf5d","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            if failed:"},{"line_number":85,"context_line":"                notification.retry_count +\u003d 1"},{"line_number":86,"context_line":"                notification.notification_timestamp \u003d time.time()"},{"line_number":87,"context_line":"                if notification.retry_count \u003c 5:"},{"line_number":88,"context_line":"                    log.info(\"retry failed for {} with name {} \""},{"line_number":89,"context_line":"                             \"at {}.  \""},{"line_number":90,"context_line":"                             \"Saving for later retry.\".format(ntype, name, addr))"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_c6d3f7d2","line":87,"in_reply_to":"da86d52c_203da02b","updated":"2015-02-06 04:34:32.000000000","message":"With your concern about the 30 second delay starving some of the partitions we may be reading I think we should make this and the total delay configurable.  Maybe a high retry with a short delay will be what we end up wanting but until we can really exercise it I\u0027m don\u0027t think we can know for sure.","commit_id":"2ef4fab2b96e34d0f1db0de26e7d2468cbc238dd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"4db7862c8c668abd6fb22c01da2bbb0f6ff8d688","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                if notification.retry_count \u003c 5:"},{"line_number":88,"context_line":"                    log.info(\"retry failed for {} with name {} \""},{"line_number":89,"context_line":"                             \"at {}.  \""},{"line_number":90,"context_line":"                             \"Saving for later retry.\".format(ntype, name, addr))"},{"line_number":91,"context_line":"                    self._producer.publish(self._topics[\u0027retry_topic\u0027],"},{"line_number":92,"context_line":"                                           [notification])"},{"line_number":93,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_529ee663","line":90,"updated":"2015-02-06 02:52:53.000000000","message":"Hmmm, I think I would make this a log.error as you tried to send the notification and it failed, so it should be an error, not info.","commit_id":"2ef4fab2b96e34d0f1db0de26e7d2468cbc238dd"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"b770d5696c9c1aacd3ca4aa6eb3779a729439bd8","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                    self._producer.publish(self._topics[\u0027retry_topic\u0027],"},{"line_number":91,"context_line":"                                           [notification])"},{"line_number":92,"context_line":"                else:"},{"line_number":93,"context_line":"                    log.error(\"retry failed for {} with name {} \""},{"line_number":94,"context_line":"                              \"at {} after {} retries.  \""},{"line_number":95,"context_line":"                              \"Giving up on retry.\""},{"line_number":96,"context_line":"                              .format(ntype, name, addr, self._retry_max))"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_7012a1b5","line":93,"updated":"2015-02-09 21:02:51.000000000","message":"At some point, a counter here would be good, too","commit_id":"9f0e65028f325d73596e7a24124b4087d7b25324"}],"monasca_notification/types/email_notifier.py":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"4db7862c8c668abd6fb22c01da2bbb0f6ff8d688","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"            self._smtp \u003d smtp"},{"line_number":97,"context_line":"        except Exception:"},{"line_number":98,"context_line":"            self._log.exception(\"Unable to connect to email server.\")"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def _create_msg(self, hostname, notification):"},{"line_number":101,"context_line":"        \"\"\"Create two kind of messages:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_f2ea7a72","line":98,"updated":"2015-02-06 02:52:53.000000000","message":"So, you are in the constructor for the EmailNotifier and if you can\u0027t connect to the SMTP server, previously you exited, but not you just log and continue on, but the SMTP connection is never initialized, right? If that is the case, then this doesn\u0027t sound good. I\u0027m not saying that exit was the right answer, at least at this spot in the code, but I was expecting to log, raise the exception again, and then let the program\u0027s main exception handler exit.","commit_id":"2ef4fab2b96e34d0f1db0de26e7d2468cbc238dd"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"f74287ff272d4727179ce205c4e366e202acaf5d","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"            self._smtp \u003d smtp"},{"line_number":97,"context_line":"        except Exception:"},{"line_number":98,"context_line":"            self._log.exception(\"Unable to connect to email server.\")"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def _create_msg(self, hostname, notification):"},{"line_number":101,"context_line":"        \"\"\"Create two kind of messages:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_66988b1c","line":98,"in_reply_to":"da86d52c_f2ea7a72","updated":"2015-02-06 04:34:32.000000000","message":"You\u0027re right, I forgot the raise when I took out the exit.","commit_id":"2ef4fab2b96e34d0f1db0de26e7d2468cbc238dd"}],"notification.yaml":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"4db7862c8c668abd6fb22c01da2bbb0f6ff8d688","unresolved":false,"context_lines":[{"line_number":3,"context_line":"    group: monasca-notification"},{"line_number":4,"context_line":"    alarm_topic: alarm-state-transitions"},{"line_number":5,"context_line":"    notification_topic: alarm-notifications"},{"line_number":6,"context_line":"    retry_topic: retry_notifications"},{"line_number":7,"context_line":"    max_offset_lag: 600  # In seconds, undefined for none"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"mysql:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"da86d52c_f2e99ab7","line":6,"updated":"2015-02-06 02:52:53.000000000","message":"I was just wondering if we should make this a little more explicit and call this alarm_retry_topic and alarm_retry_notfications.","commit_id":"2ef4fab2b96e34d0f1db0de26e7d2468cbc238dd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"dcde7d12aab787304565178ec98afad08c4931aa","unresolved":false,"context_lines":[{"line_number":3,"context_line":"    group: monasca-notification"},{"line_number":4,"context_line":"    alarm_topic: alarm-state-transitions"},{"line_number":5,"context_line":"    notification_topic: alarm-notifications"},{"line_number":6,"context_line":"    retry_topic: retry_notifications"},{"line_number":7,"context_line":"    max_offset_lag: 600  # In seconds, undefined for none"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"mysql:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"da86d52c_20e10a2a","line":6,"in_reply_to":"da86d52c_c6b85777","updated":"2015-02-06 13:25:34.000000000","message":"Yeah, that helps me out with being explicit.","commit_id":"2ef4fab2b96e34d0f1db0de26e7d2468cbc238dd"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"f74287ff272d4727179ce205c4e366e202acaf5d","unresolved":false,"context_lines":[{"line_number":3,"context_line":"    group: monasca-notification"},{"line_number":4,"context_line":"    alarm_topic: alarm-state-transitions"},{"line_number":5,"context_line":"    notification_topic: alarm-notifications"},{"line_number":6,"context_line":"    retry_topic: retry_notifications"},{"line_number":7,"context_line":"    max_offset_lag: 600  # In seconds, undefined for none"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"mysql:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"da86d52c_c6b85777","line":6,"in_reply_to":"da86d52c_f2e99ab7","updated":"2015-02-06 04:34:32.000000000","message":"It\u0027s not the alarms that are going on the retry topic though.  We\u0027re just putting failed notifications on it so that alarms that have multiple notifications don\u0027t repeat ones that already succeeded.  Maybe notification_retry_topic?","commit_id":"2ef4fab2b96e34d0f1db0de26e7d2468cbc238dd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"dcde7d12aab787304565178ec98afad08c4931aa","unresolved":false,"context_lines":[{"line_number":46,"context_line":"zookeeper:"},{"line_number":47,"context_line":"    url: 192.168.10.4:2181  # or comma seperated list of multiple hosts"},{"line_number":48,"context_line":"    notification_path: /notification/alarms"},{"line_number":49,"context_line":"    retry_path: /notification/retry"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"logging: # Used in logging.dictConfig"},{"line_number":52,"context_line":"    version: 1"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"da86d52c_a05a5aef","line":49,"updated":"2015-02-06 13:25:34.000000000","message":"Based on the above comments, then this would be \"notification_retry_path\". Just trying to be consistent as well as explicit. It is your call on whether you want to make these name changes, but in general for someone coming in and looking at the code I think this will help them understand what is going on as well as maybe future proof the names a bit if we ever add some other thing having to do with \"retry\" which could result in some ambiguity.","commit_id":"2ef4fab2b96e34d0f1db0de26e7d2468cbc238dd"}]}
