)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"f46ae1eaeba86155d69019deb412332ad8af1cf0","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When a create call fails due to user_storage_quota"},{"line_number":10,"context_line":"being exceeded, log an Error message."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Closes-Bug #1270832"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Ic7ec266aace03cff0a1f72dc3ba6f17b89f5fd55"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAUH%2F%2ByMc%3D","line":12,"updated":"2014-01-22 06:45:35.000000000","message":"Please use format \"Closes-Bug: #1270832\" so that the Gerrit can parse it as a bug link correctly.","commit_id":"6f99bd9bf04b39c86724e0647338f98c51d7e8e5"}],"glance/api/common.py":[{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"53069ba571ffd663270dd64ace96a9c1bab62c83","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        # exception is when there is no room left at all, thus we know"},{"line_number":130,"context_line":"        # it will not fit"},{"line_number":131,"context_line":"        if remaining \u003c\u003d 0:"},{"line_number":132,"context_line":"            LOG.error(_(\"User %s attempted to upload an image of size %d\""},{"line_number":133,"context_line":"                        \" that will exceeed the quota. %s bytes remaining.\")"},{"line_number":134,"context_line":"                        % (context.user, image_size, remaining))"},{"line_number":135,"context_line":"            raise exception.StorageQuotaFull(image_size\u003dimage_size,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Bz5c%3D","line":132,"updated":"2014-01-21 21:02:22.000000000","message":"Should this really be error? It\u0027s not a problem of the system but rather a user problem. Would log.info make more sense?","commit_id":"6f99bd9bf04b39c86724e0647338f98c51d7e8e5"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"f46ae1eaeba86155d69019deb412332ad8af1cf0","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        # exception is when there is no room left at all, thus we know"},{"line_number":130,"context_line":"        # it will not fit"},{"line_number":131,"context_line":"        if remaining \u003c\u003d 0:"},{"line_number":132,"context_line":"            LOG.error(_(\"User %s attempted to upload an image of size %d\""},{"line_number":133,"context_line":"                        \" that will exceeed the quota. %s bytes remaining.\")"},{"line_number":134,"context_line":"                        % (context.user, image_size, remaining))"},{"line_number":135,"context_line":"            raise exception.StorageQuotaFull(image_size\u003dimage_size,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2ByM4%3D","line":132,"in_reply_to":"AAAAUH%2F%2By%2Bc%3D","updated":"2014-01-22 06:45:35.000000000","message":"+1 BTW, I prefer to use warn for the audit purpose.","commit_id":"6f99bd9bf04b39c86724e0647338f98c51d7e8e5"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"7fca2d2fe341b300bfb030c0abc7cf86c2ad6adb","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        # exception is when there is no room left at all, thus we know"},{"line_number":130,"context_line":"        # it will not fit"},{"line_number":131,"context_line":"        if remaining \u003c\u003d 0:"},{"line_number":132,"context_line":"            LOG.error(_(\"User %s attempted to upload an image of size %d\""},{"line_number":133,"context_line":"                        \" that will exceeed the quota. %s bytes remaining.\")"},{"line_number":134,"context_line":"                        % (context.user, image_size, remaining))"},{"line_number":135,"context_line":"            raise exception.StorageQuotaFull(image_size\u003dimage_size,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BwTA%3D","line":132,"in_reply_to":"AAAAUH%2F%2ByM4%3D","updated":"2014-01-22 13:52:48.000000000","message":"+1 warn","commit_id":"6f99bd9bf04b39c86724e0647338f98c51d7e8e5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"6f4f878c098c0ba6a6e467dcd1ff6fe8fccd5fb2","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        # exception is when there is no room left at all, thus we know"},{"line_number":130,"context_line":"        # it will not fit"},{"line_number":131,"context_line":"        if remaining \u003c\u003d 0:"},{"line_number":132,"context_line":"            LOG.error(_(\"User %s attempted to upload an image of size %d\""},{"line_number":133,"context_line":"                        \" that will exceeed the quota. %s bytes remaining.\")"},{"line_number":134,"context_line":"                        % (context.user, image_size, remaining))"},{"line_number":135,"context_line":"            raise exception.StorageQuotaFull(image_size\u003dimage_size,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2By%2Bc%3D","line":132,"in_reply_to":"AAAAUH%2F%2Bz5c%3D","updated":"2014-01-22 02:30:45.000000000","message":"+1\n\nOr maybe \"warn\"?","commit_id":"6f99bd9bf04b39c86724e0647338f98c51d7e8e5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"6f4f878c098c0ba6a6e467dcd1ff6fe8fccd5fb2","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        return"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    if image_size \u003e remaining:"},{"line_number":140,"context_line":"        LOG.error(_(\"User %s attempted to upload an image of size %d\""},{"line_number":141,"context_line":"                    \" that will exceeed the quota. %s bytes remaining.\")"},{"line_number":142,"context_line":"                    % (context.user, image_size, remaining))"},{"line_number":143,"context_line":"        raise exception.StorageQuotaFull(image_size\u003dimage_size,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2By%2BQ%3D","line":140,"updated":"2014-01-22 02:30:45.000000000","message":"ditto","commit_id":"6f99bd9bf04b39c86724e0647338f98c51d7e8e5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"7e30509fc4121cb97fbb2437e89e5e1f6cebdd04","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        # exception is when there is no room left at all, thus we know"},{"line_number":130,"context_line":"        # it will not fit"},{"line_number":131,"context_line":"        if remaining \u003c\u003d 0:"},{"line_number":132,"context_line":"            LOG.warn(_(\"User %s attempted to upload an image of size %d\""},{"line_number":133,"context_line":"                        \" that will exceeed the quota. %s bytes remaining.\")"},{"line_number":134,"context_line":"                        % (context.user, image_size, remaining))"},{"line_number":135,"context_line":"            raise exception.StorageQuotaFull(image_size\u003dimage_size,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BwIY%3D","line":132,"updated":"2014-01-22 14:24:43.000000000","message":"May I ask you using named parameter formation instead of \"%s\"?","commit_id":"3d5670aef80ceacee635a5f339933a901bebec5a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"7e30509fc4121cb97fbb2437e89e5e1f6cebdd04","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        return"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    if image_size \u003e remaining:"},{"line_number":140,"context_line":"        LOG.warn(_(\"User %s attempted to upload an image of size %d\""},{"line_number":141,"context_line":"                    \" that will exceeed the quota. %s bytes remaining.\")"},{"line_number":142,"context_line":"                    % (context.user, image_size, remaining))"},{"line_number":143,"context_line":"        raise exception.StorageQuotaFull(image_size\u003dimage_size,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BwIs%3D","line":140,"updated":"2014-01-22 14:24:43.000000000","message":"ditto","commit_id":"3d5670aef80ceacee635a5f339933a901bebec5a"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"123bbbd670ce7acf45a65d3db98f18bb2434c7cf","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            LOG.warn(_(\"User %(user)s attempted to upload an image of size\""},{"line_number":133,"context_line":"                       \" %(size)d that will exceeed the quota. %(remaining)d\""},{"line_number":134,"context_line":"                       \" bytes remaining.\")"},{"line_number":135,"context_line":"                        % {\u0027user\u0027: context.user, \u0027size\u0027: image_size,"},{"line_number":136,"context_line":"                          \u0027remaining\u0027: remaining})"},{"line_number":137,"context_line":"            raise exception.StorageQuotaFull(image_size\u003dimage_size,"},{"line_number":138,"context_line":"                                             remaining\u003dremaining)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2Bvu4%3D","line":135,"updated":"2014-01-22 15:26:03.000000000","message":"oh, seems this formation will cause follow issue since image_size var is None at here (even go your original way in PS#2):\n\n    TypeError: %d format: a number is required, not NoneType\n\nsorry for my separated comments.","commit_id":"96cfa25385927bf95ef70fbae283a38d72a65a71"},{"author":{"_account_id":9500,"name":"Matt Fischer","email":"matt@mattfischer.com","username":"mfisch"},"change_message_id":"e9e523874e8005ce69b0f3cdf8761f829f4ecc5d","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            LOG.warn(_(\"User %(user)s attempted to upload an image of size\""},{"line_number":133,"context_line":"                       \" %(size)d that will exceeed the quota. %(remaining)d\""},{"line_number":134,"context_line":"                       \" bytes remaining.\")"},{"line_number":135,"context_line":"                        % {\u0027user\u0027: context.user, \u0027size\u0027: image_size,"},{"line_number":136,"context_line":"                          \u0027remaining\u0027: remaining})"},{"line_number":137,"context_line":"            raise exception.StorageQuotaFull(image_size\u003dimage_size,"},{"line_number":138,"context_line":"                                             remaining\u003dremaining)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2BuVM%3D","line":135,"in_reply_to":"AAAAUH%2F%2Bvu4%3D","updated":"2014-01-22 19:27:50.000000000","message":"Thanks for catching this. I didn\u0027t have a way to test this path easily.","commit_id":"96cfa25385927bf95ef70fbae283a38d72a65a71"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"30bbe0def7060ae058aca26aeee7fe9592e3be09","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        # it will not fit"},{"line_number":131,"context_line":"        if remaining \u003c\u003d 0:"},{"line_number":132,"context_line":"            try:"},{"line_number":133,"context_line":"                user \u003d context.user"},{"line_number":134,"context_line":"            except AttributeError:"},{"line_number":135,"context_line":"                user \u003d \u0027unknown\u0027"},{"line_number":136,"context_line":"            LOG.warn(_(\"User %(user)s attempted to upload an image of\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BlZs%3D","line":133,"updated":"2014-01-24 05:58:28.000000000","message":"1. Do you really think we need to provide \"user\" var in log message?\n\n2. If answer is yes, can we do this once and reuse \"user\" var at below (line #152)?\n\n3. And can we go this easy way: \"user \u003d getattar(context, \u0027user\u0027, \"\u003cunknow\u003e\")\"","commit_id":"feacab6a4e03240839eb5394901909845e0ae9ad"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"30bbe0def7060ae058aca26aeee7fe9592e3be09","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                user \u003d context.user"},{"line_number":134,"context_line":"            except AttributeError:"},{"line_number":135,"context_line":"                user \u003d \u0027unknown\u0027"},{"line_number":136,"context_line":"            LOG.warn(_(\"User %(user)s attempted to upload an image of\""},{"line_number":137,"context_line":"                       \" unknown size that will exceeed the quota.\""},{"line_number":138,"context_line":"                       \" %(remaining)d bytes remaining.\")"},{"line_number":139,"context_line":"                     % {\u0027user\u0027: user, \u0027remaining\u0027: remaining})"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BlaU%3D","line":136,"updated":"2014-01-24 05:58:28.000000000","message":"For log level point, I personally like to go \"warn\", but \"info\" is fine.\n\nThe reason for me:\n\n1. Like Matt Fischer mentioned, debug level is too low, I believe most deployment should never use debug level, and warn/info log here can get admin\u0027s notice easily.\n\n2. Besides, I like \"warn\" more since the glance store quota is be configured by admin/operator currently [1] but end user (even probably we will use keystone instead as per-tenant quota), so if admin notice this situation then he can help raise quota up if needed, to help resolve end user\u0027s problem actively on time.\n\n[1] https://github.com/openstack/glance/blob/master/etc/glance-api.conf#L489","commit_id":"feacab6a4e03240839eb5394901909845e0ae9ad"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"30bbe0def7060ae058aca26aeee7fe9592e3be09","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            user \u003d context.user"},{"line_number":147,"context_line":"        except AttributeError:"},{"line_number":148,"context_line":"            user \u003d \u0027unknown\u0027"},{"line_number":149,"context_line":"        LOG.warn(_(\"User %(user)s attempted to upload an image of size\""},{"line_number":150,"context_line":"                   \" %(size)d that will exceeed the quota. %(remaining)d\""},{"line_number":151,"context_line":"                   \" bytes remaining.\")"},{"line_number":152,"context_line":"                 % {\u0027user\u0027: user, \u0027size\u0027: image_size, \u0027remaining\u0027: remaining})"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BlZo%3D","line":149,"updated":"2014-01-24 05:58:28.000000000","message":"ditto","commit_id":"feacab6a4e03240839eb5394901909845e0ae9ad"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"87a85671b23465332487846ba65d36ac496d9cbe","unresolved":false,"context_lines":[{"line_number":123,"context_line":"    if remaining is None:"},{"line_number":124,"context_line":"        return"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    user \u003d getattr(context, \u0027user\u0027, \"\u003cunknown\u003e\")"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    if image_size is None:"},{"line_number":129,"context_line":"        #NOTE(jbresnah) When the image size is None it means that it is"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BfGQ%3D","line":126,"updated":"2014-01-25 03:48:05.000000000","message":"Nit: change \u0027  to \"  for consistent?","commit_id":"5299c26fcc2044a18bd6d10604e317e8ce39a6fe"},{"author":{"_account_id":9500,"name":"Matt Fischer","email":"matt@mattfischer.com","username":"mfisch"},"change_message_id":"5a4fe727f0e8c77888cf7ab3f408bf4f9fcecec8","unresolved":false,"context_lines":[{"line_number":123,"context_line":"    if remaining is None:"},{"line_number":124,"context_line":"        return"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    user \u003d getattr(context, \u0027user\u0027, \"\u003cunknown\u003e\")"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    if image_size is None:"},{"line_number":129,"context_line":"        #NOTE(jbresnah) When the image size is None it means that it is"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BdJ4%3D","line":126,"in_reply_to":"AAAAUH%2F%2BfGQ%3D","updated":"2014-01-26 02:04:07.000000000","message":"Done","commit_id":"5299c26fcc2044a18bd6d10604e317e8ce39a6fe"}]}
