)]}'
{"doc/source/cli/nova-manage.rst":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fc5c78079a7d5f3428531cfb27225099bd6e57c7","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    Move deleted rows from production tables to shadow tables. Note that the"},{"line_number":66,"context_line":"    corresponding rows in the instance_mappings and request_specs tables of the"},{"line_number":67,"context_line":"    API database are purged when instance records are archived if the"},{"line_number":68,"context_line":"    CONF.api_database.connection is set in the config file. Specifying"},{"line_number":69,"context_line":"    --verbose will print the results of the archive operation for any tables that"},{"line_number":70,"context_line":"    were changed. Specifying --until-complete will make the command run"},{"line_number":71,"context_line":"    continuously until all deleted rows are archived. Use the --max_rows option,"}],"source_content_type":"text/x-rst","patch_set":3,"id":"df7087c5_79d82c1d","line":68,"range":{"start_line":67,"start_character":63,"end_line":68,"end_character":58},"updated":"2018-03-13 17:00:19.000000000","message":"This seems misleading now. Probably should just leave it the way it was, or say that \"...and thus, api_db config is required.\"","commit_id":"fdc18644f394b9c4cc7eda9119d2dc8a85847b5d"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"9e585352d708cde39661ce1ec3d8cc97ff78f5fe","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    Move deleted rows from production tables to shadow tables. Note that the"},{"line_number":66,"context_line":"    corresponding rows in the instance_mappings and request_specs tables of the"},{"line_number":67,"context_line":"    API database are purged when instance records are archived if the"},{"line_number":68,"context_line":"    CONF.api_database.connection is set in the config file. Specifying"},{"line_number":69,"context_line":"    --verbose will print the results of the archive operation for any tables that"},{"line_number":70,"context_line":"    were changed. Specifying --until-complete will make the command run"},{"line_number":71,"context_line":"    continuously until all deleted rows are archived. Use the --max_rows option,"}],"source_content_type":"text/x-rst","patch_set":3,"id":"df7087c5_749cb369","line":68,"range":{"start_line":67,"start_character":63,"end_line":68,"end_character":58},"in_reply_to":"df7087c5_79d82c1d","updated":"2018-03-13 17:35:12.000000000","message":"Done","commit_id":"fdc18644f394b9c4cc7eda9119d2dc8a85847b5d"}],"nova/cmd/manage.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ab3b0e892246dc9c90ae09f505c036aa5145d51c","unresolved":false,"context_lines":[{"line_number":530,"context_line":"                    table_to_rows_archived[\u0027instance_mappings\u0027] +\u003d deleted_ims"},{"line_number":531,"context_line":"                    deleted_specs \u003d objects.RequestSpec.destroy_bulk("},{"line_number":532,"context_line":"                                            ctxt, deleted_instance_uuids)"},{"line_number":533,"context_line":"                    table_to_rows_archived[\u0027request_specs\u0027] +\u003d deleted_specs"},{"line_number":534,"context_line":"                except db_exc.CantStartEngineError:"},{"line_number":535,"context_line":"                    print(_(\u0027Failed to connect to API DB due to which the \u0027"},{"line_number":536,"context_line":"                            \u0027instance_mappings and request_specs of the \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_d26658ee","line":533,"updated":"2018-03-08 18:15:10.000000000","message":"Only the two object calls need to be inside the try..except block. You can do the other stuff before/after it to reduce the scope, which is always better, IMHO.","commit_id":"41139bcba8145d629e6815fb220fa754688fb924"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"e1167d7ba060c92c13093f24fd079e5dadd1d9bc","unresolved":false,"context_lines":[{"line_number":530,"context_line":"                    table_to_rows_archived[\u0027instance_mappings\u0027] +\u003d deleted_ims"},{"line_number":531,"context_line":"                    deleted_specs \u003d objects.RequestSpec.destroy_bulk("},{"line_number":532,"context_line":"                                            ctxt, deleted_instance_uuids)"},{"line_number":533,"context_line":"                    table_to_rows_archived[\u0027request_specs\u0027] +\u003d deleted_specs"},{"line_number":534,"context_line":"                except db_exc.CantStartEngineError:"},{"line_number":535,"context_line":"                    print(_(\u0027Failed to connect to API DB due to which the \u0027"},{"line_number":536,"context_line":"                            \u0027instance_mappings and request_specs of the \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_7202ecb6","line":533,"in_reply_to":"df7087c5_d26658ee","updated":"2018-03-08 18:48:26.000000000","message":"Yep, will get this fixed in the next patch set.","commit_id":"41139bcba8145d629e6815fb220fa754688fb924"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"241a4eded9eec6da1e4fbf213ca5cdc14fc9907f","unresolved":false,"context_lines":[{"line_number":532,"context_line":"                                            ctxt, deleted_instance_uuids)"},{"line_number":533,"context_line":"                    table_to_rows_archived[\u0027request_specs\u0027] +\u003d deleted_specs"},{"line_number":534,"context_line":"                except db_exc.CantStartEngineError:"},{"line_number":535,"context_line":"                    print(_(\u0027Failed to connect to API DB due to which the \u0027"},{"line_number":536,"context_line":"                            \u0027instance_mappings and request_specs of the \u0027"},{"line_number":537,"context_line":"                            \u0027deleted instances were not purged. Please check \u0027"},{"line_number":538,"context_line":"                            \u0027your config file to make sure that \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_52d7a84c","line":535,"range":{"start_line":535,"start_character":57,"end_line":535,"end_character":69},"updated":"2018-03-08 18:16:15.000000000","message":"This is a bit hard to follow. Maybe just change this to \u0027so\u0027.","commit_id":"41139bcba8145d629e6815fb220fa754688fb924"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"e1167d7ba060c92c13093f24fd079e5dadd1d9bc","unresolved":false,"context_lines":[{"line_number":532,"context_line":"                                            ctxt, deleted_instance_uuids)"},{"line_number":533,"context_line":"                    table_to_rows_archived[\u0027request_specs\u0027] +\u003d deleted_specs"},{"line_number":534,"context_line":"                except db_exc.CantStartEngineError:"},{"line_number":535,"context_line":"                    print(_(\u0027Failed to connect to API DB due to which the \u0027"},{"line_number":536,"context_line":"                            \u0027instance_mappings and request_specs of the \u0027"},{"line_number":537,"context_line":"                            \u0027deleted instances were not purged. Please check \u0027"},{"line_number":538,"context_line":"                            \u0027your config file to make sure that \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_92ff80a9","line":535,"range":{"start_line":535,"start_character":57,"end_line":535,"end_character":69},"in_reply_to":"df7087c5_52d7a84c","updated":"2018-03-08 18:48:26.000000000","message":"will do.","commit_id":"41139bcba8145d629e6815fb220fa754688fb924"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ab3b0e892246dc9c90ae09f505c036aa5145d51c","unresolved":false,"context_lines":[{"line_number":537,"context_line":"                            \u0027deleted instances were not purged. Please check \u0027"},{"line_number":538,"context_line":"                            \u0027your config file to make sure that \u0027"},{"line_number":539,"context_line":"                            \u0027CONF.api_database.connection is set.\u0027))"},{"line_number":540,"context_line":"                    pass"},{"line_number":541,"context_line":"            if not until_complete:"},{"line_number":542,"context_line":"                break"},{"line_number":543,"context_line":"            elif not run:"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_52eec822","line":540,"range":{"start_line":540,"start_character":20,"end_line":540,"end_character":24},"updated":"2018-03-08 18:15:10.000000000","message":"I was thinking about this after we noted this potential bug, but this made it even more obvious:\n\nIf we hit this case, we may have archived several hundred instances, and then failed to delete the mappings. Since we don\u0027t know the uuids, they may be lost in the sea of stuff already in the shadow tables. If the user passed --until-complete --purge and --all-cells (which are patches pending gate), then we may have archived a tooon of data, and lost all record of what those things were such that we have a bunch of cruft in those mappings that is expensive to resolve.\n\nI wonder if we should do something before we start any of this to make sure we can connect to the API database and fail if so? Also, I think we probably don\u0027t want to pass here, so at least we stop the bleeding before we go do a bunch more work.\n\nWhat do you think?\n\n(we\u0027ll also print this message N times for N rounds/cells as we flush all their data down the drain :P )","commit_id":"41139bcba8145d629e6815fb220fa754688fb924"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"e1167d7ba060c92c13093f24fd079e5dadd1d9bc","unresolved":false,"context_lines":[{"line_number":537,"context_line":"                            \u0027deleted instances were not purged. Please check \u0027"},{"line_number":538,"context_line":"                            \u0027your config file to make sure that \u0027"},{"line_number":539,"context_line":"                            \u0027CONF.api_database.connection is set.\u0027))"},{"line_number":540,"context_line":"                    pass"},{"line_number":541,"context_line":"            if not until_complete:"},{"line_number":542,"context_line":"                break"},{"line_number":543,"context_line":"            elif not run:"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_dd0f492c","line":540,"range":{"start_line":540,"start_character":20,"end_line":540,"end_character":24},"in_reply_to":"df7087c5_12bdb064","updated":"2018-03-08 18:48:26.000000000","message":"The reason why I did the \"pass\" was because Matt stated in the bug that we should be able to continue with the archival command which also makes sense since we would have already archived all the tables in the individual cell DBs but will not output the dictionary with the results (verbose case) since this exception would be raised.\n\nI would also prefer handling this by putting this check at the beginning of the command somehow by checking if I can connect to the api engine (or is it better I just check if CONF.api_database.connection is set or not - wondering how the test case would be for a config option set/unset checking)?","commit_id":"41139bcba8145d629e6815fb220fa754688fb924"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4091b7b80d31e313cf788b6b5e9b70681b8d91e6","unresolved":false,"context_lines":[{"line_number":537,"context_line":"                            \u0027deleted instances were not purged. Please check \u0027"},{"line_number":538,"context_line":"                            \u0027your config file to make sure that \u0027"},{"line_number":539,"context_line":"                            \u0027CONF.api_database.connection is set.\u0027))"},{"line_number":540,"context_line":"                    pass"},{"line_number":541,"context_line":"            if not until_complete:"},{"line_number":542,"context_line":"                break"},{"line_number":543,"context_line":"            elif not run:"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_d2c2d885","line":540,"range":{"start_line":540,"start_character":20,"end_line":540,"end_character":24},"in_reply_to":"df7087c5_52eec822","updated":"2018-03-08 18:18:55.000000000","message":"Trying to connect to the API DB before we proceed with archive makes sense, or at least check to make sure that CONF.api.database is not None. We could get progressively more strict based on whether or not the soon-to-be-merged purge option is used, i.e. if we\u0027re going to archive and then purge, we should be sure before we do so that we fail. Maybe that\u0027s to the point about the \u0027pass\u0027 in here - if we\u0027re told to purge and we fail, don\u0027t pass (don\u0027t purge).","commit_id":"41139bcba8145d629e6815fb220fa754688fb924"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e18d89677cdbbbc7d174e3a5e6c58a48891b6f66","unresolved":false,"context_lines":[{"line_number":537,"context_line":"                            \u0027deleted instances were not purged. Please check \u0027"},{"line_number":538,"context_line":"                            \u0027your config file to make sure that \u0027"},{"line_number":539,"context_line":"                            \u0027CONF.api_database.connection is set.\u0027))"},{"line_number":540,"context_line":"                    pass"},{"line_number":541,"context_line":"            if not until_complete:"},{"line_number":542,"context_line":"                break"},{"line_number":543,"context_line":"            elif not run:"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_18138fb7","line":540,"range":{"start_line":540,"start_character":20,"end_line":540,"end_character":24},"in_reply_to":"df7087c5_b8406337","updated":"2018-03-08 20:36:42.000000000","message":"Yeah, we would normally not backport something like his patch (being a feature) but it\u0027s also \"just nova-manage\" so I can see making an argument for it.\n\nMaybe the best thing then is to just add the lookup to your patch, similar to what he has and then we\u0027ll rebase his on top of yours. Even though his has been around for a while, he\u0027s got more work to do on it, and prioritizing a bug fix ahead of it so the backport is clean(er) is totally legit.","commit_id":"41139bcba8145d629e6815fb220fa754688fb924"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"422459a9303559c29b2d72084b1edd130086d96a","unresolved":false,"context_lines":[{"line_number":537,"context_line":"                            \u0027deleted instances were not purged. Please check \u0027"},{"line_number":538,"context_line":"                            \u0027your config file to make sure that \u0027"},{"line_number":539,"context_line":"                            \u0027CONF.api_database.connection is set.\u0027))"},{"line_number":540,"context_line":"                    pass"},{"line_number":541,"context_line":"            if not until_complete:"},{"line_number":542,"context_line":"                break"},{"line_number":543,"context_line":"            elif not run:"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_12bdb064","line":540,"range":{"start_line":540,"start_character":20,"end_line":540,"end_character":24},"in_reply_to":"df7087c5_d2c2d885","updated":"2018-03-08 18:40:08.000000000","message":"Well, even if we don\u0027t purge, we\u0027ve archived instances at this point, but we don\u0027t report those uuids to the user. If they don\u0027t have a ton of junk in shadow_instances, they could manually construct a list of things to try to purge from mappings themselves. We shouldn\u0027t continue to process more cells (after that patch is merged) or purge either in that case.\n\nJust checking that we can hit the API DB first would be minimal safety net I think.","commit_id":"41139bcba8145d629e6815fb220fa754688fb924"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8ca63e0e67339e34b6324a102d297b969998c4c3","unresolved":false,"context_lines":[{"line_number":537,"context_line":"                            \u0027deleted instances were not purged. Please check \u0027"},{"line_number":538,"context_line":"                            \u0027your config file to make sure that \u0027"},{"line_number":539,"context_line":"                            \u0027CONF.api_database.connection is set.\u0027))"},{"line_number":540,"context_line":"                    pass"},{"line_number":541,"context_line":"            if not until_complete:"},{"line_number":542,"context_line":"                break"},{"line_number":543,"context_line":"            elif not run:"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_fda48d0a","line":540,"range":{"start_line":540,"start_character":20,"end_line":540,"end_character":24},"in_reply_to":"df7087c5_dd0f492c","updated":"2018-03-08 18:55:46.000000000","message":"Checking that you can actually connect to the DB would be better. If you rebase on top of Kevin\u0027s patch then you\u0027ll get that for free in the case of --all-cells because it looks up the cell list. So you could just move that cell listing statement to always run, even if not --all-cells and report the issue properly.\n\nJust checking if the conf option is set isn\u0027t as good I think, because if it\u0027s set incorrectly, or being run behind a firewall, we won\u0027t know until it\u0027s too late here.","commit_id":"41139bcba8145d629e6815fb220fa754688fb924"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"e5fc273be55dad78d6784724d18b14568ce75ae5","unresolved":false,"context_lines":[{"line_number":537,"context_line":"                            \u0027deleted instances were not purged. Please check \u0027"},{"line_number":538,"context_line":"                            \u0027your config file to make sure that \u0027"},{"line_number":539,"context_line":"                            \u0027CONF.api_database.connection is set.\u0027))"},{"line_number":540,"context_line":"                    pass"},{"line_number":541,"context_line":"            if not until_complete:"},{"line_number":542,"context_line":"                break"},{"line_number":543,"context_line":"            elif not run:"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_b8406337","line":540,"range":{"start_line":540,"start_character":20,"end_line":540,"end_character":24},"in_reply_to":"df7087c5_fda48d0a","updated":"2018-03-08 20:02:00.000000000","message":"I saw Kevin\u0027s patch and yes seems valid enough to do rebase and move the query for all cells to the top and have this check, however is his Wishlist going to back ported to Queens as well ? I would have to fix this in Queens release too and I am not sure of the rules we have for back porting.","commit_id":"41139bcba8145d629e6815fb220fa754688fb924"}],"nova/tests/unit/test_nova_manage.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d0f3a6750b63829f39ae98d9367ab7110f430adc","unresolved":false,"context_lines":[{"line_number":552,"context_line":"            self.assertEqual(0, len(output))"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"    @mock.patch.object(objects.CellMappingList, \u0027get_all\u0027,"},{"line_number":555,"context_line":"                       side_effect\u003ddb_exc.CantStartEngineError)"},{"line_number":556,"context_line":"    def test_archive_deleted_rows_without_api_connection_configured(self,"},{"line_number":557,"context_line":"                                                           mock_get_all):"},{"line_number":558,"context_line":"        result \u003d self.commands.archive_deleted_rows(20, verbose\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_302a82da","line":555,"range":{"start_line":555,"start_character":42,"end_line":555,"end_character":62},"updated":"2018-03-15 19:48:55.000000000","message":"I would have preferred a test that doesn\u0027t mock out oslo.db and just lets it fail how it needs to fail, since it\u0027s pretty simple when you don\u0027t have the config set. I was able to recreate and test this in a virtual environment for this patch:\n\n(venv) osboxes@osboxes:~/git/nova$ nova-manage db archive_deleted_rows\n/home/osboxes/git/nova/.tox/venv/local/lib/python2.7/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use \"pip install psycopg2-binary\" instead. For details see: \u003chttp://initd.org/psycopg/docs/install.html#binary-install-from-pypi\u003e.\n  \"\"\")\n/home/osboxes/git/nova/.tox/venv/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:332: NotSupportedWarning: Configuration option(s) [\u0027use_tpool\u0027] not supported\n  exception.NotSupportedWarning\nFailed to connect to API DB so aborting this archival attempt. Please check your config file to make sure that CONF.api_database.connection is set and run this command again.\n(venv) osboxes@osboxes:~/git/nova$ echo $?\n3\n(venv) osboxes@osboxes:~/git/nova$","commit_id":"8da6831e6375d013f0235a542b6b91580a43f61f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"efc113504e5b049917ea9595a367646d41da4f69","unresolved":false,"context_lines":[{"line_number":552,"context_line":"            self.assertEqual(0, len(output))"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"    @mock.patch.object(objects.CellMappingList, \u0027get_all\u0027,"},{"line_number":555,"context_line":"                       side_effect\u003ddb_exc.CantStartEngineError)"},{"line_number":556,"context_line":"    def test_archive_deleted_rows_without_api_connection_configured(self,"},{"line_number":557,"context_line":"                                                           mock_get_all):"},{"line_number":558,"context_line":"        result \u003d self.commands.archive_deleted_rows(20, verbose\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_7039daef","line":555,"range":{"start_line":555,"start_character":42,"end_line":555,"end_character":62},"in_reply_to":"df7087c5_302a82da","updated":"2018-03-15 20:03:38.000000000","message":"oh okay,, well the confusion for me when writing the test was \"how to fake the config not being set?\" Could you please explain what you mean by \"just let it fail\" ? Sorry if I am asking a dumb question, but maybe when I back port this to queens (since I do need to remove the conflicts,) I could try to write a proper test.. without mocking the oslo.db,","commit_id":"8da6831e6375d013f0235a542b6b91580a43f61f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"4411db56af398e076de4821bfaa7ecc1c41579d4","unresolved":false,"context_lines":[{"line_number":552,"context_line":"            self.assertEqual(0, len(output))"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"    @mock.patch.object(objects.CellMappingList, \u0027get_all\u0027,"},{"line_number":555,"context_line":"                       side_effect\u003ddb_exc.CantStartEngineError)"},{"line_number":556,"context_line":"    def test_archive_deleted_rows_without_api_connection_configured(self,"},{"line_number":557,"context_line":"                                                           mock_get_all):"},{"line_number":558,"context_line":"        result \u003d self.commands.archive_deleted_rows(20, verbose\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_5353806b","line":555,"range":{"start_line":555,"start_character":42,"end_line":555,"end_character":62},"in_reply_to":"df7087c5_33fccc6e","updated":"2018-03-15 20:33:32.000000000","message":"\u003e This is a NoDBTestCase so I don\u0027t think you can test that here, but\n \u003e you could in a functional test that has an actual database\n \u003e connection - not sure, you\u0027d need to try it.\n\nOkay.\n\n \u003e As for the config, you don\u0027t really need to fake it, you can just\n \u003e set:\n \u003e \n \u003e self.flags(connection\u003dNone, group\u003d\u0027api_database\u0027)\n\nOh cool!\n\n \u003e \n \u003e But it might depend on how the test setUp() works because the base\n \u003e test class does do some database stuff automatically depending on\n \u003e how the test is configured.\n\nYea, here Its configured automatically.\n\n \u003e \n \u003e \u003e when I back port this to queens (since I do need to remove the\n \u003e conflicts,) I could try to write a proper test.\n \u003e \n \u003e You can\u0027t change the patch in a backport. If you were going to\n \u003e re-write the test, it would have to be in a separate change on top\n \u003e of this one.\n\nAh okay, then I will leave this as it is for now and do the back port :D .","commit_id":"8da6831e6375d013f0235a542b6b91580a43f61f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7cead3e967f8a92f67885465bd05d0729f021e07","unresolved":false,"context_lines":[{"line_number":552,"context_line":"            self.assertEqual(0, len(output))"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"    @mock.patch.object(objects.CellMappingList, \u0027get_all\u0027,"},{"line_number":555,"context_line":"                       side_effect\u003ddb_exc.CantStartEngineError)"},{"line_number":556,"context_line":"    def test_archive_deleted_rows_without_api_connection_configured(self,"},{"line_number":557,"context_line":"                                                           mock_get_all):"},{"line_number":558,"context_line":"        result \u003d self.commands.archive_deleted_rows(20, verbose\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_33fccc6e","line":555,"range":{"start_line":555,"start_character":42,"end_line":555,"end_character":62},"in_reply_to":"df7087c5_7039daef","updated":"2018-03-15 20:27:35.000000000","message":"\u003e well the confusion for me when writing the test was \"how to fake the config not being set?\" Could you please explain what you mean by \"just let it fail\" ?\n\nThis is a NoDBTestCase so I don\u0027t think you can test that here, but you could in a functional test that has an actual database connection - not sure, you\u0027d need to try it.\n\nAs for the config, you don\u0027t really need to fake it, you can just set:\n\n  self.flags(connection\u003dNone, group\u003d\u0027api_database\u0027)\n\nBut it might depend on how the test setUp() works because the base test class does do some database stuff automatically depending on how the test is configured.\n\n\u003e when I back port this to queens (since I do need to remove the conflicts,) I could try to write a proper test.\n\nYou can\u0027t change the patch in a backport. If you were going to re-write the test, it would have to be in a separate change on top of this one.","commit_id":"8da6831e6375d013f0235a542b6b91580a43f61f"}]}
