)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"17bc23118716c37fa78404901780803d7b0dfce8","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Abhishek Kekane \u003cakekane@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2021-02-25 16:35:32 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Get tasks assoiciated with image"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add support to get tasks associated with specific image."},{"line_number":10,"context_line":"bp: messages-api"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"d6835dfc_bdaa7e85","line":7,"range":{"start_line":7,"start_character":10,"end_line":7,"end_character":21},"updated":"2021-03-01 16:51:39.000000000","message":"\"associated\"","commit_id":"5f257fac32f1af32e1a2d92b38a5528c71220400"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4e6b4de64fd98daa791f007a046129deb9a0c759","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Abhishek Kekane \u003cakekane@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2021-02-25 16:35:32 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Get tasks assoiciated with image"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add support to get tasks associated with specific image."},{"line_number":10,"context_line":"bp: messages-api"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"6705ff38_4103c21a","line":7,"range":{"start_line":7,"start_character":10,"end_line":7,"end_character":21},"in_reply_to":"d6835dfc_bdaa7e85","updated":"2021-03-02 08:08:19.000000000","message":"Done","commit_id":"5f257fac32f1af32e1a2d92b38a5528c71220400"}],"glanceclient/common/utils.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ea65a8ba15672844678257b3ad8600cd9fa6600a","unresolved":true,"context_lines":[{"line_number":179,"context_line":"    for version_struct in versions:"},{"line_number":180,"context_line":"        if version_struct[\u0027id\u0027] \u003d\u003d version:"},{"line_number":181,"context_line":"            return version_struct[\u0027status\u0027] in supported"},{"line_number":182,"context_line":"    return False"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"def print_dict_list(objects, fields):"}],"source_content_type":"text/x-python","patch_set":3,"id":"0252368e_e896bb27","line":182,"updated":"2021-03-02 17:35:42.000000000","message":"Matches my tested tempest implementation:\n\nhttps://review.opendev.org/c/openstack/tempest/+/775679/2/tempest/lib/services/image/v2/versions_client.py","commit_id":"95aaaa3dbd57428496acdff190ed33804a592b79"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"954e3d264c39d3f55f0b9395d704664bd9e4a64a","unresolved":true,"context_lines":[{"line_number":179,"context_line":"    for version_struct in versions:"},{"line_number":180,"context_line":"        if version_struct[\u0027id\u0027] \u003d\u003d version:"},{"line_number":181,"context_line":"            return version_struct[\u0027status\u0027] in supported"},{"line_number":182,"context_line":"    return False"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"def print_dict_list(objects, fields):"}],"source_content_type":"text/x-python","patch_set":3,"id":"76b8737a_d5e6668a","line":182,"in_reply_to":"0252368e_e896bb27","updated":"2021-03-02 17:43:09.000000000","message":"Referred from there only :D","commit_id":"95aaaa3dbd57428496acdff190ed33804a592b79"}],"glanceclient/tests/unit/v2/test_images.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6c4b875ff04eb287dd598ac0dd3b91c917961487","unresolved":true,"context_lines":[{"line_number":741,"context_line":"        with mock.patch.object(common_utils,"},{"line_number":742,"context_line":"                               \u0027has_version\u0027) as mock_has_version:"},{"line_number":743,"context_line":"            mock_has_version.return_value \u003d False"},{"line_number":744,"context_line":"            self.assertRaises(exc.HTTPNotImplemented,"},{"line_number":745,"context_line":"                              self.controller.get_associated_image_tasks,"},{"line_number":746,"context_line":"                              \u00273a4560a1-e585-443e-9b39-553b46ec92d1\u0027)"},{"line_number":747,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"59541cf0_03c23292","line":744,"range":{"start_line":744,"start_character":30,"end_line":744,"end_character":52},"updated":"2021-03-02 18:03:42.000000000","message":"Changed this from TypeError to match.","commit_id":"e0a35a1150a7afe1e28b8d9b59a9e41951276baa"}],"glanceclient/tests/unit/v2/test_shell_v2.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6c4b875ff04eb287dd598ac0dd3b91c917961487","unresolved":true,"context_lines":[{"line_number":608,"context_line":"    def test_do_image_tasks_with_verbose(self):"},{"line_number":609,"context_line":"        self._test_do_image_tasks(verbose\u003dTrue)"},{"line_number":610,"context_line":""},{"line_number":611,"context_line":"    def test_do_image_tasks_unsupported(self):"},{"line_number":612,"context_line":"        with mock.patch(\u0027glanceclient.common.utils.exit\u0027) as mock_exit:"},{"line_number":613,"context_line":"            self._test_do_image_tasks(supported\u003dFalse)"},{"line_number":614,"context_line":"            mock_exit.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":4,"id":"6c2281b2_828ba56e","line":611,"updated":"2021-03-02 18:03:42.000000000","message":"I added this test.","commit_id":"e0a35a1150a7afe1e28b8d9b59a9e41951276baa"}],"glanceclient/v2/images.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"17bc23118716c37fa78404901780803d7b0dfce8","unresolved":true,"context_lines":[{"line_number":201,"context_line":"        url \u003d \u0027/v2/images/%s/tasks\u0027 % image_id"},{"line_number":202,"context_line":"        resp, body \u003d self.http_client.get(url)"},{"line_number":203,"context_line":"        body.pop(\u0027self\u0027, None)"},{"line_number":204,"context_line":"        return body, resp"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    @utils.add_req_id_to_object()"},{"line_number":207,"context_line":"    def data(self, image_id, do_checksum\u003dTrue, allow_md5_fallback\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":2,"id":"774f6284_eee43a76","line":204,"updated":"2021-03-01 16:51:39.000000000","message":"Just realized while looking at the other stack -- does glanceclient not check its own API versions to see if this is supported? I would expect to see a probe for version here, and if the server isn\u0027t new enough, print a nice message instead of what I expect will be a \"Not Found\" error otherwise...","commit_id":"5f257fac32f1af32e1a2d92b38a5528c71220400"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"a9a56480faa7ac4d1ee6124c2fa1e7f7fa1cf303","unresolved":true,"context_lines":[{"line_number":201,"context_line":"        url \u003d \u0027/v2/images/%s/tasks\u0027 % image_id"},{"line_number":202,"context_line":"        resp, body \u003d self.http_client.get(url)"},{"line_number":203,"context_line":"        body.pop(\u0027self\u0027, None)"},{"line_number":204,"context_line":"        return body, resp"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    @utils.add_req_id_to_object()"},{"line_number":207,"context_line":"    def data(self, image_id, do_checksum\u003dTrue, allow_md5_fallback\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":2,"id":"f7288e49_b3a55c42","line":204,"in_reply_to":"774f6284_eee43a76","updated":"2021-03-01 18:38:29.000000000","message":"I guess it is good to have that check here.","commit_id":"5f257fac32f1af32e1a2d92b38a5528c71220400"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4e6b4de64fd98daa791f007a046129deb9a0c759","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        url \u003d \u0027/v2/images/%s/tasks\u0027 % image_id"},{"line_number":202,"context_line":"        resp, body \u003d self.http_client.get(url)"},{"line_number":203,"context_line":"        body.pop(\u0027self\u0027, None)"},{"line_number":204,"context_line":"        return body, resp"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    @utils.add_req_id_to_object()"},{"line_number":207,"context_line":"    def data(self, image_id, do_checksum\u003dTrue, allow_md5_fallback\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7c3fa59e_ba09ef9b","line":204,"in_reply_to":"f7288e49_b3a55c42","updated":"2021-03-02 08:08:19.000000000","message":"Done","commit_id":"5f257fac32f1af32e1a2d92b38a5528c71220400"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ea65a8ba15672844678257b3ad8600cd9fa6600a","unresolved":true,"context_lines":[{"line_number":206,"context_line":"            body.pop(\u0027self\u0027, None)"},{"line_number":207,"context_line":"            return body, resp"},{"line_number":208,"context_line":"        else:"},{"line_number":209,"context_line":"            raise TypeError(\u0027This operation is not supported by Glance.\u0027)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    @utils.add_req_id_to_object()"},{"line_number":212,"context_line":"    def data(self, image_id, do_checksum\u003dTrue, allow_md5_fallback\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ffbed60b_803e180a","line":209,"updated":"2021-03-02 17:35:42.000000000","message":"This seems like an odd exception to raise. Everything else here (in view) seems to raise HTTP-like errors. Would it not be better to raise HTTPBadRequest or something? Or maybe 501 Not Implemented?\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTTP/Status/501","commit_id":"95aaaa3dbd57428496acdff190ed33804a592b79"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"954e3d264c39d3f55f0b9395d704664bd9e4a64a","unresolved":true,"context_lines":[{"line_number":206,"context_line":"            body.pop(\u0027self\u0027, None)"},{"line_number":207,"context_line":"            return body, resp"},{"line_number":208,"context_line":"        else:"},{"line_number":209,"context_line":"            raise TypeError(\u0027This operation is not supported by Glance.\u0027)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    @utils.add_req_id_to_object()"},{"line_number":212,"context_line":"    def data(self, image_id, do_checksum\u003dTrue, allow_md5_fallback\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":3,"id":"96ce2e32_bfd21b06","line":209,"in_reply_to":"fcc24279_eba684d2","updated":"2021-03-02 17:43:09.000000000","message":"I think I read somewhere about it that if any operation is not supported then TypeError is appropriate to throw, but as here we are already communicating with server then 501 will make more sense here;","commit_id":"95aaaa3dbd57428496acdff190ed33804a592b79"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ac107ba7257053ddfa78d2865af7fcafb80160e3","unresolved":true,"context_lines":[{"line_number":206,"context_line":"            body.pop(\u0027self\u0027, None)"},{"line_number":207,"context_line":"            return body, resp"},{"line_number":208,"context_line":"        else:"},{"line_number":209,"context_line":"            raise TypeError(\u0027This operation is not supported by Glance.\u0027)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    @utils.add_req_id_to_object()"},{"line_number":212,"context_line":"    def data(self, image_id, do_checksum\u003dTrue, allow_md5_fallback\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fcc24279_eba684d2","line":209,"in_reply_to":"ffbed60b_803e180a","updated":"2021-03-02 17:36:27.000000000","message":"Also, if we\u0027re going to stick with TypeError, perhaps it should be in the docstring so it\u0027s clear what we need to guard for?","commit_id":"95aaaa3dbd57428496acdff190ed33804a592b79"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6c4b875ff04eb287dd598ac0dd3b91c917961487","unresolved":true,"context_lines":[{"line_number":212,"context_line":"            body.pop(\u0027self\u0027, None)"},{"line_number":213,"context_line":"            return body, resp"},{"line_number":214,"context_line":"        else:"},{"line_number":215,"context_line":"            raise exc.HTTPNotImplemented("},{"line_number":216,"context_line":"                \u0027This operation is not supported by Glance.\u0027)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    @utils.add_req_id_to_object()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3b1585da_7c0623d8","line":215,"updated":"2021-03-02 18:03:42.000000000","message":"I changed this from TypeError to HTTPNotImplemented","commit_id":"e0a35a1150a7afe1e28b8d9b59a9e41951276baa"}],"glanceclient/v2/shell.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"76a5091dfaf48d96ead18d1a17c0ae0669819ae0","unresolved":true,"context_lines":[{"line_number":472,"context_line":"def do_image_tasks(gc, args):"},{"line_number":473,"context_line":"    \"\"\"Get tasks associated with image\"\"\""},{"line_number":474,"context_line":"    columns \u003d [\u0027Image Id\u0027, \u0027Task Id\u0027, \u0027User Id\u0027, \u0027Request Id\u0027,"},{"line_number":475,"context_line":"               \u0027Message\u0027, \u0027Status\u0027]"},{"line_number":476,"context_line":"    if args.verbose:"},{"line_number":477,"context_line":"        columns +\u003d [\u0027Result\u0027, \u0027Owner\u0027, \u0027Input\u0027, \u0027Expires at\u0027]"},{"line_number":478,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"8228606c_19b8f3c0","line":475,"updated":"2021-02-25 15:57:57.000000000","message":"This ends up with a suuuper wide table. I would tend to think that in the default case, a shell user really just wants to see if their import is done (or progressing). They initiated the request, so they don\u0027t really need to know all the details. They want to see the message and status. I really think the non-verbose case can just be that. They called this with the image-id, so showing that in the table is redundant and just takes up space. Also, a shell user probably doesn\u0027t need to know that they (user_id) submitted the request, and they probably can\u0027t use the task_id for anything unless they are an admin. The request_id is mostly only useful for a script or other service that is trying to follow a request.\n\nAll that to say... how about in the default case we just show \"message\" and \"status\"? And actually, how about adding updated_at into the default list? I think the user will be running this default case with the question of \"what is the status of my import?\" and updated_at,message,status is the meat of that answer.\n\nFor --verbose, adding all the other stuff makes sense.","commit_id":"f2ec7a8901d181a02dde14a5e7e7dca3d95d833d"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d95356351d0f772042245a1a7d5dc52872fa207a","unresolved":false,"context_lines":[{"line_number":472,"context_line":"def do_image_tasks(gc, args):"},{"line_number":473,"context_line":"    \"\"\"Get tasks associated with image\"\"\""},{"line_number":474,"context_line":"    columns \u003d [\u0027Image Id\u0027, \u0027Task Id\u0027, \u0027User Id\u0027, \u0027Request Id\u0027,"},{"line_number":475,"context_line":"               \u0027Message\u0027, \u0027Status\u0027]"},{"line_number":476,"context_line":"    if args.verbose:"},{"line_number":477,"context_line":"        columns +\u003d [\u0027Result\u0027, \u0027Owner\u0027, \u0027Input\u0027, \u0027Expires at\u0027]"},{"line_number":478,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f85bfe0_1bdfc6b2","line":475,"in_reply_to":"8228606c_19b8f3c0","updated":"2021-02-25 16:46:41.000000000","message":"Done","commit_id":"f2ec7a8901d181a02dde14a5e7e7dca3d95d833d"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"dc0972612c13f1e096082932eb3ae100462d44cc","unresolved":true,"context_lines":[{"line_number":483,"context_line":"    except exc.HTTPNotFound:"},{"line_number":484,"context_line":"        utils.exit(\u0027Image %s not found.\u0027 % args.id)"},{"line_number":485,"context_line":"    except exc.HTTPNotImplemented:"},{"line_number":486,"context_line":"        utils.exit(\u0027Server does not support image tasks API (v2.12)\u0027)"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"@utils.arg(\u0027--image-id\u0027, metavar\u003d\u0027\u003cIMAGE_ID\u003e\u0027, required\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":4,"id":"6910c47a_bf2e8875","line":486,"range":{"start_line":486,"start_character":20,"end_line":486,"end_character":67},"updated":"2021-03-02 18:11:12.000000000","message":"Is it misleading as we are supporting it for v2.12?\n\nServer does not support image tasks API below (v2.12)","commit_id":"e0a35a1150a7afe1e28b8d9b59a9e41951276baa"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"727ed14571bd2a91fa219d463964eac276135604","unresolved":true,"context_lines":[{"line_number":483,"context_line":"    except exc.HTTPNotFound:"},{"line_number":484,"context_line":"        utils.exit(\u0027Image %s not found.\u0027 % args.id)"},{"line_number":485,"context_line":"    except exc.HTTPNotImplemented:"},{"line_number":486,"context_line":"        utils.exit(\u0027Server does not support image tasks API (v2.12)\u0027)"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"@utils.arg(\u0027--image-id\u0027, metavar\u003d\u0027\u003cIMAGE_ID\u003e\u0027, required\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":4,"id":"6d44c3e7_a2e4b42e","line":486,"range":{"start_line":486,"start_character":20,"end_line":486,"end_character":67},"in_reply_to":"6910c47a_bf2e8875","updated":"2021-03-02 18:22:22.000000000","message":"The way this reads is \"The server does not support 2.12, which is required for the thing you ask me to do\". So, I think it makes sense to me as a native speaker.\n\nWe could change the wording maybe, if you think it would be more clear:\n\n\"Server does not support API v2.12 which is required when querying for image tasks\"\n\nIs that better?","commit_id":"e0a35a1150a7afe1e28b8d9b59a9e41951276baa"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b97fecb5dded79e9f01315738dfe6498237a779e","unresolved":true,"context_lines":[{"line_number":483,"context_line":"    except exc.HTTPNotFound:"},{"line_number":484,"context_line":"        utils.exit(\u0027Image %s not found.\u0027 % args.id)"},{"line_number":485,"context_line":"    except exc.HTTPNotImplemented:"},{"line_number":486,"context_line":"        utils.exit(\u0027Server does not support image tasks API (v2.12)\u0027)"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"@utils.arg(\u0027--image-id\u0027, metavar\u003d\u0027\u003cIMAGE_ID\u003e\u0027, required\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":4,"id":"d70b1604_00ebd918","line":486,"range":{"start_line":486,"start_character":20,"end_line":486,"end_character":67},"in_reply_to":"6d44c3e7_a2e4b42e","updated":"2021-03-02 18:48:58.000000000","message":"Makes more sense after your explanation, no need to change.","commit_id":"e0a35a1150a7afe1e28b8d9b59a9e41951276baa"}]}
