)]}'
{"glance/api/v2/image_data.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"34a32905cb2dec0c9524fe2a224df5d2b37cd9a7","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        if os.path.exists(file_path):"},{"line_number":79,"context_line":"            try:"},{"line_number":80,"context_line":"                os.unlink(file_path)"},{"line_number":81,"context_line":"            except OSError:"},{"line_number":82,"context_line":"                pass"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        self._restore(image_repo, image)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_d5331461","line":81,"updated":"2019-03-14 18:00:41.000000000","message":"I think we should log something here -- we know the file exists but we weren\u0027t able to delete it, so there\u0027s some dark data being left on disk.  Maybe something like \"Cannot delete staged image data %(fn)s [Errno %(en)d]\"","commit_id":"9ab442ba23f8c9c3ff5c1dfb2dcc1d9d6d895209"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"9454ce08aa39138beffed1795880ff6aeb56848c","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        if os.path.exists(file_path):"},{"line_number":79,"context_line":"            try:"},{"line_number":80,"context_line":"                os.unlink(file_path)"},{"line_number":81,"context_line":"            except OSError:"},{"line_number":82,"context_line":"                pass"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        self._restore(image_repo, image)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_9444a548","line":81,"in_reply_to":"5fc1f717_ca67e7e8","updated":"2019-03-15 05:55:05.000000000","message":"Done","commit_id":"9ab442ba23f8c9c3ff5c1dfb2dcc1d9d6d895209"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"0ce12a07c53c4177a9f91b8e198db01a1aa3b738","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        if os.path.exists(file_path):"},{"line_number":79,"context_line":"            try:"},{"line_number":80,"context_line":"                os.unlink(file_path)"},{"line_number":81,"context_line":"            except OSError:"},{"line_number":82,"context_line":"                pass"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        self._restore(image_repo, image)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_ca67e7e8","line":81,"in_reply_to":"5fc1f717_d5331461","updated":"2019-03-15 00:34:18.000000000","message":"I think the situation is different from the original code.  Previously, we were using the glance_store, which would log any problems; if the store raised NotFound, we didn\u0027t log anything, but there also wasn\u0027t any possibility of dark data.  At this point in the new code, we know the file_path gives us an existing file, but for some reason the O/S is not allowing us to delete it, and hence we are leaving data behind.  So I think we need to keep the operator informed.","commit_id":"9ab442ba23f8c9c3ff5c1dfb2dcc1d9d6d895209"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"18494146acc2467d1b551e5781ca52ec9e684a2d","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            LOG.exception(msg)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _unstage(self, image_repo, image):"},{"line_number":71,"context_line":"        \"\"\""},{"line_number":72,"context_line":"        Restore the image to queued status and remove data from staging."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        :param image_repo: The instance of ImageRepo"}],"source_content_type":"text/x-python","patch_set":6,"id":"5fc1f717_43175da5","line":71,"updated":"2019-03-15 12:01:06.000000000","message":"Sorry I didn\u0027t mention this on the previous patch.  To minimize the size of the backport, I think it would be good to keep the staging_store parameter here and add two comments  after the docstring:\n\n  # NOTE(abhishek): staging_store not being used in this function because of bug #1803498\n  # TODO(abhishek): refactor to use the staging_store when the \"Rethinking Filesystem Access\" spec is implemented in Train","commit_id":"bea99b5830164d6c847ab92ce1164c0d07bc70d0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"a021c72178b390cd5a85336ddb42a762c988957c","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            LOG.exception(msg)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _unstage(self, image_repo, image):"},{"line_number":71,"context_line":"        \"\"\""},{"line_number":72,"context_line":"        Restore the image to queued status and remove data from staging."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        :param image_repo: The instance of ImageRepo"}],"source_content_type":"text/x-python","patch_set":6,"id":"5fc1f717_63e938e4","line":71,"in_reply_to":"5fc1f717_43175da5","updated":"2019-03-15 12:32:53.000000000","message":"Done","commit_id":"bea99b5830164d6c847ab92ce1164c0d07bc70d0"}],"glance/async_/flows/api_image_import.py":[{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"199abcdba870a93252d0db95ff2987ed1f5b4257","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            staging_store \u003d self._build_store()"},{"line_number":96,"context_line":"            loc \u003d store_api.location.get_location_from_uri(file_path)"},{"line_number":97,"context_line":"            staging_store.delete(loc)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _build_store(self):"},{"line_number":100,"context_line":"        conf \u003d cfg.ConfigOpts()"},{"line_number":101,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_08cec529","line":98,"updated":"2018-11-19 12:50:04.000000000","message":"So, this _build_store method is the same in this class (_DeleteFromFS) and _VerifyStaging, right? Couldn\u0027t we avoid duplicating code by moving _build_store to a common class? Like:\n\nclass _StoreBuildingTask(task.Task)\nclass _DeleteFromFS(_StoreBuildingTask)\nclass _VerifyStaging(_StoreBuildingTask)\n\nOr something along those lines?","commit_id":"857d5e0856ce758b38af6cc8e1507db5d51b2568"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"704ce6592abf9a616256fc5085174c0077ddafb7","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            staging_store \u003d self._build_store()"},{"line_number":96,"context_line":"            loc \u003d store_api.location.get_location_from_uri(file_path)"},{"line_number":97,"context_line":"            staging_store.delete(loc)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _build_store(self):"},{"line_number":100,"context_line":"        conf \u003d cfg.ConfigOpts()"},{"line_number":101,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_d537f24b","line":98,"in_reply_to":"3f79a3b5_08cec529","updated":"2018-11-20 07:08:07.000000000","message":"Done","commit_id":"857d5e0856ce758b38af6cc8e1507db5d51b2568"},{"author":{"_account_id":27882,"name":"Piotr Bielak","email":"piotrbielak2@gmail.com","username":"pbielak"},"change_message_id":"18379a4de384430c1b720658f15e79f3c68816d8","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        except cfg.DuplicateOptError:"},{"line_number":104,"context_line":"            pass"},{"line_number":105,"context_line":"        conf.set_override(\u0027filesystem_store_datadir\u0027,"},{"line_number":106,"context_line":"                          CONF.node_staging_uri[7:],"},{"line_number":107,"context_line":"                          group\u003d\u0027glance_store\u0027)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        store \u003d backend._load_store(conf, \u0027file\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_28c94123","line":106,"range":{"start_line":106,"start_character":48,"end_line":106,"end_character":49},"updated":"2018-11-19 12:48:22.000000000","message":"I\u0027d love it if you could explain why there is \"7\" ;)","commit_id":"857d5e0856ce758b38af6cc8e1507db5d51b2568"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"704ce6592abf9a616256fc5085174c0077ddafb7","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        except cfg.DuplicateOptError:"},{"line_number":104,"context_line":"            pass"},{"line_number":105,"context_line":"        conf.set_override(\u0027filesystem_store_datadir\u0027,"},{"line_number":106,"context_line":"                          CONF.node_staging_uri[7:],"},{"line_number":107,"context_line":"                          group\u003d\u0027glance_store\u0027)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        store \u003d backend._load_store(conf, \u0027file\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_b53cb62d","line":106,"range":{"start_line":106,"start_character":48,"end_line":106,"end_character":49},"in_reply_to":"3f79a3b5_28c94123","updated":"2018-11-20 07:08:07.000000000","message":"this is because, node_staging_uri config option should be defined like, \u0027file:///tmp/staging\u0027 and 7: will remove file:// so that store.configure() method at line #112 will create this staging directory.","commit_id":"857d5e0856ce758b38af6cc8e1507db5d51b2568"},{"author":{"_account_id":27882,"name":"Piotr Bielak","email":"piotrbielak2@gmail.com","username":"pbielak"},"change_message_id":"b9d7df0c89a64a730a0bfa6206235727b27ed097","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        except cfg.DuplicateOptError:"},{"line_number":104,"context_line":"            pass"},{"line_number":105,"context_line":"        conf.set_override(\u0027filesystem_store_datadir\u0027,"},{"line_number":106,"context_line":"                          CONF.node_staging_uri[7:],"},{"line_number":107,"context_line":"                          group\u003d\u0027glance_store\u0027)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        store \u003d backend._load_store(conf, \u0027file\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_9878b5f6","line":106,"range":{"start_line":106,"start_character":48,"end_line":106,"end_character":49},"in_reply_to":"3f79a3b5_b53cb62d","updated":"2018-11-21 13:22:04.000000000","message":"Alright, thx for the explanation, but should we use some existing functions to extract the desired path? I would suggest something like this:\n\nuri \u003d six.moves.urllib.parse.urlsplit(CONF.node_staging_uri)\nconf.set_override(\u0027filesystem_store_datadir\u0027, uri.path)","commit_id":"857d5e0856ce758b38af6cc8e1507db5d51b2568"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b6d988e4897961d9c0681757449d39a6b6cc0d75","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    except cfg.DuplicateOptError:"},{"line_number":90,"context_line":"        pass"},{"line_number":91,"context_line":"    conf.set_override(\u0027filesystem_store_datadir\u0027,"},{"line_number":92,"context_line":"                      CONF.node_staging_uri[7:],"},{"line_number":93,"context_line":"                      group\u003d\u0027glance_store\u0027)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    # NOTE(flaper87): Do not even try to judge me for this... :("}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_d58107fd","line":92,"range":{"start_line":92,"start_character":44,"end_line":92,"end_character":45},"updated":"2019-03-12 19:09:19.000000000","message":"I guess you didn\u0027t like Piotr\u0027s suggestion of using urllib.  Maybe substitute \"len(\u0027file://\u0027)\" for \"7\", or just add a comment \"#  7 \u003d\u003d len(\u0027file://\u0027)\" before line 92?  Or you could do what Flavio did somewhere and use CONF.node_staging_uri.split(\u0027file://\u0027)[-1].  I think Piotr\u0027s right that the magic 7 is a bit obscure.","commit_id":"540718f5e4c8d94f283791f0048d64ad9bb40617"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"7f2e5d4cd51e765d5c0a29de5d1c3c2865851e4b","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    except cfg.DuplicateOptError:"},{"line_number":90,"context_line":"        pass"},{"line_number":91,"context_line":"    conf.set_override(\u0027filesystem_store_datadir\u0027,"},{"line_number":92,"context_line":"                      CONF.node_staging_uri[7:],"},{"line_number":93,"context_line":"                      group\u003d\u0027glance_store\u0027)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    # NOTE(flaper87): Do not even try to judge me for this... :("}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_6b8dd0d1","line":92,"range":{"start_line":92,"start_character":44,"end_line":92,"end_character":45},"in_reply_to":"5fc1f717_8b57dc58","updated":"2019-03-12 19:27:50.000000000","message":"We\u0027re definitely doing the Rethinking Filesystem spec, so let\u0027s not worry about this since it\u0027s going away.","commit_id":"540718f5e4c8d94f283791f0048d64ad9bb40617"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"290016dac0241ddd4d3a0565c9946935f95d9e1f","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    except cfg.DuplicateOptError:"},{"line_number":90,"context_line":"        pass"},{"line_number":91,"context_line":"    conf.set_override(\u0027filesystem_store_datadir\u0027,"},{"line_number":92,"context_line":"                      CONF.node_staging_uri[7:],"},{"line_number":93,"context_line":"                      group\u003d\u0027glance_store\u0027)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    # NOTE(flaper87): Do not even try to judge me for this... :("}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_8b57dc58","line":92,"range":{"start_line":92,"start_character":44,"end_line":92,"end_character":45},"in_reply_to":"5fc1f717_d58107fd","updated":"2019-03-12 19:19:46.000000000","message":"This logic is repeated at 3-4 places, the most important reason I have not implemented his suggestion is because once my Rethinking filesystem patch gets merged this hardcoded loading of store will go away.\n\nNow since that has moved to Train I suggest that we should address this in a separate patch.\n\nKindly let me know your suggestion.","commit_id":"540718f5e4c8d94f283791f0048d64ad9bb40617"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b6d988e4897961d9c0681757449d39a6b6cc0d75","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        :param file_path: path to the file being deleted"},{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        if CONF.enabled_backends:"},{"line_number":129,"context_line":"            store_api.delete(file_path, None)"},{"line_number":130,"context_line":"        else:"},{"line_number":131,"context_line":"            # NOTE(abhishekk): Loading \u0027file\u0027 store explicitly as there"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_cbb3a409","line":128,"range":{"start_line":128,"start_character":11,"end_line":128,"end_character":32},"updated":"2019-03-12 19:09:19.000000000","message":"Do we know that there\u0027s a file backend configured? Didn\u0027t your spec for that get delayed until Train?","commit_id":"540718f5e4c8d94f283791f0048d64ad9bb40617"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"7f2e5d4cd51e765d5c0a29de5d1c3c2865851e4b","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        :param file_path: path to the file being deleted"},{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        if CONF.enabled_backends:"},{"line_number":129,"context_line":"            store_api.delete(file_path, None)"},{"line_number":130,"context_line":"        else:"},{"line_number":131,"context_line":"            # NOTE(abhishekk): Loading \u0027file\u0027 store explicitly as there"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_ab5e5841","line":128,"range":{"start_line":128,"start_character":11,"end_line":128,"end_character":32},"in_reply_to":"5fc1f717_6b4390b0","updated":"2019-03-12 19:27:50.000000000","message":"I see you doing the manual load in the \u0027else\u0027 clause, but what happens when the next line is executed if enabled_backends doesn\u0027t include a file store?","commit_id":"540718f5e4c8d94f283791f0048d64ad9bb40617"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b349f788eafe28b1987ee7990b46d9263bc9ee00","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        :param file_path: path to the file being deleted"},{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        if CONF.enabled_backends:"},{"line_number":129,"context_line":"            store_api.delete(file_path, None)"},{"line_number":130,"context_line":"        else:"},{"line_number":131,"context_line":"            # NOTE(abhishekk): Loading \u0027file\u0027 store explicitly as there"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_cb93a35a","line":128,"range":{"start_line":128,"start_character":11,"end_line":128,"end_character":32},"in_reply_to":"5fc1f717_ab5e5841","updated":"2019-03-12 19:46:57.000000000","message":"Again, enabled_backends will not include file store as that will be part of rethinking file system spec, you can see the logic of delete method in multiple_backend.py of glance_store.","commit_id":"540718f5e4c8d94f283791f0048d64ad9bb40617"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"290016dac0241ddd4d3a0565c9946935f95d9e1f","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        :param file_path: path to the file being deleted"},{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        if CONF.enabled_backends:"},{"line_number":129,"context_line":"            store_api.delete(file_path, None)"},{"line_number":130,"context_line":"        else:"},{"line_number":131,"context_line":"            # NOTE(abhishekk): Loading \u0027file\u0027 store explicitly as there"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_6b4390b0","line":128,"range":{"start_line":128,"start_character":11,"end_line":128,"end_character":32},"in_reply_to":"5fc1f717_cbb3a409","updated":"2019-03-12 19:19:46.000000000","message":"Yes, the staging logic is built around filestore only and that,s the only reason we are loading filestore manually here. My spec is about resrving a file store so that that reserved store will load once at the service start and not for the every call.","commit_id":"540718f5e4c8d94f283791f0048d64ad9bb40617"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"dc9abd69b1b7a3330ee70bd8f62b8bed55cb7265","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        file_path \u003d file_path[7:]"},{"line_number":90,"context_line":"        if os.path.exists(file_path):"},{"line_number":91,"context_line":"            try:"},{"line_number":92,"context_line":"                LOG.debug(_(\"Deleting image at %(fn)s\"), {\u0027fn\u0027: file_path})"},{"line_number":93,"context_line":"                os.unlink(file_path)"},{"line_number":94,"context_line":"            except OSError:"},{"line_number":95,"context_line":"                raise exception.Forbidden("}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_ad6094d0","line":92,"range":{"start_line":92,"start_character":29,"end_line":92,"end_character":53},"updated":"2019-03-13 19:40:43.000000000","message":"I\u0027d suggest giving the debug message some more context, something like \"After upload to the backend, deleting staged image data from %(fn)s\"","commit_id":"a418d4acd17e484909547e7b7bd4f9370f06e56e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d08fe4a52b788b92855221e6bc9b689655eae2d3","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        file_path \u003d file_path[7:]"},{"line_number":90,"context_line":"        if os.path.exists(file_path):"},{"line_number":91,"context_line":"            try:"},{"line_number":92,"context_line":"                LOG.debug(_(\"Deleting image at %(fn)s\"), {\u0027fn\u0027: file_path})"},{"line_number":93,"context_line":"                os.unlink(file_path)"},{"line_number":94,"context_line":"            except OSError:"},{"line_number":95,"context_line":"                raise exception.Forbidden("}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_efa76bbc","line":92,"range":{"start_line":92,"start_character":29,"end_line":92,"end_character":53},"in_reply_to":"5fc1f717_ad6094d0","updated":"2019-03-14 05:43:57.000000000","message":"Done","commit_id":"a418d4acd17e484909547e7b7bd4f9370f06e56e"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"dc9abd69b1b7a3330ee70bd8f62b8bed55cb7265","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                LOG.debug(_(\"Deleting image at %(fn)s\"), {\u0027fn\u0027: file_path})"},{"line_number":93,"context_line":"                os.unlink(file_path)"},{"line_number":94,"context_line":"            except OSError:"},{"line_number":95,"context_line":"                raise exception.Forbidden("},{"line_number":96,"context_line":"                    message\u003d(_(\"You cannot delete file %s\") % file_path))"},{"line_number":97,"context_line":"        else:"},{"line_number":98,"context_line":"            raise exception.ImageNotFound("}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_ea2522c3","line":95,"updated":"2019-03-13 19:40:43.000000000","message":"Instead of raising the exception, maybe just log an ERROR?  (If we raise an uncaught exception, I believe taskflow won\u0027t continue to execute the remainder of the flow, and the image record won\u0027t be updated and saved even though the data has already been uploaded to the backend.)  Message something like \"After upload to the backend, deletion of staged image data from %(fn)s has failed because it is Forbidden by the operating system\"","commit_id":"a418d4acd17e484909547e7b7bd4f9370f06e56e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d08fe4a52b788b92855221e6bc9b689655eae2d3","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                LOG.debug(_(\"Deleting image at %(fn)s\"), {\u0027fn\u0027: file_path})"},{"line_number":93,"context_line":"                os.unlink(file_path)"},{"line_number":94,"context_line":"            except OSError:"},{"line_number":95,"context_line":"                raise exception.Forbidden("},{"line_number":96,"context_line":"                    message\u003d(_(\"You cannot delete file %s\") % file_path))"},{"line_number":97,"context_line":"        else:"},{"line_number":98,"context_line":"            raise exception.ImageNotFound("}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_8f59078f","line":95,"in_reply_to":"5fc1f717_ea2522c3","updated":"2019-03-14 05:43:57.000000000","message":"Done","commit_id":"a418d4acd17e484909547e7b7bd4f9370f06e56e"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"dc9abd69b1b7a3330ee70bd8f62b8bed55cb7265","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                raise exception.Forbidden("},{"line_number":96,"context_line":"                    message\u003d(_(\"You cannot delete file %s\") % file_path))"},{"line_number":97,"context_line":"        else:"},{"line_number":98,"context_line":"            raise exception.ImageNotFound("},{"line_number":99,"context_line":"                message\u003d(_(\"File %s is not exist\") % file_path))"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_2d1fc45b","line":98,"updated":"2019-03-13 19:40:43.000000000","message":"I think this is another place where we want to log (probably ERROR, maybe WARNING) with a message something like \"After upload to the backend, deletion of staged image data has failed because it cannot be found at %(fn)s\"","commit_id":"a418d4acd17e484909547e7b7bd4f9370f06e56e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d08fe4a52b788b92855221e6bc9b689655eae2d3","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                raise exception.Forbidden("},{"line_number":96,"context_line":"                    message\u003d(_(\"You cannot delete file %s\") % file_path))"},{"line_number":97,"context_line":"        else:"},{"line_number":98,"context_line":"            raise exception.ImageNotFound("},{"line_number":99,"context_line":"                message\u003d(_(\"File %s is not exist\") % file_path))"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_af5e4373","line":98,"in_reply_to":"5fc1f717_2d1fc45b","updated":"2019-03-14 05:43:57.000000000","message":"Done","commit_id":"a418d4acd17e484909547e7b7bd4f9370f06e56e"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"34a32905cb2dec0c9524fe2a224df5d2b37cd9a7","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            except OSError:"},{"line_number":96,"context_line":"                LOG.error(_(\"After upload to backend, deletion of staged \""},{"line_number":97,"context_line":"                            \"image data from %(fn)s has failed because \""},{"line_number":98,"context_line":"                            \"it is Forbidden by operating \""},{"line_number":99,"context_line":"                            \"system\"), {\u0027fn\u0027: file_path})"},{"line_number":100,"context_line":"        else:"},{"line_number":101,"context_line":"            LOG.error(_(\"After upload to backend, deletion of staged \""},{"line_number":102,"context_line":"                        \"image data has failed because \""}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_359b7818","line":99,"range":{"start_line":98,"start_character":29,"end_line":99,"end_character":35},"updated":"2019-03-14 18:00:41.000000000","message":"There may be some other reasons to get an OSError.  Maybe just say it has failed because of Errno # and get the errno from the exception.","commit_id":"9ab442ba23f8c9c3ff5c1dfb2dcc1d9d6d895209"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"9454ce08aa39138beffed1795880ff6aeb56848c","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            except OSError:"},{"line_number":96,"context_line":"                LOG.error(_(\"After upload to backend, deletion of staged \""},{"line_number":97,"context_line":"                            \"image data from %(fn)s has failed because \""},{"line_number":98,"context_line":"                            \"it is Forbidden by operating \""},{"line_number":99,"context_line":"                            \"system\"), {\u0027fn\u0027: file_path})"},{"line_number":100,"context_line":"        else:"},{"line_number":101,"context_line":"            LOG.error(_(\"After upload to backend, deletion of staged \""},{"line_number":102,"context_line":"                        \"image data has failed because \""}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_7449f95d","line":99,"range":{"start_line":98,"start_character":29,"end_line":99,"end_character":35},"in_reply_to":"5fc1f717_359b7818","updated":"2019-03-15 05:55:05.000000000","message":"Done","commit_id":"9ab442ba23f8c9c3ff5c1dfb2dcc1d9d6d895209"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"18494146acc2467d1b551e5781ca52ec9e684a2d","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        \"\"\"Remove file from the backend"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        :param file_path: path to the file being deleted"},{"line_number":88,"context_line":"        \"\"\""},{"line_number":89,"context_line":"        file_path \u003d file_path[7:]"},{"line_number":90,"context_line":"        if os.path.exists(file_path):"},{"line_number":91,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5fc1f717_a3708109","line":88,"updated":"2019-03-15 12:01:06.000000000","message":"Maybe add a comment here:\n\n  # TODO(abhishek): refactor to use a specific staging store when the \"Rethinking Filesystem Access\"\n  # spec is implemented in Train","commit_id":"bea99b5830164d6c847ab92ce1164c0d07bc70d0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"a021c72178b390cd5a85336ddb42a762c988957c","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        \"\"\"Remove file from the backend"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        :param file_path: path to the file being deleted"},{"line_number":88,"context_line":"        \"\"\""},{"line_number":89,"context_line":"        file_path \u003d file_path[7:]"},{"line_number":90,"context_line":"        if os.path.exists(file_path):"},{"line_number":91,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5fc1f717_03d95455","line":88,"in_reply_to":"5fc1f717_a3708109","updated":"2019-03-15 12:32:53.000000000","message":"Done","commit_id":"bea99b5830164d6c847ab92ce1164c0d07bc70d0"}]}
