)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1404fb0982cb3c0cbc77ab067f86727b24c5e0d4","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix incomplete instance data returned after build failure"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change fixes a race in _cleanup_build_artifacts. We were creating"},{"line_number":10,"context_line":"the instance mapping before the instance record was complete. Creating"},{"line_number":11,"context_line":"the instance mapping exposes the cell\u0027s version of the instance to the"},{"line_number":12,"context_line":"API. If the API happened to fetch it before it was finished being"},{"line_number":13,"context_line":"created it would return incomplete data."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5fc1f717_21215ba0","line":10,"range":{"start_line":10,"start_character":32,"end_line":10,"end_character":60},"updated":"2019-03-22 14:18:22.000000000","message":"You mean BDMs and tags?","commit_id":"94524124a62817ffbeafddf8f18d9d66eb5f1198"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"b9c216eca28a9661c61986d1109400063cdd1992","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix incomplete instance data returned after build failure"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change fixes a race in _cleanup_build_artifacts. We were creating"},{"line_number":10,"context_line":"the instance mapping before the instance record was complete. Creating"},{"line_number":11,"context_line":"the instance mapping exposes the cell\u0027s version of the instance to the"},{"line_number":12,"context_line":"API. If the API happened to fetch it before it was finished being"},{"line_number":13,"context_line":"created it would return incomplete data."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5fc1f717_21a4fb07","line":10,"range":{"start_line":10,"start_character":32,"end_line":10,"end_character":60},"in_reply_to":"5fc1f717_21215ba0","updated":"2019-03-22 14:24:29.000000000","message":"Yes.","commit_id":"94524124a62817ffbeafddf8f18d9d66eb5f1198"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"201a533efb8bf791c58f432afb2f1788dc947b4a","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix incomplete instance data returned after build failure"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change fixes a race in _cleanup_build_artifacts. We were creating"},{"line_number":10,"context_line":"the instance mapping before the instance record was complete. Creating"},{"line_number":11,"context_line":"the instance mapping exposes the cell\u0027s version of the instance to the"},{"line_number":12,"context_line":"API. If the API happened to fetch it before it was finished being"},{"line_number":13,"context_line":"created it would return incomplete data."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5fc1f717_490eb73b","line":11,"range":{"start_line":10,"start_character":62,"end_line":11,"end_character":20},"updated":"2019-03-26 14:57:21.000000000","message":"This code doesn\u0027t actually create the instance mapping, the API does that, this code updates it to target the instance mapping at the cell in which the instance was created. I\u0027ll re-word.","commit_id":"94524124a62817ffbeafddf8f18d9d66eb5f1198"}],"nova/conductor/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1404fb0982cb3c0cbc77ab067f86727b24c5e0d4","unresolved":false,"context_lines":[{"line_number":1228,"context_line":"        updates \u003d {\u0027vm_state\u0027: vm_states.ERROR, \u0027task_state\u0027: None}"},{"line_number":1229,"context_line":"        for instance in instances_by_uuid.values():"},{"line_number":1230,"context_line":"            with obj_target_cell(instance, cell0) as cctxt:"},{"line_number":1231,"context_line":"                instance.create()"},{"line_number":1232,"context_line":""},{"line_number":1233,"context_line":"                # NOTE(mnaser): In order to properly clean-up volumes after"},{"line_number":1234,"context_line":"                #               being buried in cell0, we need to store BDMs."},{"line_number":1235,"context_line":"                if block_device_mapping:"},{"line_number":1236,"context_line":"                    self._create_block_device_mapping("},{"line_number":1237,"context_line":"                       cell0, instance.flavor, instance.uuid,"},{"line_number":1238,"context_line":"                       block_device_mapping)"},{"line_number":1239,"context_line":""},{"line_number":1240,"context_line":"                self._create_tags(cctxt, instance.uuid, tags)"},{"line_number":1241,"context_line":""},{"line_number":1242,"context_line":"                # Use the context targeted to cell0 here since the instance is"},{"line_number":1243,"context_line":"                # now in cell0."}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_c15df715","line":1240,"range":{"start_line":1231,"start_character":16,"end_line":1240,"end_character":61},"updated":"2019-03-22 14:18:22.000000000","message":"I thought about this as well, but we can\u0027t create the BDMs and tags before the instance in this case.","commit_id":"94524124a62817ffbeafddf8f18d9d66eb5f1198"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"b9c216eca28a9661c61986d1109400063cdd1992","unresolved":false,"context_lines":[{"line_number":1251,"context_line":"                        objects.InstanceMapping.get_by_instance_uuid("},{"line_number":1252,"context_line":"                            context, instance.uuid)"},{"line_number":1253,"context_line":"                    inst_mapping.cell_mapping \u003d cell0"},{"line_number":1254,"context_line":"                    inst_mapping.save()"},{"line_number":1255,"context_line":"                except exception.InstanceMappingNotFound:"},{"line_number":1256,"context_line":"                    pass"},{"line_number":1257,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_e1c4b394","line":1254,"updated":"2019-03-22 14:24:29.000000000","message":"The above looks ok because we don\u0027t create the instance mapping until down here, so the api will never see the incomplete instance.","commit_id":"94524124a62817ffbeafddf8f18d9d66eb5f1198"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1404fb0982cb3c0cbc77ab067f86727b24c5e0d4","unresolved":false,"context_lines":[{"line_number":1535,"context_line":"            inst_mapping \u003d objects.InstanceMapping.get_by_instance_uuid("},{"line_number":1536,"context_line":"                context, instance.uuid)"},{"line_number":1537,"context_line":"            inst_mapping.cell_mapping \u003d cell"},{"line_number":1538,"context_line":"            inst_mapping.save()"},{"line_number":1539,"context_line":""},{"line_number":1540,"context_line":"            # Be paranoid about artifacts being deleted underneath us."},{"line_number":1541,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_e13fd3b2","line":1538,"updated":"2019-03-22 14:18:22.000000000","message":"Surely there is a test for this method and we could stub out instance mapping save() and assert that _create_block_device_mapping and _create_tags are called *before* InstanceMapping.save() to enforce the order, yeah?","commit_id":"94524124a62817ffbeafddf8f18d9d66eb5f1198"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"b9c216eca28a9661c61986d1109400063cdd1992","unresolved":false,"context_lines":[{"line_number":1535,"context_line":"            inst_mapping \u003d objects.InstanceMapping.get_by_instance_uuid("},{"line_number":1536,"context_line":"                context, instance.uuid)"},{"line_number":1537,"context_line":"            inst_mapping.cell_mapping \u003d cell"},{"line_number":1538,"context_line":"            inst_mapping.save()"},{"line_number":1539,"context_line":""},{"line_number":1540,"context_line":"            # Be paranoid about artifacts being deleted underneath us."},{"line_number":1541,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_41434714","line":1538,"in_reply_to":"5fc1f717_e13fd3b2","updated":"2019-03-22 14:24:29.000000000","message":"Haven\u0027t looked yet, but agree we could do with a test.","commit_id":"94524124a62817ffbeafddf8f18d9d66eb5f1198"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"d1693379eb4b0b42c8664cbddf1fa84f47560e37","unresolved":false,"context_lines":[{"line_number":1535,"context_line":"            inst_mapping \u003d objects.InstanceMapping.get_by_instance_uuid("},{"line_number":1536,"context_line":"                context, instance.uuid)"},{"line_number":1537,"context_line":"            inst_mapping.cell_mapping \u003d cell"},{"line_number":1538,"context_line":"            inst_mapping.save()"},{"line_number":1539,"context_line":""},{"line_number":1540,"context_line":"            # Be paranoid about artifacts being deleted underneath us."},{"line_number":1541,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_7dc5c33b","line":1538,"in_reply_to":"5fc1f717_e13fd3b2","updated":"2019-03-22 17:09:48.000000000","message":"Hmm, I can\u0027t see any test which covers _cleanup_build_artifacts. It\u0027s called in 2 error paths in schedule_and_build_instances, which does have some unit tests. Only one of those error paths is exercised, in test_schedule_and_build_instances_fill_request_spec_error, and that test mocks out _cleanup_build_artifacts.\n\nI could add some.","commit_id":"94524124a62817ffbeafddf8f18d9d66eb5f1198"}],"nova/tests/unit/conductor/test_conductor.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"37e4437730f4885be11f82388e4508809f178220","unresolved":false,"context_lines":[{"line_number":2186,"context_line":"    @mock.patch(\u0027nova.objects.request_spec.RequestSpec.\u0027"},{"line_number":2187,"context_line":"                \u0027map_requested_resources_to_providers\u0027,"},{"line_number":2188,"context_line":"                new_callable\u003dmock.NonCallableMock)"},{"line_number":2189,"context_line":"    def test_schedule_and_build_instances_fill_request_spec_no_allocs("},{"line_number":2190,"context_line":"            self, mock_map, mock_get_allocs, mock_traits):"},{"line_number":2191,"context_line":"        \"\"\"Tests to make sure _fill_provider_mapping handles a scheduler"},{"line_number":2192,"context_line":"        driver which does not use placement (so there are no allocations)."}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_44af7ee2","line":2189,"updated":"2019-03-26 15:03:21.000000000","message":"blarg, what happened here","commit_id":"f8b8a6af553db5f658ab2fdcceaafb5cf356f84a"}]}
