)]}'
{"monasca_setup/detection/plugins/mysql.py":[{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"54eb78114ce91c30fec4479e2b9de20efc0d511c","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                    log.error(\"\\tI/O error reading {:s}\".format(mysql_conf))"},{"line_number":76,"context_line":"                    pass"},{"line_number":77,"context_line":"            except _mysql_exceptions.MySQLError:"},{"line_number":78,"context_line":"                pass"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"            # Try logging in as \u0027root\u0027 with an empty password"},{"line_number":81,"context_line":"            if \u0027mysql\u0027 not in config:"}],"source_content_type":"text/x-python","patch_set":1,"id":"bae84128_93fab873","line":78,"range":{"start_line":78,"start_character":16,"end_line":78,"end_character":20},"updated":"2016-02-23 17:33:51.000000000","message":"Is it possible that \"except pass\" with no raise exception or log might cause errors to pass silently?","commit_id":"febf0533f204263b2115881c4732c5ee79c5b89f"},{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"54eb78114ce91c30fec4479e2b9de20efc0d511c","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                                       [{\u0027name\u0027: \u0027localhost\u0027, \u0027server\u0027: \u0027localhost\u0027, \u0027user\u0027: \u0027root\u0027,"},{"line_number":87,"context_line":"                                         \u0027port\u0027: 3306}]}"},{"line_number":88,"context_line":"                except _mysql_exceptions.MySQLError:"},{"line_number":89,"context_line":"                    pass"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        if \u0027mysql\u0027 not in config:"},{"line_number":92,"context_line":"            exception_msg \u003d \u0027Unable to log into the mysql database;\u0027 \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"bae84128_d3f0c093","line":89,"range":{"start_line":89,"start_character":20,"end_line":89,"end_character":24},"updated":"2016-02-23 17:33:51.000000000","message":"Same here","commit_id":"febf0533f204263b2115881c4732c5ee79c5b89f"},{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"1341305f23c314600712ea082057517e485377d8","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                                       [{\u0027name\u0027: \u0027localhost\u0027, \u0027server\u0027: \u0027localhost\u0027, \u0027user\u0027: \u0027root\u0027,"},{"line_number":87,"context_line":"                                         \u0027port\u0027: 3306}]}"},{"line_number":88,"context_line":"                except _mysql_exceptions.MySQLError:"},{"line_number":89,"context_line":"                    pass"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        if \u0027mysql\u0027 not in config:"},{"line_number":92,"context_line":"            exception_msg \u003d \u0027Unable to log into the mysql database;\u0027 \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"bae84128_a5fe93ab","line":89,"range":{"start_line":89,"start_character":20,"end_line":89,"end_character":24},"in_reply_to":"bae84128_938bd8c2","updated":"2016-02-23 17:47:05.000000000","message":"Yeah I agree. Maybe adding some log messages will help debugging later on. Thank you Michael.","commit_id":"febf0533f204263b2115881c4732c5ee79c5b89f"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"7df70bd03fe62cad9cb9f1ef36956b5a4668be3b","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                                       [{\u0027name\u0027: \u0027localhost\u0027, \u0027server\u0027: \u0027localhost\u0027, \u0027user\u0027: \u0027root\u0027,"},{"line_number":87,"context_line":"                                         \u0027port\u0027: 3306}]}"},{"line_number":88,"context_line":"                except _mysql_exceptions.MySQLError:"},{"line_number":89,"context_line":"                    pass"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        if \u0027mysql\u0027 not in config:"},{"line_number":92,"context_line":"            exception_msg \u003d \u0027Unable to log into the mysql database;\u0027 \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"bae84128_938bd8c2","line":89,"range":{"start_line":89,"start_character":20,"end_line":89,"end_character":24},"in_reply_to":"bae84128_d3f0c093","updated":"2016-02-23 17:37:55.000000000","message":"yes and no. We check at the end of the method if mysql is in the config and if it is not we log an error. So if an exception was caught in both attempts to connect then it will log an error. We could add a log message when those attempts failed and still continue on. What do you think?","commit_id":"febf0533f204263b2115881c4732c5ee79c5b89f"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"c6102531fe780107e7e677aedd910d28ef3a5389","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                pass"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"            # Try logging in as \u0027root\u0027 with an empty password"},{"line_number":82,"context_line":"            if \u0027mysql\u0027 not in config:"},{"line_number":83,"context_line":"                try:"},{"line_number":84,"context_line":"                    MySQLdb.connect(host\u003d\u0027localhost\u0027, port\u003d3306, user\u003d\u0027root\u0027)"},{"line_number":85,"context_line":"                    log.info(\"\\tConfiguring plugin to connect with user root.\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"bae84128_abb3fd08","line":82,"range":{"start_line":82,"start_character":12,"end_line":82,"end_character":36},"updated":"2016-02-23 20:51:14.000000000","message":"Can we just use a configured variable that gets set when the config[\u0027mysql\u0027] is created? That would be clearer than this","commit_id":"19e2ad05f608ccfc8e4de0494517469a49a17705"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"c6102531fe780107e7e677aedd910d28ef3a5389","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                    pass"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        if \u0027mysql\u0027 not in config:"},{"line_number":94,"context_line":"            exception_msg \u003d \u0027Unable to log into the mysql database;\u0027 \\"},{"line_number":95,"context_line":"                            \u0027 the mysql plugin is not configured.\u0027"},{"line_number":96,"context_line":"            log.error(exception_msg)"},{"line_number":97,"context_line":"            raise Exception(exception_msg)"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bae84128_8bdf1939","line":95,"range":{"start_line":94,"start_character":13,"end_line":95,"end_character":66},"updated":"2016-02-23 20:51:14.000000000","message":"This exception could be thrown because the dependencies aren\u0027t installed. It seems better to make that a separate check and error message","commit_id":"19e2ad05f608ccfc8e4de0494517469a49a17705"}]}
