)]}'
{"monasca_agent/collector/checks_d/kubernetes_api.py":[{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"236e6199bbbb0fa845e311eb00138e3e4c1d5d98","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                else:"},{"line_number":52,"context_line":"                    exception_message \u003d \"Either Kubernetes API url or derive api url must be set when \" \\"},{"line_number":53,"context_line":"                                        \"running Kubernetes API plugin.\""},{"line_number":54,"context_line":"                    self.log.exception(exception_message)"},{"line_number":55,"context_line":"                    raise exception_message"},{"line_number":56,"context_line":"            else:"},{"line_number":57,"context_line":"                kubernetes_api_port \u003d instance.get(\"kubernetes_api_port\", \"8080\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a430d35_da052714","line":54,"range":{"start_line":54,"start_character":29,"end_line":54,"end_character":38},"updated":"2017-02-08 18:22:13.000000000","message":"I don\u0027t think this logs a stack trace unless you\u0027re in an except clause.  If we don\u0027t want a stack trace it should be log.error","commit_id":"b62045f0314efef3deefe340c2010725070b1159"},{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"f649d40a9006d70374c9041ce042539c2441cc59","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                else:"},{"line_number":52,"context_line":"                    exception_message \u003d \"Either Kubernetes API url or derive api url must be set when \" \\"},{"line_number":53,"context_line":"                                        \"running Kubernetes API plugin.\""},{"line_number":54,"context_line":"                    self.log.exception(exception_message)"},{"line_number":55,"context_line":"                    raise exception_message"},{"line_number":56,"context_line":"            else:"},{"line_number":57,"context_line":"                kubernetes_api_port \u003d instance.get(\"kubernetes_api_port\", \"8080\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_059e4956","line":54,"range":{"start_line":54,"start_character":29,"end_line":54,"end_character":38},"in_reply_to":"1a430d35_da052714","updated":"2017-03-16 21:09:52.000000000","message":"Yep you are right. Will change it in next patch set.","commit_id":"b62045f0314efef3deefe340c2010725070b1159"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"236e6199bbbb0fa845e311eb00138e3e4c1d5d98","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                    exception_message \u003d \"Either Kubernetes API url or derive api url must be set when \" \\"},{"line_number":53,"context_line":"                                        \"running Kubernetes API plugin.\""},{"line_number":54,"context_line":"                    self.log.exception(exception_message)"},{"line_number":55,"context_line":"                    raise exception_message"},{"line_number":56,"context_line":"            else:"},{"line_number":57,"context_line":"                kubernetes_api_port \u003d instance.get(\"kubernetes_api_port\", \"8080\")"},{"line_number":58,"context_line":"                self.kubernetes_api \u003d \"http://{}:{}\".format(host, kubernetes_api_port)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a430d35_6e05580f","line":55,"range":{"start_line":55,"start_character":26,"end_line":55,"end_character":43},"updated":"2017-02-08 18:22:13.000000000","message":"Does this work?  I thought you had to create an exception object?","commit_id":"b62045f0314efef3deefe340c2010725070b1159"},{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"f649d40a9006d70374c9041ce042539c2441cc59","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                    exception_message \u003d \"Either Kubernetes API url or derive api url must be set when \" \\"},{"line_number":53,"context_line":"                                        \"running Kubernetes API plugin.\""},{"line_number":54,"context_line":"                    self.log.exception(exception_message)"},{"line_number":55,"context_line":"                    raise exception_message"},{"line_number":56,"context_line":"            else:"},{"line_number":57,"context_line":"                kubernetes_api_port \u003d instance.get(\"kubernetes_api_port\", \"8080\")"},{"line_number":58,"context_line":"                self.kubernetes_api \u003d \"http://{}:{}\".format(host, kubernetes_api_port)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_821dcfbf","line":55,"range":{"start_line":55,"start_character":26,"end_line":55,"end_character":43},"in_reply_to":"1a430d35_6e05580f","updated":"2017-03-16 21:09:52.000000000","message":"Yeah I don\u0027t think this would work. Python will complain: exceptions must be old-style classes or derived from BaseException, not str","commit_id":"b62045f0314efef3deefe340c2010725070b1159"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"6360d80dc6b603e32a3791b5e069c370c16e92cb","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                exception_message \u003d \"Either Kubernetes API url or derive api url must be set when \" \\"},{"line_number":53,"context_line":"                                    \"running Kubernetes API plugin.\""},{"line_number":54,"context_line":"                self.log.exception(exception_message)"},{"line_number":55,"context_line":"                raise exception_message"},{"line_number":56,"context_line":"        else:"},{"line_number":57,"context_line":"            kubernetes_api_port \u003d instance.get(\"kubernetes_api_port\", \"8080\")"},{"line_number":58,"context_line":"            self.kubernetes_api \u003d \"http://{}:{}\".format(host, kubernetes_api_port)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a1ff146_d31f9e59","line":55,"range":{"start_line":55,"start_character":22,"end_line":55,"end_character":39},"updated":"2017-03-14 15:29:13.000000000","message":"any answer to Joe\u0027s questions from patchset 4?","commit_id":"e4a4f4d4ee068c2d6796b8f9ede7d27769e21493"},{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"6d1ddb68b30e8377310f0f76ad5565eefd975ff4","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                exception_message \u003d \"Either Kubernetes API url or derive api url must be set when \" \\"},{"line_number":53,"context_line":"                                    \"running Kubernetes API plugin.\""},{"line_number":54,"context_line":"                self.log.exception(exception_message)"},{"line_number":55,"context_line":"                raise exception_message"},{"line_number":56,"context_line":"        else:"},{"line_number":57,"context_line":"            kubernetes_api_port \u003d instance.get(\"kubernetes_api_port\", \"8080\")"},{"line_number":58,"context_line":"            self.kubernetes_api \u003d \"http://{}:{}\".format(host, kubernetes_api_port)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a1ced50_85aa396f","line":55,"range":{"start_line":55,"start_character":22,"end_line":55,"end_character":39},"in_reply_to":"3a1ff146_d31f9e59","updated":"2017-03-16 21:09:46.000000000","message":"Will do!","commit_id":"e4a4f4d4ee068c2d6796b8f9ede7d27769e21493"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"737b6f79de4c382f6879520ae2e7b6d7978a6a38","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            node_dimensions \u003d dimensions.copy()"},{"line_number":156,"context_line":"            node_dimensions[\u0027hostname\u0027] \u003d node[\u0027metadata\u0027][\u0027name\u0027]"},{"line_number":157,"context_line":"            node_status \u003d node[\u0027status\u0027]"},{"line_number":158,"context_line":"            node_capacity \u003d node_status[\u0027capacity\u0027]"},{"line_number":159,"context_line":"            node_allocatable \u003d node_status[\u0027allocatable\u0027]"},{"line_number":160,"context_line":"            self._report_node_conditions_metrics(node_status[\u0027conditions\u0027], node_dimensions)"},{"line_number":161,"context_line":"            if \u0027spec\u0027 in node and \u0027unschedulable\u0027 in node[\u0027spec\u0027]:"},{"line_number":162,"context_line":"                node_spec \u003d node[\u0027spec\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a1ced50_40890fca","line":159,"range":{"start_line":158,"start_character":0,"end_line":159,"end_character":57},"updated":"2017-03-16 22:14:13.000000000","message":"Move these down to where they are used","commit_id":"e4a4f4d4ee068c2d6796b8f9ede7d27769e21493"},{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"30c40e537b22c116833e3ee826d9cd2662c6ed5a","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            node_dimensions \u003d dimensions.copy()"},{"line_number":156,"context_line":"            node_dimensions[\u0027hostname\u0027] \u003d node[\u0027metadata\u0027][\u0027name\u0027]"},{"line_number":157,"context_line":"            node_status \u003d node[\u0027status\u0027]"},{"line_number":158,"context_line":"            node_capacity \u003d node_status[\u0027capacity\u0027]"},{"line_number":159,"context_line":"            node_allocatable \u003d node_status[\u0027allocatable\u0027]"},{"line_number":160,"context_line":"            self._report_node_conditions_metrics(node_status[\u0027conditions\u0027], node_dimensions)"},{"line_number":161,"context_line":"            if \u0027spec\u0027 in node and \u0027unschedulable\u0027 in node[\u0027spec\u0027]:"},{"line_number":162,"context_line":"                node_spec \u003d node[\u0027spec\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a1ced50_5b865eba","line":159,"range":{"start_line":158,"start_character":0,"end_line":159,"end_character":57},"in_reply_to":"1a1ced50_40890fca","updated":"2017-03-16 22:58:33.000000000","message":"Done","commit_id":"e4a4f4d4ee068c2d6796b8f9ede7d27769e21493"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"737b6f79de4c382f6879520ae2e7b6d7978a6a38","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            node_allocatable \u003d node_status[\u0027allocatable\u0027]"},{"line_number":160,"context_line":"            self._report_node_conditions_metrics(node_status[\u0027conditions\u0027], node_dimensions)"},{"line_number":161,"context_line":"            if \u0027spec\u0027 in node and \u0027unschedulable\u0027 in node[\u0027spec\u0027]:"},{"line_number":162,"context_line":"                node_spec \u003d node[\u0027spec\u0027]"},{"line_number":163,"context_line":"                node_unschedulable \u003d node_spec[\u0027unschedulable\u0027]"},{"line_number":164,"context_line":"                if node_unschedulable:"},{"line_number":165,"context_line":"                    continue"},{"line_number":166,"context_line":"            self._report_node_resource_metrics(\u0027capacity\u0027, node_capacity, node_dimensions)"},{"line_number":167,"context_line":"            self._report_node_resource_metrics(\u0027allocatable\u0027, node_allocatable, node_dimensions)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a1ced50_80aa2718","line":164,"range":{"start_line":162,"start_character":0,"end_line":164,"end_character":38},"updated":"2017-03-16 22:14:13.000000000","message":"Make this just:\n\nif node[\u0027spec\u0027][\u0027unschedulable\u0027]:","commit_id":"e4a4f4d4ee068c2d6796b8f9ede7d27769e21493"},{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"30c40e537b22c116833e3ee826d9cd2662c6ed5a","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            node_allocatable \u003d node_status[\u0027allocatable\u0027]"},{"line_number":160,"context_line":"            self._report_node_conditions_metrics(node_status[\u0027conditions\u0027], node_dimensions)"},{"line_number":161,"context_line":"            if \u0027spec\u0027 in node and \u0027unschedulable\u0027 in node[\u0027spec\u0027]:"},{"line_number":162,"context_line":"                node_spec \u003d node[\u0027spec\u0027]"},{"line_number":163,"context_line":"                node_unschedulable \u003d node_spec[\u0027unschedulable\u0027]"},{"line_number":164,"context_line":"                if node_unschedulable:"},{"line_number":165,"context_line":"                    continue"},{"line_number":166,"context_line":"            self._report_node_resource_metrics(\u0027capacity\u0027, node_capacity, node_dimensions)"},{"line_number":167,"context_line":"            self._report_node_resource_metrics(\u0027allocatable\u0027, node_allocatable, node_dimensions)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a1ced50_566555df","line":164,"range":{"start_line":162,"start_character":0,"end_line":164,"end_character":38},"in_reply_to":"1a1ced50_80aa2718","updated":"2017-03-16 22:58:33.000000000","message":"Done","commit_id":"e4a4f4d4ee068c2d6796b8f9ede7d27769e21493"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"737b6f79de4c382f6879520ae2e7b6d7978a6a38","unresolved":false,"context_lines":[{"line_number":217,"context_line":"                self._set_kubernetes_dimensions(rc_dimensions, \"replication_controller\", rc[\u0027metadata\u0027],"},{"line_number":218,"context_line":"                                                kubernetes_labels)"},{"line_number":219,"context_line":"                rc_status \u003d rc[\u0027status\u0027]"},{"line_number":220,"context_line":"                if \u0027replicas\u0027 not in rc_status or not rc_status[\u0027replicas\u0027]:"},{"line_number":221,"context_line":"                    continue"},{"line_number":222,"context_line":"                self.gauge(\"kubernetes.replication.controller.replicas\", rc_status[\u0027replicas\u0027],"},{"line_number":223,"context_line":"                           rc_dimensions, hostname\u003d\"SUPPRESS\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a1ced50_9b69b68e","line":220,"range":{"start_line":220,"start_character":47,"end_line":220,"end_character":75},"updated":"2017-03-16 22:14:13.000000000","message":"This will be true when this value is 0 which seems wrong","commit_id":"e4a4f4d4ee068c2d6796b8f9ede7d27769e21493"},{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"30c40e537b22c116833e3ee826d9cd2662c6ed5a","unresolved":false,"context_lines":[{"line_number":217,"context_line":"                self._set_kubernetes_dimensions(rc_dimensions, \"replication_controller\", rc[\u0027metadata\u0027],"},{"line_number":218,"context_line":"                                                kubernetes_labels)"},{"line_number":219,"context_line":"                rc_status \u003d rc[\u0027status\u0027]"},{"line_number":220,"context_line":"                if \u0027replicas\u0027 not in rc_status or not rc_status[\u0027replicas\u0027]:"},{"line_number":221,"context_line":"                    continue"},{"line_number":222,"context_line":"                self.gauge(\"kubernetes.replication.controller.replicas\", rc_status[\u0027replicas\u0027],"},{"line_number":223,"context_line":"                           rc_dimensions, hostname\u003d\"SUPPRESS\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a1ced50_f6aac184","line":220,"range":{"start_line":220,"start_character":47,"end_line":220,"end_character":75},"in_reply_to":"1a1ced50_9b69b68e","updated":"2017-03-16 22:58:33.000000000","message":"Done","commit_id":"e4a4f4d4ee068c2d6796b8f9ede7d27769e21493"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"8a99c709d2dbc77cccf384876b1ec7501e682cce","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                       hostname\u003d\"SUPPRESS\")"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _set_kubernetes_dimensions(self, dimensions, type, metadata, kubernetes_labels):"},{"line_number":114,"context_line":"        dimensions[type] \u003d metadata[\u0027name\u0027]"},{"line_number":115,"context_line":"        dimensions[\u0027namespace\u0027] \u003d metadata[\u0027namespace\u0027]"},{"line_number":116,"context_line":"        if \u0027labels\u0027 in metadata:"},{"line_number":117,"context_line":"            labels \u003d metadata[\u0027labels\u0027]"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a1ced50_59820fc9","line":114,"updated":"2017-03-23 05:01:40.000000000","message":"type is reserved keyword, so maybe put this inside \u0027 \u0027","commit_id":"aac00586566f10f9b4f8f0dc91d02b0d3372c3e8"},{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"a4a4b29a4c422b330b8e8e75b5710e2a861f420f","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                       hostname\u003d\"SUPPRESS\")"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _set_kubernetes_dimensions(self, dimensions, type, metadata, kubernetes_labels):"},{"line_number":114,"context_line":"        dimensions[type] \u003d metadata[\u0027name\u0027]"},{"line_number":115,"context_line":"        dimensions[\u0027namespace\u0027] \u003d metadata[\u0027namespace\u0027]"},{"line_number":116,"context_line":"        if \u0027labels\u0027 in metadata:"},{"line_number":117,"context_line":"            labels \u003d metadata[\u0027labels\u0027]"}],"source_content_type":"text/x-python","patch_set":16,"id":"7ffa3b31_7c6df902","line":114,"in_reply_to":"1a1ced50_59820fc9","updated":"2017-04-20 21:19:23.000000000","message":"Done","commit_id":"aac00586566f10f9b4f8f0dc91d02b0d3372c3e8"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"63363b191ab81a25d3d0a300e08147eb18871449","unresolved":false,"context_lines":[{"line_number":6,"context_line":"from monasca_agent.collector import checks"},{"line_number":7,"context_line":"from monasca_agent.collector.checks import utils"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"log \u003d logging.getLogger(__name__)"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"DEFAULT_TIMEOUT \u003d 5"},{"line_number":12,"context_line":"NODE_CONDITIONS_MAP \u003d {"}],"source_content_type":"text/x-python","patch_set":21,"id":"7ffa3b31_724915b5","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":3},"updated":"2017-04-21 16:31:59.000000000","message":"Not used? Should be using just self.log","commit_id":"80c1d52d21db1022d5b0cc39500dc51bd33dd0aa"},{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"ef5b5bb1872e3ac85d5cec2785b8ec84352ea62c","unresolved":false,"context_lines":[{"line_number":6,"context_line":"from monasca_agent.collector import checks"},{"line_number":7,"context_line":"from monasca_agent.collector.checks import utils"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"log \u003d logging.getLogger(__name__)"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"DEFAULT_TIMEOUT \u003d 5"},{"line_number":12,"context_line":"NODE_CONDITIONS_MAP \u003d {"}],"source_content_type":"text/x-python","patch_set":21,"id":"5ff73747_037db21b","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":3},"in_reply_to":"7ffa3b31_724915b5","updated":"2017-04-21 23:35:24.000000000","message":"Done","commit_id":"80c1d52d21db1022d5b0cc39500dc51bd33dd0aa"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"63363b191ab81a25d3d0a300e08147eb18871449","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            if derive_api_url:"},{"line_number":50,"context_line":"                self.kubernetes_connector \u003d utils.KubernetesConnector(self.connection_timeout)"},{"line_number":51,"context_line":"            else:"},{"line_number":52,"context_line":"                exception_message \u003d \"Either Kubernetes API url or derive api url must be set when \" \\"},{"line_number":53,"context_line":"                                    \"running Kubernetes API plugin.\""},{"line_number":54,"context_line":"                self.log.error(exception_message)"},{"line_number":55,"context_line":"                raise Exception(exception_message)"}],"source_content_type":"text/x-python","patch_set":21,"id":"7ffa3b31_d2dd89e0","line":52,"range":{"start_line":52,"start_character":66,"end_line":52,"end_character":80},"updated":"2017-04-21 16:31:59.000000000","message":"Use the real field name. And say what value it needs.","commit_id":"80c1d52d21db1022d5b0cc39500dc51bd33dd0aa"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"4b8a4ab58980b14ae410d71e8cce55477809b123","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            if derive_api_url:"},{"line_number":50,"context_line":"                self.kubernetes_connector \u003d utils.KubernetesConnector(self.connection_timeout)"},{"line_number":51,"context_line":"            else:"},{"line_number":52,"context_line":"                exception_message \u003d \"Either Kubernetes API url or derive api url must be set when \" \\"},{"line_number":53,"context_line":"                                    \"running Kubernetes API plugin.\""},{"line_number":54,"context_line":"                self.log.error(exception_message)"},{"line_number":55,"context_line":"                raise Exception(exception_message)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5ff73747_7c09b0db","line":52,"range":{"start_line":52,"start_character":66,"end_line":52,"end_character":80},"in_reply_to":"5ff73747_43b17ae1","updated":"2017-04-23 03:34:23.000000000","message":"I think you need to say something about setting derive_api_url. This message doesn\u0027t say anything about it, so I wouldn\u0027t know that might be the problem","commit_id":"80c1d52d21db1022d5b0cc39500dc51bd33dd0aa"},{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"218776d4743870bf27070ef4116e74a62d8d5814","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            if derive_api_url:"},{"line_number":50,"context_line":"                self.kubernetes_connector \u003d utils.KubernetesConnector(self.connection_timeout)"},{"line_number":51,"context_line":"            else:"},{"line_number":52,"context_line":"                exception_message \u003d \"Either Kubernetes API url or derive api url must be set when \" \\"},{"line_number":53,"context_line":"                                    \"running Kubernetes API plugin.\""},{"line_number":54,"context_line":"                self.log.error(exception_message)"},{"line_number":55,"context_line":"                raise Exception(exception_message)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5ff73747_6448e0cb","line":52,"range":{"start_line":52,"start_character":66,"end_line":52,"end_character":80},"in_reply_to":"5ff73747_7c09b0db","updated":"2017-04-24 14:54:04.000000000","message":"Done","commit_id":"80c1d52d21db1022d5b0cc39500dc51bd33dd0aa"},{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"ef5b5bb1872e3ac85d5cec2785b8ec84352ea62c","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            if derive_api_url:"},{"line_number":50,"context_line":"                self.kubernetes_connector \u003d utils.KubernetesConnector(self.connection_timeout)"},{"line_number":51,"context_line":"            else:"},{"line_number":52,"context_line":"                exception_message \u003d \"Either Kubernetes API url or derive api url must be set when \" \\"},{"line_number":53,"context_line":"                                    \"running Kubernetes API plugin.\""},{"line_number":54,"context_line":"                self.log.error(exception_message)"},{"line_number":55,"context_line":"                raise Exception(exception_message)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5ff73747_43b17ae1","line":52,"range":{"start_line":52,"start_character":66,"end_line":52,"end_character":80},"in_reply_to":"7ffa3b31_d2dd89e0","updated":"2017-04-21 23:35:24.000000000","message":"Thanks for pointing it out! I changed it to \"Either Kubernetes API url or container environment variables KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be set when running Kubernetes API plugin.\" Does this look better to you?","commit_id":"80c1d52d21db1022d5b0cc39500dc51bd33dd0aa"},{"author":{"_account_id":17001,"name":"Tim Buckley","email":"timothy.jas.buckley@hpe.com","username":"timothy.jas.buckley"},"change_message_id":"ef67bfe5eebddd0a52e5a04e16dd66d7251dc5c4","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            self.log.error(\"Error connecting to the health endpoint with exception {}\".format(e))"},{"line_number":84,"context_line":"            return False"},{"line_number":85,"context_line":"        else:"},{"line_number":86,"context_line":"            api_health \u003d False"},{"line_number":87,"context_line":"            for line in result.iter_lines():"},{"line_number":88,"context_line":"                if line \u003d\u003d \u0027ok\u0027:"},{"line_number":89,"context_line":"                    api_health \u003d True"},{"line_number":90,"context_line":"                    break"},{"line_number":91,"context_line":"            return api_health"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _report_cluster_component_statuses(self, dimensions):"},{"line_number":94,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":23,"id":"5ff73747_4054a7ca","line":91,"range":{"start_line":86,"start_character":12,"end_line":91,"end_character":29},"updated":"2017-04-24 19:57:37.000000000","message":"maybe this could be simplified?\n\n    return \u0027ok\u0027 in result.iter_lines()","commit_id":"48266f014eaa9ea94e1ef03f8a7d543d27e82819"},{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"f328fd0523557275260da7b103b0ca2b38392523","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            self.log.error(\"Error connecting to the health endpoint with exception {}\".format(e))"},{"line_number":84,"context_line":"            return False"},{"line_number":85,"context_line":"        else:"},{"line_number":86,"context_line":"            api_health \u003d False"},{"line_number":87,"context_line":"            for line in result.iter_lines():"},{"line_number":88,"context_line":"                if line \u003d\u003d \u0027ok\u0027:"},{"line_number":89,"context_line":"                    api_health \u003d True"},{"line_number":90,"context_line":"                    break"},{"line_number":91,"context_line":"            return api_health"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _report_cluster_component_statuses(self, dimensions):"},{"line_number":94,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":23,"id":"5ff73747_c398c16b","line":91,"range":{"start_line":86,"start_character":12,"end_line":91,"end_character":29},"in_reply_to":"5ff73747_4054a7ca","updated":"2017-04-24 20:23:48.000000000","message":"Good one!! Thanks!","commit_id":"48266f014eaa9ea94e1ef03f8a7d543d27e82819"},{"author":{"_account_id":17001,"name":"Tim Buckley","email":"timothy.jas.buckley@hpe.com","username":"timothy.jas.buckley"},"change_message_id":"ef67bfe5eebddd0a52e5a04e16dd66d7251dc5c4","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                self.gauge(\"kubernetes.deployment.updated_replicas\", deployment_updated_replicas,"},{"line_number":189,"context_line":"                           deployment_dimensions, hostname\u003d\"SUPPRESS\")"},{"line_number":190,"context_line":"            except Exception as e:"},{"line_number":191,"context_line":"                self.log.info(\"Error {} parsing deployment {}. Skipping\".format(e, deployment))"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _report_replication_controller_metrics(self, dimensions, kubernetes_labels):"},{"line_number":194,"context_line":"        # Get namespaces first"}],"source_content_type":"text/x-python","patch_set":23,"id":"5ff73747_a0d5abbb","line":191,"range":{"start_line":191,"start_character":16,"end_line":191,"end_character":95},"updated":"2017-04-24 19:57:37.000000000","message":"It might be good to give log.info `exc_info\u003de` so we can get a useful traceback","commit_id":"48266f014eaa9ea94e1ef03f8a7d543d27e82819"},{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"f328fd0523557275260da7b103b0ca2b38392523","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                self.gauge(\"kubernetes.deployment.updated_replicas\", deployment_updated_replicas,"},{"line_number":189,"context_line":"                           deployment_dimensions, hostname\u003d\"SUPPRESS\")"},{"line_number":190,"context_line":"            except Exception as e:"},{"line_number":191,"context_line":"                self.log.info(\"Error {} parsing deployment {}. Skipping\".format(e, deployment))"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _report_replication_controller_metrics(self, dimensions, kubernetes_labels):"},{"line_number":194,"context_line":"        # Get namespaces first"}],"source_content_type":"text/x-python","patch_set":23,"id":"5ff73747_034c699c","line":191,"range":{"start_line":191,"start_character":16,"end_line":191,"end_character":95},"in_reply_to":"5ff73747_a0d5abbb","updated":"2017-04-24 20:23:48.000000000","message":"Done","commit_id":"48266f014eaa9ea94e1ef03f8a7d543d27e82819"}]}
