)]}'
{"nova/tests/functional/regressions/test_bug_1783613.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"3fd102d08fa8cfa42f0817b4a20ff52cda0ff4cb","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class TestDeleteWhileBootingInstanceNotFound("},{"line_number":25,"context_line":"        test.TestCase, integrated_helpers.InstanceHelperMixin):"},{"line_number":26,"context_line":"    \"\"\"This tests a regression in the Ocata release."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    In Ocata we started building instances in conductor for cells v2. If create"},{"line_number":29,"context_line":"    and delete requests are racing, we can have a situation where we never"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_41028cb6","line":26,"updated":"2018-08-06 18:36:33.000000000","message":"This was the regression -- TODO(self): add this to the commit message(s) if this patch gets any support:\n\nhttps://github.com/openstack/nova/commit/361b88383130be8da9d474d02a9f62136239d506","commit_id":"efb3a7d77a88c361f7b804762a157af6d59aab26"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"82546768b6b4ee2a2d318a9cae80283d56d15060","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        # the image fake backend needed for image discovery"},{"line_number":64,"context_line":"        nova.tests.unit.image.fake.stub_out_image_service(self)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        self.image_id \u003d self.api.get_images()[0][\u0027id\u0027]"},{"line_number":67,"context_line":"        self.flavor_id \u003d self.api.get_flavors()[0][\u0027id\u0027]"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_4c2e43a6","line":65,"updated":"2018-08-06 20:22:31.000000000","message":"Since you talk about the conductor involvement above, it might be worth noting here that conductor _needs_ to be absent to ensure you control the ordering enough for this to pass.","commit_id":"aa9ac1e403265591a609f1c65b33e945db0f5694"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"7dbd1392348cf0096a46e4df8e81f58a8bb34fb5","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        # the image fake backend needed for image discovery"},{"line_number":64,"context_line":"        nova.tests.unit.image.fake.stub_out_image_service(self)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        self.image_id \u003d self.api.get_images()[0][\u0027id\u0027]"},{"line_number":67,"context_line":"        self.flavor_id \u003d self.api.get_flavors()[0][\u0027id\u0027]"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_277be08c","line":65,"in_reply_to":"3f79a3b5_4c2e43a6","updated":"2018-08-06 20:27:23.000000000","message":"That\u0027s a good point. I will add a code comment here explaining why we intentionally omit the conductor service.","commit_id":"aa9ac1e403265591a609f1c65b33e945db0f5694"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"82546768b6b4ee2a2d318a9cae80283d56d15060","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        # conductor hadn\u0027t yet created it yet or deleted it after the build"},{"line_number":107,"context_line":"        # request was deleted by the API."},{"line_number":108,"context_line":"        self.stub_out(\u0027nova.compute.api.API._lookup_instance\u0027,"},{"line_number":109,"context_line":"                      lambda *a, **k: (None, None))"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        # Now delete the server and wait for it to be gone."},{"line_number":112,"context_line":"        self._delete_server(server[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_a70ff02c","line":109,"updated":"2018-08-06 20:22:31.000000000","message":"I know I\u0027m in the minority, but.. I really think this test is a unit test, both because it\u0027s mocking out internals of the api class, but also now because it really doesn\u0027t need to go through the actual api fixtures.\n\nI know this is how/where we write regression tests, but, I just had to say it :)","commit_id":"aa9ac1e403265591a609f1c65b33e945db0f5694"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5187def35c5fb1441b385338bc1e6239a9b4c3e8","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    decrement the quota."},{"line_number":52,"context_line":"    \"\"\""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def setUp(self):"},{"line_number":55,"context_line":"        super(TestDeleteWhileBootingInstanceNotFound, self).setUp()"},{"line_number":56,"context_line":"        self.useFixture(policy_fixture.RealPolicyFixture())"},{"line_number":57,"context_line":"        # This is needed for the network_api.validate_networks check in the API"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_ae1796a3","line":54,"updated":"2018-08-08 22:08:07.000000000","message":"Kind of surprised you\u0027re not using the AllServicesCurrent fixture because of this:\n\nhttps://github.com/openstack/nova/blob/stable/ocata/nova/compute/api.py#L1729","commit_id":"3120f40f636ab4cbdcb9f5cd4e9175e99e1e1c63"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4463861a2b1ee39633286b8ad62ddcc87d58f6ae","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    decrement the quota."},{"line_number":52,"context_line":"    \"\"\""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def setUp(self):"},{"line_number":55,"context_line":"        super(TestDeleteWhileBootingInstanceNotFound, self).setUp()"},{"line_number":56,"context_line":"        self.useFixture(policy_fixture.RealPolicyFixture())"},{"line_number":57,"context_line":"        # This is needed for the network_api.validate_networks check in the API"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_8ef09a69","line":54,"in_reply_to":"3f79a3b5_ae1796a3","updated":"2018-08-08 22:15:09.000000000","message":"AllServicesCurrent fixture is probably no longer necessary for API services since Ia91fd7d7605dfb1a6f4376b1680cd26ea410d0f3 - so that answers that.","commit_id":"3120f40f636ab4cbdcb9f5cd4e9175e99e1e1c63"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4ea708114a72e975fe3b1bc648cc8a344900649b","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            api_version\u003d\u0027v2.1\u0027))"},{"line_number":61,"context_line":"        self.api \u003d api_fixture.api"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        # the image fake backend needed for image discovery"},{"line_number":64,"context_line":"        nova.tests.unit.image.fake.stub_out_image_service(self)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        # NOTE(melwitt): We intentionally do not start a conductor service in"},{"line_number":67,"context_line":"        # this test because we want to force the ordering such that the API"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_4e0fe2e0","line":64,"range":{"start_line":63,"start_character":8,"end_line":64,"end_character":63},"updated":"2018-08-08 21:53:33.000000000","message":"Generally need to reset this on tearDown:\n\nself.addCleanup(nova.tests.unit.image.fake.FakeImageService_reset)","commit_id":"3120f40f636ab4cbdcb9f5cd4e9175e99e1e1c63"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"982907e45162ad96ce8747a6ef2decd7b4de92e0","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        # this test because we want to force the ordering such that the API"},{"line_number":68,"context_line":"        # deletes the build request during a concurrent DELETE from the user"},{"line_number":69,"context_line":"        # while the instance is being created, before the conductor has a"},{"line_number":70,"context_line":"        # chance to delete the build request as part of the create flow."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.image_id \u003d self.api.get_images()[0][\u0027id\u0027]"},{"line_number":73,"context_line":"        self.flavor_id \u003d self.api.get_flavors()[0][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_59c11154","line":70,"updated":"2018-08-07 14:28:32.000000000","message":"Thanks, I think this is an important detail to understand (and also why I think this is really a unit test :)","commit_id":"3120f40f636ab4cbdcb9f5cd4e9175e99e1e1c63"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4ea708114a72e975fe3b1bc648cc8a344900649b","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        # this test because we want to force the ordering such that the API"},{"line_number":68,"context_line":"        # deletes the build request during a concurrent DELETE from the user"},{"line_number":69,"context_line":"        # while the instance is being created, before the conductor has a"},{"line_number":70,"context_line":"        # chance to delete the build request as part of the create flow."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.image_id \u003d self.api.get_images()[0][\u0027id\u0027]"},{"line_number":73,"context_line":"        self.flavor_id \u003d self.api.get_flavors()[0][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_ce1bf218","line":70,"in_reply_to":"3f79a3b5_59c11154","updated":"2018-08-08 21:53:33.000000000","message":"Why not use:\n\nself.useFixture(nova_fixtures.NoopConductorFixture())\n\nThen anything you do in the API on the instance is really on the build request, because conductor will be running but not actually process the schedule_and_build_instances request.\n\nProbably the same result either way, but follows the pattern of using that fixture in tests like this. You\u0027d still want the note if using that fixture, just update it.","commit_id":"3120f40f636ab4cbdcb9f5cd4e9175e99e1e1c63"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4ea708114a72e975fe3b1bc648cc8a344900649b","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    def _delete_server(self, server_id):"},{"line_number":93,"context_line":"        try:"},{"line_number":94,"context_line":"            self.api.delete_server(server_id)"},{"line_number":95,"context_line":"        except client.OpenStackApiNotFoundException:"},{"line_number":96,"context_line":"            pass"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test_delete_while_booting_instance_lookup_fails(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_2ecb8672","line":95,"updated":"2018-08-08 21:53:33.000000000","message":"Shouldn\u0027t need this.","commit_id":"3120f40f636ab4cbdcb9f5cd4e9175e99e1e1c63"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4ea708114a72e975fe3b1bc648cc8a344900649b","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        self.assertEqual(starting_usage[\u0027absolute\u0027][\u0027totalInstancesUsed\u0027] + 1,"},{"line_number":109,"context_line":"                         current_usage[\u0027absolute\u0027][\u0027totalInstancesUsed\u0027])"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        # Stub out the API to make the instance lookup fail, simulating if"},{"line_number":112,"context_line":"        # conductor hadn\u0027t yet created it yet or deleted it after the build"},{"line_number":113,"context_line":"        # request was deleted by the API."},{"line_number":114,"context_line":"        self.stub_out(\u0027nova.compute.api.API._lookup_instance\u0027,"},{"line_number":115,"context_line":"                      lambda *a, **k: (None, None))"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        # Now delete the server and wait for it to be gone."},{"line_number":118,"context_line":"        self._delete_server(server[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_0ed00a1f","line":115,"range":{"start_line":111,"start_character":8,"end_line":115,"end_character":51},"updated":"2018-08-08 21:53:33.000000000","message":"We shouldn\u0027t need this if you use the NoopConductorFixture right?","commit_id":"3120f40f636ab4cbdcb9f5cd4e9175e99e1e1c63"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4ea708114a72e975fe3b1bc648cc8a344900649b","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        # InstanceNotFound from instance.destroy() and quotas.rollback() won\u0027t"},{"line_number":148,"context_line":"        # be the right choice. It\u0027s only the right choice if we\u0027re racing with"},{"line_number":149,"context_line":"        # another delete request, not if we\u0027re racing with a create request."},{"line_number":150,"context_line":"        def fake_destroy(*args, **kwargs):"},{"line_number":151,"context_line":"            raise exception.InstanceNotFound(instance_id\u003dserver[\u0027id\u0027])"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        self.stub_out(\u0027nova.objects.Instance.destroy\u0027, fake_destroy)"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_4eab6288","line":151,"range":{"start_line":150,"start_character":8,"end_line":151,"end_character":70},"updated":"2018-08-08 21:53:33.000000000","message":"I guess NoopConductorFixture might hurt you in this case, but you could selectively apply the NoopConductorFixture to the test above. And really, this is a unit test and could just be done in test_compute_api, right?","commit_id":"3120f40f636ab4cbdcb9f5cd4e9175e99e1e1c63"}]}
