)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"24b976e115b0cdbafe27731c5fa331132b4d24c2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"d09a9866_dfe75add","updated":"2025-06-26 16:19:56.000000000","message":"Man, the duplication in `test_X_store` and `test_multistore_X` is crazy!","commit_id":"33a19c5d7e73b381f41e5b9735d0ca9c7c6e31de"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5e8f11658e8db79f8b9893272e69f2a3dcef3207","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"8c9d6055_3370eb3d","updated":"2025-06-27 13:23:22.000000000","message":"recheck unrelated timeout","commit_id":"e7e1acc3915ab2ff1ddf7dd0c94e4fec90308867"}],"glance_store/_drivers/rbd.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"24b976e115b0cdbafe27731c5fa331132b4d24c2","unresolved":true,"context_lines":[{"line_number":615,"context_line":"                            bytes_written +\u003d chunk_length"},{"line_number":616,"context_line":"                            # Check if writing this chunk exceeds the"},{"line_number":617,"context_line":"                            # image_size"},{"line_number":618,"context_line":"                            if image_size !\u003d 0 and bytes_written \u003e image_size:"},{"line_number":619,"context_line":"                                raise exceptions.Invalid("},{"line_number":620,"context_line":"                                    \"Data written exceeds the specified \""},{"line_number":621,"context_line":"                                    \"image_size: %s bytes.\" % image_size)"}],"source_content_type":"text/x-python","patch_set":4,"id":"19e3cd30_30d00024","line":618,"updated":"2025-06-26 16:19:56.000000000","message":"Perhaps this answers my question from the other patch, but... is image_size\u003d0 a thing we can expect callers to provide here? If so, fine, but we still don\u0027t need to make it optional (in the s3 patch).","commit_id":"33a19c5d7e73b381f41e5b9735d0ca9c7c6e31de"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"bd9f580310927dc3adc7ab2cb14544dcb6f9f15a","unresolved":true,"context_lines":[{"line_number":615,"context_line":"                            bytes_written +\u003d chunk_length"},{"line_number":616,"context_line":"                            # Check if writing this chunk exceeds the"},{"line_number":617,"context_line":"                            # image_size"},{"line_number":618,"context_line":"                            if image_size !\u003d 0 and bytes_written \u003e image_size:"},{"line_number":619,"context_line":"                                raise exceptions.Invalid("},{"line_number":620,"context_line":"                                    \"Data written exceeds the specified \""},{"line_number":621,"context_line":"                                    \"image_size: %s bytes.\" % image_size)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0bc62c_74009242","line":618,"in_reply_to":"19e3cd30_30d00024","updated":"2025-06-26 17:17:54.000000000","message":"Yes, image_size is always 0 as we are passing it from glance. Once our current work of passing image_size as header is merged there will be possibility that this will never be 0.","commit_id":"33a19c5d7e73b381f41e5b9735d0ca9c7c6e31de"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"731ce6f5889c4219686e4ec59751d35b4b8e1c67","unresolved":false,"context_lines":[{"line_number":615,"context_line":"                            bytes_written +\u003d chunk_length"},{"line_number":616,"context_line":"                            # Check if writing this chunk exceeds the"},{"line_number":617,"context_line":"                            # image_size"},{"line_number":618,"context_line":"                            if image_size !\u003d 0 and bytes_written \u003e image_size:"},{"line_number":619,"context_line":"                                raise exceptions.Invalid("},{"line_number":620,"context_line":"                                    \"Data written exceeds the specified \""},{"line_number":621,"context_line":"                                    \"image_size: %s bytes.\" % image_size)"}],"source_content_type":"text/x-python","patch_set":4,"id":"187c7203_d611cf16","line":618,"in_reply_to":"ba0bc62c_74009242","updated":"2025-06-30 14:51:04.000000000","message":"Acknowledged","commit_id":"33a19c5d7e73b381f41e5b9735d0ca9c7c6e31de"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"24b976e115b0cdbafe27731c5fa331132b4d24c2","unresolved":true,"context_lines":[{"line_number":652,"context_line":"                except rbd.IncompleteWriteError as exc:"},{"line_number":653,"context_line":"                    log_msg \u003d (_LE(\"Failed to store image %(img_name)s \""},{"line_number":654,"context_line":"                                   \"image data exceeded than expected size. \""},{"line_number":655,"context_line":"                                   \"Store Exception %(store_exc)s\") %"},{"line_number":656,"context_line":"                               {\u0027img_name\u0027: image_name,"},{"line_number":657,"context_line":"                                \u0027store_exc\u0027: exc})"},{"line_number":658,"context_line":"                    LOG.error(log_msg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"907032c4_784b472e","line":655,"updated":"2025-06-26 16:19:56.000000000","message":"s/than/the/ ?","commit_id":"33a19c5d7e73b381f41e5b9735d0ca9c7c6e31de"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"bd9f580310927dc3adc7ab2cb14544dcb6f9f15a","unresolved":false,"context_lines":[{"line_number":652,"context_line":"                except rbd.IncompleteWriteError as exc:"},{"line_number":653,"context_line":"                    log_msg \u003d (_LE(\"Failed to store image %(img_name)s \""},{"line_number":654,"context_line":"                                   \"image data exceeded than expected size. \""},{"line_number":655,"context_line":"                                   \"Store Exception %(store_exc)s\") %"},{"line_number":656,"context_line":"                               {\u0027img_name\u0027: image_name,"},{"line_number":657,"context_line":"                                \u0027store_exc\u0027: exc})"},{"line_number":658,"context_line":"                    LOG.error(log_msg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"6a6d16cc_ff7e2720","line":655,"in_reply_to":"907032c4_784b472e","updated":"2025-06-26 17:17:54.000000000","message":"Acknowledged","commit_id":"33a19c5d7e73b381f41e5b9735d0ca9c7c6e31de"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"24b976e115b0cdbafe27731c5fa331132b4d24c2","unresolved":true,"context_lines":[{"line_number":665,"context_line":"                    except exceptions.NotFound:"},{"line_number":666,"context_line":"                        pass"},{"line_number":667,"context_line":""},{"line_number":668,"context_line":"                    raise exceptions.Invalid(message\u003dlog_msg)"},{"line_number":669,"context_line":"                except Exception as exc:"},{"line_number":670,"context_line":"                    log_msg \u003d (_LE(\"Failed to store image %(img_name)s \""},{"line_number":671,"context_line":"                                   \"Store Exception %(store_exc)s\") %"}],"source_content_type":"text/x-python","patch_set":4,"id":"f890734a_e5bf776e","line":668,"updated":"2025-06-26 16:19:56.000000000","message":"Is this related to this change, and do we really need to do this separately? It seems like we have three except cases that all do the exact same set of steps aside from the log message difference. Do we really need to duplicate all that code so we can say \"image data exceeded\"?","commit_id":"33a19c5d7e73b381f41e5b9735d0ca9c7c6e31de"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"bb2ee767f2959d823c01ef6b4ea8585a969cc82a","unresolved":true,"context_lines":[{"line_number":665,"context_line":"                    except exceptions.NotFound:"},{"line_number":666,"context_line":"                        pass"},{"line_number":667,"context_line":""},{"line_number":668,"context_line":"                    raise exceptions.Invalid(message\u003dlog_msg)"},{"line_number":669,"context_line":"                except Exception as exc:"},{"line_number":670,"context_line":"                    log_msg \u003d (_LE(\"Failed to store image %(img_name)s \""},{"line_number":671,"context_line":"                                   \"Store Exception %(store_exc)s\") %"}],"source_content_type":"text/x-python","patch_set":4,"id":"bd6999b4_a2ddf076","line":668,"in_reply_to":"d56b234a_b9aecdde","updated":"2025-06-27 09:59:35.000000000","message":"I think I will work on this duplication in another patch.","commit_id":"33a19c5d7e73b381f41e5b9735d0ca9c7c6e31de"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"bd9f580310927dc3adc7ab2cb14544dcb6f9f15a","unresolved":true,"context_lines":[{"line_number":665,"context_line":"                    except exceptions.NotFound:"},{"line_number":666,"context_line":"                        pass"},{"line_number":667,"context_line":""},{"line_number":668,"context_line":"                    raise exceptions.Invalid(message\u003dlog_msg)"},{"line_number":669,"context_line":"                except Exception as exc:"},{"line_number":670,"context_line":"                    log_msg \u003d (_LE(\"Failed to store image %(img_name)s \""},{"line_number":671,"context_line":"                                   \"Store Exception %(store_exc)s\") %"}],"source_content_type":"text/x-python","patch_set":4,"id":"d56b234a_b9aecdde","line":668,"in_reply_to":"f890734a_e5bf776e","updated":"2025-06-26 17:17:54.000000000","message":"I can move this deletion code to finally block, but that is required IMO","commit_id":"33a19c5d7e73b381f41e5b9735d0ca9c7c6e31de"}],"glance_store/tests/unit/test_multistore_rbd.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"24b976e115b0cdbafe27731c5fa331132b4d24c2","unresolved":true,"context_lines":[{"line_number":257,"context_line":"        data \u003d b\u0027a\u0027 * (total_bytes + 1024)"},{"line_number":258,"context_line":"        image_file \u003d io.BytesIO(data)"},{"line_number":259,"context_line":"        with mock.patch.object(rbd_store.rbd.Image, \u0027write\u0027):"},{"line_number":260,"context_line":"            self.assertRaises(exceptions.Invalid, self.store.add,"},{"line_number":261,"context_line":"                              \u0027fake_image_id\u0027, image_file, image_size)"},{"line_number":262,"context_line":"            # Confirm that image deletion was called due to size mismatch"},{"line_number":263,"context_line":"            mock_delete.assert_called()"}],"source_content_type":"text/x-python","patch_set":4,"id":"e842fa82_99f126ae","line":260,"updated":"2025-06-26 16:19:56.000000000","message":"Again, please make sure you\u0027re hitting the expected Invalid case. It would be easy to have these all pass because you\u0027re passing an incorrect size and thus only covering a fraction of the cases.","commit_id":"33a19c5d7e73b381f41e5b9735d0ca9c7c6e31de"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"bd9f580310927dc3adc7ab2cb14544dcb6f9f15a","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        data \u003d b\u0027a\u0027 * (total_bytes + 1024)"},{"line_number":258,"context_line":"        image_file \u003d io.BytesIO(data)"},{"line_number":259,"context_line":"        with mock.patch.object(rbd_store.rbd.Image, \u0027write\u0027):"},{"line_number":260,"context_line":"            self.assertRaises(exceptions.Invalid, self.store.add,"},{"line_number":261,"context_line":"                              \u0027fake_image_id\u0027, image_file, image_size)"},{"line_number":262,"context_line":"            # Confirm that image deletion was called due to size mismatch"},{"line_number":263,"context_line":"            mock_delete.assert_called()"}],"source_content_type":"text/x-python","patch_set":4,"id":"465b2cf8_6d367445","line":260,"in_reply_to":"e842fa82_99f126ae","updated":"2025-06-26 17:17:54.000000000","message":"Acknowledged","commit_id":"33a19c5d7e73b381f41e5b9735d0ca9c7c6e31de"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"731ce6f5889c4219686e4ec59751d35b4b8e1c67","unresolved":true,"context_lines":[{"line_number":260,"context_line":"            try:"},{"line_number":261,"context_line":"                self.store.add(\u0027fake_image_id\u0027, image_file, image_size)"},{"line_number":262,"context_line":"            except exceptions.Invalid as e:"},{"line_number":263,"context_line":"                self.assertIn(\u0027Size exceeds: expected\u0027, e.msg)"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"            # Confirm that image deletion was called due to size mismatch"},{"line_number":266,"context_line":"            mock_delete.assert_called()"}],"source_content_type":"text/x-python","patch_set":6,"id":"ee51eb62_5e5c04d4","line":263,"updated":"2025-06-30 14:51:04.000000000","message":"As with the others, this needs to be `assertRaisesRegex()`","commit_id":"f01377bc316bcbc72907e42ecadd905bc0ddbe4f"}]}
