)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"9adc1b3b1cccbb2656cc3e5b93d7fa68e9263b7e","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Fei Long Wang \u003cflwang@cn.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-12-23 19:13:23 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"No image size after update/add locations"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Based on current implement, the image size won\u0027t be updated if user"},{"line_number":10,"context_line":"update/add locations against a queued image. This fix will update"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAATn%2F8rV0%3D","line":7,"updated":"2013-12-23 11:22:34.000000000","message":"Change to \"Set image size after update/add locations\" ?","commit_id":"2a326b4d0815105d628b0baa14832737379f2959"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"ceb00d3f64feb45488989216a776872d0f1c04f0","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Fei Long Wang \u003cflwang@cn.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-12-23 19:13:23 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"No image size after update/add locations"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Based on current implement, the image size won\u0027t be updated if user"},{"line_number":10,"context_line":"update/add locations against a queued image. This fix will update"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAATn%2F8qlQ%3D","line":7,"in_reply_to":"AAAATn%2F8rV0%3D","updated":"2013-12-23 14:15:29.000000000","message":"Make sense.","commit_id":"2a326b4d0815105d628b0baa14832737379f2959"},{"author":{"_account_id":9520,"name":"David Koo (koofoss)","email":"david.koo@huawei.com","username":"koofoss"},"change_message_id":"579e1ac981a3b2e0a44b980aa8a8590d66567aa0","unresolved":false,"context_lines":[{"line_number":10,"context_line":"update/add locations against a queued image. This fix will set the"},{"line_number":11,"context_line":"image size based on given location."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Fixes bug 1261624"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I265c6a92274ab2f94e005a1ab50e01d2f0c2143e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAT3%2F%2Fy1c%3D","line":13,"updated":"2013-12-31 13:38:56.000000000","message":"I think this should be:\n\n  Fixes bug: 1261624\n\notherwise it points to a (non-existent) link in Gerrit and not to the bug in launchpad.","commit_id":"a23d8074e4f8c271f2100df40621810f6405c693"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"a46e58698e4856373e831d8ab13453460a981a16","unresolved":false,"context_lines":[{"line_number":10,"context_line":"update/add locations against a queued image. This fix will set the"},{"line_number":11,"context_line":"image size based on given location."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Fixes bug 1261624"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I265c6a92274ab2f94e005a1ab50e01d2f0c2143e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAT3%2F%2Fyow%3D","line":13,"in_reply_to":"AAAAT3%2F%2Fy1c%3D","updated":"2013-12-31 15:29:35.000000000","message":"Will fix it. Seems gerrit has changed the rule to extract the bug link.","commit_id":"a23d8074e4f8c271f2100df40621810f6405c693"}],"glance/store/__init__.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"9adc1b3b1cccbb2656cc3e5b93d7fa68e9263b7e","unresolved":false,"context_lines":[{"line_number":530,"context_line":"        if not self.image_proxy.size:"},{"line_number":531,"context_line":"            self.image_proxy.size \u003d get_size_from_backend("},{"line_number":532,"context_line":"                                        self.image_proxy.context,"},{"line_number":533,"context_line":"                                        location)"},{"line_number":534,"context_line":""},{"line_number":535,"context_line":"    def __delitem__(self, i):"},{"line_number":536,"context_line":"        location \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8rWQ%3D","line":533,"updated":"2013-12-23 11:22:34.000000000","message":"location[\u0027url\u0027]","commit_id":"2a326b4d0815105d628b0baa14832737379f2959"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"ceb00d3f64feb45488989216a776872d0f1c04f0","unresolved":false,"context_lines":[{"line_number":530,"context_line":"        if not self.image_proxy.size:"},{"line_number":531,"context_line":"            self.image_proxy.size \u003d get_size_from_backend("},{"line_number":532,"context_line":"                                        self.image_proxy.context,"},{"line_number":533,"context_line":"                                        location)"},{"line_number":534,"context_line":""},{"line_number":535,"context_line":"    def __delitem__(self, i):"},{"line_number":536,"context_line":"        location \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8ql4%3D","line":533,"in_reply_to":"AAAATn%2F8rWQ%3D","updated":"2013-12-23 14:15:29.000000000","message":"ah, stupid typo","commit_id":"2a326b4d0815105d628b0baa14832737379f2959"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"9adc1b3b1cccbb2656cc3e5b93d7fa68e9263b7e","unresolved":false,"context_lines":[{"line_number":608,"context_line":"                                      location)"},{"line_number":609,"context_line":""},{"line_number":610,"context_line":"                if value.count(location) \u003e 1:"},{"line_number":611,"context_line":"                    raise exception.DuplicateLocation(location\u003dlocation[\u0027url\u0027])"},{"line_number":612,"context_line":""},{"line_number":613,"context_line":"            return setattr(getattr(self, target), attr, list(value))"},{"line_number":614,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8rUQ%3D","line":611,"updated":"2013-12-23 11:22:34.000000000","message":"IMO we need do same thing at here also, since \"replace\" operation of patch api will use this part.","commit_id":"2a326b4d0815105d628b0baa14832737379f2959"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"f790225f8187283e62efc66d67b13458b26cf700","unresolved":false,"context_lines":[{"line_number":608,"context_line":"                                      location)"},{"line_number":609,"context_line":""},{"line_number":610,"context_line":"                if value.count(location) \u003e 1:"},{"line_number":611,"context_line":"                    raise exception.DuplicateLocation(location\u003dlocation[\u0027url\u0027])"},{"line_number":612,"context_line":""},{"line_number":613,"context_line":"            return setattr(getattr(self, target), attr, list(value))"},{"line_number":614,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8qVo%3D","line":611,"in_reply_to":"AAAATn%2F8qiU%3D","updated":"2013-12-23 15:18:42.000000000","message":"Tested it, you\u0027re right. Will fix it in next ps.","commit_id":"2a326b4d0815105d628b0baa14832737379f2959"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"a288f997dbe2b6614203fa03c8eb5842cb1e6d5b","unresolved":false,"context_lines":[{"line_number":608,"context_line":"                                      location)"},{"line_number":609,"context_line":""},{"line_number":610,"context_line":"                if value.count(location) \u003e 1:"},{"line_number":611,"context_line":"                    raise exception.DuplicateLocation(location\u003dlocation[\u0027url\u0027])"},{"line_number":612,"context_line":""},{"line_number":613,"context_line":"            return setattr(getattr(self, target), attr, list(value))"},{"line_number":614,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8qiU%3D","line":611,"in_reply_to":"AAAATn%2F8qlY%3D","updated":"2013-12-23 14:28:18.000000000","message":"https://github.com/openstack/glance/blob/master/glance/api/v2/images.py#L228 will trigger this code stuff but involve above functions in StoreLocations indirectly.","commit_id":"2a326b4d0815105d628b0baa14832737379f2959"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"ceb00d3f64feb45488989216a776872d0f1c04f0","unresolved":false,"context_lines":[{"line_number":608,"context_line":"                                      location)"},{"line_number":609,"context_line":""},{"line_number":610,"context_line":"                if value.count(location) \u003e 1:"},{"line_number":611,"context_line":"                    raise exception.DuplicateLocation(location\u003dlocation[\u0027url\u0027])"},{"line_number":612,"context_line":""},{"line_number":613,"context_line":"            return setattr(getattr(self, target), attr, list(value))"},{"line_number":614,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8qlY%3D","line":611,"in_reply_to":"AAAATn%2F8rUQ%3D","updated":"2013-12-23 14:15:29.000000000","message":"Based on my understanding, all the operations called by setattr will be executed by the methods of class StoreLocations. Please correct me.","commit_id":"2a326b4d0815105d628b0baa14832737379f2959"},{"author":{"_account_id":8759,"name":"Arnaud Legendre","email":"arnaudleg@gmail.com","username":"arnaud"},"change_message_id":"4e1cb52d8f8152dac9a5a71166f10ef9412e11d6","unresolved":false,"context_lines":[{"line_number":611,"context_line":"                    raise exception.DuplicateLocation(location\u003dlocation[\u0027url\u0027])"},{"line_number":612,"context_line":"            if not getattr(self, target).size:"},{"line_number":613,"context_line":"                for location in value:"},{"line_number":614,"context_line":"                    size_from_backend \u003d glance.store.get_size_from_backend("},{"line_number":615,"context_line":"                                        self.context, location[\u0027url\u0027])"},{"line_number":616,"context_line":"                    if size_from_backend:"},{"line_number":617,"context_line":"                        getattr(self, target).size \u003d size_from_backend"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F8pbw%3D","line":614,"updated":"2013-12-23 18:46:13.000000000","message":"I was just wondering if it wouldn\u0027t be better to return the size from _check_image_location size since there is the exact same logic in it","commit_id":"021cb22a6ddf9a3e037dbb6723133c464aca18b5"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"bbb5b8228456d4cd52f55b1296455ac232c65e4b","unresolved":false,"context_lines":[{"line_number":611,"context_line":"                    raise exception.DuplicateLocation(location\u003dlocation[\u0027url\u0027])"},{"line_number":612,"context_line":"            if not getattr(self, target).size:"},{"line_number":613,"context_line":"                for location in value:"},{"line_number":614,"context_line":"                    size_from_backend \u003d glance.store.get_size_from_backend("},{"line_number":615,"context_line":"                                        self.context, location[\u0027url\u0027])"},{"line_number":616,"context_line":"                    if size_from_backend:"},{"line_number":617,"context_line":"                        getattr(self, target).size \u003d size_from_backend"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F8mm0%3D","line":614,"in_reply_to":"AAAATn%2F8oRU%3D","updated":"2013-12-24 13:29:24.000000000","message":"@zhiyan, it makes sense. Fixes in next PS. Thanks for the comments.","commit_id":"021cb22a6ddf9a3e037dbb6723133c464aca18b5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"5fe266ec9ca3cf8f1012390fe89b1dcfed48a740","unresolved":false,"context_lines":[{"line_number":611,"context_line":"                    raise exception.DuplicateLocation(location\u003dlocation[\u0027url\u0027])"},{"line_number":612,"context_line":"            if not getattr(self, target).size:"},{"line_number":613,"context_line":"                for location in value:"},{"line_number":614,"context_line":"                    size_from_backend \u003d glance.store.get_size_from_backend("},{"line_number":615,"context_line":"                                        self.context, location[\u0027url\u0027])"},{"line_number":616,"context_line":"                    if size_from_backend:"},{"line_number":617,"context_line":"                        getattr(self, target).size \u003d size_from_backend"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F8oRU%3D","line":614,"in_reply_to":"AAAATn%2F8oa0%3D","updated":"2013-12-24 02:45:09.000000000","message":"@Arnaud, IMO we\u0027d better keep this logic be independent since actually you know, as flwang mentioned above, they are doing different thing.\n\n@flwang, do you think it will be better if we extract this image size update logic to a helper function (and just to put it in this file)? you can see these three places are all using similar code snippets.","commit_id":"021cb22a6ddf9a3e037dbb6723133c464aca18b5"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"dbfa63e3f8f36b11cd47c79ecf882f2fc264e54b","unresolved":false,"context_lines":[{"line_number":611,"context_line":"                    raise exception.DuplicateLocation(location\u003dlocation[\u0027url\u0027])"},{"line_number":612,"context_line":"            if not getattr(self, target).size:"},{"line_number":613,"context_line":"                for location in value:"},{"line_number":614,"context_line":"                    size_from_backend \u003d glance.store.get_size_from_backend("},{"line_number":615,"context_line":"                                        self.context, location[\u0027url\u0027])"},{"line_number":616,"context_line":"                    if size_from_backend:"},{"line_number":617,"context_line":"                        getattr(self, target).size \u003d size_from_backend"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F8oa0%3D","line":614,"in_reply_to":"AAAATn%2F8pbw%3D","updated":"2013-12-24 01:17:32.000000000","message":"Thanks for the comments. TBH, I have considered about this, but I\u0027m following current way because:\n\n1. This logic only happens on specific condition, the image size is None.\n\n2. It will change the return value of _check_image_location, so it will ^break^ the method name a little bit.\n\nSo I would like to see the other reviewers\u0027 comments about this. Thanks.","commit_id":"021cb22a6ddf9a3e037dbb6723133c464aca18b5"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"03498e7ed8e1662b16328e5d76d740ddf6dfe13b","unresolved":false,"context_lines":[{"line_number":431,"context_line":"        for location in locations:"},{"line_number":432,"context_line":"            size_from_backend \u003d glance.store.get_size_from_backend("},{"line_number":433,"context_line":"                                context, location[\u0027url\u0027])"},{"line_number":434,"context_line":"            if size_from_backend:"},{"line_number":435,"context_line":"                image.size \u003d size_from_backend"},{"line_number":436,"context_line":"                break"},{"line_number":437,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAT3%2F%2F06w%3D","line":434,"updated":"2013-12-30 16:31:08.000000000","message":"perhaps a doc note explaining how this depends upon all location replicas being the same size?  This may not always be the case.","commit_id":"0fedb0b7c4a5709b278abe2ad7971e993fa349dc"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"04973e7e8aae0fd000848494474a9d2a23b4b954","unresolved":false,"context_lines":[{"line_number":431,"context_line":"        for location in locations:"},{"line_number":432,"context_line":"            size_from_backend \u003d glance.store.get_size_from_backend("},{"line_number":433,"context_line":"                                context, location[\u0027url\u0027])"},{"line_number":434,"context_line":"            if size_from_backend:"},{"line_number":435,"context_line":"                image.size \u003d size_from_backend"},{"line_number":436,"context_line":"                break"},{"line_number":437,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAT3%2F%2Fzy0%3D","line":434,"in_reply_to":"AAAAT3%2F%2F06w%3D","updated":"2013-12-31 03:11:45.000000000","message":"+1, it will be better I think, to help us notice this when we do the related change in future.","commit_id":"0fedb0b7c4a5709b278abe2ad7971e993fa349dc"},{"author":{"_account_id":9520,"name":"David Koo (koofoss)","email":"david.koo@huawei.com","username":"koofoss"},"change_message_id":"579e1ac981a3b2e0a44b980aa8a8590d66567aa0","unresolved":false,"context_lines":[{"line_number":429,"context_line":"def _set_image_size(context, image, locations):"},{"line_number":430,"context_line":"    if not image.size:"},{"line_number":431,"context_line":"        for location in locations:"},{"line_number":432,"context_line":"            size_from_backend \u003d glance.store.get_size_from_backend("},{"line_number":433,"context_line":"                context, location[\u0027url\u0027])"},{"line_number":434,"context_line":"            if size_from_backend:"},{"line_number":435,"context_line":"                # NOTE(flwang): This assumes all locations have the same size"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAT3%2F%2Fy0s%3D","line":432,"updated":"2013-12-31 13:38:56.000000000","message":"Shouldn\u0027t this be in a try ... except statement because one backend may throw an exception but another may be OK?","commit_id":"a23d8074e4f8c271f2100df40621810f6405c693"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"a46e58698e4856373e831d8ab13453460a981a16","unresolved":false,"context_lines":[{"line_number":429,"context_line":"def _set_image_size(context, image, locations):"},{"line_number":430,"context_line":"    if not image.size:"},{"line_number":431,"context_line":"        for location in locations:"},{"line_number":432,"context_line":"            size_from_backend \u003d glance.store.get_size_from_backend("},{"line_number":433,"context_line":"                context, location[\u0027url\u0027])"},{"line_number":434,"context_line":"            if size_from_backend:"},{"line_number":435,"context_line":"                # NOTE(flwang): This assumes all locations have the same size"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAT3%2F%2FyoM%3D","line":432,"in_reply_to":"AAAAT3%2F%2Fy0s%3D","updated":"2013-12-31 15:29:35.000000000","message":"Make sense.","commit_id":"a23d8074e4f8c271f2100df40621810f6405c693"},{"author":{"_account_id":9520,"name":"David Koo (koofoss)","email":"david.koo@huawei.com","username":"koofoss"},"change_message_id":"579e1ac981a3b2e0a44b980aa8a8590d66567aa0","unresolved":false,"context_lines":[{"line_number":432,"context_line":"            size_from_backend \u003d glance.store.get_size_from_backend("},{"line_number":433,"context_line":"                context, location[\u0027url\u0027])"},{"line_number":434,"context_line":"            if size_from_backend:"},{"line_number":435,"context_line":"                # NOTE(flwang): This assumes all locations have the same size"},{"line_number":436,"context_line":"                image.size \u003d size_from_backend"},{"line_number":437,"context_line":"                break"},{"line_number":438,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAT3%2F%2Fyzk%3D","line":435,"updated":"2013-12-31 13:38:56.000000000","message":"A question not directly concerning this bug but related: what should the policy be if we find out the locations have different sizes?\n\nPerhaps something like \"first non zero location wins\" - its size is saved as the image size in the DB and if other locations have a different size then downloading from those locations won\u0027t be allowed and those locations will be deleted? That way your assumption here can be enforced.\n\nWhat do you (and other cores) think? Should we file a \"wishlist\" bug for this ;)?","commit_id":"a23d8074e4f8c271f2100df40621810f6405c693"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"a46e58698e4856373e831d8ab13453460a981a16","unresolved":false,"context_lines":[{"line_number":432,"context_line":"            size_from_backend \u003d glance.store.get_size_from_backend("},{"line_number":433,"context_line":"                context, location[\u0027url\u0027])"},{"line_number":434,"context_line":"            if size_from_backend:"},{"line_number":435,"context_line":"                # NOTE(flwang): This assumes all locations have the same size"},{"line_number":436,"context_line":"                image.size \u003d size_from_backend"},{"line_number":437,"context_line":"                break"},{"line_number":438,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAT3%2F%2Fyng%3D","line":435,"in_reply_to":"AAAAT3%2F%2Fyzk%3D","updated":"2013-12-31 15:29:35.000000000","message":"I would say it\u0027s not a bug, but a limitation? Because based on current design, multi locations should have the same size. However in the future, it maybe not true. AFAIK, zhiyan is proposing moving some properties into location which maybe cause the image distributed in different locations have different sizes. IMHO, that\u0027s what jbresnah and zhiyan concerned.","commit_id":"a23d8074e4f8c271f2100df40621810f6405c693"},{"author":{"_account_id":9520,"name":"David Koo (koofoss)","email":"david.koo@huawei.com","username":"koofoss"},"change_message_id":"63dab2fb88d426258d30032ac686df6e20e24571","unresolved":false,"context_lines":[{"line_number":429,"context_line":"def _set_image_size(context, image, locations):"},{"line_number":430,"context_line":"    if not image.size:"},{"line_number":431,"context_line":"        for location in locations:"},{"line_number":432,"context_line":"            size_from_backend \u003d glance.store.get_size_from_backend("},{"line_number":433,"context_line":"                context, location[\u0027url\u0027])"},{"line_number":434,"context_line":"            if size_from_backend:"},{"line_number":435,"context_line":"                # NOTE(flwang): This assumes all locations have the same size"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAT3%2F%2Fx9s%3D","line":432,"updated":"2014-01-01 00:30:45.000000000","message":"The try: ... except: is still missing.","commit_id":"11f0be725a82bb84cd8c084af157e201bda3e5e4"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"02ed9bcb265329bbd03d9b53c3a66750a7b2c2a8","unresolved":false,"context_lines":[{"line_number":429,"context_line":"def _set_image_size(context, image, locations):"},{"line_number":430,"context_line":"    if not image.size:"},{"line_number":431,"context_line":"        for location in locations:"},{"line_number":432,"context_line":"            size_from_backend \u003d glance.store.get_size_from_backend("},{"line_number":433,"context_line":"                context, location[\u0027url\u0027])"},{"line_number":434,"context_line":"            if size_from_backend:"},{"line_number":435,"context_line":"                # NOTE(flwang): This assumes all locations have the same size"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAT3%2F%2Fx6Q%3D","line":432,"in_reply_to":"AAAAT3%2F%2Fx9s%3D","updated":"2014-01-01 04:15:21.000000000","message":"Oops, will submit a new ps soon.","commit_id":"11f0be725a82bb84cd8c084af157e201bda3e5e4"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"19a0af43054afa7076a477b928566954b05313f0","unresolved":false,"context_lines":[{"line_number":430,"context_line":"    if not image.size:"},{"line_number":431,"context_line":"        for location in locations:"},{"line_number":432,"context_line":"            size_from_backend \u003d None"},{"line_number":433,"context_line":"            try:"},{"line_number":434,"context_line":"                size_from_backend \u003d glance.store.get_size_from_backend("},{"line_number":435,"context_line":"                    context, location[\u0027url\u0027])"},{"line_number":436,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAT3%2F%2FwtU%3D","line":433,"updated":"2014-01-02 06:54:25.000000000","message":"Actually this try-crach protection is overkill, since _check_image_location() will be called always before this function.\n\nbut of cause it\u0027s hurtless to this change.","commit_id":"487696819a11d3120fc872f3a778f0ff58e9d6b9"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"d30ea3ae370389de172d6c7d80d5f75a4a7e6a5a","unresolved":false,"context_lines":[{"line_number":430,"context_line":"    if not image.size:"},{"line_number":431,"context_line":"        for location in locations:"},{"line_number":432,"context_line":"            size_from_backend \u003d None"},{"line_number":433,"context_line":"            try:"},{"line_number":434,"context_line":"                size_from_backend \u003d glance.store.get_size_from_backend("},{"line_number":435,"context_line":"                    context, location[\u0027url\u0027])"},{"line_number":436,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAT3%2F%2Fwdo%3D","line":433,"in_reply_to":"AAAAT3%2F%2FwtU%3D","updated":"2014-01-02 14:44:14.000000000","message":"Good point, forgot that check. Thanks for the reminder.","commit_id":"487696819a11d3120fc872f3a778f0ff58e9d6b9"}],"glance/tests/functional/v2/test_images.py":[{"author":{"_account_id":9520,"name":"David Koo (koofoss)","email":"david.koo@huawei.com","username":"koofoss"},"change_message_id":"579e1ac981a3b2e0a44b980aa8a8590d66567aa0","unresolved":false,"context_lines":[{"line_number":1723,"context_line":"        self.assertEqual(image[\u0027status\u0027], \u0027queued\u0027)"},{"line_number":1724,"context_line":"        self.assertNotIn(\u0027size\u0027, image)"},{"line_number":1725,"context_line":""},{"line_number":1726,"context_line":"        tmp_dir \u003d self.useFixture(fixtures.TempDir()).path"},{"line_number":1727,"context_line":"        file_path \u003d os.path.join(tmp_dir, \u0027fake_image\u0027)"},{"line_number":1728,"context_line":"        with open(file_path, \u0027w\u0027) as fap:"},{"line_number":1729,"context_line":"            fap.write(\u0027glance\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAT3%2F%2Fyyw%3D","line":1726,"updated":"2013-12-31 13:38:56.000000000","message":"\"self.test_dir\" is already defined in the parent functional.FunctionalTest class.","commit_id":"a23d8074e4f8c271f2100df40621810f6405c693"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"a46e58698e4856373e831d8ab13453460a981a16","unresolved":false,"context_lines":[{"line_number":1723,"context_line":"        self.assertEqual(image[\u0027status\u0027], \u0027queued\u0027)"},{"line_number":1724,"context_line":"        self.assertNotIn(\u0027size\u0027, image)"},{"line_number":1725,"context_line":""},{"line_number":1726,"context_line":"        tmp_dir \u003d self.useFixture(fixtures.TempDir()).path"},{"line_number":1727,"context_line":"        file_path \u003d os.path.join(tmp_dir, \u0027fake_image\u0027)"},{"line_number":1728,"context_line":"        with open(file_path, \u0027w\u0027) as fap:"},{"line_number":1729,"context_line":"            fap.write(\u0027glance\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAT3%2F%2FynI%3D","line":1726,"in_reply_to":"AAAAT3%2F%2Fyyw%3D","updated":"2013-12-31 15:29:35.000000000","message":"Good catch.","commit_id":"a23d8074e4f8c271f2100df40621810f6405c693"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"19a0af43054afa7076a477b928566954b05313f0","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import json"},{"line_number":19,"context_line":"import uuid"},{"line_number":20,"context_line":"import os"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import requests"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAT3%2F%2Fwt8%3D","line":20,"updated":"2014-01-02 06:54:25.000000000","message":"reorder pls","commit_id":"487696819a11d3120fc872f3a778f0ff58e9d6b9"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"d30ea3ae370389de172d6c7d80d5f75a4a7e6a5a","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import json"},{"line_number":19,"context_line":"import uuid"},{"line_number":20,"context_line":"import os"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import requests"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAT3%2F%2Fwdk%3D","line":20,"in_reply_to":"AAAAT3%2F%2Fwt8%3D","updated":"2014-01-02 14:44:14.000000000","message":"Done","commit_id":"487696819a11d3120fc872f3a778f0ff58e9d6b9"}],"glance/tests/unit/test_store_location.py":[{"author":{"_account_id":9520,"name":"David Koo (koofoss)","email":"david.koo@huawei.com","username":"koofoss"},"change_message_id":"579e1ac981a3b2e0a44b980aa8a8590d66567aa0","unresolved":false,"context_lines":[{"line_number":441,"context_line":"        self.stubs.Set(glance.store, \u0027get_size_from_backend\u0027,"},{"line_number":442,"context_line":"                       fake_get_size_from_backend)"},{"line_number":443,"context_line":"        glance.store._check_image_location \u003d mock.Mock()"},{"line_number":444,"context_line":"        location \u003d {\u0027url\u0027: \u0027file:///fake1.img.tar.gz\u0027, \u0027metadata\u0027: {}}"},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"        image1 \u003d FakeImageProxy()"},{"line_number":447,"context_line":"        locations \u003d glance.store.StoreLocations(image1, [])"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAT3%2F%2Fywk%3D","line":444,"updated":"2013-12-31 13:38:56.000000000","message":"Perhaps you should change the \u0027location\u0027 variable name - it overshadows the \"import glance.store.location as location\" in line 24 above. Probably no harm done (since this function doesn\u0027t use glance.store.location) but still ...","commit_id":"a23d8074e4f8c271f2100df40621810f6405c693"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"a46e58698e4856373e831d8ab13453460a981a16","unresolved":false,"context_lines":[{"line_number":441,"context_line":"        self.stubs.Set(glance.store, \u0027get_size_from_backend\u0027,"},{"line_number":442,"context_line":"                       fake_get_size_from_backend)"},{"line_number":443,"context_line":"        glance.store._check_image_location \u003d mock.Mock()"},{"line_number":444,"context_line":"        location \u003d {\u0027url\u0027: \u0027file:///fake1.img.tar.gz\u0027, \u0027metadata\u0027: {}}"},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"        image1 \u003d FakeImageProxy()"},{"line_number":447,"context_line":"        locations \u003d glance.store.StoreLocations(image1, [])"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAT3%2F%2FynA%3D","line":444,"in_reply_to":"AAAAT3%2F%2Fywk%3D","updated":"2013-12-31 15:29:35.000000000","message":"Make sense for me.","commit_id":"a23d8074e4f8c271f2100df40621810f6405c693"},{"author":{"_account_id":9520,"name":"David Koo (koofoss)","email":"david.koo@huawei.com","username":"koofoss"},"change_message_id":"579e1ac981a3b2e0a44b980aa8a8590d66567aa0","unresolved":false,"context_lines":[{"line_number":451,"context_line":"        image2 \u003d FakeImageProxy()"},{"line_number":452,"context_line":"        locations \u003d glance.store.StoreLocations(image2, [location])"},{"line_number":453,"context_line":"        locations[0] \u003d {\u0027url\u0027: \u0027file:///fake2.img.tar.gz\u0027, \u0027metadata\u0027: {}}"},{"line_number":454,"context_line":"        self.assertIn({\u0027url\u0027: \u0027file:///fake2.img.tar.gz\u0027, \u0027metadata\u0027: {}},"},{"line_number":455,"context_line":"                      locations)"},{"line_number":456,"context_line":"        self.assertEqual(image2.size, 1)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAT3%2F%2Fyvo%3D","line":454,"updated":"2013-12-31 13:38:56.000000000","message":"I don\u0027t know if this will call nose\u0027s assert_in or standard Python unittest\u0027s assertIn. If it calls unittest\u0027s then I suggest you change it to:\n\n  self.assertTrue({...}, locations)\n\nbecause Python 2.6 doesn\u0027t have assertIn (was added in Python 2.7)","commit_id":"a23d8074e4f8c271f2100df40621810f6405c693"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"a46e58698e4856373e831d8ab13453460a981a16","unresolved":false,"context_lines":[{"line_number":451,"context_line":"        image2 \u003d FakeImageProxy()"},{"line_number":452,"context_line":"        locations \u003d glance.store.StoreLocations(image2, [location])"},{"line_number":453,"context_line":"        locations[0] \u003d {\u0027url\u0027: \u0027file:///fake2.img.tar.gz\u0027, \u0027metadata\u0027: {}}"},{"line_number":454,"context_line":"        self.assertIn({\u0027url\u0027: \u0027file:///fake2.img.tar.gz\u0027, \u0027metadata\u0027: {}},"},{"line_number":455,"context_line":"                      locations)"},{"line_number":456,"context_line":"        self.assertEqual(image2.size, 1)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAT3%2F%2FydQ%3D","line":454,"in_reply_to":"AAAAT3%2F%2Fyvo%3D","updated":"2013-12-31 15:29:35.000000000","message":"Done","commit_id":"a23d8074e4f8c271f2100df40621810f6405c693"}]}
