)]}'
{"glance/db/simple/api.py":[{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"69bd1f51bcc2aed88aa9cb372938e42713fdc79f","unresolved":false,"context_lines":[{"line_number":324,"context_line":"                filter_tags \u003d value"},{"line_number":325,"context_line":"                image_tags \u003d image_tag_get_all(context, image[\u0027id\u0027])"},{"line_number":326,"context_line":"                for tag in filter_tags:"},{"line_number":327,"context_line":"                    if tag not in image_tags:"},{"line_number":328,"context_line":"                        to_add \u003d False"},{"line_number":329,"context_line":"                        break"},{"line_number":330,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_0c080d27","line":327,"updated":"2016-03-10 22:33:06.000000000","message":"It will eliminate the same issue at places like here.","commit_id":"645dcd852845fee26755b925879f03eea6b53e13"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"69bd1f51bcc2aed88aa9cb372938e42713fdc79f","unresolved":false,"context_lines":[{"line_number":769,"context_line":""},{"line_number":770,"context_line":"@log_call"},{"line_number":771,"context_line":"def image_tag_get_all(context, image_id):"},{"line_number":772,"context_line":"    return DATA[\u0027tags\u0027].get(image_id, [])"},{"line_number":773,"context_line":""},{"line_number":774,"context_line":""},{"line_number":775,"context_line":"@log_call"}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_d11a427c","line":772,"updated":"2016-03-10 22:33:06.000000000","message":"Why don\u0027t you do it here and return it ?","commit_id":"645dcd852845fee26755b925879f03eea6b53e13"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"df760c06faea65529db10a71e0ce3977168a1be4","unresolved":false,"context_lines":[{"line_number":769,"context_line":""},{"line_number":770,"context_line":"@log_call"},{"line_number":771,"context_line":"def image_tag_get_all(context, image_id):"},{"line_number":772,"context_line":"    return list(DATA[\u0027tags\u0027].get(image_id, []))"},{"line_number":773,"context_line":""},{"line_number":774,"context_line":""},{"line_number":775,"context_line":"@log_call"}],"source_content_type":"text/x-python","patch_set":4,"id":"1af94dfe_89efd8af","line":772,"range":{"start_line":772,"start_character":11,"end_line":772,"end_character":47},"updated":"2016-03-15 18:54:56.000000000","message":"maybe a comment here explaining why you are doing this.","commit_id":"c3e1744331c963522c468b9931ffc73acb4704d3"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"10e8c5a129e991d928c6ed9d36b0e98cb6d396ee","unresolved":false,"context_lines":[{"line_number":769,"context_line":""},{"line_number":770,"context_line":"@log_call"},{"line_number":771,"context_line":"def image_tag_get_all(context, image_id):"},{"line_number":772,"context_line":"    return list(DATA[\u0027tags\u0027].get(image_id, []))"},{"line_number":773,"context_line":""},{"line_number":774,"context_line":""},{"line_number":775,"context_line":"@log_call"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa0719c6_d833d460","line":772,"range":{"start_line":772,"start_character":43,"end_line":772,"end_character":47},"updated":"2016-03-23 14:04:09.000000000","message":"We seem to hit the bug because we\u0027re mixing \u0027sets\u0027 and \u0027lists\u0027.\n\nWhen we update the tags we go through this:\n\n class QuotaImageTagsProxy(object):\n\n    def __init__(self, orig_set):\n        if orig_set is None:\n            orig_set \u003d set([])\n        self.tags \u003d orig_set\n\nso when we go through this code\n\n @log_call\n def image_tag_set_all(context, image_id, values):\n     import traceback\n     global DATA\n     DATA[\u0027tags\u0027][image_id] \u003d values\n\nthe tags are a set.\n\nWe then fall over in the for loop because you can\u0027t modify a set while iterating over it.\n\nRather than masking this in image_tag_get_all would it be (slightly) better to set the tags to be a list in the first place?\n\n @log_call\n def image_tag_set_all(context, image_id, values):\n     import traceback\n     global DATA\n     DATA[\u0027tags\u0027][image_id] \u003d list(values)","commit_id":"54f4ff5afaef1ec1bbd2a1e659b0e94aae81c870"},{"author":{"_account_id":17116,"name":"Niall Bunting","email":"niall.bunting@hpe.com","username":"NiallBunting"},"change_message_id":"f4255adbf950b7d1ddc8f376bf60aa08b797ff12","unresolved":false,"context_lines":[{"line_number":769,"context_line":""},{"line_number":770,"context_line":"@log_call"},{"line_number":771,"context_line":"def image_tag_get_all(context, image_id):"},{"line_number":772,"context_line":"    return list(DATA[\u0027tags\u0027].get(image_id, []))"},{"line_number":773,"context_line":""},{"line_number":774,"context_line":""},{"line_number":775,"context_line":"@log_call"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa0719c6_a6a19afa","line":772,"range":{"start_line":772,"start_character":43,"end_line":772,"end_character":47},"in_reply_to":"fa0719c6_d833d460","updated":"2016-03-23 15:06:23.000000000","message":"Sounds good to me, the test should still work so should not be a problem.","commit_id":"54f4ff5afaef1ec1bbd2a1e659b0e94aae81c870"}]}
