)]}'
{"glance/api/v2/image_data.py":[{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"d5e52d1ff33cfbb9827f57ec529af9345f850b91","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        :param staging_store: The store used for staging"},{"line_number":78,"context_line":"        \"\"\""},{"line_number":79,"context_line":"        loc \u003d glance_store.location.get_location_from_uri(str("},{"line_number":80,"context_line":"            CONF.node_staging_uri+\u0027/\u0027+image.image_id))"},{"line_number":81,"context_line":"        try:"},{"line_number":82,"context_line":"            staging_store.delete(loc)"},{"line_number":83,"context_line":"        except glance_store.exceptions.NotFound:"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_e7d656c4","line":80,"range":{"start_line":80,"start_character":12,"end_line":80,"end_character":33},"updated":"2017-03-30 18:11:17.000000000","message":"We don\u0027t have this config opt available yet because this commit isn\u0027t depending on Ie5ab21ec3f9c880fa042dcc68865c1fceb9463ec.\n\nI think it\u0027s the same reason why tests are failing on Ie70abd0737e4ddf52fded941d7abc9d9d1eb285a","commit_id":"0efc4c7b763d00063043b3cfddcfcc553ad7b67e"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"6d2fa1d59646e62224d82d1dce460e7e5900d50f","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        :param image: The image will be restored"},{"line_number":77,"context_line":"        :param staging_store: The store used for staging"},{"line_number":78,"context_line":"        \"\"\""},{"line_number":79,"context_line":"        loc \u003d glance_store.location.get_location_from_uri(str("},{"line_number":80,"context_line":"            CONF.node_staging_uri+\u0027/\u0027+image.image_id))"},{"line_number":81,"context_line":"        try:"},{"line_number":82,"context_line":"            staging_store.delete(loc)"},{"line_number":83,"context_line":"        except glance_store.exceptions.NotFound:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_af282234","line":80,"range":{"start_line":79,"start_character":58,"end_line":80,"end_character":53},"updated":"2017-03-22 22:51:53.000000000","message":"probably should be using urlparse.urljoin?","commit_id":"0efc4c7b763d00063043b3cfddcfcc553ad7b67e"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"68ebfbca47de6fad94146bfb1e5d43b1a6de4e05","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        :param image: The image will be restored"},{"line_number":77,"context_line":"        :param staging_store: The store used for staging"},{"line_number":78,"context_line":"        \"\"\""},{"line_number":79,"context_line":"        loc \u003d glance_store.location.get_location_from_uri(str("},{"line_number":80,"context_line":"            CONF.node_staging_uri+\u0027/\u0027+image.image_id))"},{"line_number":81,"context_line":"        try:"},{"line_number":82,"context_line":"            staging_store.delete(loc)"},{"line_number":83,"context_line":"        except glance_store.exceptions.NotFound:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f044301_1e36ec04","line":80,"range":{"start_line":79,"start_character":58,"end_line":80,"end_character":53},"in_reply_to":"1a1ced50_af282234","updated":"2017-05-05 14:37:48.000000000","message":"Any specific reason for that? We\u0027re adding image ID at the end of the uri which is pretty straight forward operation for single function call. Using urlparse introduces one more module to import we really don\u0027t need and complicates this bit of code while the end result is the same.","commit_id":"0efc4c7b763d00063043b3cfddcfcc553ad7b67e"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"d5e52d1ff33cfbb9827f57ec529af9345f850b91","unresolved":false,"context_lines":[{"line_number":282,"context_line":"            conf \u003d cfg.ConfigOpts()"},{"line_number":283,"context_line":"            backend.register_opts(conf)"},{"line_number":284,"context_line":"            conf.set_override(\u0027filesystem_store_datadir\u0027,"},{"line_number":285,"context_line":"                              CONF.node_staging_uri[7:],"},{"line_number":286,"context_line":"                              group\u003d\u0027glance_store\u0027,"},{"line_number":287,"context_line":"                              enforce_type\u003dTrue)"},{"line_number":288,"context_line":"            staging_store \u003d backend._load_store(conf, \u0027file\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_6799261e","line":285,"range":{"start_line":285,"start_character":30,"end_line":285,"end_character":51},"updated":"2017-03-30 18:11:17.000000000","message":"same","commit_id":"0efc4c7b763d00063043b3cfddcfcc553ad7b67e"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"6d2fa1d59646e62224d82d1dce460e7e5900d50f","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        except exception.StorageQuotaFull as e:"},{"line_number":320,"context_line":"            msg \u003d _(\"Image exceeds the storage \""},{"line_number":321,"context_line":"                    \"quota: %s\") % encodeutils.exception_to_unicode(e)"},{"line_number":322,"context_line":"            LOG.error(msg)"},{"line_number":323,"context_line":"            self._unstage(image_repo, image, staging_store)"},{"line_number":324,"context_line":"            raise webob.exc.HTTPRequestEntityTooLarge(explanation\u003dmsg,"},{"line_number":325,"context_line":"                                                      request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_40d3fd5f","line":322,"range":{"start_line":322,"start_character":16,"end_line":322,"end_character":21},"updated":"2017-03-22 22:51:53.000000000","message":"not an error severity event, maybe info","commit_id":"0efc4c7b763d00063043b3cfddcfcc553ad7b67e"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"68ebfbca47de6fad94146bfb1e5d43b1a6de4e05","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        except exception.StorageQuotaFull as e:"},{"line_number":320,"context_line":"            msg \u003d _(\"Image exceeds the storage \""},{"line_number":321,"context_line":"                    \"quota: %s\") % encodeutils.exception_to_unicode(e)"},{"line_number":322,"context_line":"            LOG.error(msg)"},{"line_number":323,"context_line":"            self._unstage(image_repo, image, staging_store)"},{"line_number":324,"context_line":"            raise webob.exc.HTTPRequestEntityTooLarge(explanation\u003dmsg,"},{"line_number":325,"context_line":"                                                      request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f044301_949e5cb6","line":322,"range":{"start_line":322,"start_character":16,"end_line":322,"end_character":21},"in_reply_to":"1a1ced50_40d3fd5f","updated":"2017-05-05 14:37:48.000000000","message":"Done","commit_id":"0efc4c7b763d00063043b3cfddcfcc553ad7b67e"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"6d2fa1d59646e62224d82d1dce460e7e5900d50f","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        except exception.ImageSizeLimitExceeded as e:"},{"line_number":328,"context_line":"            msg \u003d _(\"The incoming image is \""},{"line_number":329,"context_line":"                    \"too large: %s\") % encodeutils.exception_to_unicode(e)"},{"line_number":330,"context_line":"            LOG.error(msg)"},{"line_number":331,"context_line":"            self._unstage(image_repo, image, staging_store)"},{"line_number":332,"context_line":"            raise webob.exc.HTTPRequestEntityTooLarge(explanation\u003dmsg,"},{"line_number":333,"context_line":"                                                      request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_c0c7ed93","line":330,"range":{"start_line":330,"start_character":16,"end_line":330,"end_character":21},"updated":"2017-03-22 22:51:53.000000000","message":"not an error severity event, maybe info","commit_id":"0efc4c7b763d00063043b3cfddcfcc553ad7b67e"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"68ebfbca47de6fad94146bfb1e5d43b1a6de4e05","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        except exception.ImageSizeLimitExceeded as e:"},{"line_number":328,"context_line":"            msg \u003d _(\"The incoming image is \""},{"line_number":329,"context_line":"                    \"too large: %s\") % encodeutils.exception_to_unicode(e)"},{"line_number":330,"context_line":"            LOG.error(msg)"},{"line_number":331,"context_line":"            self._unstage(image_repo, image, staging_store)"},{"line_number":332,"context_line":"            raise webob.exc.HTTPRequestEntityTooLarge(explanation\u003dmsg,"},{"line_number":333,"context_line":"                                                      request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f044301_74a51004","line":330,"range":{"start_line":330,"start_character":16,"end_line":330,"end_character":21},"in_reply_to":"1a1ced50_c0c7ed93","updated":"2017-05-05 14:37:48.000000000","message":"Done","commit_id":"0efc4c7b763d00063043b3cfddcfcc553ad7b67e"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"6d2fa1d59646e62224d82d1dce460e7e5900d50f","unresolved":false,"context_lines":[{"line_number":344,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":345,"context_line":"                LOG.exception(_LE(\"Failed to stage image data due to \""},{"line_number":346,"context_line":"                                  \"internal error\"))"},{"line_number":347,"context_line":"                self._restore(image_repo, image)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    def download(self, req, image_id):"},{"line_number":350,"context_line":"        image_repo \u003d self.gateway.get_repo(req.context)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_c0236d54","line":347,"range":{"start_line":347,"start_character":21,"end_line":347,"end_character":29},"updated":"2017-03-22 22:51:53.000000000","message":"I\u0027m not sure what other exceptions might be encountered, but maybe _unstage instead to be sure?","commit_id":"0efc4c7b763d00063043b3cfddcfcc553ad7b67e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"26e807304af75f296d91fe2c6051ceb8ca8589fd","unresolved":false,"context_lines":[{"line_number":271,"context_line":"    @utils.mutating"},{"line_number":272,"context_line":"    def stage(self, req, image_id, data, size):"},{"line_number":273,"context_line":"        image_repo \u003d self.gateway.get_repo(req.context)"},{"line_number":274,"context_line":"        image \u003d None"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        # NOTE(jokke): this is horrible way to do it but as long as"},{"line_number":277,"context_line":"        # glance_store is in a shape it is, the only way. Don\u0027t hold me"}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_76b540ee","line":274,"range":{"start_line":274,"start_character":8,"end_line":274,"end_character":20},"updated":"2017-05-29 10:56:05.000000000","message":"is it required?","commit_id":"bc78de2dd22cac934dd5ede8a57236acb83c93ba"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"c187473fca060bbb201a84370f5e93e137e6502c","unresolved":false,"context_lines":[{"line_number":271,"context_line":"    @utils.mutating"},{"line_number":272,"context_line":"    def stage(self, req, image_id, data, size):"},{"line_number":273,"context_line":"        image_repo \u003d self.gateway.get_repo(req.context)"},{"line_number":274,"context_line":"        image \u003d None"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        # NOTE(jokke): this is horrible way to do it but as long as"},{"line_number":277,"context_line":"        # glance_store is in a shape it is, the only way. Don\u0027t hold me"}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_bbf6455c","line":274,"range":{"start_line":274,"start_character":8,"end_line":274,"end_character":20},"in_reply_to":"df140735_76b540ee","updated":"2017-06-06 09:56:17.000000000","message":"yes","commit_id":"bc78de2dd22cac934dd5ede8a57236acb83c93ba"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"c1b7bd1861e9c6e8a425bbccdee2081bed8bbcfc","unresolved":false,"context_lines":[{"line_number":287,"context_line":""},{"line_number":288,"context_line":"            try:"},{"line_number":289,"context_line":"                staging_store.configure()"},{"line_number":290,"context_line":"            except AttributeError:"},{"line_number":291,"context_line":"                msg \u003d _(\"\u0027node_staging_uri\u0027 is not set correctly. Could not \""},{"line_number":292,"context_line":"                        \"load staging store.\")"},{"line_number":293,"context_line":"                raise exception.BadStoreUri(message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_a90c8942","line":290,"updated":"2017-06-07 14:08:10.000000000","message":"I have several questions about this part:\n1. How can there be an AttributeError?\n2. Why shouldn\u0027t we add \u0027re_raise_bsc\u003dTrue\u0027 to \u0027configure\u0027 call (https://github.com/openstack/glance_store/blob/master/glance_store/driver.py#L55) and catch BadStoreConfiguration as well?","commit_id":"bc78de2dd22cac934dd5ede8a57236acb83c93ba"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"26e807304af75f296d91fe2c6051ceb8ca8589fd","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        staging_store \u003d _build_staging_store()"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        try:"},{"line_number":299,"context_line":"            image \u003d image_repo.get(image_id)"},{"line_number":300,"context_line":"            image.status \u003d \u0027uploading\u0027"},{"line_number":301,"context_line":"            image_repo.save(image, from_state\u003d\u0027queued\u0027)"},{"line_number":302,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_36a2289c","line":299,"range":{"start_line":299,"start_character":20,"end_line":299,"end_character":44},"updated":"2017-05-29 10:56:05.000000000","message":"Is it require to caught NotFound exception?","commit_id":"bc78de2dd22cac934dd5ede8a57236acb83c93ba"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"c187473fca060bbb201a84370f5e93e137e6502c","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        staging_store \u003d _build_staging_store()"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        try:"},{"line_number":299,"context_line":"            image \u003d image_repo.get(image_id)"},{"line_number":300,"context_line":"            image.status \u003d \u0027uploading\u0027"},{"line_number":301,"context_line":"            image_repo.save(image, from_state\u003d\u0027queued\u0027)"},{"line_number":302,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_db057915","line":299,"range":{"start_line":299,"start_character":20,"end_line":299,"end_character":44},"in_reply_to":"df140735_36a2289c","updated":"2017-06-06 09:56:17.000000000","message":"Correct, so if we fail here for any reason (most likely NotFound) our last catch will then call the _restore with image being one of the parameters. That would cause the _restore call fail as we do not have image, but the restore can handle it just being None. it\u0027s there to avoid unhandled exception to be raised during our exception handling.","commit_id":"bc78de2dd22cac934dd5ede8a57236acb83c93ba"}]}
