)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fc27bec4c3708b37e48a297529388415add5d24b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Abhishek Kekane \u003cakekane@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-06-24 20:06:12 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix: Interrupted copy-imgae leaking data on subsequent operation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If copying existing image in other stores fails while staging the data to"},{"line_number":10,"context_line":"staging directory due to power, network or any other reason. Then"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bf51134e_1648d484","line":7,"range":{"start_line":7,"start_character":22,"end_line":7,"end_character":27},"updated":"2020-06-24 20:07:34.000000000","message":"image","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4b2ca7015369ad9efbbd502bba112bb7d8895855","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Abhishek Kekane \u003cakekane@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-06-24 20:06:12 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix: Interrupted copy-imgae leaking data on subsequent operation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If copying existing image in other stores fails while staging the data to"},{"line_number":10,"context_line":"staging directory due to power, network or any other reason. Then"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bf51134e_3a24d6ae","line":7,"range":{"start_line":7,"start_character":22,"end_line":7,"end_character":27},"in_reply_to":"bf51134e_1648d484","updated":"2020-06-25 07:16:40.000000000","message":"Done","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6e91b6963f78ea449f6dfb252b67e8b542f6204f","unresolved":false,"context_lines":[{"line_number":10,"context_line":"staging directory due to power, network or any other reason. Then"},{"line_number":11,"context_line":"subsequent try may lead to data leaks in stores."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"To fix this, added check to check the actual image size with the size"},{"line_number":14,"context_line":"of image file present it staging area. If it mismatch then deleting"},{"line_number":15,"context_line":"the image file from staging area so that entire image will be staged"},{"line_number":16,"context_line":"again."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bf51134e_b962bbd6","line":13,"range":{"start_line":13,"start_character":19,"end_line":13,"end_character":33},"updated":"2020-06-24 20:18:57.000000000","message":"check of","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4b2ca7015369ad9efbbd502bba112bb7d8895855","unresolved":false,"context_lines":[{"line_number":10,"context_line":"staging directory due to power, network or any other reason. Then"},{"line_number":11,"context_line":"subsequent try may lead to data leaks in stores."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"To fix this, added check to check the actual image size with the size"},{"line_number":14,"context_line":"of image file present it staging area. If it mismatch then deleting"},{"line_number":15,"context_line":"the image file from staging area so that entire image will be staged"},{"line_number":16,"context_line":"again."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bf51134e_da34bae0","line":13,"range":{"start_line":13,"start_character":19,"end_line":13,"end_character":33},"in_reply_to":"bf51134e_b962bbd6","updated":"2020-06-25 07:16:40.000000000","message":"Done","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6e91b6963f78ea449f6dfb252b67e8b542f6204f","unresolved":false,"context_lines":[{"line_number":11,"context_line":"subsequent try may lead to data leaks in stores."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"To fix this, added check to check the actual image size with the size"},{"line_number":14,"context_line":"of image file present it staging area. If it mismatch then deleting"},{"line_number":15,"context_line":"the image file from staging area so that entire image will be staged"},{"line_number":16,"context_line":"again."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bf51134e_39a4eb07","line":14,"range":{"start_line":14,"start_character":59,"end_line":14,"end_character":67},"updated":"2020-06-24 20:18:57.000000000","message":"delete","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6e91b6963f78ea449f6dfb252b67e8b542f6204f","unresolved":false,"context_lines":[{"line_number":11,"context_line":"subsequent try may lead to data leaks in stores."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"To fix this, added check to check the actual image size with the size"},{"line_number":14,"context_line":"of image file present it staging area. If it mismatch then deleting"},{"line_number":15,"context_line":"the image file from staging area so that entire image will be staged"},{"line_number":16,"context_line":"again."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bf51134e_d9a04ff7","line":14,"range":{"start_line":14,"start_character":45,"end_line":14,"end_character":53},"updated":"2020-06-24 20:18:57.000000000","message":"does not match","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6e91b6963f78ea449f6dfb252b67e8b542f6204f","unresolved":false,"context_lines":[{"line_number":11,"context_line":"subsequent try may lead to data leaks in stores."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"To fix this, added check to check the actual image size with the size"},{"line_number":14,"context_line":"of image file present it staging area. If it mismatch then deleting"},{"line_number":15,"context_line":"the image file from staging area so that entire image will be staged"},{"line_number":16,"context_line":"again."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bf51134e_995d3717","line":14,"range":{"start_line":14,"start_character":22,"end_line":14,"end_character":24},"updated":"2020-06-24 20:18:57.000000000","message":"in the","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4b2ca7015369ad9efbbd502bba112bb7d8895855","unresolved":false,"context_lines":[{"line_number":11,"context_line":"subsequent try may lead to data leaks in stores."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"To fix this, added check to check the actual image size with the size"},{"line_number":14,"context_line":"of image file present it staging area. If it mismatch then deleting"},{"line_number":15,"context_line":"the image file from staging area so that entire image will be staged"},{"line_number":16,"context_line":"again."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bf51134e_ba2f4686","line":14,"range":{"start_line":14,"start_character":59,"end_line":14,"end_character":67},"in_reply_to":"bf51134e_39a4eb07","updated":"2020-06-25 07:16:40.000000000","message":"Done","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4b2ca7015369ad9efbbd502bba112bb7d8895855","unresolved":false,"context_lines":[{"line_number":11,"context_line":"subsequent try may lead to data leaks in stores."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"To fix this, added check to check the actual image size with the size"},{"line_number":14,"context_line":"of image file present it staging area. If it mismatch then deleting"},{"line_number":15,"context_line":"the image file from staging area so that entire image will be staged"},{"line_number":16,"context_line":"again."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bf51134e_1a50f20a","line":14,"range":{"start_line":14,"start_character":22,"end_line":14,"end_character":24},"in_reply_to":"bf51134e_995d3717","updated":"2020-06-25 07:16:40.000000000","message":"Done","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4b2ca7015369ad9efbbd502bba112bb7d8895855","unresolved":false,"context_lines":[{"line_number":11,"context_line":"subsequent try may lead to data leaks in stores."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"To fix this, added check to check the actual image size with the size"},{"line_number":14,"context_line":"of image file present it staging area. If it mismatch then deleting"},{"line_number":15,"context_line":"the image file from staging area so that entire image will be staged"},{"line_number":16,"context_line":"again."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bf51134e_fa525e12","line":14,"range":{"start_line":14,"start_character":45,"end_line":14,"end_character":53},"in_reply_to":"bf51134e_d9a04ff7","updated":"2020-06-25 07:16:40.000000000","message":"Done","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6e91b6963f78ea449f6dfb252b67e8b542f6204f","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"To fix this, added check to check the actual image size with the size"},{"line_number":14,"context_line":"of image file present it staging area. If it mismatch then deleting"},{"line_number":15,"context_line":"the image file from staging area so that entire image will be staged"},{"line_number":16,"context_line":"again."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I44bfefb6eee421e18e5e95a0dafaef0ea4e170da"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bf51134e_79b14347","line":15,"range":{"start_line":15,"start_character":40,"end_line":15,"end_character":41},"updated":"2020-06-24 20:18:57.000000000","message":"the","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4b2ca7015369ad9efbbd502bba112bb7d8895855","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"To fix this, added check to check the actual image size with the size"},{"line_number":14,"context_line":"of image file present it staging area. If it mismatch then deleting"},{"line_number":15,"context_line":"the image file from staging area so that entire image will be staged"},{"line_number":16,"context_line":"again."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I44bfefb6eee421e18e5e95a0dafaef0ea4e170da"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bf51134e_5a56ea07","line":15,"range":{"start_line":15,"start_character":40,"end_line":15,"end_character":41},"in_reply_to":"bf51134e_79b14347","updated":"2020-06-25 07:16:40.000000000","message":"Done","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"}],"glance/async_/flows/_internal_plugins/copy_image.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6e91b6963f78ea449f6dfb252b67e8b542f6204f","unresolved":false,"context_lines":[{"line_number":59,"context_line":"            self.image_id)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        if os.path.exists(file_path):"},{"line_number":62,"context_line":"            return file_path, 0"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # At first search image in default_backend"},{"line_number":65,"context_line":"        default_store \u003d CONF.glance_store.default_backend"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_76103058","side":"PARENT","line":62,"updated":"2020-06-24 20:18:57.000000000","message":"Yikes, this is a bad assumption for sure.","commit_id":"e6db0b10a703037f754007bef6f56451086850cd"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4b2ca7015369ad9efbbd502bba112bb7d8895855","unresolved":false,"context_lines":[{"line_number":59,"context_line":"            self.image_id)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        if os.path.exists(file_path):"},{"line_number":62,"context_line":"            return file_path, 0"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # At first search image in default_backend"},{"line_number":65,"context_line":"        default_store \u003d CONF.glance_store.default_backend"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_37ecef8d","side":"PARENT","line":62,"in_reply_to":"bf51134e_76103058","updated":"2020-06-25 07:16:40.000000000","message":"agree","commit_id":"e6db0b10a703037f754007bef6f56451086850cd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6e91b6963f78ea449f6dfb252b67e8b542f6204f","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            CONF, \u0027os_glance_staging_store\u0027).filesystem_store_datadir,"},{"line_number":59,"context_line":"            self.image_id)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        if os.path.exists(file_path):"},{"line_number":62,"context_line":"            # NOTE (abhishekk): If previous copy-image operation is failed"},{"line_number":63,"context_line":"            # due to Power failure, network failure or any other reason and"},{"line_number":64,"context_line":"            # the image data here is partial then clear the staging area and"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_d97b2f89","line":61,"updated":"2020-06-24 20:18:57.000000000","message":"I\u0027m surprised that we don\u0027t check the image hash instead of just the existence (and now size) of the image. I haven\u0027t looked, but shouldn\u0027t we calculate the image hash as we\u0027re downloading it, store that in a sidecar file at the end and compare that to the expected hash? That would be much safer, but maybe it\u0027s not possible for some reason.","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c5736aec0621541ea3ae22afc0e80704fe8b0692","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            CONF, \u0027os_glance_staging_store\u0027).filesystem_store_datadir,"},{"line_number":59,"context_line":"            self.image_id)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        if os.path.exists(file_path):"},{"line_number":62,"context_line":"            # NOTE (abhishekk): If previous copy-image operation is failed"},{"line_number":63,"context_line":"            # due to Power failure, network failure or any other reason and"},{"line_number":64,"context_line":"            # the image data here is partial then clear the staging area and"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_452726cb","line":61,"in_reply_to":"bf51134e_b7f75f59","updated":"2020-06-25 15:11:33.000000000","message":"What I meant was, if when we\u0027re downloading to stage in the first place, we calculate the image as we\u0027re reading it, we could store the hash in a sidecar and then we\u0027d know that a past stage operation had calculated the same hash as the image we\u0027re now being asked to push to the store. Something like:\n\n $staging_dir/the_image.img\n $staging_dir/the_image.img.SHA1  \u003c\u003c has the hash inside\n\nCalculating it as we\u0027re downloading it involves some extra CPU during the download, but doesn\u0027t require us to re-read the whole image here when we resume the upload to the store. It helps avoid propagating a failure or an attack on the image in the source store.\n\nAnyway, I\u0027m just surprised to see less hash checking in glance than I assumed from the outside was being done. This operation where we would trust prior residue in the staging dir is a liability, but obviously the immediate solution here is what you have.","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4b2ca7015369ad9efbbd502bba112bb7d8895855","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            CONF, \u0027os_glance_staging_store\u0027).filesystem_store_datadir,"},{"line_number":59,"context_line":"            self.image_id)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        if os.path.exists(file_path):"},{"line_number":62,"context_line":"            # NOTE (abhishekk): If previous copy-image operation is failed"},{"line_number":63,"context_line":"            # due to Power failure, network failure or any other reason and"},{"line_number":64,"context_line":"            # the image data here is partial then clear the staging area and"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_b7f75f59","line":61,"in_reply_to":"bf51134e_d97b2f89","updated":"2020-06-25 07:16:40.000000000","message":"As this check implies that the file is already in staging;\ncalculating hash will result in reading whole file again, so IMO size check will be enough.","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6e91b6963f78ea449f6dfb252b67e8b542f6204f","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        if os.path.exists(file_path):"},{"line_number":62,"context_line":"            # NOTE (abhishekk): If previous copy-image operation is failed"},{"line_number":63,"context_line":"            # due to Power failure, network failure or any other reason and"},{"line_number":64,"context_line":"            # the image data here is partial then clear the staging area and"},{"line_number":65,"context_line":"            # re-stage the fresh image data."},{"line_number":66,"context_line":"            # Ref: https://bugs.launchpad.net/glance/+bug/1885003"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_f61c4079","line":63,"range":{"start_line":63,"start_character":21,"end_line":63,"end_character":26},"updated":"2020-06-24 20:18:57.000000000","message":"nit: s/Power/power/","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4b2ca7015369ad9efbbd502bba112bb7d8895855","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        if os.path.exists(file_path):"},{"line_number":62,"context_line":"            # NOTE (abhishekk): If previous copy-image operation is failed"},{"line_number":63,"context_line":"            # due to Power failure, network failure or any other reason and"},{"line_number":64,"context_line":"            # the image data here is partial then clear the staging area and"},{"line_number":65,"context_line":"            # re-stage the fresh image data."},{"line_number":66,"context_line":"            # Ref: https://bugs.launchpad.net/glance/+bug/1885003"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_57e9a37d","line":63,"range":{"start_line":63,"start_character":21,"end_line":63,"end_character":26},"in_reply_to":"bf51134e_f61c4079","updated":"2020-06-25 07:16:40.000000000","message":"Done","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6e91b6963f78ea449f6dfb252b67e8b542f6204f","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            # re-stage the fresh image data."},{"line_number":66,"context_line":"            # Ref: https://bugs.launchpad.net/glance/+bug/1885003"},{"line_number":67,"context_line":"            size_in_staging \u003d os.path.getsize(file_path)"},{"line_number":68,"context_line":"            if image.size \u003d\u003d size_in_staging:"},{"line_number":69,"context_line":"                return file_path, 0"},{"line_number":70,"context_line":"            else:"},{"line_number":71,"context_line":"                try:"},{"line_number":72,"context_line":"                    LOG.debug(_(\"Found partial image data in staging \""}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_793e63c1","line":69,"range":{"start_line":68,"start_character":0,"end_line":69,"end_character":35},"updated":"2020-06-24 20:18:57.000000000","message":"I don\u0027t think you have a test for this case.","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1ab4c1199949b0e46669be8e891038429d48abdb","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            # re-stage the fresh image data."},{"line_number":66,"context_line":"            # Ref: https://bugs.launchpad.net/glance/+bug/1885003"},{"line_number":67,"context_line":"            size_in_staging \u003d os.path.getsize(file_path)"},{"line_number":68,"context_line":"            if image.size \u003d\u003d size_in_staging:"},{"line_number":69,"context_line":"                return file_path, 0"},{"line_number":70,"context_line":"            else:"},{"line_number":71,"context_line":"                try:"},{"line_number":72,"context_line":"                    LOG.debug(_(\"Found partial image data in staging \""}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_b91abb13","line":69,"range":{"start_line":68,"start_character":0,"end_line":69,"end_character":35},"in_reply_to":"bf51134e_793e63c1","updated":"2020-06-24 20:28:48.000000000","message":"I was lazy :D\nWill add it tomorrow","commit_id":"0cad494a398210b026ba91d1efcb166af0dcc6b0"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"814a67b8cf2dea30df0a9c344adba4364c601ef9","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                return file_path, 0"},{"line_number":70,"context_line":"            else:"},{"line_number":71,"context_line":"                try:"},{"line_number":72,"context_line":"                    LOG.debug(_(\"Found partial image data in staging \""},{"line_number":73,"context_line":"                                \"%(fn)s, deleting it to re-stage \""},{"line_number":74,"context_line":"                                \"again\"), {\u0027fn\u0027: file_path})"},{"line_number":75,"context_line":"                    os.unlink(file_path)"},{"line_number":76,"context_line":"                except OSError as e:"},{"line_number":77,"context_line":"                    LOG.error(_(\"Deletion of staged \""}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_ab51b338","line":74,"range":{"start_line":72,"start_character":20,"end_line":74,"end_character":60},"updated":"2020-06-25 17:19:08.000000000","message":"NIT: this probably doesn\u0027t need to be within that try block.\n\nNot so much nit: debug messages should never go through translations.","commit_id":"46ab0ec607944df6df77e4e5103b6824c18a94ef"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"73d2aa0d438d89a0493c94e0542e41b9607fbe59","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                return file_path, 0"},{"line_number":70,"context_line":"            else:"},{"line_number":71,"context_line":"                try:"},{"line_number":72,"context_line":"                    LOG.debug(_(\"Found partial image data in staging \""},{"line_number":73,"context_line":"                                \"%(fn)s, deleting it to re-stage \""},{"line_number":74,"context_line":"                                \"again\"), {\u0027fn\u0027: file_path})"},{"line_number":75,"context_line":"                    os.unlink(file_path)"},{"line_number":76,"context_line":"                except OSError as e:"},{"line_number":77,"context_line":"                    LOG.error(_(\"Deletion of staged \""}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_76ef7ee8","line":74,"range":{"start_line":72,"start_character":20,"end_line":74,"end_character":60},"in_reply_to":"bf51134e_ab51b338","updated":"2020-06-25 17:50:01.000000000","message":"Done","commit_id":"46ab0ec607944df6df77e4e5103b6824c18a94ef"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"814a67b8cf2dea30df0a9c344adba4364c601ef9","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                                \"again\"), {\u0027fn\u0027: file_path})"},{"line_number":75,"context_line":"                    os.unlink(file_path)"},{"line_number":76,"context_line":"                except OSError as e:"},{"line_number":77,"context_line":"                    LOG.error(_(\"Deletion of staged \""},{"line_number":78,"context_line":"                                \"image data from %(fn)s has failed because \""},{"line_number":79,"context_line":"                                \"[Errno %(en)d]\"), {\u0027fn\u0027: file_path,"},{"line_number":80,"context_line":"                                                    \u0027en\u0027: e.errno})"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_cb1ce779","line":77,"range":{"start_line":77,"start_character":30,"end_line":77,"end_character":31},"updated":"2020-06-25 17:19:08.000000000","message":"should be _LE","commit_id":"46ab0ec607944df6df77e4e5103b6824c18a94ef"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"73d2aa0d438d89a0493c94e0542e41b9607fbe59","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                                \"again\"), {\u0027fn\u0027: file_path})"},{"line_number":75,"context_line":"                    os.unlink(file_path)"},{"line_number":76,"context_line":"                except OSError as e:"},{"line_number":77,"context_line":"                    LOG.error(_(\"Deletion of staged \""},{"line_number":78,"context_line":"                                \"image data from %(fn)s has failed because \""},{"line_number":79,"context_line":"                                \"[Errno %(en)d]\"), {\u0027fn\u0027: file_path,"},{"line_number":80,"context_line":"                                                    \u0027en\u0027: e.errno})"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_56ea3ad7","line":77,"range":{"start_line":77,"start_character":30,"end_line":77,"end_character":31},"in_reply_to":"bf51134e_cb1ce779","updated":"2020-06-25 17:50:01.000000000","message":"Done","commit_id":"46ab0ec607944df6df77e4e5103b6824c18a94ef"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"92ca4ad1aa308db612dcd64a2ff27caaf98b118b","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            if image.size \u003d\u003d size_in_staging:"},{"line_number":69,"context_line":"                return file_path, 0"},{"line_number":70,"context_line":"            else:"},{"line_number":71,"context_line":"                LOG.debug((\"Found partial image data in staging \""},{"line_number":72,"context_line":"                           \"%(fn)s, deleting it to re-stage \""},{"line_number":73,"context_line":"                           \"again\"), {\u0027fn\u0027: file_path})"},{"line_number":74,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_43597058","line":71,"range":{"start_line":71,"start_character":26,"end_line":71,"end_character":27},"updated":"2020-07-03 18:35:26.000000000","message":"nit: extra () around the string is not needed.\n\nOnly pointing out because I have a compulsion, please feel free to ignore. :)","commit_id":"22d8f1fcbf4325d79ac18adfe87198c785f1df52"}],"glance/tests/unit/async_/flows/test_copy_image.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e66c7620e9eece441e8785cb72c97aa5b1c5c690","unresolved":false,"context_lines":[{"line_number":198,"context_line":"            # As valid image data already exists in staging area"},{"line_number":199,"context_line":"            # it does not remove it and also does not download"},{"line_number":200,"context_line":"            # it again to staging area"},{"line_number":201,"context_line":"            self.assertEqual(0, mock_unlink.call_count)"},{"line_number":202,"context_line":"            self.assertEqual(0, self.staging_store.add.call_count)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    @mock.patch.object(store_api, \u0027get_store_from_store_identifier\u0027)"},{"line_number":205,"context_line":"    def test_copy_non_existing_image_to_staging_store_(self, mock_store_api):"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_e858d131","line":202,"range":{"start_line":201,"start_character":0,"end_line":202,"end_character":66},"updated":"2020-06-25 15:18:05.000000000","message":"nit, you can now do:\n\n mock_unlink.assert_not_called()","commit_id":"46ab0ec607944df6df77e4e5103b6824c18a94ef"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"73d2aa0d438d89a0493c94e0542e41b9607fbe59","unresolved":false,"context_lines":[{"line_number":198,"context_line":"            # As valid image data already exists in staging area"},{"line_number":199,"context_line":"            # it does not remove it and also does not download"},{"line_number":200,"context_line":"            # it again to staging area"},{"line_number":201,"context_line":"            self.assertEqual(0, mock_unlink.call_count)"},{"line_number":202,"context_line":"            self.assertEqual(0, self.staging_store.add.call_count)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    @mock.patch.object(store_api, \u0027get_store_from_store_identifier\u0027)"},{"line_number":205,"context_line":"    def test_copy_non_existing_image_to_staging_store_(self, mock_store_api):"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_16e4420c","line":202,"range":{"start_line":201,"start_character":0,"end_line":202,"end_character":66},"in_reply_to":"bf51134e_e858d131","updated":"2020-06-25 17:50:01.000000000","message":"Done","commit_id":"46ab0ec607944df6df77e4e5103b6824c18a94ef"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"814a67b8cf2dea30df0a9c344adba4364c601ef9","unresolved":false,"context_lines":[{"line_number":198,"context_line":"            # As valid image data already exists in staging area"},{"line_number":199,"context_line":"            # it does not remove it and also does not download"},{"line_number":200,"context_line":"            # it again to staging area"},{"line_number":201,"context_line":"            self.assertEqual(0, mock_unlink.call_count)"},{"line_number":202,"context_line":"            self.assertEqual(0, self.staging_store.add.call_count)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    @mock.patch.object(store_api, \u0027get_store_from_store_identifier\u0027)"},{"line_number":205,"context_line":"    def test_copy_non_existing_image_to_staging_store_(self, mock_store_api):"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_76493e5e","line":202,"range":{"start_line":201,"start_character":0,"end_line":202,"end_character":66},"in_reply_to":"bf51134e_e858d131","updated":"2020-06-25 17:19:08.000000000","message":"cool, thanks for the hint.","commit_id":"46ab0ec607944df6df77e4e5103b6824c18a94ef"}]}
