)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"bb53378d37622dafa1f978e7ef7f5433d76af7c6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"03ac1204_0c3467a7","updated":"2025-09-19 16:14:21.000000000","message":"Forgot to mention that these are minor and the code looks fine; commit message and code have good comments explaining what\u0027s going on.","commit_id":"94be13ba4714818c0a16f798d01daff01403f48c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"698f3e45d3195a50ceb7e9ef048503cf6a1278a3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"4962cecd_bb3c452e","updated":"2025-09-19 15:55:21.000000000","message":"I agree with Abhishek\u0027s comment about the misleading log message; see inline for a suggestion.  Also, suggestion inline for enhancing the unit test.","commit_id":"94be13ba4714818c0a16f798d01daff01403f48c"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"3daf55309f21dfcdcd88bf6afdcc3501287bc70b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"f36f8e89_9a5fdd14","updated":"2025-09-17 22:18:38.000000000","message":"We\u0027ll probably want to backport this.","commit_id":"94be13ba4714818c0a16f798d01daff01403f48c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"f80d679dc6207b7a9d28585c455c634d64028282","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"dfb7005c_3b850a35","updated":"2025-09-22 12:20:22.000000000","message":"Looks good, but a question inline about logging.","commit_id":"342e95e1c1ecd2a2848aed6d9bb118336d73e535"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"695dd72e53e9a529eeec73f1b4c202d73837764b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"0cd2c540_572b5ff8","updated":"2025-09-22 14:09:43.000000000","message":"My concerns have been addressed.","commit_id":"342e95e1c1ecd2a2848aed6d9bb118336d73e535"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"35358a5e930362c61eb2e5654b4f21db30dc6f00","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"cd90c050_17b717a0","updated":"2025-09-21 17:45:36.000000000","message":"Thanks Cyril, Abhishek and Brian!\nI\u0027ve incorporated all of the review comments and addressed them in latest PS.","commit_id":"342e95e1c1ecd2a2848aed6d9bb118336d73e535"}],"glance_store/_drivers/s3.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"698f3e45d3195a50ceb7e9ef048503cf6a1278a3","unresolved":true,"context_lines":[{"line_number":848,"context_line":"            # object directly."},{"line_number":849,"context_line":"            if not plist:"},{"line_number":850,"context_line":"                LOG.debug(\"Aborting multipart upload for zero-byte image \""},{"line_number":851,"context_line":"                          \"key\u003d%(key)s, UploadId\u003d%(UploadId)s\","},{"line_number":852,"context_line":"                          {\u0027key\u0027: key, \u0027UploadId\u0027: upload_id})"},{"line_number":853,"context_line":"                s3_client.abort_multipart_upload(Bucket\u003dbucket, Key\u003dkey,"},{"line_number":854,"context_line":"                                                 UploadId\u003dupload_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"e0226b62_d6cf6613","line":851,"range":{"start_line":851,"start_character":27,"end_line":851,"end_character":30},"updated":"2025-09-19 15:55:21.000000000","message":"I really wished they had called this \u0027name\u0027 or \u0027id\u0027 so it was obvious that there\u0027s nothing sensitive being passed here!","commit_id":"94be13ba4714818c0a16f798d01daff01403f48c"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"35358a5e930362c61eb2e5654b4f21db30dc6f00","unresolved":false,"context_lines":[{"line_number":848,"context_line":"            # object directly."},{"line_number":849,"context_line":"            if not plist:"},{"line_number":850,"context_line":"                LOG.debug(\"Aborting multipart upload for zero-byte image \""},{"line_number":851,"context_line":"                          \"key\u003d%(key)s, UploadId\u003d%(UploadId)s\","},{"line_number":852,"context_line":"                          {\u0027key\u0027: key, \u0027UploadId\u0027: upload_id})"},{"line_number":853,"context_line":"                s3_client.abort_multipart_upload(Bucket\u003dbucket, Key\u003dkey,"},{"line_number":854,"context_line":"                                                 UploadId\u003dupload_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"2e6957d5_aadda472","line":851,"range":{"start_line":851,"start_character":27,"end_line":851,"end_character":30},"in_reply_to":"e0226b62_d6cf6613","updated":"2025-09-21 17:45:36.000000000","message":"Agreed, it\u0027s just an identifier to be stored as the object name so naming it \"key\" is really misleading.\n\n        :param key: The object name to be stored (image identifier)","commit_id":"94be13ba4714818c0a16f798d01daff01403f48c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"8ca3e30a3290c1e291f42c0c1933c42186c885b8","unresolved":true,"context_lines":[{"line_number":865,"context_line":"                                                    MultipartUpload\u003dmpu_list,"},{"line_number":866,"context_line":"                                                    UploadId\u003dupload_id)"},{"line_number":867,"context_line":""},{"line_number":868,"context_line":"            LOG.info(\"Multipart complete key\u003d%(key)s \""},{"line_number":869,"context_line":"                     \"UploadId\u003d%(UploadId)s \""},{"line_number":870,"context_line":"                     \"Wrote %(total_size)d bytes to S3 key \""},{"line_number":871,"context_line":"                     \"named %(key)s \""},{"line_number":872,"context_line":"                     \"with checksum %(checksum)s\","},{"line_number":873,"context_line":"                     {\u0027key\u0027: key, \u0027UploadId\u0027: upload_id,"},{"line_number":874,"context_line":"                      \u0027total_size\u0027: total_size, \u0027checksum\u0027: checksum_hex})"},{"line_number":875,"context_line":"            return loc.get_uri(), total_size, checksum_hex, hash_hex, metadata"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"        # Abort"}],"source_content_type":"text/x-python","patch_set":1,"id":"d47a37ef_ee69b536","line":874,"range":{"start_line":868,"start_character":12,"end_line":874,"end_character":74},"updated":"2025-09-18 16:08:43.000000000","message":"Isn\u0027t this log message will be confusing if we are aborting the multipart upload?","commit_id":"94be13ba4714818c0a16f798d01daff01403f48c"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"35358a5e930362c61eb2e5654b4f21db30dc6f00","unresolved":false,"context_lines":[{"line_number":865,"context_line":"                                                    MultipartUpload\u003dmpu_list,"},{"line_number":866,"context_line":"                                                    UploadId\u003dupload_id)"},{"line_number":867,"context_line":""},{"line_number":868,"context_line":"            LOG.info(\"Multipart complete key\u003d%(key)s \""},{"line_number":869,"context_line":"                     \"UploadId\u003d%(UploadId)s \""},{"line_number":870,"context_line":"                     \"Wrote %(total_size)d bytes to S3 key \""},{"line_number":871,"context_line":"                     \"named %(key)s \""},{"line_number":872,"context_line":"                     \"with checksum %(checksum)s\","},{"line_number":873,"context_line":"                     {\u0027key\u0027: key, \u0027UploadId\u0027: upload_id,"},{"line_number":874,"context_line":"                      \u0027total_size\u0027: total_size, \u0027checksum\u0027: checksum_hex})"},{"line_number":875,"context_line":"            return loc.get_uri(), total_size, checksum_hex, hash_hex, metadata"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"        # Abort"}],"source_content_type":"text/x-python","patch_set":1,"id":"3d655139_25807fe8","line":874,"range":{"start_line":868,"start_character":12,"end_line":874,"end_character":74},"in_reply_to":"2ba82de5_0618596a","updated":"2025-09-21 17:45:36.000000000","message":"Done","commit_id":"94be13ba4714818c0a16f798d01daff01403f48c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"698f3e45d3195a50ceb7e9ef048503cf6a1278a3","unresolved":true,"context_lines":[{"line_number":865,"context_line":"                                                    MultipartUpload\u003dmpu_list,"},{"line_number":866,"context_line":"                                                    UploadId\u003dupload_id)"},{"line_number":867,"context_line":""},{"line_number":868,"context_line":"            LOG.info(\"Multipart complete key\u003d%(key)s \""},{"line_number":869,"context_line":"                     \"UploadId\u003d%(UploadId)s \""},{"line_number":870,"context_line":"                     \"Wrote %(total_size)d bytes to S3 key \""},{"line_number":871,"context_line":"                     \"named %(key)s \""},{"line_number":872,"context_line":"                     \"with checksum %(checksum)s\","},{"line_number":873,"context_line":"                     {\u0027key\u0027: key, \u0027UploadId\u0027: upload_id,"},{"line_number":874,"context_line":"                      \u0027total_size\u0027: total_size, \u0027checksum\u0027: checksum_hex})"},{"line_number":875,"context_line":"            return loc.get_uri(), total_size, checksum_hex, hash_hex, metadata"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"        # Abort"}],"source_content_type":"text/x-python","patch_set":1,"id":"2ba82de5_0618596a","line":874,"range":{"start_line":868,"start_character":12,"end_line":874,"end_character":74},"in_reply_to":"3a5468de_43b47abd","updated":"2025-09-19 15:55:21.000000000","message":"My suggestion is to change line 850 to INFO level and then indent lines 868-874 to be part of the \u0027else\u0027 block.  Also, instead of saying \"Aborting\" in line 850, I suggest saying \"Not doing\" to distinguish this message from the one we log at line 880.  (I know, we call abort_multipart_upload(), but then we immediately go ahead and add a zero-byte object to the bucket, so it\u0027s not like we\u0027re aborting the upload, we\u0027re continuing the upload, just not using multipart to do it.)","commit_id":"94be13ba4714818c0a16f798d01daff01403f48c"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"a89ea3c2ae3f713602cd821be009bc8aa6d64d07","unresolved":true,"context_lines":[{"line_number":865,"context_line":"                                                    MultipartUpload\u003dmpu_list,"},{"line_number":866,"context_line":"                                                    UploadId\u003dupload_id)"},{"line_number":867,"context_line":""},{"line_number":868,"context_line":"            LOG.info(\"Multipart complete key\u003d%(key)s \""},{"line_number":869,"context_line":"                     \"UploadId\u003d%(UploadId)s \""},{"line_number":870,"context_line":"                     \"Wrote %(total_size)d bytes to S3 key \""},{"line_number":871,"context_line":"                     \"named %(key)s \""},{"line_number":872,"context_line":"                     \"with checksum %(checksum)s\","},{"line_number":873,"context_line":"                     {\u0027key\u0027: key, \u0027UploadId\u0027: upload_id,"},{"line_number":874,"context_line":"                      \u0027total_size\u0027: total_size, \u0027checksum\u0027: checksum_hex})"},{"line_number":875,"context_line":"            return loc.get_uri(), total_size, checksum_hex, hash_hex, metadata"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"        # Abort"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a5468de_43b47abd","line":874,"range":{"start_line":868,"start_character":12,"end_line":874,"end_character":74},"in_reply_to":"d47a37ef_ee69b536","updated":"2025-09-18 21:34:20.000000000","message":"Maybe we can add a \"upload_type\" variable to be filled in the if/else above, and turn the log into \"%(upload_type)s complete...\". WDYT?","commit_id":"94be13ba4714818c0a16f798d01daff01403f48c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"f80d679dc6207b7a9d28585c455c634d64028282","unresolved":true,"context_lines":[{"line_number":856,"context_line":"                LOG.debug(\"Creating zero-byte object directly using \""},{"line_number":857,"context_line":"                          \"singlepart for key\u003d%s\", key)"},{"line_number":858,"context_line":"                s3_client.put_object(Body\u003db\u0027\u0027, Bucket\u003dbucket, Key\u003dkey)"},{"line_number":859,"context_line":"                LOG.info(\"Singlepart upload completed. \""},{"line_number":860,"context_line":"                         \"Wrote %(total_size)d bytes to S3 key \""},{"line_number":861,"context_line":"                         \"named %(key)s \""},{"line_number":862,"context_line":"                         \"with checksum %(checksum)s\","},{"line_number":863,"context_line":"                         {\u0027key\u0027: key, \u0027total_size\u0027: total_size,"},{"line_number":864,"context_line":"                          \u0027checksum\u0027: checksum_hex})"},{"line_number":865,"context_line":"            else:"},{"line_number":866,"context_line":"                # Complete the multipart upload"},{"line_number":867,"context_line":"                pedict \u003d {p.partnum: p.etag[p.partnum] for p in plist}"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a2ca1e3_7135b022","line":864,"range":{"start_line":859,"start_character":0,"end_line":864,"end_character":52},"updated":"2025-09-22 12:20:22.000000000","message":"I can see that you added this to be symmetric with the \u0027else\u0027 log message, but I wonder whether it\u0027s really giving us any info that we didn\u0027t get from line 850?  The total_size will always be 0, and the checksum of a zero-byte string will be the same each time as well.  I\u0027m worried about too many info messages in the logs.  Maybe since we have a message at line 850 now saying we\u0027re not doing the multipart upload, we can move the line 856 message to after the put_object() (at debug level) to signal completion?\n\nFeel free to push back on this, because you had to figure out this issue, so I think you are in a better position to know what will be helpful to have in the logs.","commit_id":"342e95e1c1ecd2a2848aed6d9bb118336d73e535"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"33409b66680ea1dd036e31a315b42a4812abc34e","unresolved":true,"context_lines":[{"line_number":856,"context_line":"                LOG.debug(\"Creating zero-byte object directly using \""},{"line_number":857,"context_line":"                          \"singlepart for key\u003d%s\", key)"},{"line_number":858,"context_line":"                s3_client.put_object(Body\u003db\u0027\u0027, Bucket\u003dbucket, Key\u003dkey)"},{"line_number":859,"context_line":"                LOG.info(\"Singlepart upload completed. \""},{"line_number":860,"context_line":"                         \"Wrote %(total_size)d bytes to S3 key \""},{"line_number":861,"context_line":"                         \"named %(key)s \""},{"line_number":862,"context_line":"                         \"with checksum %(checksum)s\","},{"line_number":863,"context_line":"                         {\u0027key\u0027: key, \u0027total_size\u0027: total_size,"},{"line_number":864,"context_line":"                          \u0027checksum\u0027: checksum_hex})"},{"line_number":865,"context_line":"            else:"},{"line_number":866,"context_line":"                # Complete the multipart upload"},{"line_number":867,"context_line":"                pedict \u003d {p.partnum: p.etag[p.partnum] for p in plist}"}],"source_content_type":"text/x-python","patch_set":2,"id":"ce4985d7_78354d7e","line":864,"range":{"start_line":859,"start_character":0,"end_line":864,"end_character":52},"in_reply_to":"3a2ca1e3_7135b022","updated":"2025-09-22 14:04:13.000000000","message":"Initially i didn\u0027t want to include this message as you rightly pointed out that we are not getting any useful information but later I decided to add it for 2 reasons:\n1. To make it easier to figure out when the operation completed\n2. (IMPORTANT) To know if the single part call hasn\u0027t blocked the request\n\nWe\u0027ve had cases in the past where we perform a call to backend and we don\u0027t see any log messages after that. In this scenario, it gets hard to figure out if it\u0027s the backend call that is stuck or any other part of the operation that comes later than that. Since glance can perform it\u0027s final set of steps afterwards, this message marks the end of operation from glance_store side. I added the key, size and checksum details just to make the log message more useful and analogous to the one we log in single part upload in L#723-L#725.","commit_id":"342e95e1c1ecd2a2848aed6d9bb118336d73e535"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"30db2cc834cd91becf351f684b404c72fceb1195","unresolved":true,"context_lines":[{"line_number":856,"context_line":"                LOG.debug(\"Creating zero-byte object directly using \""},{"line_number":857,"context_line":"                          \"singlepart for key\u003d%s\", key)"},{"line_number":858,"context_line":"                s3_client.put_object(Body\u003db\u0027\u0027, Bucket\u003dbucket, Key\u003dkey)"},{"line_number":859,"context_line":"                LOG.info(\"Singlepart upload completed. \""},{"line_number":860,"context_line":"                         \"Wrote %(total_size)d bytes to S3 key \""},{"line_number":861,"context_line":"                         \"named %(key)s \""},{"line_number":862,"context_line":"                         \"with checksum %(checksum)s\","},{"line_number":863,"context_line":"                         {\u0027key\u0027: key, \u0027total_size\u0027: total_size,"},{"line_number":864,"context_line":"                          \u0027checksum\u0027: checksum_hex})"},{"line_number":865,"context_line":"            else:"},{"line_number":866,"context_line":"                # Complete the multipart upload"},{"line_number":867,"context_line":"                pedict \u003d {p.partnum: p.etag[p.partnum] for p in plist}"}],"source_content_type":"text/x-python","patch_set":2,"id":"3abb1470_f42ab9af","line":864,"range":{"start_line":859,"start_character":0,"end_line":864,"end_character":52},"in_reply_to":"a1fb3e56_4d55a36b","updated":"2025-09-22 19:09:28.000000000","message":"Forgot to reply to your suggestion, the DEBUG log at L#856 tells us that abort_multipart_upload finished and at L#859 tells us that singlepart upload completed so we can easily figure out where the issue is if anything comes up related to this code path. I agree with the concern that we\u0027re adding too many logs here but we are also doing something non-conventional here to handle an edge case and if it blows up later, it would be at least easier to trace what I did wrong here 😄","commit_id":"342e95e1c1ecd2a2848aed6d9bb118336d73e535"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"695dd72e53e9a529eeec73f1b4c202d73837764b","unresolved":true,"context_lines":[{"line_number":856,"context_line":"                LOG.debug(\"Creating zero-byte object directly using \""},{"line_number":857,"context_line":"                          \"singlepart for key\u003d%s\", key)"},{"line_number":858,"context_line":"                s3_client.put_object(Body\u003db\u0027\u0027, Bucket\u003dbucket, Key\u003dkey)"},{"line_number":859,"context_line":"                LOG.info(\"Singlepart upload completed. \""},{"line_number":860,"context_line":"                         \"Wrote %(total_size)d bytes to S3 key \""},{"line_number":861,"context_line":"                         \"named %(key)s \""},{"line_number":862,"context_line":"                         \"with checksum %(checksum)s\","},{"line_number":863,"context_line":"                         {\u0027key\u0027: key, \u0027total_size\u0027: total_size,"},{"line_number":864,"context_line":"                          \u0027checksum\u0027: checksum_hex})"},{"line_number":865,"context_line":"            else:"},{"line_number":866,"context_line":"                # Complete the multipart upload"},{"line_number":867,"context_line":"                pedict \u003d {p.partnum: p.etag[p.partnum] for p in plist}"}],"source_content_type":"text/x-python","patch_set":2,"id":"a1fb3e56_4d55a36b","line":864,"range":{"start_line":859,"start_character":0,"end_line":864,"end_character":52},"in_reply_to":"ce4985d7_78354d7e","updated":"2025-09-22 14:09:43.000000000","message":"OK, works for me!","commit_id":"342e95e1c1ecd2a2848aed6d9bb118336d73e535"}],"glance_store/tests/unit/test_multistore_s3.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"698f3e45d3195a50ceb7e9ef048503cf6a1278a3","unresolved":true,"context_lines":[{"line_number":759,"context_line":""},{"line_number":760,"context_line":"    @mock.patch.object(boto3.session.Session, \"client\")"},{"line_number":761,"context_line":"    def test_add_multipart_zero_byte_image(self, mock_client):"},{"line_number":762,"context_line":"        \"\"\"Test that we can add an image via the s3 backend.\"\"\""},{"line_number":763,"context_line":"        expected_image_id \u003d str(uuid.uuid4())"},{"line_number":764,"context_line":"        expected_s3_size \u003d 0"},{"line_number":765,"context_line":"        expected_s3_contents \u003d b\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"55468984_85cc177e","line":762,"range":{"start_line":762,"start_character":8,"end_line":762,"end_character":63},"updated":"2025-09-19 15:55:21.000000000","message":"I suggest changing this to\n\n```\n\"\"\"Bug #2124829: add a zero-byte image using multipart upload.\"\"\"\n```","commit_id":"94be13ba4714818c0a16f798d01daff01403f48c"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"35358a5e930362c61eb2e5654b4f21db30dc6f00","unresolved":false,"context_lines":[{"line_number":759,"context_line":""},{"line_number":760,"context_line":"    @mock.patch.object(boto3.session.Session, \"client\")"},{"line_number":761,"context_line":"    def test_add_multipart_zero_byte_image(self, mock_client):"},{"line_number":762,"context_line":"        \"\"\"Test that we can add an image via the s3 backend.\"\"\""},{"line_number":763,"context_line":"        expected_image_id \u003d str(uuid.uuid4())"},{"line_number":764,"context_line":"        expected_s3_size \u003d 0"},{"line_number":765,"context_line":"        expected_s3_contents \u003d b\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"34414e17_f635658a","line":762,"range":{"start_line":762,"start_character":8,"end_line":762,"end_character":63},"in_reply_to":"55468984_85cc177e","updated":"2025-09-21 17:45:36.000000000","message":"Done","commit_id":"94be13ba4714818c0a16f798d01daff01403f48c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"698f3e45d3195a50ceb7e9ef048503cf6a1278a3","unresolved":true,"context_lines":[{"line_number":805,"context_line":"            parts \u003d []"},{"line_number":806,"context_line":"            remaining_image_size \u003d expected_s3_size"},{"line_number":807,"context_line":"            chunk_size \u003d S3_CONF[\u0027s3_store_large_object_chunk_size\u0027] * units.Mi"},{"line_number":808,"context_line":"            for i in range(num_parts):"},{"line_number":809,"context_line":"                part_number \u003d i + 1"},{"line_number":810,"context_line":"                stubber.add_response(method\u003d\u0027upload_part\u0027,"},{"line_number":811,"context_line":"                                     service_response\u003d{"},{"line_number":812,"context_line":"                                         \u0027ETag\u0027: \u0027ETag\u0027"},{"line_number":813,"context_line":"                                     },"},{"line_number":814,"context_line":"                                     expected_params\u003d{"},{"line_number":815,"context_line":"                                         \"Bucket\": S3_CONF[\u0027s3_store_bucket\u0027],"},{"line_number":816,"context_line":"                                         \"Key\": expected_image_id,"},{"line_number":817,"context_line":"                                         \"Body\": botocore.stub.ANY,"},{"line_number":818,"context_line":"                                         \u0027ContentLength\u0027: chunk_size,"},{"line_number":819,"context_line":"                                         \"PartNumber\": part_number,"},{"line_number":820,"context_line":"                                         \"UploadId\": \u0027UploadId\u0027"},{"line_number":821,"context_line":"                                     })"},{"line_number":822,"context_line":"                parts.append({\u0027ETag\u0027: \u0027ETag\u0027, \u0027PartNumber\u0027: part_number})"},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"                remaining_image_size -\u003d chunk_size"},{"line_number":825,"context_line":"                if remaining_image_size \u003c chunk_size:"},{"line_number":826,"context_line":"                    chunk_size \u003d remaining_image_size"},{"line_number":827,"context_line":""},{"line_number":828,"context_line":"            stubber.add_response(method\u003d\u0027abort_multipart_upload\u0027,"},{"line_number":829,"context_line":"                                 service_response\u003d{},"}],"source_content_type":"text/x-python","patch_set":1,"id":"09249897_693131db","line":826,"range":{"start_line":808,"start_character":0,"end_line":826,"end_character":53},"updated":"2025-09-19 15:55:21.000000000","message":"Given line 781, this entire \u0027for\u0027 block is never executed; should remove it.","commit_id":"94be13ba4714818c0a16f798d01daff01403f48c"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"35358a5e930362c61eb2e5654b4f21db30dc6f00","unresolved":false,"context_lines":[{"line_number":805,"context_line":"            parts \u003d []"},{"line_number":806,"context_line":"            remaining_image_size \u003d expected_s3_size"},{"line_number":807,"context_line":"            chunk_size \u003d S3_CONF[\u0027s3_store_large_object_chunk_size\u0027] * units.Mi"},{"line_number":808,"context_line":"            for i in range(num_parts):"},{"line_number":809,"context_line":"                part_number \u003d i + 1"},{"line_number":810,"context_line":"                stubber.add_response(method\u003d\u0027upload_part\u0027,"},{"line_number":811,"context_line":"                                     service_response\u003d{"},{"line_number":812,"context_line":"                                         \u0027ETag\u0027: \u0027ETag\u0027"},{"line_number":813,"context_line":"                                     },"},{"line_number":814,"context_line":"                                     expected_params\u003d{"},{"line_number":815,"context_line":"                                         \"Bucket\": S3_CONF[\u0027s3_store_bucket\u0027],"},{"line_number":816,"context_line":"                                         \"Key\": expected_image_id,"},{"line_number":817,"context_line":"                                         \"Body\": botocore.stub.ANY,"},{"line_number":818,"context_line":"                                         \u0027ContentLength\u0027: chunk_size,"},{"line_number":819,"context_line":"                                         \"PartNumber\": part_number,"},{"line_number":820,"context_line":"                                         \"UploadId\": \u0027UploadId\u0027"},{"line_number":821,"context_line":"                                     })"},{"line_number":822,"context_line":"                parts.append({\u0027ETag\u0027: \u0027ETag\u0027, \u0027PartNumber\u0027: part_number})"},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"                remaining_image_size -\u003d chunk_size"},{"line_number":825,"context_line":"                if remaining_image_size \u003c chunk_size:"},{"line_number":826,"context_line":"                    chunk_size \u003d remaining_image_size"},{"line_number":827,"context_line":""},{"line_number":828,"context_line":"            stubber.add_response(method\u003d\u0027abort_multipart_upload\u0027,"},{"line_number":829,"context_line":"                                 service_response\u003d{},"}],"source_content_type":"text/x-python","patch_set":1,"id":"59fb9ccc_ed4a6039","line":826,"range":{"start_line":808,"start_character":0,"end_line":826,"end_character":53},"in_reply_to":"09249897_693131db","updated":"2025-09-21 17:45:36.000000000","message":"Done","commit_id":"94be13ba4714818c0a16f798d01daff01403f48c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"698f3e45d3195a50ceb7e9ef048503cf6a1278a3","unresolved":true,"context_lines":[{"line_number":843,"context_line":"            mock_client.return_value \u003d fake_s3_client"},{"line_number":844,"context_line":"            loc, size, checksum, multihash, metadata \u003d \\"},{"line_number":845,"context_line":"                self.store.add(expected_image_id, image_s3, expected_s3_size,"},{"line_number":846,"context_line":"                               self.hash_algo)"},{"line_number":847,"context_line":"            self.assertEqual(\"s3_region1\", metadata[\"store\"])"},{"line_number":848,"context_line":""},{"line_number":849,"context_line":"            self.assertEqual(expected_location, loc)"}],"source_content_type":"text/x-python","patch_set":1,"id":"d4adf7f7_87c807ff","line":846,"updated":"2025-09-19 15:55:21.000000000","message":"I think you should add\n\n```\n            stubber.assert_no_pending_responses()\n```\n\nto make sure that both abort_multipart and put_object were called.","commit_id":"94be13ba4714818c0a16f798d01daff01403f48c"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"35358a5e930362c61eb2e5654b4f21db30dc6f00","unresolved":false,"context_lines":[{"line_number":843,"context_line":"            mock_client.return_value \u003d fake_s3_client"},{"line_number":844,"context_line":"            loc, size, checksum, multihash, metadata \u003d \\"},{"line_number":845,"context_line":"                self.store.add(expected_image_id, image_s3, expected_s3_size,"},{"line_number":846,"context_line":"                               self.hash_algo)"},{"line_number":847,"context_line":"            self.assertEqual(\"s3_region1\", metadata[\"store\"])"},{"line_number":848,"context_line":""},{"line_number":849,"context_line":"            self.assertEqual(expected_location, loc)"}],"source_content_type":"text/x-python","patch_set":1,"id":"8f8e28c9_27b66c8a","line":846,"in_reply_to":"d4adf7f7_87c807ff","updated":"2025-09-21 17:45:36.000000000","message":"Done","commit_id":"94be13ba4714818c0a16f798d01daff01403f48c"}]}
