)]}'
{"glance/api/v2/image_data.py":[{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"6412e2ebbb839f71dabf419fd664ea84281e6653","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                    req.context, \u0027file\u0027, image_id, data, size)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        except exception.Duplicate, e:"},{"line_number":52,"context_line":"            msg \u003d _(\"Attempt to upload duplicate image: %s\") % e"},{"line_number":53,"context_line":"            LOG.error(msg)"},{"line_number":54,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003dmsg, request\u003dreq)"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2Fr4E%3D","line":52,"updated":"2012-08-20 17:25:40.000000000","message":"_(\u0027Unable to upload duplicate image data for image %s\u0027) % image_id","commit_id":"b6603b57d99630f19da0b571ba0f0b0b82f9ed55"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"6412e2ebbb839f71dabf419fd664ea84281e6653","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003dmsg, request\u003dreq)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        except exception.Forbidden, e:"},{"line_number":57,"context_line":"            msg \u003d _(\"Forbidden upload attempt: %s\") % e"},{"line_number":58,"context_line":"            LOG.error(msg)"},{"line_number":59,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg,"},{"line_number":60,"context_line":"                                request\u003dreq,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2Fr4A%3D","line":57,"updated":"2012-08-20 17:25:40.000000000","message":"_(\u0027Not allowed to upload image data for image %s\u0027) % image_id","commit_id":"b6603b57d99630f19da0b571ba0f0b0b82f9ed55"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"6412e2ebbb839f71dabf419fd664ea84281e6653","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            LOG.error(msg)"},{"line_number":59,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg,"},{"line_number":60,"context_line":"                                request\u003dreq,"},{"line_number":61,"context_line":"                                content_type\u003d\"text/plain\")"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        except exception.StorageFull, e:"},{"line_number":64,"context_line":"            msg \u003d _(\"Image storage media is full: %s\") % e"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2Fr38%3D","line":61,"updated":"2012-08-20 17:25:40.000000000","message":"Remove content_type","commit_id":"b6603b57d99630f19da0b571ba0f0b0b82f9ed55"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"6412e2ebbb839f71dabf419fd664ea84281e6653","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            LOG.error(msg)"},{"line_number":66,"context_line":"            raise webob.exc.HTTPRequestEntityTooLarge(explanation\u003dmsg,"},{"line_number":67,"context_line":"                                            request\u003dreq,"},{"line_number":68,"context_line":"                                            content_type\u003d\u0027text/plain\u0027)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        except exception.StorageWriteDenied, e:"},{"line_number":71,"context_line":"            msg \u003d _(\"Insufficient permissions on image storage media: %s\") % e"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2Fr34%3D","line":68,"updated":"2012-08-20 17:25:40.000000000","message":"Remove content_type","commit_id":"b6603b57d99630f19da0b571ba0f0b0b82f9ed55"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"6412e2ebbb839f71dabf419fd664ea84281e6653","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            LOG.error(msg)"},{"line_number":73,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003dmsg,"},{"line_number":74,"context_line":"                                         request\u003dreq,"},{"line_number":75,"context_line":"                                         content_type\u003d\u0027text/plain\u0027)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        except HTTPError, e:"},{"line_number":78,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2Fr30%3D","line":75,"updated":"2012-08-20 17:25:40.000000000","message":"Remove content_type","commit_id":"b6603b57d99630f19da0b571ba0f0b0b82f9ed55"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"6412e2ebbb839f71dabf419fd664ea84281e6653","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        except Exception, e:"},{"line_number":81,"context_line":"            tb_info \u003d traceback.format_exc()"},{"line_number":82,"context_line":"            LOG.error(tb_info)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"            msg \u003d _(\"Error uploading image: (%(class_name)s): \""},{"line_number":85,"context_line":"                    \"%(exc)s\") % ({\u0027class_name\u0027: e.__class__.__name__,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2Fr4Q%3D","line":82,"updated":"2012-08-20 17:25:40.000000000","message":"Replace lines 81and 82 with something like this:\n\n  LOG.exception(\u0027Failed to upload image data\u0027)","commit_id":"b6603b57d99630f19da0b571ba0f0b0b82f9ed55"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"6412e2ebbb839f71dabf419fd664ea84281e6653","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            tb_info \u003d traceback.format_exc()"},{"line_number":82,"context_line":"            LOG.error(tb_info)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"            msg \u003d _(\"Error uploading image: (%(class_name)s): \""},{"line_number":85,"context_line":"                    \"%(exc)s\") % ({\u0027class_name\u0027: e.__class__.__name__,"},{"line_number":86,"context_line":"                    \u0027exc\u0027: str(e)})"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2Fr4M%3D","line":84,"updated":"2012-08-20 17:25:40.000000000","message":"I don\u0027t want to give this much information back to the user. Let\u0027s just make the message this:\n\n  \u0027Image data upload failed due to internal error.\u0027","commit_id":"b6603b57d99630f19da0b571ba0f0b0b82f9ed55"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"0ea8c8c86eb51c0668d52c2c4339db59b0e03ecc","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @utils.mutating"},{"line_number":54,"context_line":"    def upload(self, req, image_id, data, size):"},{"line_number":55,"context_line":"        try:"},{"line_number":56,"context_line":"            image \u003d self._get_image(req.context, image_id)"},{"line_number":57,"context_line":"            location, size, checksum \u003d self.store_api.add_to_backend("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2Fm%2FI%3D","line":54,"updated":"2012-08-27 20:58:32.000000000","message":"Could catching these be narrowed down? for instance, StorageFull should only be raised by add_to_backend so there is no need to wrap around the entire block. I also don\u0027t like the catch all.\n\nMaybe we could have a common exception type for all of the Storage errors at least. That way we could just catch that and use the msgs defined for them in exception.py.","commit_id":"3a60490087add4e4a5a03c8613fcc79de02e588b"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"4066a88633fcf8a9832f77426bdd17661897a1f0","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @utils.mutating"},{"line_number":54,"context_line":"    def upload(self, req, image_id, data, size):"},{"line_number":55,"context_line":"        try:"},{"line_number":56,"context_line":"            image \u003d self._get_image(req.context, image_id)"},{"line_number":57,"context_line":"            location, size, checksum \u003d self.store_api.add_to_backend("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2FmFU%3D","line":54,"in_reply_to":"AAAALH%2F%2Fm%2FI%3D","updated":"2012-08-28 21:25:28.000000000","message":"Alex:\n\nWhile these are all fair points and I agree with everything you have said, I think we should also not worry about wasting too much time here as this whole file will get refactored as soon as Grizzly opens up.","commit_id":"3a60490087add4e4a5a03c8613fcc79de02e588b"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"c8e17eaa6dcc6a9bdac56509d49975539e059fca","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @utils.mutating"},{"line_number":54,"context_line":"    def upload(self, req, image_id, data, size):"},{"line_number":55,"context_line":"        try:"},{"line_number":56,"context_line":"            image \u003d self._get_image(req.context, image_id)"},{"line_number":57,"context_line":"            location, size, checksum \u003d self.store_api.add_to_backend("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2Fm9c%3D","line":54,"in_reply_to":"AAAALH%2F%2Fm%2FI%3D","updated":"2012-08-27 21:55:24.000000000","message":"Thanks for your feedback Alex. But this is not only about using the messages, because some the store exceptions, throw specific HTTP errors like RequestEntityTooLarge which I dont want to lose.\n\nI can investigate if there are other store exceptions which land in the generic Exception segment and ensure they are thrown either as a generic storage error if you want. But I am not sure at this instance that if it is absolutely necessary.","commit_id":"3a60490087add4e4a5a03c8613fcc79de02e588b"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"bbc6f598b62579aefbfbf812fdf07abcab481857","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            raise webob.exc.HTTPServiceUnavailable(explanation\u003dmsg,"},{"line_number":80,"context_line":"                                                  request\u003dreq)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        except webob.exc.HTTPError, e:"},{"line_number":83,"context_line":"            raise"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        except Exception, e:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FjSU%3D","line":82,"updated":"2012-08-31 16:56:59.000000000","message":"do you want to log this exception too?","commit_id":"dfe936d94ec0a6bbabdd476440e771ad087c53db"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"bbc6f598b62579aefbfbf812fdf07abcab481857","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        except Exception, e:"},{"line_number":86,"context_line":"            LOG.exception(\"Failed to upload image data\")"},{"line_number":87,"context_line":"            msg \u003d _(\"Image data upload failed due to internal error\")"},{"line_number":88,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg, request\u003dreq)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        v2.update_image_read_acl(req, self.db_api, image)"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FjSY%3D","line":88,"updated":"2012-08-31 16:56:59.000000000","message":"Should this be HTTPInternalServerError ? or maybe just  reraise the original after logging?","commit_id":"dfe936d94ec0a6bbabdd476440e771ad087c53db"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"f25af35866243adf77cb9881a308276f5226b736","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        except exception.Duplicate, e:"},{"line_number":63,"context_line":"            msg \u003d _(\"Unable to upload duplicate image data for image: %s\")"},{"line_number":64,"context_line":"            LOG.error(msg % image_id)"},{"line_number":65,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003dmsg, request\u003dreq)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        except exception.Forbidden, e:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAALH%2F%2FhNk%3D","line":64,"updated":"2012-09-04 20:24:28.000000000","message":"This should be debug.","commit_id":"d477c9dcd751d2e996ce18489615e32d8c0c5f04"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"f25af35866243adf77cb9881a308276f5226b736","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        except exception.Forbidden, e:"},{"line_number":68,"context_line":"            msg \u003d _(\"Not allowed to upload image data for image %s\")"},{"line_number":69,"context_line":"            LOG.error(msg % image_id)"},{"line_number":70,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg, request\u003dreq)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        except exception.StorageFull, e:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAALH%2F%2FhSo%3D","line":69,"updated":"2012-09-04 20:24:28.000000000","message":"This should be debug.","commit_id":"d477c9dcd751d2e996ce18489615e32d8c0c5f04"}]}
