)]}'
{"glance/common/scripts/image_import/main.py":[{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"8a98e92f3e0be6b3818d399b3d5c0e7b81b4b502","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        return image_id"},{"line_number":111,"context_line":"    except (exception.Conflict, exception.NotFound):"},{"line_number":112,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":113,"context_line":"            original_image.delete()"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"def create_image(image_repo, image_factory, image_properties, task_id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_71c62f18","line":113,"updated":"2014-09-18 14:20:01.000000000","message":"Just trying to think out loud here:-\n\nIf the image status is deleted, does this call work original_image.delete() ?\nOr do we need to call something like store.delete() ?","commit_id":"10e3df3ca08a0d49f170e404eefe10f98d07b2fc"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"3e7a6d99ab030afd383f0a9da720c7fedd86766a","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        return image_id"},{"line_number":111,"context_line":"    except (exception.Conflict, exception.NotFound):"},{"line_number":112,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":113,"context_line":"            original_image.delete()"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"def create_image(image_repo, image_factory, image_properties, task_id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_f4668ded","line":113,"in_reply_to":"fa98f980_71c62f18","updated":"2014-09-18 15:01:27.000000000","message":"this call works for me - file is deleted. but maybe it\u0027s not the best way do to it.","commit_id":"10e3df3ca08a0d49f170e404eefe10f98d07b2fc"},{"author":{"_account_id":8127,"name":"Alexander Tivelkov","email":"locher@yandex.ru","username":"ativelkov"},"change_message_id":"b717eee32ed7d891a67ec85618b69c1ea32deb31","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        return image_id"},{"line_number":111,"context_line":"    except (exception.Conflict, exception.NotFound):"},{"line_number":112,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":113,"context_line":"            original_image.delete()"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"def create_image(image_repo, image_factory, image_properties, task_id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_c0a45f0a","line":113,"updated":"2014-09-18 16:26:02.000000000","message":"I actually don\u0027t like the idea of calling image.delete() here: the call to \"delete\" will be executed on all the layers of the domain model (policy, notification, db etc), while we don\u0027t need it, we rather want to only remove the data from storage. I\u0027d prefer to retrieve the location info from image object after calling the set_data and then use the store_utils.delete_image_location_from_backend() function to actually remove the data without doing anything else","commit_id":"dbf96d4696b62f87a3fcf30d40bcfbae6dfc39c1"},{"author":{"_account_id":8127,"name":"Alexander Tivelkov","email":"locher@yandex.ru","username":"ativelkov"},"change_message_id":"9bf9f2391253e31181667656001e183bd2f13301","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    except (exception.Conflict, exception.NotFound):"},{"line_number":113,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":114,"context_line":"            if original_image.locations:"},{"line_number":115,"context_line":"                for location in original_image.locations:"},{"line_number":116,"context_line":"                    store_utils.delete_image_location_from_backend("},{"line_number":117,"context_line":"                        original_image.context,"},{"line_number":118,"context_line":"                        original_image.image_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa98f980_b59ea661","line":115,"updated":"2014-09-19 11:42:37.000000000","message":"This looks slightly confusing, as we are trying to delete ALL the image locations, while we need to revert only the location created at line 88.\n\nHowever, this is probably fine for now, as there may be no other locations at this point.","commit_id":"792d5c74f686db098f2f0622546078247976ec18"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"5ff379996ff454210eeb8ab117ea35828bb65940","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    image_id \u003d original_image.image_id"},{"line_number":96,"context_line":"    try:"},{"line_number":97,"context_line":"        new_image \u003d image_repo.get(image_id)"},{"line_number":98,"context_line":"        if new_image.status in [\u0027saving\u0027]:"},{"line_number":99,"context_line":"            new_image.status \u003d \u0027active\u0027"},{"line_number":100,"context_line":"            new_image.size \u003d original_image.size"},{"line_number":101,"context_line":"            new_image.virtual_size \u003d original_image.virtual_size"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_2acb37a6","line":98,"updated":"2014-10-14 00:20:00.000000000","message":"why in [\u0027saving\u0027] instead of \u003d\u003d \u0027saving\u0027 ? (I recognize that this is how it was originally).","commit_id":"1ddb9d3b4341abfe4d39736ed8864ae9aab1d564"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"e7d68b29dfc65afe319699eab1c910ba1f165b1f","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    image_id \u003d original_image.image_id"},{"line_number":96,"context_line":"    try:"},{"line_number":97,"context_line":"        new_image \u003d image_repo.get(image_id)"},{"line_number":98,"context_line":"        if new_image.status in [\u0027saving\u0027]:"},{"line_number":99,"context_line":"            new_image.status \u003d \u0027active\u0027"},{"line_number":100,"context_line":"            new_image.size \u003d original_image.size"},{"line_number":101,"context_line":"            new_image.virtual_size \u003d original_image.virtual_size"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa7fdbe_3c8a1c64","line":98,"in_reply_to":"baa201ad_2acb37a6","updated":"2014-10-28 10:43:23.000000000","message":"you better ask it nikhil :) i have no idea why it\u0027s done in this way.\nbut actually i can fix it too.","commit_id":"1ddb9d3b4341abfe4d39736ed8864ae9aab1d564"}]}
