)]}'
{"trove/guestagent/datastore/experimental/vertica/manager.py":[{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"cd66b6ba65e313327fe0304f116273ff89668a6e","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            if cluster_config is None:"},{"line_number":66,"context_line":"                self.app.install_vertica()"},{"line_number":67,"context_line":"                self.app.create_db()"},{"line_number":68,"context_line":"                self.app.complete_install_or_restart()"},{"line_number":69,"context_line":"            elif cluster_config[\u0027instance_type\u0027] \u003d\u003d \"member\":"},{"line_number":70,"context_line":"                self.appStatus.set_status(rd_ins.ServiceStatuses.BUILD_PENDING)"},{"line_number":71,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_cf9f05b3","line":68,"updated":"2015-03-31 19:13:03.000000000","message":"Shouldnt this line be outside the if-else condition?","commit_id":"ea23625e8c88e130c3f8965bac6951ce496305b6"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"62abea0d2bbc044e0acb5481abb96e40cb517fa2","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            if cluster_config is None:"},{"line_number":66,"context_line":"                self.app.install_vertica()"},{"line_number":67,"context_line":"                self.app.create_db()"},{"line_number":68,"context_line":"                self.app.complete_install_or_restart()"},{"line_number":69,"context_line":"            elif cluster_config[\u0027instance_type\u0027] \u003d\u003d \"member\":"},{"line_number":70,"context_line":"                self.appStatus.set_status(rd_ins.ServiceStatuses.BUILD_PENDING)"},{"line_number":71,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_771686a8","line":68,"in_reply_to":"da9b358b_cf9f05b3","updated":"2015-04-01 02:34:14.000000000","message":"Not needed, because other else parts are already setting up the status.","commit_id":"ea23625e8c88e130c3f8965bac6951ce496305b6"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"7baffddf3a3863655598d0c1107b25f0ab96c0e1","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            else:"},{"line_number":72,"context_line":"                LOG.error(_(\"Bad cluster configuration; instance type \""},{"line_number":73,"context_line":"                            \"given as %s.\") % cluster_config[\u0027instance_type\u0027])"},{"line_number":74,"context_line":"                raise"},{"line_number":75,"context_line":"            LOG.info(_(\u0027Completed setup of Vertica database instance.\u0027))"},{"line_number":76,"context_line":"        except Exception:"},{"line_number":77,"context_line":"            LOG.exception(_(\u0027Cannot prepare Vertica database instance.\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_9ffe016a","line":74,"updated":"2015-03-30 18:16:35.000000000","message":"* just an out-of-scope aside - this is going to throw TypeError exception (immediately caught in the outer block) if there is not an exception in the scope. I think this is a potential bug.","commit_id":"ea23625e8c88e130c3f8965bac6951ce496305b6"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"535b5f9f5f06e190157679ee447fc557413751df","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            else:"},{"line_number":72,"context_line":"                LOG.error(_(\"Bad cluster configuration; instance type \""},{"line_number":73,"context_line":"                            \"given as %s.\") % cluster_config[\u0027instance_type\u0027])"},{"line_number":74,"context_line":"                raise"},{"line_number":75,"context_line":"            LOG.info(_(\u0027Completed setup of Vertica database instance.\u0027))"},{"line_number":76,"context_line":"        except Exception:"},{"line_number":77,"context_line":"            LOG.exception(_(\u0027Cannot prepare Vertica database instance.\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_b36e9094","line":74,"in_reply_to":"da9b358b_9ffe016a","updated":"2015-03-31 05:15:47.000000000","message":"So, if there is a bad cluster configuration received from prepare, instance should goto FAILED state.\n\nNow, set_status was already in the parent exception handler block, which is why just not to repeat the set_status, a raise was written here which gets handled in parent exception block.","commit_id":"ea23625e8c88e130c3f8965bac6951ce496305b6"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"e45424a1b5cfe356825bf6537c4f36e855bf1b3d","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            else:"},{"line_number":72,"context_line":"                LOG.error(_(\"Bad cluster configuration; instance type \""},{"line_number":73,"context_line":"                            \"given as %s.\") % cluster_config[\u0027instance_type\u0027])"},{"line_number":74,"context_line":"                raise"},{"line_number":75,"context_line":"            LOG.info(_(\u0027Completed setup of Vertica database instance.\u0027))"},{"line_number":76,"context_line":"        except Exception:"},{"line_number":77,"context_line":"            LOG.exception(_(\u0027Cannot prepare Vertica database instance.\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_1a053679","line":74,"in_reply_to":"da9b358b_b36e9094","updated":"2015-03-31 15:52:53.000000000","message":"The problem I see here is that \u0027raise \u0027 will throw a TypeError exception if there is not an exception thrown in the scope. The \u0027raise \u0027 clause will effectively fail with an error unrelated to the original cause.\n\nThe repetition can be avoided (for instance) by returning from all normal execution branches and letting everything else fall through to the exception handler.","commit_id":"ea23625e8c88e130c3f8965bac6951ce496305b6"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"7baffddf3a3863655598d0c1107b25f0ab96c0e1","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                            \"given as %s.\") % cluster_config[\u0027instance_type\u0027])"},{"line_number":74,"context_line":"                raise"},{"line_number":75,"context_line":"            LOG.info(_(\u0027Completed setup of Vertica database instance.\u0027))"},{"line_number":76,"context_line":"        except Exception:"},{"line_number":77,"context_line":"            LOG.exception(_(\u0027Cannot prepare Vertica database instance.\u0027))"},{"line_number":78,"context_line":"            self.appStatus.set_status(rd_ins.ServiceStatuses.FAILED)"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_7f11fdab","line":76,"updated":"2015-03-30 18:16:35.000000000","message":"Your commit message talks about adding new unit tests, but this looks more like some sort of a bug fix. If there is a bug it should be fixed in a separate patch set.\n\nAlso, you already log the exceptions once in the service and then again in here. I think it is going to clutter the log with repeated stack traces.\n\nFinally, looking at the other datastores it seems like they just simply rethrow whatever they get. Again, why exactly are you stopping the exception propagation here?","commit_id":"ea23625e8c88e130c3f8965bac6951ce496305b6"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"086e73d434fb3525dfefaa38ae40a5ab16d9daf7","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                            \"given as %s.\") % cluster_config[\u0027instance_type\u0027])"},{"line_number":74,"context_line":"                raise"},{"line_number":75,"context_line":"            LOG.info(_(\u0027Completed setup of Vertica database instance.\u0027))"},{"line_number":76,"context_line":"        except Exception:"},{"line_number":77,"context_line":"            LOG.exception(_(\u0027Cannot prepare Vertica database instance.\u0027))"},{"line_number":78,"context_line":"            self.appStatus.set_status(rd_ins.ServiceStatuses.FAILED)"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_170e1a3b","line":76,"in_reply_to":"da9b358b_1a641620","updated":"2015-04-01 02:54:02.000000000","message":"Done the needful","commit_id":"ea23625e8c88e130c3f8965bac6951ce496305b6"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"535b5f9f5f06e190157679ee447fc557413751df","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                            \"given as %s.\") % cluster_config[\u0027instance_type\u0027])"},{"line_number":74,"context_line":"                raise"},{"line_number":75,"context_line":"            LOG.info(_(\u0027Completed setup of Vertica database instance.\u0027))"},{"line_number":76,"context_line":"        except Exception:"},{"line_number":77,"context_line":"            LOG.exception(_(\u0027Cannot prepare Vertica database instance.\u0027))"},{"line_number":78,"context_line":"            self.appStatus.set_status(rd_ins.ServiceStatuses.FAILED)"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_f329b838","line":76,"in_reply_to":"da9b358b_7f11fdab","updated":"2015-03-31 05:15:47.000000000","message":"1. The stacktrace from here would be visible in guest-instance\n\n2. This exception handler block would make the instance reach the failed state, in case prepare fails, in the absence of which the instance remains in build state until a timeout is reached.","commit_id":"ea23625e8c88e130c3f8965bac6951ce496305b6"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"e45424a1b5cfe356825bf6537c4f36e855bf1b3d","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                            \"given as %s.\") % cluster_config[\u0027instance_type\u0027])"},{"line_number":74,"context_line":"                raise"},{"line_number":75,"context_line":"            LOG.info(_(\u0027Completed setup of Vertica database instance.\u0027))"},{"line_number":76,"context_line":"        except Exception:"},{"line_number":77,"context_line":"            LOG.exception(_(\u0027Cannot prepare Vertica database instance.\u0027))"},{"line_number":78,"context_line":"            self.appStatus.set_status(rd_ins.ServiceStatuses.FAILED)"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_1a641620","line":76,"in_reply_to":"da9b358b_f329b838","updated":"2015-03-31 15:52:53.000000000","message":"1. In that case we probably should not log full stack traces (LOG.exception) in the service calls.\n\n2. I agree this makes sense, althougt it does not seem to be common practice in other guestagents. But it means this patch set really fixes an issue rather than just adding tests. I would suggest restating the commit message at least.","commit_id":"ea23625e8c88e130c3f8965bac6951ce496305b6"}],"trove/guestagent/datastore/experimental/vertica/service.py":[{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"016d4731f13aea26e390e34ce4a7544ea7b0a103","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            system.shell_execute(create_db_command, \"dbadmin\")"},{"line_number":162,"context_line":"        except Exception:"},{"line_number":163,"context_line":"            LOG.exception(_(\"Vertica database create failed.\"))"},{"line_number":164,"context_line":"            raise RuntimeError(\"Could not create database.\")"},{"line_number":165,"context_line":"        LOG.info(_(\"Vertica database create completed.\"))"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def install_vertica(self, members\u003doperating_system.get_ip_address()):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa53dc9_d3aa7485","line":164,"updated":"2015-04-06 14:06:53.000000000","message":"Why is this a RuntimeError?  I would expect that failures to perform Trove operations should result in either a specific exception, or a TroveError.","commit_id":"dbdd3e599a1251273b0e03650388e81ea6017648"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"1f8077152b64d8da9d5725de6885ff34f9592268","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            system.shell_execute(create_db_command, \"dbadmin\")"},{"line_number":162,"context_line":"        except Exception:"},{"line_number":163,"context_line":"            LOG.exception(_(\"Vertica database create failed.\"))"},{"line_number":164,"context_line":"            raise RuntimeError(\"Could not create database.\")"},{"line_number":165,"context_line":"        LOG.info(_(\"Vertica database create completed.\"))"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def install_vertica(self, members\u003doperating_system.get_ip_address()):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa53dc9_b948ef88","line":164,"in_reply_to":"9aa53dc9_d3aa7485","updated":"2015-04-06 14:52:24.000000000","message":"So thats every datastore has been doing on failure of a shell execution, the RuntimeError","commit_id":"dbdd3e599a1251273b0e03650388e81ea6017648"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"016d4731f13aea26e390e34ce4a7544ea7b0a103","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            system.shell_execute(install_vertica_cmd)"},{"line_number":174,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":175,"context_line":"            LOG.exception(_(\"install_vertica failed.\"))"},{"line_number":176,"context_line":"            raise RuntimeError(\"Could not install Vertica.\")"},{"line_number":177,"context_line":"        self._generate_database_password()"},{"line_number":178,"context_line":"        LOG.info(_(\"install_vertica completed.\"))"},{"line_number":179,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa53dc9_73928859","line":176,"updated":"2015-04-06 14:06:53.000000000","message":"As above.","commit_id":"dbdd3e599a1251273b0e03650388e81ea6017648"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"0768b5489c11294f21c1776e87687f42efbdb838","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        except Exception:"},{"line_number":216,"context_line":"            LOG.exception(_(\"Failed to read config %s.\") % system.VERTICA_CONF)"},{"line_number":217,"context_line":"            raise RuntimeError(\"Failed to read config %s.\")"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def _get_database_password(self):"},{"line_number":220,"context_line":"        \"\"\"Read the password from vertica.cnf file and return it.\"\"\""},{"line_number":221,"context_line":"        return self.read_config().get(\u0027credentials\u0027, \u0027dbadmin_password\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_ac2eea40","line":218,"updated":"2015-04-09 09:40:03.000000000","message":"Did you forget to add the config file name here? Thanks Sushil","commit_id":"a3a04b4a43595e360b9b4b3cadf8bcba5a8baaaa"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"540572187d6de31ab16c6af8eecf13036b009c0c","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            system.shell_execute(create_db_command, \"dbadmin\")"},{"line_number":162,"context_line":"        except Exception:"},{"line_number":163,"context_line":"            LOG.exception(_(\"Vertica database create failed.\"))"},{"line_number":164,"context_line":"            raise RuntimeError(\"Could not create database.\")"},{"line_number":165,"context_line":"        LOG.info(_(\"Vertica database create completed.\"))"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def install_vertica(self, members\u003dnetutils.get_my_ipv4()):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aa745d1_19145a42","line":164,"updated":"2015-04-16 17:56:43.000000000","message":"Since this is an error that propagates up the stack (and not just a debug message) it should be marked for translation.","commit_id":"fe652c964177ca64118dfec47e3629d77c73ee66"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"540572187d6de31ab16c6af8eecf13036b009c0c","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            system.shell_execute(install_vertica_cmd)"},{"line_number":174,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":175,"context_line":"            LOG.exception(_(\"install_vertica failed.\"))"},{"line_number":176,"context_line":"            raise RuntimeError(\"Could not install Vertica.\")"},{"line_number":177,"context_line":"        self._generate_database_password()"},{"line_number":178,"context_line":"        LOG.info(_(\"install_vertica completed.\"))"},{"line_number":179,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5aa745d1_792b5e83","line":176,"updated":"2015-04-16 17:56:43.000000000","message":"same","commit_id":"fe652c964177ca64118dfec47e3629d77c73ee66"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"540572187d6de31ab16c6af8eecf13036b009c0c","unresolved":false,"context_lines":[{"line_number":214,"context_line":"            return config"},{"line_number":215,"context_line":"        except Exception:"},{"line_number":216,"context_line":"            LOG.exception(_(\"Failed to read config %s.\") % system.VERTICA_CONF)"},{"line_number":217,"context_line":"            raise RuntimeError(\"Failed to read config.\")"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def _get_database_password(self):"},{"line_number":220,"context_line":"        \"\"\"Read the password from vertica.cnf file and return it.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"5aa745d1_193b3ad3","line":217,"updated":"2015-04-16 17:56:43.000000000","message":"same","commit_id":"fe652c964177ca64118dfec47e3629d77c73ee66"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"a627c87e4db2fbe19ac9fa7b836a1a8859978eec","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            subprocess.Popen(command)"},{"line_number":72,"context_line":"        except Exception:"},{"line_number":73,"context_line":"            LOG.exception(_(\"Failed to enable db on boot.\"))"},{"line_number":74,"context_line":"            raise RuntimeError(\"Could not enable db on boot.\")"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def _disable_db_on_boot(self):"},{"line_number":77,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ab451fb_c5b3d009","line":74,"updated":"2015-04-16 21:35:31.000000000","message":"translation","commit_id":"41056a05384ff0ee20bf1799525fadc78459dd23"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"a627c87e4db2fbe19ac9fa7b836a1a8859978eec","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            system.shell_execute(command)"},{"line_number":82,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":83,"context_line":"            LOG.exception(_(\"Failed to disable db on boot.\"))"},{"line_number":84,"context_line":"            raise RuntimeError(\"Could not disable db on boot.\")"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def stop_db(self, update_db\u003dFalse, do_not_start_on_reboot\u003dFalse):"},{"line_number":87,"context_line":"        \"\"\"Stop the database.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"3ab451fb_a5b8c4e6","line":84,"updated":"2015-04-16 21:35:31.000000000","message":"translation","commit_id":"41056a05384ff0ee20bf1799525fadc78459dd23"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"a627c87e4db2fbe19ac9fa7b836a1a8859978eec","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                            self.state_change_wait_time, update_db):"},{"line_number":106,"context_line":"                        LOG.error(_(\"Could not stop Vertica.\"))"},{"line_number":107,"context_line":"                        self.status.end_install_or_restart()"},{"line_number":108,"context_line":"                        raise RuntimeError(\"Could not stop Vertica!\")"},{"line_number":109,"context_line":"                LOG.debug(\"Database stopped.\")"},{"line_number":110,"context_line":"            else:"},{"line_number":111,"context_line":"                LOG.debug(\"Database is not running.\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ab451fb_65cbdc73","line":108,"updated":"2015-04-16 21:35:31.000000000","message":"translation","commit_id":"41056a05384ff0ee20bf1799525fadc78459dd23"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"312a41e7c411ff3afeb08076c9b30f590dfde293","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                LOG.debug(\"Database is not running.\")"},{"line_number":112,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":113,"context_line":"            LOG.exception(_(\"Failed to stop database.\"))"},{"line_number":114,"context_line":"            raise RuntimeError(\"Could not stop database.\")"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def start_db(self, update_db\u003dFalse):"},{"line_number":117,"context_line":"        \"\"\"Start the database.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"5aa745d1_0f976891","line":114,"updated":"2015-04-16 18:42:39.000000000","message":"This needs to be translated as well","commit_id":"41056a05384ff0ee20bf1799525fadc78459dd23"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"a627c87e4db2fbe19ac9fa7b836a1a8859978eec","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                self.status.end_install_or_restart()"},{"line_number":132,"context_line":"            LOG.debug(\"Database started.\")"},{"line_number":133,"context_line":"        except Exception:"},{"line_number":134,"context_line":"            raise RuntimeError(\"Could not start Vertica!\")"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def start_db_with_conf_changes(self, config_contents):"},{"line_number":137,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"3ab451fb_e5a5acb5","line":134,"updated":"2015-04-16 21:35:31.000000000","message":"translation","commit_id":"41056a05384ff0ee20bf1799525fadc78459dd23"}],"trove/tests/unittests/guestagent/test_dbaas.py":[{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"851fb15da774ce3494e3cbff52738a43a59bae5e","unresolved":false,"context_lines":[{"line_number":2164,"context_line":"    def test_failure_install_vertica(self):"},{"line_number":2165,"context_line":"        with patch.object(vertica_system, \u0027shell_execute\u0027,"},{"line_number":2166,"context_line":"                          side_effect\u003dProcessExecutionError(\u0027Error\u0027)):"},{"line_number":2167,"context_line":"            self.assertRaises(RuntimeError, self.app.install_vertica,"},{"line_number":2168,"context_line":"                              \u002710.0.0.2\u0027)"},{"line_number":2169,"context_line":""},{"line_number":2170,"context_line":"    def test_create_db(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa53dc9_e1a65952","line":2167,"updated":"2015-04-08 18:19:46.000000000","message":"When testing for generic errors like RuntimeError, we should use assertRaisesWithRegexp to make sure we\u0027re getting the one we expect.","commit_id":"6f620dd2badfa81dfe5873c98d46e7469626f2e3"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"312a41e7c411ff3afeb08076c9b30f590dfde293","unresolved":false,"context_lines":[{"line_number":2166,"context_line":"                          side_effect\u003dProcessExecutionError(\u0027Error\u0027)):"},{"line_number":2167,"context_line":"            self.assertRaisesRegexp(RuntimeError, \u0027Could not install Vertica.\u0027,"},{"line_number":2168,"context_line":"                                    self.app.install_vertica, \u002710.0.0.2\u0027)"},{"line_number":2169,"context_line":""},{"line_number":2170,"context_line":"    def test_create_db(self):"},{"line_number":2171,"context_line":"        with patch.object(self.app, \u0027read_config\u0027,"},{"line_number":2172,"context_line":"                          return_value\u003dself.test_config):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aa745d1_af9cf469","line":2169,"updated":"2015-04-16 18:42:39.000000000","message":"Just a quick question - so how does this test work when we these messages are translated? Wouldnt it fail.","commit_id":"41056a05384ff0ee20bf1799525fadc78459dd23"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"f123189f6045538429c2e4cb45280907ca05c89e","unresolved":false,"context_lines":[{"line_number":2166,"context_line":"                          side_effect\u003dProcessExecutionError(\u0027Error\u0027)):"},{"line_number":2167,"context_line":"            self.assertRaisesRegexp(RuntimeError, \u0027Could not install Vertica.\u0027,"},{"line_number":2168,"context_line":"                                    self.app.install_vertica, \u002710.0.0.2\u0027)"},{"line_number":2169,"context_line":""},{"line_number":2170,"context_line":"    def test_create_db(self):"},{"line_number":2171,"context_line":"        with patch.object(self.app, \u0027read_config\u0027,"},{"line_number":2172,"context_line":"                          return_value\u003dself.test_config):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ab451fb_fabacc6d","line":2169,"in_reply_to":"3ab451fb_ce02c53e","updated":"2015-04-17 14:24:23.000000000","message":"I think they\u0027re fine, but if not we can deal with it when it becomes an issue.","commit_id":"41056a05384ff0ee20bf1799525fadc78459dd23"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"ad1d18f7de3bdb946eb657ce8f14bf04d3d41353","unresolved":false,"context_lines":[{"line_number":2166,"context_line":"                          side_effect\u003dProcessExecutionError(\u0027Error\u0027)):"},{"line_number":2167,"context_line":"            self.assertRaisesRegexp(RuntimeError, \u0027Could not install Vertica.\u0027,"},{"line_number":2168,"context_line":"                                    self.app.install_vertica, \u002710.0.0.2\u0027)"},{"line_number":2169,"context_line":""},{"line_number":2170,"context_line":"    def test_create_db(self):"},{"line_number":2171,"context_line":"        with patch.object(self.app, \u0027read_config\u0027,"},{"line_number":2172,"context_line":"                          return_value\u003dself.test_config):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aa745d1_ef4afb82","line":2169,"in_reply_to":"5aa745d1_0fc2c733","updated":"2015-04-16 19:25:12.000000000","message":"You are probably right. Messages are translated for the end users, so there shouldnt be a reason to run these tests in a translated language.","commit_id":"41056a05384ff0ee20bf1799525fadc78459dd23"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"93ae146c521883776d6d4ed5e9e7eb96e58bac92","unresolved":false,"context_lines":[{"line_number":2166,"context_line":"                          side_effect\u003dProcessExecutionError(\u0027Error\u0027)):"},{"line_number":2167,"context_line":"            self.assertRaisesRegexp(RuntimeError, \u0027Could not install Vertica.\u0027,"},{"line_number":2168,"context_line":"                                    self.app.install_vertica, \u002710.0.0.2\u0027)"},{"line_number":2169,"context_line":""},{"line_number":2170,"context_line":"    def test_create_db(self):"},{"line_number":2171,"context_line":"        with patch.object(self.app, \u0027read_config\u0027,"},{"line_number":2172,"context_line":"                          return_value\u003dself.test_config):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5aa745d1_0fc2c733","line":2169,"in_reply_to":"5aa745d1_af9cf469","updated":"2015-04-16 19:13:23.000000000","message":"Why would someone want to run tests in a translated language?  Do you have something specific in mind?","commit_id":"41056a05384ff0ee20bf1799525fadc78459dd23"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"e301b7c4f84d49186b036c03d114f6f39977d410","unresolved":false,"context_lines":[{"line_number":2166,"context_line":"                          side_effect\u003dProcessExecutionError(\u0027Error\u0027)):"},{"line_number":2167,"context_line":"            self.assertRaisesRegexp(RuntimeError, \u0027Could not install Vertica.\u0027,"},{"line_number":2168,"context_line":"                                    self.app.install_vertica, \u002710.0.0.2\u0027)"},{"line_number":2169,"context_line":""},{"line_number":2170,"context_line":"    def test_create_db(self):"},{"line_number":2171,"context_line":"        with patch.object(self.app, \u0027read_config\u0027,"},{"line_number":2172,"context_line":"                          return_value\u003dself.test_config):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ab451fb_ce02c53e","line":2169,"in_reply_to":"5aa745d1_ef4afb82","updated":"2015-04-17 07:41:40.000000000","message":"So I did not get the output of discussion, these tests are valid or not :)","commit_id":"41056a05384ff0ee20bf1799525fadc78459dd23"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"b8e0561ebd5f9a2cb31680d306dc4067aa190531","unresolved":false,"context_lines":[{"line_number":2490,"context_line":"    def test_fail_read_config(self):"},{"line_number":2491,"context_line":"        with patch.object(ConfigParser.ConfigParser, \u0027read\u0027,"},{"line_number":2492,"context_line":"                          side_effect\u003dConfigParser.Error()):"},{"line_number":2493,"context_line":"            self.assertRaises(RuntimeError, self.app.read_config)"},{"line_number":2494,"context_line":""},{"line_number":2495,"context_line":"    def test_complete_install_or_restart(self):"},{"line_number":2496,"context_line":"        app \u003d VerticaApp(MagicMock())"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ab451fb_7a359544","line":2493,"updated":"2015-04-17 16:50:42.000000000","message":"Is there a reason why we are using assertRaises instead of assertRaisesRegexp?","commit_id":"9d9a7a750b9aa46b423799ef48aa044a30b4a429"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"620b555463e8430799597370434038bf9665e404","unresolved":false,"context_lines":[{"line_number":2490,"context_line":"    def test_fail_read_config(self):"},{"line_number":2491,"context_line":"        with patch.object(ConfigParser.ConfigParser, \u0027read\u0027,"},{"line_number":2492,"context_line":"                          side_effect\u003dConfigParser.Error()):"},{"line_number":2493,"context_line":"            self.assertRaises(RuntimeError, self.app.read_config)"},{"line_number":2494,"context_line":""},{"line_number":2495,"context_line":"    def test_complete_install_or_restart(self):"},{"line_number":2496,"context_line":"        app \u003d VerticaApp(MagicMock())"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ab451fb_ba955de5","line":2493,"in_reply_to":"3ab451fb_7a359544","updated":"2015-04-17 16:55:20.000000000","message":"So, as per current code, read_config raises RuntimeError without any messages, which is why I thought to only use assertRaises instead of assertRaisesRegexp","commit_id":"9d9a7a750b9aa46b423799ef48aa044a30b4a429"},{"author":{"_account_id":13355,"name":"Edmond Kotowski","email":"ekotowski@gmail.com","username":"ekotowski"},"change_message_id":"8123a3828b6e0e8e7f2e6e49e5e559453d310637","unresolved":false,"context_lines":[{"line_number":2312,"context_line":"                                                         [\u0027\u0027, \u0027\u0027]])):"},{"line_number":2313,"context_line":"                    app.stop_db(do_not_start_on_reboot\u003dTrue)"},{"line_number":2314,"context_line":""},{"line_number":2315,"context_line":"                    self.assertEqual(vertica_system.shell_execute.call_count,"},{"line_number":2316,"context_line":"                                     3)"},{"line_number":2317,"context_line":"                    app._disable_db_on_boot.assert_any_call()"},{"line_number":2318,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3ab451fb_c703b1b7","line":2315,"updated":"2015-04-17 17:39:54.000000000","message":"Expected value should be the first value. Switch the order. Repeat this for the rest of the test.","commit_id":"780013bd515f3208ddc2a6c41a89da3b01ce9f8d"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"4a0d897b79ad800ca2b950bd7047402aa7f2e4cb","unresolved":false,"context_lines":[{"line_number":2312,"context_line":"                                                         [\u0027\u0027, \u0027\u0027]])):"},{"line_number":2313,"context_line":"                    app.stop_db(do_not_start_on_reboot\u003dTrue)"},{"line_number":2314,"context_line":""},{"line_number":2315,"context_line":"                    self.assertEqual(vertica_system.shell_execute.call_count,"},{"line_number":2316,"context_line":"                                     3)"},{"line_number":2317,"context_line":"                    app._disable_db_on_boot.assert_any_call()"},{"line_number":2318,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3ab451fb_804d8f74","line":2315,"in_reply_to":"3ab451fb_279ed556","updated":"2015-04-17 18:44:07.000000000","message":"Sushil should follow the convention of the rest of the file.  If we wish to fix the order, that should be a separate bug to fix all occurances.","commit_id":"780013bd515f3208ddc2a6c41a89da3b01ce9f8d"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"d56ce727c0c0df6db421a77581ddee0d9a7601c5","unresolved":false,"context_lines":[{"line_number":2312,"context_line":"                                                         [\u0027\u0027, \u0027\u0027]])):"},{"line_number":2313,"context_line":"                    app.stop_db(do_not_start_on_reboot\u003dTrue)"},{"line_number":2314,"context_line":""},{"line_number":2315,"context_line":"                    self.assertEqual(vertica_system.shell_execute.call_count,"},{"line_number":2316,"context_line":"                                     3)"},{"line_number":2317,"context_line":"                    app._disable_db_on_boot.assert_any_call()"},{"line_number":2318,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3ab451fb_80dd8f16","line":2315,"in_reply_to":"3ab451fb_804d8f74","updated":"2015-04-17 18:57:30.000000000","message":"so the reason, why I wrote like that, was inspite of earlier refactoring, there was a lot of code which was like this when it came to usage with call_count.","commit_id":"780013bd515f3208ddc2a6c41a89da3b01ce9f8d"},{"author":{"_account_id":13355,"name":"Edmond Kotowski","email":"ekotowski@gmail.com","username":"ekotowski"},"change_message_id":"5e39a8b1f2c7ea4ef97717350800b82abff7ecc7","unresolved":false,"context_lines":[{"line_number":2312,"context_line":"                                                         [\u0027\u0027, \u0027\u0027]])):"},{"line_number":2313,"context_line":"                    app.stop_db(do_not_start_on_reboot\u003dTrue)"},{"line_number":2314,"context_line":""},{"line_number":2315,"context_line":"                    self.assertEqual(vertica_system.shell_execute.call_count,"},{"line_number":2316,"context_line":"                                     3)"},{"line_number":2317,"context_line":"                    app._disable_db_on_boot.assert_any_call()"},{"line_number":2318,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3ab451fb_609a8316","line":2315,"in_reply_to":"3ab451fb_80dd8f16","updated":"2015-04-17 19:05:36.000000000","message":"Yeah I am fine with fixing it in a separate patch. Just wanted to make a note of it","commit_id":"780013bd515f3208ddc2a6c41a89da3b01ce9f8d"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"d3d83325471791fab5ee82b4ed9e451ef5a5d041","unresolved":false,"context_lines":[{"line_number":2312,"context_line":"                                                         [\u0027\u0027, \u0027\u0027]])):"},{"line_number":2313,"context_line":"                    app.stop_db(do_not_start_on_reboot\u003dTrue)"},{"line_number":2314,"context_line":""},{"line_number":2315,"context_line":"                    self.assertEqual(vertica_system.shell_execute.call_count,"},{"line_number":2316,"context_line":"                                     3)"},{"line_number":2317,"context_line":"                    app._disable_db_on_boot.assert_any_call()"},{"line_number":2318,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3ab451fb_279ed556","line":2315,"in_reply_to":"3ab451fb_c703b1b7","updated":"2015-04-17 17:45:00.000000000","message":"am I expected to do this for the entire test_dbaas.py or is it only for new tests that I have written","commit_id":"780013bd515f3208ddc2a6c41a89da3b01ce9f8d"},{"author":{"_account_id":13355,"name":"Edmond Kotowski","email":"ekotowski@gmail.com","username":"ekotowski"},"change_message_id":"8123a3828b6e0e8e7f2e6e49e5e559453d310637","unresolved":false,"context_lines":[{"line_number":2414,"context_line":"                    MagicMock(side_effect\u003d[ProcessExecutionError(\u0027Some Error\u0027),"},{"line_number":2415,"context_line":"                                           [\u0027some_key\u0027, None]])):"},{"line_number":2416,"context_line":"                key \u003d self.app.get_public_keys(user\u003duser)"},{"line_number":2417,"context_line":"                self.assertEqual(vertica_system.shell_execute.call_count, 2)"},{"line_number":2418,"context_line":"                self.assertEqual(\u0027some_key\u0027, key)"},{"line_number":2419,"context_line":""},{"line_number":2420,"context_line":"    def test_fail_get_public_keys(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ab451fb_4758c1fa","line":2417,"updated":"2015-04-17 17:39:54.000000000","message":"Same comment about switching the order of these parameters.","commit_id":"780013bd515f3208ddc2a6c41a89da3b01ce9f8d"}],"trove/tests/unittests/guestagent/test_vertica_manager.py":[{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"25d2ef04fec047eed0e7cab89c3f509e3336f899","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def test_rpc_ping(self):"},{"line_number":200,"context_line":"        output \u003d self.manager.rpc_ping(self.context)"},{"line_number":201,"context_line":"        self.assertEqual(output, True)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    @patch.object(VerticaAppStatus, \u0027set_status\u0027)"},{"line_number":204,"context_line":"    def test_prepare_invalid_cluster_config(self, mock_set_status):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ab451fb_a618ae85","line":201,"updated":"2015-04-17 15:35:25.000000000","message":"This should be using assertTrue()","commit_id":"9d9a7a750b9aa46b423799ef48aa044a30b4a429"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"fe5efb24d4b51e3c1334c83a09c9f3479a0420d1","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def test_rpc_ping(self):"},{"line_number":200,"context_line":"        output \u003d self.manager.rpc_ping(self.context)"},{"line_number":201,"context_line":"        self.assertEqual(output, True)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    @patch.object(VerticaAppStatus, \u0027set_status\u0027)"},{"line_number":204,"context_line":"    def test_prepare_invalid_cluster_config(self, mock_set_status):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ab451fb_949a7813","line":201,"in_reply_to":"3ab451fb_a618ae85","updated":"2015-04-17 16:10:18.000000000","message":"This is not a change under current patchset.","commit_id":"9d9a7a750b9aa46b423799ef48aa044a30b4a429"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"25d2ef04fec047eed0e7cab89c3f509e3336f899","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        with patch.object(VerticaApp, \u0027get_public_keys\u0027,"},{"line_number":247,"context_line":"                          return_value\u003d\u0027some_key\u0027):"},{"line_number":248,"context_line":"            test_key \u003d self.manager.get_public_keys(self.context, \u0027test_user\u0027)"},{"line_number":249,"context_line":"            self.assertEqual(test_key, \u0027some_key\u0027)"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def test_authorize_public_keys(self):"},{"line_number":252,"context_line":"        with patch.object(VerticaApp, \u0027authorize_public_keys\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ab451fb_8636d201","line":249,"updated":"2015-04-17 15:35:25.000000000","message":"This is a common mistake which has already been addressed in at least one refactoring patchset.\nThe order of arguments is assertEqual(\u0027expected\u0027, \u0027observed\u0027).\nIt does not break the testcase, but makes the error message confusing as it actually prints the \u0027expected\u0027 and \u0027actual\u0027 values.\nI think that the other occurrences in this testsuite may be fixed as well in this patch set.","commit_id":"9d9a7a750b9aa46b423799ef48aa044a30b4a429"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"c59a8b8da81032c5b2152c0117d30a5f5ec3f1bb","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        with patch.object(VerticaApp, \u0027get_public_keys\u0027,"},{"line_number":247,"context_line":"                          return_value\u003d\u0027some_key\u0027):"},{"line_number":248,"context_line":"            test_key \u003d self.manager.get_public_keys(self.context, \u0027test_user\u0027)"},{"line_number":249,"context_line":"            self.assertEqual(test_key, \u0027some_key\u0027)"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def test_authorize_public_keys(self):"},{"line_number":252,"context_line":"        with patch.object(VerticaApp, \u0027authorize_public_keys\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ab451fb_b588ce23","line":249,"in_reply_to":"3ab451fb_743b6cec","updated":"2015-04-17 17:09:55.000000000","message":"OK, my bad, Mock asserts print \u0027expected\u0027 and \u0027actual\u0027 strings. Still, I think we should keep it consistent and stick with the API of the used library which says that the first arg is expected and second observed.","commit_id":"9d9a7a750b9aa46b423799ef48aa044a30b4a429"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"fe5efb24d4b51e3c1334c83a09c9f3479a0420d1","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        with patch.object(VerticaApp, \u0027get_public_keys\u0027,"},{"line_number":247,"context_line":"                          return_value\u003d\u0027some_key\u0027):"},{"line_number":248,"context_line":"            test_key \u003d self.manager.get_public_keys(self.context, \u0027test_user\u0027)"},{"line_number":249,"context_line":"            self.assertEqual(test_key, \u0027some_key\u0027)"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def test_authorize_public_keys(self):"},{"line_number":252,"context_line":"        with patch.object(VerticaApp, \u0027authorize_public_keys\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ab451fb_743b6cec","line":249,"in_reply_to":"3ab451fb_8636d201","updated":"2015-04-17 16:10:18.000000000","message":"I did not get any such references, which is treating the result like this,\n\nFollowing references suggest that it only matches a with b and does not treats them as actual or expected, \n\nhttps://docs.python.org/2/library/unittest.html\n\nhttps://docs.python.org/3/library/unittest.html\n\n\nI also tried to fail the test with the wrong value and the message I got reads like this\n\nFAIL: guestagent.test_vertica_manager.GuestAgentManagerTest.test_get_public_keys\n\ntags: worker-4\n\n----------------------------------------------------------------------\n\nTraceback (most recent call last):\n\n  File \"/mnt/coding/improve-code-coverage/rebased/trove/trove/tests/unittests/guestagent/test_vertica_manager.py\", line 249, in test_get_public_keys\n\n    self.assertEqual(test_key, \u0027some_ke\u0027)\n\n  File \"/mnt/coding/improve-code-coverage/rebased/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py\", line 350, in assertEqual\n\n    self.assertThat(observed, matcher, message)\n\n  File \"/mnt/coding/improve-code-coverage/rebased/trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py\", line 435, in assertThat\n\n    raise mismatch_error\n\ntesttools.matchers._impl.MismatchError: \u0027some_key\u0027 !\u003d \u0027some_ke\u0027","commit_id":"9d9a7a750b9aa46b423799ef48aa044a30b4a429"}]}
