)]}'
{"id":"openstack%2Fpython-glanceclient~945894","triplet_id":"openstack%2Fpython-glanceclient~master~I9ce858accc0c9266fcd4ca5d9b2661f53d68ed43","project":"openstack/python-glanceclient","branch":"master","topic":"bp/bypass-chunked-transfer","attention_set":{},"removed_from_attention_set":{"27615":{"account":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"last_update":"2025-04-24 15:22:19.000000000","reason":"Change was abandoned"},"9303":{"account":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"last_update":"2025-04-21 04:50:54.000000000","reason":"\u003cGERRIT_ACCOUNT_9303\u003e replied on the change","reason_account":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"}},"4690":{"account":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"last_update":"2025-04-24 15:22:19.000000000","reason":"Change was abandoned"}},"hashtags":[],"change_id":"I9ce858accc0c9266fcd4ca5d9b2661f53d68ed43","subject":"Add option to upload without chunked transfer encoding","status":"ABANDONED","created":"2025-03-29 00:27:34.000000000","updated":"2025-04-24 15:22:19.000000000","total_comment_count":7,"unresolved_comment_count":2,"work_in_progress":true,"has_review_started":true,"meta_rev_id":"cbe2b2a48f820511570946159607261cd8524e3c","_number":945894,"virtual_id_number":945894,"owner":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"actions":{},"labels":{"Verified":{"disliked":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"tag":"autogenerated:zuul:check","value":-1,"date":"2025-04-18 04:08:44.000000000","permitted_voting_range":{"min":-2,"max":2},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","value":-1,"default_value":0,"optional":true},"Code-Review":{"all":[{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","default_value":0,"optional":true},"Workflow":{"all":[{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true},"Review-Priority":{"all":[{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-1":"Branch Freeze"," 0":"No Priority","+1":"Important Change","+2":"Top Priority / Holds Gate"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"CC":[{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"}],"REVIEWER":[{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}]},"pending_reviewers":{"CC":[{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"}],"REVIEWER":[{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}]},"reviewer_updates":[{"updated":"2025-03-29 01:54:18.000000000","updated_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"reviewer":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"state":"REVIEWER"},{"updated":"2025-03-31 07:20:47.000000000","updated_by":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"reviewer":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"state":"CC"},{"updated":"2025-04-02 05:13:20.000000000","updated_by":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"reviewer":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"state":"CC"},{"updated":"2025-04-17 08:01:38.000000000","updated_by":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"reviewer":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"state":"CC"}],"messages":[{"id":"7fdef3b5799ab04b2b73041b3e237fd29178554a","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"date":"2025-03-29 00:27:34.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"3c9500c852da11b17767cbb39c33d20832ea5f4b","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"date":"2025-03-29 00:45:45.000000000","message":"Uploaded patch set 2.","accounts_in_message":[],"_revision_number":2},{"id":"0675b6623e59e8100582e564fd643d14fad18b52","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"date":"2025-03-29 00:51:36.000000000","message":"Uploaded patch set 3.","accounts_in_message":[],"_revision_number":3},{"id":"3db78292398e73a979c473a90f4e81223591832b","tag":"autogenerated:gerrit:setWorkInProgress","author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"date":"2025-03-29 00:58:44.000000000","message":"Set Work In Progress","accounts_in_message":[],"_revision_number":3},{"id":"7ebcaad4c62f8981e132db9c8a4b456870e06831","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2025-03-29 01:54:18.000000000","message":"Patch Set 3: Verified-1\n\nBuild failed (check pipeline).  For information on how to proceed, see\nhttps://docs.opendev.org/opendev/infra-manual/latest/developers.html#automated-testing\nand https://docs.openstack.org/project-team-guide/testing.html#how-to-handle-test-failures\n\nhttps://zuul.opendev.org/t/openstack/buildset/63d87cda26d24aa0804cffac2877ecaf\n\n- tempest-full-py3 https://zuul.opendev.org/t/openstack/build/24f615708a46411ea4b5559541bca840 : SUCCESS in 1h 02m 11s\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/98a668eca5fd4c00b6b101f590354371 : SUCCESS in 2m 21s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/fbe01fc1f7d0479da2678d7ca3ddd669 : SUCCESS in 2m 03s\n- openstack-tox-py39 https://zuul.opendev.org/t/openstack/build/01857ba1d59b4ca28f36c96dffe59f60 : SUCCESS in 1m 33s\n- openstack-tox-py312 https://zuul.opendev.org/t/openstack/build/1d377c19b0ce4cf393620a97e1422c50 : SUCCESS in 2m 18s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/2cb2e68a6fcb44c8a99b4865803314c0 : FAILURE in 1m 41s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/f3ea81dedc7449a7be18bba347f219bc : SUCCESS in 1m 17s\n- glanceclient-dsvm-functional https://zuul.opendev.org/t/openstack/build/886917db0794438ca6d1f86641c84122 : SUCCESS in 16m 24s","accounts_in_message":[],"_revision_number":3},{"id":"dbdb175ada24c14ea31bf83103fb9182a772f2de","author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"date":"2025-03-31 07:20:47.000000000","message":"Patch Set 3:\n\n(1 comment)","accounts_in_message":[],"_revision_number":3},{"id":"def36795b60d00fc331aacd56effd62a41f20522","author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"date":"2025-03-31 20:21:19.000000000","message":"Patch Set 3:\n\n(1 comment)","accounts_in_message":[],"_revision_number":3},{"id":"a261a8e93caeae860ce63e4580b5e35c1e6e8ccb","author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"date":"2025-04-02 05:13:20.000000000","message":"Patch Set 3:\n\n(1 comment)","accounts_in_message":[],"_revision_number":3},{"id":"559df6ed1f1b8238b065b4ee24166f84cf47e8a8","author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"date":"2025-04-18 00:14:27.000000000","message":"Patch Set 3:\n\n(1 comment)","accounts_in_message":[],"_revision_number":3},{"id":"ca397deb3f4bbe32461017df7a0f00f2f69d7441","tag":"autogenerated:gerrit:newWipPatchSet","author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"date":"2025-04-18 02:01:42.000000000","message":"Uploaded patch set 4.\n\nOutdated Votes:\n* Verified-1\n","accounts_in_message":[],"_revision_number":4},{"id":"a7a7ecead3547085c6388b8087e365df499a5de2","author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"date":"2025-04-18 02:04:44.000000000","message":"Patch Set 4:\n\n(1 comment)","accounts_in_message":[],"_revision_number":4},{"id":"ade0eda5f5bcf6131298079dc79ab05fd0789c29","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2025-04-18 04:08:44.000000000","message":"Patch Set 4: Verified-1\n\nBuild failed (check pipeline).  For information on how to proceed, see\nhttps://docs.opendev.org/opendev/infra-manual/latest/developers.html#automated-testing\nand https://docs.openstack.org/project-team-guide/testing.html#how-to-handle-test-failures\n\nhttps://zuul.opendev.org/t/openstack/buildset/5690ef7a4de44288ac6f5e0ff045fe95\n\n- tempest-full-py3 https://zuul.opendev.org/t/openstack/build/687c9b68d88d46b3a14b8a85ce2c3f0f : SUCCESS in 1h 44m 34s\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/970fd6fe4b68441f8b0b8e5a0484130b : SUCCESS in 4m 24s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/280955c38a5548f693666bd7da8860b0 : SUCCESS in 2m 35s\n- openstack-tox-py310 https://zuul.opendev.org/t/openstack/build/f2e516c1790c49dfaab0ae42fc6fc9cf : SUCCESS in 3m 03s\n- openstack-tox-py312 https://zuul.opendev.org/t/openstack/build/dbdb0b3e6ec64fa4bcdc071e3c3e2d5e : SUCCESS in 3m 29s\n- openstack-tox-py313 https://zuul.opendev.org/t/openstack/build/cbf1f93862e1486d9446d2cf6bf471aa : FAILURE in 6m 12s (non-voting)\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/e7614b764a1d4904a66c91778875f6fb : FAILURE in 3m 33s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/c5be1dc3ae1b467993add369cd03d110 : SUCCESS in 2m 15s\n- glanceclient-dsvm-functional https://zuul.opendev.org/t/openstack/build/0f826674b8ea4d19892c08ee956094f5 : SUCCESS in 19m 54s","accounts_in_message":[],"_revision_number":4},{"id":"9ab4281ee08c300159f267d85fc6fd4c197fd439","author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"date":"2025-04-19 02:17:44.000000000","message":"Patch Set 4:\n\n(1 comment)","accounts_in_message":[],"_revision_number":4},{"id":"3b2fb8fa109d002995b2c55495d4fc12f4b2d2a8","author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"date":"2025-04-21 04:50:54.000000000","message":"Patch Set 4:\n\n(1 comment)","accounts_in_message":[],"_revision_number":4},{"id":"cbe2b2a48f820511570946159607261cd8524e3c","tag":"autogenerated:gerrit:abandon","author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"date":"2025-04-24 15:22:19.000000000","message":"Abandoned","accounts_in_message":[],"_revision_number":4}],"current_revision_number":4,"current_revision":"b2892bf7ca58d797353336806770aeb0fe31fcdc","revisions":{"a92cf5a1a5a77f8b3401d997b653e2106a817e04":{"kind":"REWORK","_number":1,"created":"2025-03-29 00:27:34.000000000","uploader":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"ref":"refs/changes/94/945894/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/python-glanceclient","ref":"refs/changes/94/945894/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/94/945894/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/94/945894/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/94/945894/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/python-glanceclient refs/changes/94/945894/1"}}},"commit":{"parents":[{"commit":"235814cf868e14062e1f2250f285031f74d88d1c","subject":"Merge \"Remove Python 3.8 support\"","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/235814cf868e14062e1f2250f285031f74d88d1c"}]}],"author":{"name":"melanie witt","email":"melwittt@gmail.com","date":"2025-03-29 00:12:51.000000000","tz":-420},"committer":{"name":"melanie witt","email":"melwittt@gmail.com","date":"2025-03-29 00:27:16.000000000","tz":-420},"subject":"Add option to upload without chunked transfer encoding","message":"Add option to upload without chunked transfer encoding\n\nHistorically, glanceclient uploads image data with\n\"Transer-Encoding: chunked\" with no choice to stream image data without\nthe HTTP chunked transfer mechanism. The Python requests library knows\nto do this based on whether it receives a Generator type as the upload\ndata [1].\n\nThis works fine in most cases but can become an issue if Glance is\nusing Cinder as the backend. An HTTP chunked transfer inherently has no\nknown data size and because of this Glance will perform an iterative\n\"resize-before-write\" process to gradually grow the Cinder volume 1 GB\nat a time until it receives the last of the image data. The problem\nwith this is that the Cinder volume must be detached and then\nre-attached each iteration. This process can be very slow.\n\nThe Python requests library also supports streaming uploads where\nit will stream the data in chunks but with \"Content-Length: \u003cfile\nsize\u003e\" instead of \"Transer-Encoding: chunked\" [2]. The Python requests\nlibrary knows to do this based on whether it receives a file-like\nobject as the upload data.\n\nWhen Glance receives this type of request it knows the image size from\nthe Content-Length header and can create the necessary size Cinder\nvolume in one step.\n\nThis adds an option to the upload() method to specify\nchunked_transfer_encoding\u003dFalse for appropriate use cases such as Nova\nuploading a snapshot to Glance.\n\n[1] https://requests.readthedocs.io/en/latest/user/advanced/#chunk-encoded-requests\n[2] https://requests.readthedocs.io/en/latest/user/advanced/#streaming-uploads\n\nChange-Id: I9ce858accc0c9266fcd4ca5d9b2661f53d68ed43\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/a92cf5a1a5a77f8b3401d997b653e2106a817e04"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/a92cf5a1a5a77f8b3401d997b653e2106a817e04"}]},"parents_data":[{"branch_name":"refs/heads/master","commit_id":"235814cf868e14062e1f2250f285031f74d88d1c","is_merged_in_target_branch":true}],"branch":"refs/heads/master"},"736c01a1faa6565468324922b888e3e658f1510a":{"kind":"REWORK","_number":2,"created":"2025-03-29 00:45:45.000000000","uploader":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"ref":"refs/changes/94/945894/2","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/python-glanceclient","ref":"refs/changes/94/945894/2","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/94/945894/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/94/945894/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/94/945894/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/python-glanceclient refs/changes/94/945894/2"}}},"commit":{"parents":[{"commit":"235814cf868e14062e1f2250f285031f74d88d1c","subject":"Merge \"Remove Python 3.8 support\"","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/235814cf868e14062e1f2250f285031f74d88d1c"}]}],"author":{"name":"melanie witt","email":"melwittt@gmail.com","date":"2025-03-29 00:12:51.000000000","tz":-420},"committer":{"name":"melanie witt","email":"melwittt@gmail.com","date":"2025-03-29 00:45:35.000000000","tz":-420},"subject":"Add option to upload without chunked transfer encoding","message":"Add option to upload without chunked transfer encoding\n\nHistorically, glanceclient uploads image data with\n\"Transer-Encoding: chunked\" with no choice to stream image data without\nthe HTTP chunked transfer mechanism. The Python requests library knows\nto do this based on whether it receives a Generator type as the upload\ndata [1].\n\nThis works fine in most cases but can become an issue if Glance is\nusing Cinder as the backend. An HTTP chunked transfer inherently has no\nknown data size and because of this Glance will perform an iterative\n\"resize-before-write\" process to gradually grow the Cinder volume 1 GB\nat a time until it receives the last of the image data. The problem\nwith this is that the Cinder volume must be detached and then\nre-attached each iteration. This process can be very slow.\n\nThe Python requests library also supports streaming uploads where\nit will stream the data in chunks but with \"Content-Length: \u003cfile\nsize\u003e\" instead of \"Transer-Encoding: chunked\" [2]. The Python requests\nlibrary knows to do this based on whether it receives a file-like\nobject as the upload data.\n\nWhen Glance receives this type of request it knows the image size from\nthe Content-Length header and can create the necessary size Cinder\nvolume in one step.\n\nThis adds an option to the upload() method to specify\nchunked_transfer_encoding\u003dFalse for appropriate use cases such as Nova\nuploading a snapshot to Glance.\n\n[1] https://requests.readthedocs.io/en/latest/user/advanced/#chunk-encoded-requests\n[2] https://requests.readthedocs.io/en/latest/user/advanced/#streaming-uploads\n\nChange-Id: I9ce858accc0c9266fcd4ca5d9b2661f53d68ed43\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/736c01a1faa6565468324922b888e3e658f1510a"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/736c01a1faa6565468324922b888e3e658f1510a"}]},"parents_data":[{"branch_name":"refs/heads/master","commit_id":"235814cf868e14062e1f2250f285031f74d88d1c","is_merged_in_target_branch":true}],"branch":"refs/heads/master"},"8abce9b1eb745268b97d45098b9a988b1ea780a8":{"kind":"REWORK","_number":3,"created":"2025-03-29 00:51:36.000000000","uploader":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"ref":"refs/changes/94/945894/3","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/python-glanceclient","ref":"refs/changes/94/945894/3","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/94/945894/3 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/94/945894/3 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/94/945894/3 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/python-glanceclient refs/changes/94/945894/3"}}},"commit":{"parents":[{"commit":"235814cf868e14062e1f2250f285031f74d88d1c","subject":"Merge \"Remove Python 3.8 support\"","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/235814cf868e14062e1f2250f285031f74d88d1c"}]}],"author":{"name":"melanie witt","email":"melwittt@gmail.com","date":"2025-03-29 00:12:51.000000000","tz":-420},"committer":{"name":"melanie witt","email":"melwittt@gmail.com","date":"2025-03-29 00:51:30.000000000","tz":-420},"subject":"Add option to upload without chunked transfer encoding","message":"Add option to upload without chunked transfer encoding\n\nHistorically, glanceclient uploads image data with\n\"Transer-Encoding: chunked\" with no choice to stream image data without\nthe HTTP chunked transfer mechanism. The Python requests library knows\nto do this based on whether it receives a Generator type as the upload\ndata [1].\n\nThis works fine in most cases but can become an issue if Glance is\nusing Cinder as the backend. An HTTP chunked transfer inherently has no\nknown data size and because of this Glance will perform an iterative\n\"resize-before-write\" process to gradually grow the Cinder volume 1 GB\nat a time until it receives the last of the image data. The problem\nwith this is that the Cinder volume must be detached and then\nre-attached each iteration. This process can be very slow.\n\nThe Python requests library also supports streaming uploads where\nit will stream the data in chunks but with \"Content-Length: \u003cfile\nsize\u003e\" instead of \"Transer-Encoding: chunked\" [2]. The Python requests\nlibrary knows to do this based on whether it receives a file-like\nobject as the upload data.\n\nWhen Glance receives this type of request it knows the image size from\nthe Content-Length header and can create the necessary size Cinder\nvolume in one step.\n\nThis adds an option to the upload() method to specify\nchunked_transfer_encoding\u003dFalse for appropriate use cases such as Nova\nuploading a snapshot to Glance.\n\n[1] https://requests.readthedocs.io/en/latest/user/advanced/#chunk-encoded-requests\n[2] https://requests.readthedocs.io/en/latest/user/advanced/#streaming-uploads\n\nChange-Id: I9ce858accc0c9266fcd4ca5d9b2661f53d68ed43\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/8abce9b1eb745268b97d45098b9a988b1ea780a8"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/8abce9b1eb745268b97d45098b9a988b1ea780a8"}]},"parents_data":[{"branch_name":"refs/heads/master","commit_id":"235814cf868e14062e1f2250f285031f74d88d1c","is_merged_in_target_branch":true}],"branch":"refs/heads/master"},"b2892bf7ca58d797353336806770aeb0fe31fcdc":{"kind":"REWORK","_number":4,"created":"2025-04-18 02:01:42.000000000","uploader":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"ref":"refs/changes/94/945894/4","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/python-glanceclient","ref":"refs/changes/94/945894/4","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/94/945894/4 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/94/945894/4 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/94/945894/4 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/python-glanceclient refs/changes/94/945894/4"}}},"commit":{"parents":[{"commit":"235814cf868e14062e1f2250f285031f74d88d1c","subject":"Merge \"Remove Python 3.8 support\"","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/235814cf868e14062e1f2250f285031f74d88d1c"}]}],"author":{"name":"melanie witt","email":"melwittt@gmail.com","date":"2025-03-29 00:12:51.000000000","tz":-420},"committer":{"name":"melanie witt","email":"melwittt@gmail.com","date":"2025-04-18 01:56:20.000000000","tz":-420},"subject":"Add option to upload without chunked transfer encoding","message":"Add option to upload without chunked transfer encoding\n\nHistorically, glanceclient uploads image data with\n\"Transer-Encoding: chunked\" with no choice to stream image data without\nthe HTTP chunked transfer mechanism. The Python requests library knows\nto do this based on whether it receives a Generator type as the upload\ndata [1].\n\nThis works fine in most cases but can become an issue if Glance is\nusing Cinder as the backend. An HTTP chunked transfer inherently has no\nknown data size and because of this Glance will perform an iterative\n\"resize-before-write\" process to gradually grow the Cinder volume 1 GB\nat a time until it receives the last of the image data. The problem\nwith this is that the Cinder volume must be detached and then\nre-attached each iteration. This process can be very slow.\n\nThe Python requests library also supports streaming uploads where\nit will stream the data in chunks but with \"Content-Length: \u003cfile\nsize\u003e\" instead of \"Transer-Encoding: chunked\" [2]. The Python requests\nlibrary knows to do this based on whether it receives a file-like\nobject as the upload data.\n\nWhen Glance receives this type of request it knows the image size from\nthe Content-Length header and can create the necessary size Cinder\nvolume in one step.\n\nThis adds an option to the upload() and stage() methods to specify\nchunked_transfer_encoding\u003dFalse for appropriate use cases such as Nova\nuploading a snapshot to Glance.\n\nRelated to blueprint bypass-chunked-transfer\n\n[1] https://requests.readthedocs.io/en/latest/user/advanced/#chunk-encoded-requests\n[2] https://requests.readthedocs.io/en/latest/user/advanced/#streaming-uploads\n\nChange-Id: I9ce858accc0c9266fcd4ca5d9b2661f53d68ed43\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/b2892bf7ca58d797353336806770aeb0fe31fcdc"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/b2892bf7ca58d797353336806770aeb0fe31fcdc"}]},"parents_data":[{"branch_name":"refs/heads/master","commit_id":"235814cf868e14062e1f2250f285031f74d88d1c","is_merged_in_target_branch":true}],"branch":"refs/heads/master"}},"requirements":[],"submit_records":[],"submit_requirements":[{"name":"Verified","description":"Verified in gate by CI","status":"UNSATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Verified\u003dMAX AND -label:Verified\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":[],"failing_atoms":["label:Verified\u003dMAX","label:Verified\u003dMIN"],"atom_explanations":{}}},{"name":"Code-Review","description":"Code reviewed by core reviewer","status":"UNSATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Code-Review\u003dMAX AND -label:Code-Review\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":[],"failing_atoms":["label:Code-Review\u003dMAX","label:Code-Review\u003dMIN"],"atom_explanations":{}}},{"name":"Review-Priority","description":"Review priority","status":"SATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"-label:Review-Priority\u003dMIN","fulfilled":true,"status":"PASS","passing_atoms":[],"failing_atoms":["label:Review-Priority\u003dMIN"],"atom_explanations":{}}},{"name":"Workflow","description":"Approved for gate by core reviewer","status":"UNSATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Workflow\u003dMAX AND -label:Workflow\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":[],"failing_atoms":["label:Workflow\u003dMAX","label:Workflow\u003dMIN"],"atom_explanations":{}}}]}
