)]}'
{"glance/api/v2/images.py":[{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"c309800c3236f304167ef254a872f28888714e3e","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        try:"},{"line_number":369,"context_line":"            image \u003d image_repo.get(image_id)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"            if image.status in [\u0027uploading\u0027, \u0027importing\u0027]:"},{"line_number":372,"context_line":"                if CONF.enabled_backends:"},{"line_number":373,"context_line":"                    separator, staging_dir \u003d store_utils.get_dir_separator()"},{"line_number":374,"context_line":"                    file_path \u003d \"%s%s%s\" % (staging_dir,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_b76aaeb2","line":371,"updated":"2019-12-17 12:55:19.000000000","message":"How about we just remove this if and let glance to check that staging is clean on every case? Specially with the multi-store import we might end up to situations where we have active image with data still intentionally in staging.","commit_id":"72d07fbb0fc5f6ca1f8dba8b18b89a8d1fd148d4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1da775714f812a8d8eee81f30c7f98fdefb506e1","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        try:"},{"line_number":369,"context_line":"            image \u003d image_repo.get(image_id)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"            if image.status in [\u0027uploading\u0027, \u0027importing\u0027]:"},{"line_number":372,"context_line":"                if CONF.enabled_backends:"},{"line_number":373,"context_line":"                    separator, staging_dir \u003d store_utils.get_dir_separator()"},{"line_number":374,"context_line":"                    file_path \u003d \"%s%s%s\" % (staging_dir,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_b4c05a7f","line":371,"in_reply_to":"3fa7e38b_b76aaeb2","updated":"2019-12-18 10:04:15.000000000","message":"makes sense","commit_id":"72d07fbb0fc5f6ca1f8dba8b18b89a8d1fd148d4"}],"glance/tests/unit/v2/test_images_resource.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"70e9e94a9ca03720d679a2a0f23581af5810b660","unresolved":false,"context_lines":[{"line_number":2714,"context_line":"            self.controller.delete(request, image_id)"},{"line_number":2715,"context_line":"            self.assertEqual(1, mock_store.call_count)"},{"line_number":2716,"context_line":"            mock_store.assert_called_once_with(\"os_glance_staging_store\")"},{"line_number":2717,"context_line":"            self.assertEqual(1, mock_location.call_count)"},{"line_number":2718,"context_line":"        except Exception as e:"},{"line_number":2719,"context_line":"            self.fail(\"Delete raised exception: %s\" % e)"},{"line_number":2720,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_e39c775c","line":2717,"updated":"2020-01-02 21:15:48.000000000","message":"We verify that we\u0027ve got the staging store and the location, but we\u0027re not checking that delete was ever actually called on the staging store.  I suggest adding something like\n\n  fake_stage_store \u003d mock.Mock()\n  mock_store.return_value \u003d fake_stage_store\n\nafter line 2697 and then add\n\n  fake_stage_store.delete.assert_called_once()\n\ndown here.","commit_id":"fad90c71de03ba0e263488213827c79d960ca258"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"8aa9bdba4ce0be82c862683aabe9e26afb300ca0","unresolved":false,"context_lines":[{"line_number":2714,"context_line":"            self.controller.delete(request, image_id)"},{"line_number":2715,"context_line":"            self.assertEqual(1, mock_store.call_count)"},{"line_number":2716,"context_line":"            mock_store.assert_called_once_with(\"os_glance_staging_store\")"},{"line_number":2717,"context_line":"            self.assertEqual(1, mock_location.call_count)"},{"line_number":2718,"context_line":"        except Exception as e:"},{"line_number":2719,"context_line":"            self.fail(\"Delete raised exception: %s\" % e)"},{"line_number":2720,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_1c5810f7","line":2717,"in_reply_to":"3fa7e38b_e39c775c","updated":"2020-01-03 05:56:57.000000000","message":"Done","commit_id":"fad90c71de03ba0e263488213827c79d960ca258"}]}
