)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"a1efbd28bbc5da044389419185e24dec4f9a4f87","unresolved":false,"context_lines":[{"line_number":14,"context_line":"Note: Based on current code, it\u0027s difficult to add unit test case"},{"line_number":15,"context_line":"against this change."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Fixes bug 1263684"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I1ab3e38724014032d9290e7dde3f8b6d23b6df6c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAT3%2F%2F4io%3D","line":17,"updated":"2013-12-28 05:53:38.000000000","message":"#1263684, or use \"Closes-Bug: #1263684\" instead.","commit_id":"141297ff99328b1b625df55ec5ee7b402cd96a23"}],"glance/api/common.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"dc7199a2a7b01bc2ad9cf6c0121f5b8d7af39056","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from oslo.config import cfg"},{"line_number":17,"context_line":"from webob.exc import HTTPBadRequest"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from glance.common import exception"},{"line_number":20,"context_line":"from glance.common import utils"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FuYo%3D","line":17,"updated":"2014-01-09 06:32:12.000000000","message":"I prefer don\u0027t involve http exception directly in this common utils file, as I proposed in former comments, what about give a new exception to common.exception.py? like InvalidImageId, then:\n\n1. we don\u0027t need pass http request object into check_image_id_format().\n\n2. reuse this exception in glance when needed.","commit_id":"bbb44730bd14c0139072c1363494110703308a92"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d6e736635cbc9c5f5a6e3f8f533121b94c2bb98b","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    return remaining"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"def check_image_id_format(image_id):"},{"line_number":145,"context_line":"    \"\"\""},{"line_number":146,"context_line":"    check if the given image id is uuid like before executing operations."},{"line_number":147,"context_line":"    :param image_id: The id of the image we want to check"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2Fjw8%3D","line":144,"updated":"2014-01-11 06:29:13.000000000","message":"what about rename this helper to \"check_image_id\" ? IMO we can add other checks on image_id into this function when we needed in future, \"check_image_id_format\" is too \"tight\" to me, it means the function only check image_id format but others, and we need add other dedicated minor helper but reuse this.","commit_id":"26d2aa5083749b8e3cdac32fdbe3be5513c57f02"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d6e736635cbc9c5f5a6e3f8f533121b94c2bb98b","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    \"\"\""},{"line_number":146,"context_line":"    check if the given image id is uuid like before executing operations."},{"line_number":147,"context_line":"    :param image_id: The id of the image we want to check"},{"line_number":148,"context_line":"    :return:"},{"line_number":149,"context_line":"    \"\"\""},{"line_number":150,"context_line":"    if not utils.is_uuid_like(image_id):"},{"line_number":151,"context_line":"        raise exception.InvalidImageIDFormat(image_id\u003dimage_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FjyI%3D","line":148,"updated":"2014-01-11 06:29:13.000000000","message":"missing description","commit_id":"26d2aa5083749b8e3cdac32fdbe3be5513c57f02"}],"glance/api/v2/images.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ee51468ffd03b3cc0463066ced53d9686983a2c8","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            LOG.info(unicode(e))"},{"line_number":142,"context_line":"            raise webob.exc.HTTPRequestEntityTooLarge("},{"line_number":143,"context_line":"                explanation\u003dunicode(e), request\u003dreq, content_type\u003d\u0027text/plain\u0027)"},{"line_number":144,"context_line":"        except exception.InvalidImageID as e:"},{"line_number":145,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dunicode(e))"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        return image"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FEpU%3D","line":144,"updated":"2014-01-17 18:10:37.000000000","message":"unused","commit_id":"51ac94eb1056d411499a9d9d6ac21ca1eba4f858"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"77c103f792fd4da94d6b20240a1f176070d31c06","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                   {\u0027image_id\u0027: image_id})"},{"line_number":204,"context_line":"            LOG.info(msg)"},{"line_number":205,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":206,"context_line":"        except exception.InvalidImageID as e:"},{"line_number":207,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dunicode(e))"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def _get_locations_op_pos(self, path_pos, max_pos, allow_max):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FEMo%3D","line":206,"updated":"2014-01-17 19:34:14.000000000","message":"similarly unused, but we should not need to change this file for this patch","commit_id":"51ac94eb1056d411499a9d9d6ac21ca1eba4f858"}],"glance/common/exception.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d6e736635cbc9c5f5a6e3f8f533121b94c2bb98b","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    message \u003d _(\"Unable to filter using the specified range.\")"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"class InvalidImageIDFormat(Invalid):"},{"line_number":144,"context_line":"    message \u003d _(\"Invalid image id format: %s(image_id).\")"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2Fjx0%3D","line":143,"updated":"2014-01-11 06:29:13.000000000","message":"@flwang do you think \"InvalidImageID\" name is more common?","commit_id":"26d2aa5083749b8e3cdac32fdbe3be5513c57f02"},{"author":{"_account_id":6983,"name":"YangLei","email":"iamhappg@aliyun.com","username":"YangLei"},"change_message_id":"8a976138dbedb24893a99158c174d15da0ee2fbb","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"class InvalidImageID(Invalid):"},{"line_number":144,"context_line":"    message \u003d _(\"Invalid image id: %s(image_id).\")"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"class ReadonlyProperty(Forbidden):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2Ffqs%3D","line":144,"updated":"2014-01-13 10:40:05.000000000","message":"It should be %(image_id)s instead of %s(image_id)","commit_id":"f306029c8f5ceccb0eb3759f07aa58a158876948"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"9996b78847767a6cdacf7b91514aa350458f09e1","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"class InvalidImageID(Invalid):"},{"line_number":144,"context_line":"    message \u003d _(\"Invalid image id: %s(image_id).\")"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"class ReadonlyProperty(Forbidden):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2Faqo%3D","line":144,"in_reply_to":"AAAAUH%2F%2Ffqs%3D","updated":"2014-01-14 00:01:12.000000000","message":"good catch!","commit_id":"f306029c8f5ceccb0eb3759f07aa58a158876948"}],"glance/db/sqlalchemy/api.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d355655c75f2cdb932c7a15325f762bd6a7f565f","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        msg \u003d (_(\"No image found with ID %s\") % image_id)"},{"line_number":330,"context_line":"        LOG.debug(msg)"},{"line_number":331,"context_line":"        raise exception.NotFound(msg)"},{"line_number":332,"context_line":"    except sqlalchemy.exc.DataError as de:"},{"line_number":333,"context_line":"        if \u0027CLI0109E\u0027 in de.message:"},{"line_number":334,"context_line":"            # NOTE(flwang): Fix bug 1263684, this is a IBM DB2 specific bug,"},{"line_number":335,"context_line":"            # see http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F8qkQ%3D","line":332,"updated":"2013-12-23 14:21:35.000000000","message":"what about using glance.openstack.common.uuidutils.is_uuid_like() to do the initiative check? https://github.com/openstack/glance/blob/master/glance/openstack/common/uuidutils.py\n\nI\u0027m thinking use a approach which can prevent we put explicit  db2 specific function code here.","commit_id":"141297ff99328b1b625df55ec5ee7b402cd96a23"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"a1efbd28bbc5da044389419185e24dec4f9a4f87","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        msg \u003d (_(\"No image found with ID %s\") % image_id)"},{"line_number":330,"context_line":"        LOG.debug(msg)"},{"line_number":331,"context_line":"        raise exception.NotFound(msg)"},{"line_number":332,"context_line":"    except sqlalchemy.exc.DataError as de:"},{"line_number":333,"context_line":"        if \u0027CLI0109E\u0027 in de.message:"},{"line_number":334,"context_line":"            # NOTE(flwang): Fix bug 1263684, this is a IBM DB2 specific bug,"},{"line_number":335,"context_line":"            # see http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAT3%2F%2F4kg%3D","line":332,"in_reply_to":"AAAAT3%2F%2F6l4%3D","updated":"2013-12-28 05:53:38.000000000","message":"@flwang, my thoughts are:\n\n1. Actually I think this approach probably will not as straightforward as you think if you plan to add this exception catching stuff to db api layer seriously, since here is not the only place to handling image id query, so you need add this stuff to other places also which in this file/layer.\n\n\n2. So I still think it will be better if we add this image id validity checking to a general place, sine a) it can resolve this db2 special defect by a graceful way; b) it will prevent add duplicated code in this file/layer as possible as we can; c) it can defense other invalid image id type but only the string which longer then 36 chars.\n\n\n3. My initial idea is that adding glance.common.utils.is_uuid_like() [1] checking to: a) v1 controller or b) registry v1 api , and c) Image domain object (for v2 entry).\n\n\nAn overall thoughts for me around this stuff:\nif we only see this defect as a db api 500 exception that caused by db2 engine, just like you mentioned in bug description, then I think this resolving idea is make sense enough, but I\u0027m thinking should we give a special attention to invalid image id issue? for example string \u0027aaaaaaaaXaaaaXaaaaXaaaaXaaaaaaaaaaaa\u0027 or \u0027aaaaaaaaXaaaaXaaaaX\u0027, their length is less then 36 (it will not trigger db2 CLI0109E exception, so passive exception caching approach will not work for this case) but it is still a wrong image id. Actually I personally like do a pre-checking on the image id string and return a explicit exception to client, since it will provide a clear feedback when request contains an invalid image id argument, says return an InvalidImageId exception but always return NotFound exception.\n\n[1] https://review.openstack.org/#/c/60643/7/glance/common/utils.py","commit_id":"141297ff99328b1b625df55ec5ee7b402cd96a23"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"961a56daadc6064717036f1fd293fc26dfb4c50c","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        msg \u003d (_(\"No image found with ID %s\") % image_id)"},{"line_number":330,"context_line":"        LOG.debug(msg)"},{"line_number":331,"context_line":"        raise exception.NotFound(msg)"},{"line_number":332,"context_line":"    except sqlalchemy.exc.DataError as de:"},{"line_number":333,"context_line":"        if \u0027CLI0109E\u0027 in de.message:"},{"line_number":334,"context_line":"            # NOTE(flwang): Fix bug 1263684, this is a IBM DB2 specific bug,"},{"line_number":335,"context_line":"            # see http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAT3%2F%2F6l4%3D","line":332,"in_reply_to":"AAAATn%2F8pwI%3D","updated":"2013-12-27 07:56:12.000000000","message":"@zhiyan, you know, current approach is simple and straightforward. After more deeper thinking for your suggestion, I would like to argue/discuss about that. Yes, it\u0027s easy to add a check in API level to make sure the given id is UUID like, but as you know, this is a negative test. That means I don\u0027t think this scenario will happen in a real world always. So it maybe non-efficient to check the image id format every time.\n\nBesides, I know current is a little bit ugly, but I think here is the right place to catch the exception. The only point making us uncomfortable is we\u0027re catching an IBM DB2 specific exception. But given we\u0027re support DB2 in OpenStack, so I think this is acceptable. See https://review.openstack.org/#/c/53816/","commit_id":"141297ff99328b1b625df55ec5ee7b402cd96a23"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"92e3f4c0b38eda7a3f28921aade3f89219c2bba0","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        msg \u003d (_(\"No image found with ID %s\") % image_id)"},{"line_number":330,"context_line":"        LOG.debug(msg)"},{"line_number":331,"context_line":"        raise exception.NotFound(msg)"},{"line_number":332,"context_line":"    except sqlalchemy.exc.DataError as de:"},{"line_number":333,"context_line":"        if \u0027CLI0109E\u0027 in de.message:"},{"line_number":334,"context_line":"            # NOTE(flwang): Fix bug 1263684, this is a IBM DB2 specific bug,"},{"line_number":335,"context_line":"            # see http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F8pwI%3D","line":332,"in_reply_to":"AAAATn%2F8qkQ%3D","updated":"2013-12-26 06:46:11.000000000","message":"Good point. I will rethink it again.","commit_id":"141297ff99328b1b625df55ec5ee7b402cd96a23"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"dc7199a2a7b01bc2ad9cf6c0121f5b8d7af39056","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        msg \u003d (_(\"No image found with ID %s\") % image_id)"},{"line_number":146,"context_line":"        LOG.debug(msg)"},{"line_number":147,"context_line":"        raise exception.NotFound(msg)"},{"line_number":148,"context_line":"    except sqlalchemy.exc.DataError as de:"},{"line_number":149,"context_line":"        if \u0027CLI0109E\u0027 in de.message:"},{"line_number":150,"context_line":"            # NOTE(flwang): Fix bug 1263684, this is a IBM DB2 specific bug,"},{"line_number":151,"context_line":"            # see http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FuXs%3D","line":148,"updated":"2014-01-09 06:32:12.000000000","message":"I we have the pre-checking in upperlayer, why we still need this stuff? why you think this exception can be raised still? IMO only right image id can reach here. Does it means we miss some checking in upper layer/such path? thanks.","commit_id":"bbb44730bd14c0139072c1363494110703308a92"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"030058df092cf7a2b96cd2deade81fafe46ebacb","unresolved":false,"context_lines":[{"line_number":130,"context_line":"    :param image_id: The id of the image we want to check"},{"line_number":131,"context_line":"    :return: Raise InvalidImageID exception if given image id is invalid"},{"line_number":132,"context_line":"    \"\"\""},{"line_number":133,"context_line":"    if len(image_id) !\u003d 36:"},{"line_number":134,"context_line":"        raise exception.InvalidImageID(image_id\u003dimage_id)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FEBs%3D","line":133,"updated":"2014-01-17 19:49:39.000000000","message":"It would be extra awesome if we could make 36 come from the model definition of the column. Something like\n\n  models.Image.id.property.columns[0].type.length","commit_id":"51ac94eb1056d411499a9d9d6ac21ca1eba4f858"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"77c103f792fd4da94d6b20240a1f176070d31c06","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    :return: Raise InvalidImageID exception if given image id is invalid"},{"line_number":132,"context_line":"    \"\"\""},{"line_number":133,"context_line":"    if len(image_id) !\u003d 36:"},{"line_number":134,"context_line":"        raise exception.InvalidImageID(image_id\u003dimage_id)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"def _image_get(context, image_id, session\u003dNone, force_show_deleted\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FEOQ%3D","line":134,"updated":"2014-01-17 19:34:14.000000000","message":"I think we should just raise ImageNotFound here.","commit_id":"51ac94eb1056d411499a9d9d6ac21ca1eba4f858"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ee51468ffd03b3cc0463066ced53d9686983a2c8","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":"def _image_get(context, image_id, session\u003dNone, force_show_deleted\u003dFalse):"},{"line_number":138,"context_line":"    \"\"\"Get an image or raise if it does not exist.\"\"\""},{"line_number":139,"context_line":"    _check_image_id(image_id)"},{"line_number":140,"context_line":"    session \u003d session or _get_session()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FEkk%3D","line":139,"updated":"2014-01-17 18:10:37.000000000","message":"flwang I\u0027d like to know you thoughts about this: do you think it will be better if we do this check for other interface/util_functions also? I think follow functions is needed also (maybe I miss some functions):\n\n    image_tag_create()\n    image_tag_delete()\n    image_tag_get_all()\n    _image_get_disk_usage_by_owner()","commit_id":"51ac94eb1056d411499a9d9d6ac21ca1eba4f858"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"62029df5a0fbc7a4c9505e0a183f24bac72f01fc","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    :return: Raise NoFound exception if given image id is invalid"},{"line_number":134,"context_line":"    \"\"\""},{"line_number":135,"context_line":"    if image_id and \\"},{"line_number":136,"context_line":"            len(image_id) !\u003d models.Image.id.property.columns[0].type.length:"},{"line_number":137,"context_line":"        raise exception.NotFound()"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2B7Ac%3D","line":136,"updated":"2014-01-20 18:12:14.000000000","message":"I think this should be a greater-than (\u003e) check, since in sqlalchemy, the String column corresponds to SQL VARCHAR [1], and VARCHARs can store \"up to\" the limit, which implies entries can also be less than the limit [2].\n\n[1] http://docs.sqlalchemy.org/en/rel_0_9/core/types.html#sqlalchemy.types.String\n\n[2] http://dev.mysql.com/doc/refman/5.0/en/char.html","commit_id":"5b123e8a2f4bfae77c3b05e4af85a883b0cdf204"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"45f0a6f138f16117bf84bd4b7d2b77108c057ba0","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    :return: Raise NoFound exception if given image id is invalid"},{"line_number":134,"context_line":"    \"\"\""},{"line_number":135,"context_line":"    if image_id and \\"},{"line_number":136,"context_line":"            len(image_id) !\u003d models.Image.id.property.columns[0].type.length:"},{"line_number":137,"context_line":"        raise exception.NotFound()"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2B4sU%3D","line":136,"in_reply_to":"AAAAUH%2F%2B7Ac%3D","updated":"2014-01-21 03:48:05.000000000","message":"Thanks for the digging, markwash.","commit_id":"5b123e8a2f4bfae77c3b05e4af85a883b0cdf204"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"70d73c67dac34843d088dd3fa2dd8b1df04dc9e4","unresolved":false,"context_lines":[{"line_number":965,"context_line":"        image_tag_delete(context, image_id, tag, session)"},{"line_number":966,"context_line":""},{"line_number":967,"context_line":""},{"line_number":968,"context_line":"def image_tag_create(context, image_id, value, session\u003dNone):"},{"line_number":969,"context_line":"    \"\"\"Create an image tag.\"\"\""},{"line_number":970,"context_line":"    session \u003d session or _get_session()"},{"line_number":971,"context_line":"    tag_ref \u003d models.ImageTag(image_id\u003dimage_id, value\u003dvalue)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F%2B3ts%3D","line":968,"updated":"2014-01-21 08:59:51.000000000","message":"I consider we\u0027d better do a check at here also.","commit_id":"5de69badfc44dd03e5fa21577a66daabc3ade5a0"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"9806b379f5863e2ce291639641f4a404f1e9a6dd","unresolved":false,"context_lines":[{"line_number":965,"context_line":"        image_tag_delete(context, image_id, tag, session)"},{"line_number":966,"context_line":""},{"line_number":967,"context_line":""},{"line_number":968,"context_line":"def image_tag_create(context, image_id, value, session\u003dNone):"},{"line_number":969,"context_line":"    \"\"\"Create an image tag.\"\"\""},{"line_number":970,"context_line":"    session \u003d session or _get_session()"},{"line_number":971,"context_line":"    tag_ref \u003d models.ImageTag(image_id\u003dimage_id, value\u003dvalue)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F%2B3OQ%3D","line":968,"in_reply_to":"AAAAUH%2F%2B3fI%3D","updated":"2014-01-21 10:27:57.000000000","message":"I don\u0027t like to be a blocker here, I\u0027m ok to go your way anyway.","commit_id":"5de69badfc44dd03e5fa21577a66daabc3ade5a0"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"f2d86b22fd0612f9cd05a00b23be4629115ae7f1","unresolved":false,"context_lines":[{"line_number":965,"context_line":"        image_tag_delete(context, image_id, tag, session)"},{"line_number":966,"context_line":""},{"line_number":967,"context_line":""},{"line_number":968,"context_line":"def image_tag_create(context, image_id, value, session\u003dNone):"},{"line_number":969,"context_line":"    \"\"\"Create an image tag.\"\"\""},{"line_number":970,"context_line":"    session \u003d session or _get_session()"},{"line_number":971,"context_line":"    tag_ref \u003d models.ImageTag(image_id\u003dimage_id, value\u003dvalue)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F%2B3fI%3D","line":968,"in_reply_to":"AAAAUH%2F%2B3lk%3D","updated":"2014-01-21 09:39:07.000000000","message":"Actually I assume this change can fix this issue *and* on the same time it can provide more advantages.\n\nAnyway, if you really don\u0027t like do this, what about also move the changes on #978, #1003 and #1014 (and related test cases) to a separated patch? .. even I don\u0027t like see that happen.","commit_id":"5de69badfc44dd03e5fa21577a66daabc3ade5a0"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"8b5cd2661e1f9113b24160a7e479a661dbcdd984","unresolved":false,"context_lines":[{"line_number":965,"context_line":"        image_tag_delete(context, image_id, tag, session)"},{"line_number":966,"context_line":""},{"line_number":967,"context_line":""},{"line_number":968,"context_line":"def image_tag_create(context, image_id, value, session\u003dNone):"},{"line_number":969,"context_line":"    \"\"\"Create an image tag.\"\"\""},{"line_number":970,"context_line":"    session \u003d session or _get_session()"},{"line_number":971,"context_line":"    tag_ref \u003d models.ImageTag(image_id\u003dimage_id, value\u003dvalue)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F%2B3lk%3D","line":968,"in_reply_to":"AAAAUH%2F%2B3ts%3D","updated":"2014-01-21 09:20:37.000000000","message":"Hi ZhiYan, I have considered this. But I don\u0027t think it\u0027s the same thing we\u0027re fixing. For now, we want to avoid get 404 instead of 500 when there is an image query. But for this, image tag create, it\u0027s not the case. Make sense?","commit_id":"5de69badfc44dd03e5fa21577a66daabc3ade5a0"}]}
