)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4d9356961f13b68587f42800476b9280d187aeed","unresolved":true,"context_lines":[{"line_number":14,"context_line":"usage of multiple threads/streams during the image download."},{"line_number":15,"context_line":"This can be useful in situations were the glance backend has"},{"line_number":16,"context_line":"limited singlestream performance."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Depends-On: I7397f3444a2174308edce5f038e202559f578cc1"},{"line_number":19,"context_line":"Change-Id: Iee5c385742b4fdb0e72ef6dc0c874f7b1da2e141"},{"line_number":20,"context_line":"Signed-off-by: Max Lamprecht \u003cmax.lamprecht@stackit.cloud\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"c512b559_2901c7c5","line":17,"updated":"2026-11-17 05:31:52.000000000","message":"Add Depends-on https://review.opendev.org/c/openstack/glance/+/1015982","commit_id":"30ef437ef6323d2b381601646e6cd5b32be1b7ea"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1c52945be0307630ee026dec1b5d095e4ad3c557","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"765d2b76_18ff6267","updated":"2025-12-05 13:30:58.000000000","message":"Hi Max,\n\nThis is a valuable enhancement. I would recommend that you consider providing a brief specification or rationale [1] outlining the need for this change, as it can help others better understand the context. Typically, we prefer that features or enhancements be proposed through formal proposals rather than directly.\nThank you for your understanding.\n\n[1] https://github.com/openstack/glance-specs/blob/master/specs/spec-lite-template.rst","commit_id":"30ef437ef6323d2b381601646e6cd5b32be1b7ea"}],"glanceclient/common/http.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b5b83684338fbdd137cfb0916aa6877828548b40","unresolved":true,"context_lines":[{"line_number":38,"context_line":"USER_AGENT \u003d \u0027python-glanceclient\u0027"},{"line_number":39,"context_line":"CHUNKSIZE \u003d 1024 * 1024  # 1MiB"},{"line_number":40,"context_line":"REQ_ID_HEADER \u003d \u0027X-OpenStack-Request-ID\u0027"},{"line_number":41,"context_line":"TOKEN_HEADERS \u003d [\u0027X-Auth-Token\u0027, \u0027X-Service-Token\u0027, \u0027Range\u0027]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def encode_headers(headers):"}],"source_content_type":"text/x-python","patch_set":4,"id":"0a620bc8_98a1e2ec","line":41,"range":{"start_line":41,"start_character":52,"end_line":41,"end_character":59},"updated":"2026-11-16 15:07:35.000000000","message":"Range is not token header. Better to use separate constant so meaning is clear.","commit_id":"30ef437ef6323d2b381601646e6cd5b32be1b7ea"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b5b83684338fbdd137cfb0916aa6877828548b40","unresolved":true,"context_lines":[{"line_number":228,"context_line":"        LOG.debug(\u0027\\n\u0027.join([encodeutils.safe_decode(x, errors\u003d\u0027ignore\u0027)"},{"line_number":229,"context_line":"                             for x in dump]))"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    def _request(self, method, url, raw_body\u003dFalse, **kwargs):"},{"line_number":232,"context_line":"        \"\"\"Send an http request with the specified characteristics."},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        Wrapper around httplib.HTTP(S)Connection.request to handle tasks such"}],"source_content_type":"text/x-python","patch_set":4,"id":"07d10080_0222c7f8","line":231,"range":{"start_line":231,"start_character":36,"end_line":231,"end_character":51},"updated":"2026-11-16 15:07:35.000000000","message":"raw_body is not used. Please remove it or use it.","commit_id":"30ef437ef6323d2b381601646e6cd5b32be1b7ea"}],"glanceclient/tests/unit/v2/test_shell_v2.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b5b83684338fbdd137cfb0916aa6877828548b40","unresolved":true,"context_lines":[{"line_number":2796,"context_line":"            mocked_data.assert_called_once_with(\u0027IMG-01\u0027,"},{"line_number":2797,"context_line":"                                                allow_md5_fallback\u003dTrue)"},{"line_number":2798,"context_line":""},{"line_number":2799,"context_line":"    def test_image_multipart_download(self):"},{"line_number":2800,"context_line":"        args \u003d self._make_args("},{"line_number":2801,"context_line":"            {\u0027id\u0027: \u0027IMG-01\u0027, \u0027file\u0027: \u0027testfile\u0027, \u0027progress\u0027: True,"},{"line_number":2802,"context_line":"             \u0027allow_md5_fallback\u0027: False, \u0027threads\u0027: 5})"}],"source_content_type":"text/x-python","patch_set":4,"id":"1231c5d3_f942d12b","line":2799,"range":{"start_line":2799,"start_character":4,"end_line":2799,"end_character":44},"updated":"2026-11-16 15:07:35.000000000","message":"Current tests only check shell call. Please add tests for multipart function itself: store discovery, thread cap, range calculation, Content-Range, retry, fallback, hash check, offset and small image.","commit_id":"30ef437ef6323d2b381601646e6cd5b32be1b7ea"}],"glanceclient/v2/images.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b5b83684338fbdd137cfb0916aa6877828548b40","unresolved":true,"context_lines":[{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        return utils.IterableWithLength(body, content_length), resp"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def download_chunk(self, args):"},{"line_number":296,"context_line":"        \"\"\"Downloads a single chunk of the file.\"\"\""},{"line_number":297,"context_line":"        url, output_file, start_byte, end_byte \u003d args"},{"line_number":298,"context_line":"        headers \u003d {\"Range\": f\"bytes\u003d{start_byte}-{end_byte}\"}"}],"source_content_type":"text/x-python","patch_set":4,"id":"0aa7dd64_b6456da0","line":295,"updated":"2026-11-16 15:07:35.000000000","message":"If store does not support range, please fallback to normal data() path. But only for specific HTTP 400 StoreRandomGetNotSupported. Other response like 200 or 416 should not fallback.","commit_id":"30ef437ef6323d2b381601646e6cd5b32be1b7ea"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b5b83684338fbdd137cfb0916aa6877828548b40","unresolved":true,"context_lines":[{"line_number":299,"context_line":"        start \u003d time.time()"},{"line_number":300,"context_line":"        try:"},{"line_number":301,"context_line":"            LOG.debug(f\"Downloading chunk: bytes {start_byte}-{end_byte}\")"},{"line_number":302,"context_line":"            resp, body \u003d self.http_client.get(url, headers\u003dheaders)"},{"line_number":303,"context_line":"            # check if resp is 206 Partial Content"},{"line_number":304,"context_line":"            if resp.status_code !\u003d 206:"},{"line_number":305,"context_line":"                raise exc.HTTPException("}],"source_content_type":"text/x-python","patch_set":4,"id":"8b1b9b0a_3b6595f1","line":302,"range":{"start_line":302,"start_character":12,"end_line":302,"end_character":67},"updated":"2026-11-16 15:07:35.000000000","message":"Please also check Content-Range and Content-Length. Only checking status 206 is not enough. Otherwise wrong range can write wrong data in file.","commit_id":"30ef437ef6323d2b381601646e6cd5b32be1b7ea"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b5b83684338fbdd137cfb0916aa6877828548b40","unresolved":true,"context_lines":[{"line_number":318,"context_line":"                f\"in {end - start} seconds\""},{"line_number":319,"context_line":"            )"},{"line_number":320,"context_line":"            return (start_byte, \"success\")"},{"line_number":321,"context_line":"        except Exception as e:"},{"line_number":322,"context_line":"            LOG.warning(f\"Failed chunks {start_byte}-{end_byte}: {e}\")"},{"line_number":323,"context_line":"            return (start_byte, \"failed\")"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def multipart_data("},{"line_number":326,"context_line":"        self, image_id, file_path, min_file_threshold\u003d500000000, num_threads\u003d3"}],"source_content_type":"text/x-python","patch_set":4,"id":"e9979a74_423b9a0f","line":323,"range":{"start_line":321,"start_character":0,"end_line":323,"end_character":41},"updated":"2026-11-16 15:07:35.000000000","message":"Catching all Exception and returning only string loses useful error details. Please keep original exception or return more information.","commit_id":"30ef437ef6323d2b381601646e6cd5b32be1b7ea"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b5b83684338fbdd137cfb0916aa6877828548b40","unresolved":true,"context_lines":[{"line_number":323,"context_line":"            return (start_byte, \"failed\")"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def multipart_data("},{"line_number":326,"context_line":"        self, image_id, file_path, min_file_threshold\u003d500000000, num_threads\u003d3"},{"line_number":327,"context_line":"    ):"},{"line_number":328,"context_line":"        \"\"\"Retrieve data of an image in parts."},{"line_number":329,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1735a8b1_a5879893","line":326,"range":{"start_line":326,"start_character":35,"end_line":326,"end_character":64},"updated":"2026-11-16 15:07:35.000000000","message":"500000000 is hardcoded. Can we expose --min-size or remove this? At least please use named constant.","commit_id":"30ef437ef6323d2b381601646e6cd5b32be1b7ea"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b5b83684338fbdd137cfb0916aa6877828548b40","unresolved":true,"context_lines":[{"line_number":323,"context_line":"            return (start_byte, \"failed\")"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def multipart_data("},{"line_number":326,"context_line":"        self, image_id, file_path, min_file_threshold\u003d500000000, num_threads\u003d3"},{"line_number":327,"context_line":"    ):"},{"line_number":328,"context_line":"        \"\"\"Retrieve data of an image in parts."},{"line_number":329,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"e6b6174d_3a4e7d1c","line":326,"range":{"start_line":326,"start_character":65,"end_line":326,"end_character":78},"updated":"2026-11-16 15:07:35.000000000","message":"Here default is 3, but CLI default is 1. Please keep same default in both places.","commit_id":"30ef437ef6323d2b381601646e6cd5b32be1b7ea"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b5b83684338fbdd137cfb0916aa6877828548b40","unresolved":true,"context_lines":[{"line_number":333,"context_line":"        :param num_threads: Number of threads to use for multipart download"},{"line_number":334,"context_line":"        \"\"\""},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        url \u003d \"/v2/images/%s\" % image_id"},{"line_number":337,"context_line":"        resp, image_meta \u003d self.http_client.get(url)"},{"line_number":338,"context_line":"        img_size \u003d image_meta.get(\"size\", None)"},{"line_number":339,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"eebcec4a_748c2163","line":336,"range":{"start_line":336,"start_character":8,"end_line":336,"end_character":40},"updated":"2026-11-16 15:07:35.000000000","message":"I think we should check store capability before using multipart. We can use get_stores_info_detail() and check READ_RANDOM. Also please limit num_threads to advertised maximum. Right now client sends range request without checking this.","commit_id":"30ef437ef6323d2b381601646e6cd5b32be1b7ea"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b5b83684338fbdd137cfb0916aa6877828548b40","unresolved":true,"context_lines":[{"line_number":348,"context_line":"        with open(file_path, \"wb\") as datafile:"},{"line_number":349,"context_line":"            datafile.truncate(img_size)"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        if img_size \u003c min_file_threshold:"},{"line_number":352,"context_line":"            LOG.info("},{"line_number":353,"context_line":"                \"Image size {img_size} is less than minimum threshold \""},{"line_number":354,"context_line":"                f\"{min_file_threshold}, downloading in single thread.\""}],"source_content_type":"text/x-python","patch_set":4,"id":"c98e1797_aa1b137b","line":351,"range":{"start_line":351,"start_character":8,"end_line":351,"end_character":41},"updated":"2026-11-16 15:07:35.000000000","message":"If image is smaller than threshold, better to use existing data() path. Now it still sends one range request even when num_threads is 1.","commit_id":"30ef437ef6323d2b381601646e6cd5b32be1b7ea"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b5b83684338fbdd137cfb0916aa6877828548b40","unresolved":true,"context_lines":[{"line_number":356,"context_line":"            num_threads \u003d 1"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"        # layout file into parts with different seek positions"},{"line_number":359,"context_line":"        chunk_size \u003d img_size // num_threads"},{"line_number":360,"context_line":"        chunks \u003d []"},{"line_number":361,"context_line":"        for i in range(num_threads):"},{"line_number":362,"context_line":"            start \u003d i * chunk_size"}],"source_content_type":"text/x-python","patch_set":4,"id":"ea85f050_13be88c4","line":359,"range":{"start_line":359,"start_character":8,"end_line":359,"end_character":44},"updated":"2026-11-16 15:07:35.000000000","message":"When image size is smaller than number of threads, chunk_size becomes 0 and ranges are wrong. Please clamp thread count and handle zero size image. Also reject --threads less than 1","commit_id":"30ef437ef6323d2b381601646e6cd5b32be1b7ea"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b5b83684338fbdd137cfb0916aa6877828548b40","unresolved":true,"context_lines":[{"line_number":368,"context_line":""},{"line_number":369,"context_line":"            chunks.append((url, file_path, start, end))"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"        with concurrent.futures.ThreadPoolExecutor("},{"line_number":372,"context_line":"                max_workers\u003dnum_threads) as executor:"},{"line_number":373,"context_line":"            tasks \u003d ["},{"line_number":374,"context_line":"                executor.submit(self.download_chunk, chunk_args)"},{"line_number":375,"context_line":"                for chunk_args in chunks"}],"source_content_type":"text/x-python","patch_set":4,"id":"adb7c07c_d45dbaf0","line":372,"range":{"start_line":371,"start_character":0,"end_line":372,"end_character":53},"updated":"2026-11-16 15:07:35.000000000","message":"Can we retry only failed part? Currently one failed chunk stops whole download. Spec says failed parts should be retried independently.","commit_id":"30ef437ef6323d2b381601646e6cd5b32be1b7ea"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b5b83684338fbdd137cfb0916aa6877828548b40","unresolved":true,"context_lines":[{"line_number":385,"context_line":"                raise exc.HTTPException("},{"line_number":386,"context_line":"                    f\"Failed to download chunks at positions: {failed_chunks}\""},{"line_number":387,"context_line":"                )"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"    @utils.add_req_id_to_object()"},{"line_number":390,"context_line":"    def upload(self, image_id, image_data, image_size\u003dNone, u_url\u003dNone,"},{"line_number":391,"context_line":"               backend\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7b215c58_86811616","line":388,"updated":"2026-11-16 15:07:35.000000000","message":"After all parts are written, please verify final image hash. Use os_hash_algo / os_hash_value and also support --allow-md5-fallback. Now multipart path skips this check","commit_id":"30ef437ef6323d2b381601646e6cd5b32be1b7ea"}],"glanceclient/v2/shell.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b5b83684338fbdd137cfb0916aa6877828548b40","unresolved":true,"context_lines":[{"line_number":665,"context_line":"                  \u0027Default is 1. Using multiple threads requires a local file \u0027"},{"line_number":666,"context_line":"                  \u0027to save the image data to. This option can significantly \u0027"},{"line_number":667,"context_line":"                  \u0027increase download speed but also requires the support of \u0027"},{"line_number":668,"context_line":"                  \u0027the glance store.\u0027))"},{"line_number":669,"context_line":"@utils.arg(\u0027--allow-md5-fallback\u0027, action\u003d\u0027store_true\u0027,"},{"line_number":670,"context_line":"           default\u003dutils.env(\u0027OS_IMAGE_ALLOW_MD5_FALLBACK\u0027, default\u003dFalse),"},{"line_number":671,"context_line":"           help\u003d_(\u0027If os_hash_algo and os_hash_value properties are available \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"13fb60cf_095a0f5e","line":668,"updated":"2026-11-16 15:07:35.000000000","message":"Please add --offset also. It should write remaining data from same offset so user can resume partial download. Non-zero offset should require file destination.","commit_id":"30ef437ef6323d2b381601646e6cd5b32be1b7ea"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b5b83684338fbdd137cfb0916aa6877828548b40","unresolved":true,"context_lines":[{"line_number":700,"context_line":"                   \u0027to save the image data to. Please specify a local file \u0027"},{"line_number":701,"context_line":"                   \u0027with --file.\u0027)"},{"line_number":702,"context_line":"            utils.exit(msg)"},{"line_number":703,"context_line":"        gc.images.multipart_data(args.id, args.file, num_threads\u003dargs.threads)"},{"line_number":704,"context_line":"        return"},{"line_number":705,"context_line":""},{"line_number":706,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"cbc73d04_411a4a24","line":703,"range":{"start_line":703,"start_character":8,"end_line":703,"end_character":78},"updated":"2026-11-16 15:07:35.000000000","message":"--progress is ignored when --threads \u003e 1. Please implement it or mention in help that it is not supported in multipart mode.","commit_id":"30ef437ef6323d2b381601646e6cd5b32be1b7ea"}]}
