)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"722f2b278993da291aac80887c724051be588632","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"8fec0763_37a1b7c6","updated":"2025-05-14 17:59:53.000000000","message":"ToDo\n1. Add unit test to ensure if --size is passed then it does not calculate size from --file (image-create, image-upload, image-stage, image-create-via-import)\n2. --size is not specified then it calculates size and passes to glance api (image-create, image-upload, image-stage, image-create-via-import)","commit_id":"e65af9efda778aa0d419ca1f50fdc8a462835470"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"c4e7f875316d2eba99015eab828cb18937940ce1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"d6a65480_eb20fdae","updated":"2025-05-15 08:41:57.000000000","message":"recheck failed to set up vhost \u0027nova_cell1\u0027","commit_id":"d52c0dcf342acc1905d5774c8f0b84e54ec63ff5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8ed32a17b9ae86ec4951bfa0d29024f5622436d6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"962b2917_c0223b8d","updated":"2025-07-22 15:22:20.000000000","message":"Some comments.. I think at least we should fail if you provide a file and size and the size does not match. The server will reject that case anyway, but only after an expensive upload so we might as well catch/reject on the client side early.","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"9beecffb11ba5acfdbc6d8f69bdf6a39f22e586d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"8553c9fb_d79302a7","updated":"2025-07-23 09:24:01.000000000","message":"Thank you for inputs, I have made changes as per suggestion and replied wherever necessary!!","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"61507c32891ba136f0dc85e9d1d48fe414137ed1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"9d773952_1b4f8390","updated":"2025-07-31 16:46:34.000000000","message":"Thank you for inputs Dan, I have tried to include the suggestions as per my understanding!!","commit_id":"85730183c441bb64772dbd7272e18ddf6c29ebf2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"eb8c1a0d7ec4a180c0c0ef45f137542d34cd71ec","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"0346f169_71e69cf9","updated":"2025-07-31 15:22:40.000000000","message":"Unless there\u0027s some good reason otherwise, I think we should not just silently ignore size as a property.","commit_id":"85730183c441bb64772dbd7272e18ddf6c29ebf2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2a0386d0c94c8e07833bd9c355795477f47d5e85","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"6a0fd2da_79d28586","updated":"2025-08-01 14:29:05.000000000","message":"No need to respin for the whitespace damage unless you want to. It just makes the git history harder to follow :/","commit_id":"90d15f65a63bacb233eb1d9d42345bd6e6e9e6d1"}],"glanceclient/tests/unit/v2/test_images.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"eb8c1a0d7ec4a180c0c0ef45f137542d34cd71ec","unresolved":true,"context_lines":[{"line_number":1024,"context_line":"        image \u003d self.controller.create(**properties)"},{"line_number":1025,"context_line":"        self.assertEqual(\u00273a4560a1-e585-443e-9b39-553b46ec92d1\u0027, image.id)"},{"line_number":1026,"context_line":"        self.assertEqual(\u0027image-1\u0027, image.name)"},{"line_number":1027,"context_line":"        self.assertIsNone(image.get(\u0027size\u0027))"},{"line_number":1028,"context_line":""},{"line_number":1029,"context_line":"    def test_create_bad_additionalProperty_type(self):"},{"line_number":1030,"context_line":"        properties \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"294fadf1_adf22d4a","line":1027,"updated":"2025-07-31 15:22:40.000000000","message":"This is asserting that if you try to pass the size in the body we ignore it?","commit_id":"85730183c441bb64772dbd7272e18ddf6c29ebf2"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"61507c32891ba136f0dc85e9d1d48fe414137ed1","unresolved":false,"context_lines":[{"line_number":1024,"context_line":"        image \u003d self.controller.create(**properties)"},{"line_number":1025,"context_line":"        self.assertEqual(\u00273a4560a1-e585-443e-9b39-553b46ec92d1\u0027, image.id)"},{"line_number":1026,"context_line":"        self.assertEqual(\u0027image-1\u0027, image.name)"},{"line_number":1027,"context_line":"        self.assertIsNone(image.get(\u0027size\u0027))"},{"line_number":1028,"context_line":""},{"line_number":1029,"context_line":"    def test_create_bad_additionalProperty_type(self):"},{"line_number":1030,"context_line":"        properties \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"f78487cd_ccea1ad9","line":1027,"in_reply_to":"294fadf1_adf22d4a","updated":"2025-07-31 16:46:34.000000000","message":"yes","commit_id":"85730183c441bb64772dbd7272e18ddf6c29ebf2"}],"glanceclient/tests/unit/v2/test_shell_v2.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8ed32a17b9ae86ec4951bfa0d29024f5622436d6","unresolved":true,"context_lines":[{"line_number":781,"context_line":"            except Exception:"},{"line_number":782,"context_line":"                pass"},{"line_number":783,"context_line":""},{"line_number":784,"context_line":"    def test_do_image_create_without_size(self):"},{"line_number":785,"context_line":"        self.mock_get_data_file.return_value \u003d io.StringIO()"},{"line_number":786,"context_line":"        try:"},{"line_number":787,"context_line":"            with open(tempfile.mktemp(), \u0027w+\u0027) as f:"}],"source_content_type":"text/x-python","patch_set":3,"id":"070c76ef_952a8116","line":784,"updated":"2025-07-22 15:22:20.000000000","message":"I think you could probably combine all of these into a single inner helper and four invocations of that to DRY it up...","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"9beecffb11ba5acfdbc6d8f69bdf6a39f22e586d","unresolved":false,"context_lines":[{"line_number":781,"context_line":"            except Exception:"},{"line_number":782,"context_line":"                pass"},{"line_number":783,"context_line":""},{"line_number":784,"context_line":"    def test_do_image_create_without_size(self):"},{"line_number":785,"context_line":"        self.mock_get_data_file.return_value \u003d io.StringIO()"},{"line_number":786,"context_line":"        try:"},{"line_number":787,"context_line":"            with open(tempfile.mktemp(), \u0027w+\u0027) as f:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9c83026d_bbbe41cb","line":784,"in_reply_to":"070c76ef_952a8116","updated":"2025-07-23 09:24:01.000000000","message":"Acknowledged","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8ed32a17b9ae86ec4951bfa0d29024f5622436d6","unresolved":true,"context_lines":[{"line_number":821,"context_line":"                        temp_args.pop(\u0027file\u0027, None)"},{"line_number":822,"context_line":"                        mocked_create.assert_called_once_with(**temp_args)"},{"line_number":823,"context_line":"                        mocked_get.assert_called_once_with(\u0027pass\u0027)"},{"line_number":824,"context_line":"                        utils.print_dict.assert_called_once_with({"},{"line_number":825,"context_line":"                            \u0027id\u0027: \u0027pass\u0027, \u0027name\u0027: \u0027IMG-01\u0027,"},{"line_number":826,"context_line":"                            \u0027disk_format\u0027: \u0027vhd\u0027,"},{"line_number":827,"context_line":"                            \u0027container_format\u0027: \u0027bare\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"2348410f_673a3aab","line":824,"updated":"2025-07-22 15:22:20.000000000","message":"Assert `mock_size` was called in this case?","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"9beecffb11ba5acfdbc6d8f69bdf6a39f22e586d","unresolved":false,"context_lines":[{"line_number":821,"context_line":"                        temp_args.pop(\u0027file\u0027, None)"},{"line_number":822,"context_line":"                        mocked_create.assert_called_once_with(**temp_args)"},{"line_number":823,"context_line":"                        mocked_get.assert_called_once_with(\u0027pass\u0027)"},{"line_number":824,"context_line":"                        utils.print_dict.assert_called_once_with({"},{"line_number":825,"context_line":"                            \u0027id\u0027: \u0027pass\u0027, \u0027name\u0027: \u0027IMG-01\u0027,"},{"line_number":826,"context_line":"                            \u0027disk_format\u0027: \u0027vhd\u0027,"},{"line_number":827,"context_line":"                            \u0027container_format\u0027: \u0027bare\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1b5656d9_068481f3","line":824,"in_reply_to":"2348410f_673a3aab","updated":"2025-07-23 09:24:01.000000000","message":"No it wasn\u0027t","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8ed32a17b9ae86ec4951bfa0d29024f5622436d6","unresolved":true,"context_lines":[{"line_number":852,"context_line":"            args \u003d self._make_args(temp_args)"},{"line_number":853,"context_line":"            with mock.patch.object(self.gc.images, \u0027create\u0027) as mocked_create:"},{"line_number":854,"context_line":"                with mock.patch.object(self.gc.images, \u0027get\u0027) as mocked_get:"},{"line_number":855,"context_line":"                    with mock.patch.object("},{"line_number":856,"context_line":"                            utils, \u0027get_file_size\u0027) as mock_size:"},{"line_number":857,"context_line":""},{"line_number":858,"context_line":"                        ignore_fields \u003d [\u0027self\u0027, \u0027access\u0027, \u0027schema\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ace49f8_f704bde1","line":855,"updated":"2025-07-22 15:22:20.000000000","message":"`mock.patch.multiple` would make this a lot easier to read with much less nesting, IMHO.","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"9beecffb11ba5acfdbc6d8f69bdf6a39f22e586d","unresolved":false,"context_lines":[{"line_number":852,"context_line":"            args \u003d self._make_args(temp_args)"},{"line_number":853,"context_line":"            with mock.patch.object(self.gc.images, \u0027create\u0027) as mocked_create:"},{"line_number":854,"context_line":"                with mock.patch.object(self.gc.images, \u0027get\u0027) as mocked_get:"},{"line_number":855,"context_line":"                    with mock.patch.object("},{"line_number":856,"context_line":"                            utils, \u0027get_file_size\u0027) as mock_size:"},{"line_number":857,"context_line":""},{"line_number":858,"context_line":"                        ignore_fields \u003d [\u0027self\u0027, \u0027access\u0027, \u0027schema\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"42c3f2bb_00261808","line":855,"in_reply_to":"7ace49f8_f704bde1","updated":"2025-07-23 09:24:01.000000000","message":"mock.patch.multiple requires further changes otherwise resulted in KeyError in create method, instead I will wrap all three mocks in one with block","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8ed32a17b9ae86ec4951bfa0d29024f5622436d6","unresolved":true,"context_lines":[{"line_number":887,"context_line":"                        mock_size.assert_not_called()"},{"line_number":888,"context_line":"        finally:"},{"line_number":889,"context_line":"            try:"},{"line_number":890,"context_line":"                os.remove(f.name)"},{"line_number":891,"context_line":"            except Exception:"},{"line_number":892,"context_line":"                pass"},{"line_number":893,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"863c240a_2dd49040","line":890,"updated":"2025-07-22 15:22:20.000000000","message":"Could also do `addCleanup()` to avoid everything being nested inside the `try`...","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"9beecffb11ba5acfdbc6d8f69bdf6a39f22e586d","unresolved":false,"context_lines":[{"line_number":887,"context_line":"                        mock_size.assert_not_called()"},{"line_number":888,"context_line":"        finally:"},{"line_number":889,"context_line":"            try:"},{"line_number":890,"context_line":"                os.remove(f.name)"},{"line_number":891,"context_line":"            except Exception:"},{"line_number":892,"context_line":"                pass"},{"line_number":893,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df2ab929_e6053ee3","line":890,"in_reply_to":"863c240a_2dd49040","updated":"2025-07-23 09:24:01.000000000","message":"Done","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8ed32a17b9ae86ec4951bfa0d29024f5622436d6","unresolved":true,"context_lines":[{"line_number":890,"context_line":"                os.remove(f.name)"},{"line_number":891,"context_line":"            except Exception:"},{"line_number":892,"context_line":"                pass"},{"line_number":893,"context_line":""},{"line_number":894,"context_line":"    @mock.patch(\u0027sys.stdin\u0027, autospec\u003dTrue)"},{"line_number":895,"context_line":"    def test_do_image_create_hidden_image(self, mock_stdin):"},{"line_number":896,"context_line":"        args \u003d self._make_args({\u0027name\u0027: \u0027IMG-01\u0027, \u0027disk_format\u0027: \u0027vhd\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"48da9c4d_21b4663e","line":893,"updated":"2025-07-22 15:22:20.000000000","message":"I think you should fail if the size provided does not match the file size, and thus we need one more case (ideally DRYed up with these) for the case where we verify the fail behavior.","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"9beecffb11ba5acfdbc6d8f69bdf6a39f22e586d","unresolved":false,"context_lines":[{"line_number":890,"context_line":"                os.remove(f.name)"},{"line_number":891,"context_line":"            except Exception:"},{"line_number":892,"context_line":"                pass"},{"line_number":893,"context_line":""},{"line_number":894,"context_line":"    @mock.patch(\u0027sys.stdin\u0027, autospec\u003dTrue)"},{"line_number":895,"context_line":"    def test_do_image_create_hidden_image(self, mock_stdin):"},{"line_number":896,"context_line":"        args \u003d self._make_args({\u0027name\u0027: \u0027IMG-01\u0027, \u0027disk_format\u0027: \u0027vhd\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9d38fe04_d1d4b5f9","line":893,"in_reply_to":"48da9c4d_21b4663e","updated":"2025-07-23 09:24:01.000000000","message":"Done","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"}],"glanceclient/v2/images.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8ed32a17b9ae86ec4951bfa0d29024f5622436d6","unresolved":true,"context_lines":[{"line_number":302,"context_line":"        url \u003d u_url or \u0027/v2/images/%s/file\u0027 % image_id"},{"line_number":303,"context_line":"        hdrs \u003d {\u0027Content-Type\u0027: \u0027application/octet-stream\u0027}"},{"line_number":304,"context_line":"        if image_size is not None:"},{"line_number":305,"context_line":"            hdrs.update({\u0027x-openstack-image-size\u0027: str(image_size)})"},{"line_number":306,"context_line":"        if backend is not None:"},{"line_number":307,"context_line":"            hdrs[\u0027x-image-meta-store\u0027] \u003d backend"},{"line_number":308,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"45555407_0ed5110a","line":305,"updated":"2025-07-22 15:22:20.000000000","message":"This is kind of a nit, but can you format this properly as `%i`? If we got something other than an integer here, we\u0027d serialize it in the header and confuse all kinds of stuff on the server side. If we git something not `int()`able we would want to fail with a `TypeError` immediately.","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"9beecffb11ba5acfdbc6d8f69bdf6a39f22e586d","unresolved":false,"context_lines":[{"line_number":302,"context_line":"        url \u003d u_url or \u0027/v2/images/%s/file\u0027 % image_id"},{"line_number":303,"context_line":"        hdrs \u003d {\u0027Content-Type\u0027: \u0027application/octet-stream\u0027}"},{"line_number":304,"context_line":"        if image_size is not None:"},{"line_number":305,"context_line":"            hdrs.update({\u0027x-openstack-image-size\u0027: str(image_size)})"},{"line_number":306,"context_line":"        if backend is not None:"},{"line_number":307,"context_line":"            hdrs[\u0027x-image-meta-store\u0027] \u003d backend"},{"line_number":308,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ed22862c_6e9fcb44","line":305,"in_reply_to":"45555407_0ed5110a","updated":"2025-07-23 09:24:01.000000000","message":"Acknowledged","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"}],"glanceclient/v2/shell.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8ed32a17b9ae86ec4951bfa0d29024f5622436d6","unresolved":true,"context_lines":[{"line_number":68,"context_line":"                  \u0027passed to the client via stdin.\u0027))"},{"line_number":69,"context_line":"@utils.arg(\u0027--size\u0027, metavar\u003d\u0027\u003cIMAGE_SIZE\u003e\u0027, type\u003dint,"},{"line_number":70,"context_line":"           help\u003d_(\u0027Size in bytes of image to be uploaded. Default is to get \u0027"},{"line_number":71,"context_line":"                  \u0027size from provided data object but this is supported in \u0027"},{"line_number":72,"context_line":"                  \u0027case where size cannot be inferred.\u0027),"},{"line_number":73,"context_line":"           default\u003dNone)"},{"line_number":74,"context_line":"@utils.arg(\u0027--progress\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse,"},{"line_number":75,"context_line":"           help\u003d_(\u0027Show upload progress bar.\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"53c1d585_a7630e4a","line":72,"range":{"start_line":71,"start_character":50,"end_line":72,"end_character":53},"updated":"2025-07-22 15:22:20.000000000","message":"This is confusing because the \"this\" sounds like it\u0027s referring to the default behavior. I suggest:\n\n\u003e Size in bytes of the image to be uploaded. Default is to get the size from the provided data object, but WHEN this is not possible, use this option to provide it manually.","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"9beecffb11ba5acfdbc6d8f69bdf6a39f22e586d","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                  \u0027passed to the client via stdin.\u0027))"},{"line_number":69,"context_line":"@utils.arg(\u0027--size\u0027, metavar\u003d\u0027\u003cIMAGE_SIZE\u003e\u0027, type\u003dint,"},{"line_number":70,"context_line":"           help\u003d_(\u0027Size in bytes of image to be uploaded. Default is to get \u0027"},{"line_number":71,"context_line":"                  \u0027size from provided data object but this is supported in \u0027"},{"line_number":72,"context_line":"                  \u0027case where size cannot be inferred.\u0027),"},{"line_number":73,"context_line":"           default\u003dNone)"},{"line_number":74,"context_line":"@utils.arg(\u0027--progress\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse,"},{"line_number":75,"context_line":"           help\u003d_(\u0027Show upload progress bar.\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"12b41fce_3fc57ba8","line":72,"range":{"start_line":71,"start_character":50,"end_line":72,"end_character":53},"in_reply_to":"53c1d585_a7630e4a","updated":"2025-07-23 09:24:01.000000000","message":"Acknowledged","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8ed32a17b9ae86ec4951bfa0d29024f5622436d6","unresolved":true,"context_lines":[{"line_number":112,"context_line":"        if utils.get_data_file(args) is not None:"},{"line_number":113,"context_line":"            backend \u003d fields.get(\u0027store\u0027, None)"},{"line_number":114,"context_line":"            args.id \u003d image[\u0027id\u0027]"},{"line_number":115,"context_line":"            args.size \u003d image_size"},{"line_number":116,"context_line":"            do_image_upload(gc, args)"},{"line_number":117,"context_line":"            image \u003d gc.images.get(args.id)"},{"line_number":118,"context_line":"    finally:"}],"source_content_type":"text/x-python","patch_set":3,"id":"49de958b_e1c7f28e","line":115,"updated":"2025-07-22 15:22:20.000000000","message":"Doesn\u0027t this just put size back into args where it came from? Why do this?","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"9beecffb11ba5acfdbc6d8f69bdf6a39f22e586d","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        if utils.get_data_file(args) is not None:"},{"line_number":113,"context_line":"            backend \u003d fields.get(\u0027store\u0027, None)"},{"line_number":114,"context_line":"            args.id \u003d image[\u0027id\u0027]"},{"line_number":115,"context_line":"            args.size \u003d image_size"},{"line_number":116,"context_line":"            do_image_upload(gc, args)"},{"line_number":117,"context_line":"            image \u003d gc.images.get(args.id)"},{"line_number":118,"context_line":"    finally:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f0df3f6_9e169698","line":115,"in_reply_to":"49de958b_e1c7f28e","updated":"2025-07-23 09:24:01.000000000","message":"Acknowledged","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8ed32a17b9ae86ec4951bfa0d29024f5622436d6","unresolved":true,"context_lines":[{"line_number":701,"context_line":"@utils.arg(\u0027--store\u0027, metavar\u003d\u0027\u003cSTORE\u003e\u0027,"},{"line_number":702,"context_line":"           default\u003dutils.env(\u0027OS_IMAGE_STORE\u0027, default\u003dNone),"},{"line_number":703,"context_line":"           help\u003d\u0027Backend store to upload image to.\u0027)"},{"line_number":704,"context_line":"def do_image_upload(gc, args):"},{"line_number":705,"context_line":"    \"\"\"Upload data for a specific image.\"\"\""},{"line_number":706,"context_line":"    backend \u003d None"},{"line_number":707,"context_line":"    if args.store:"}],"source_content_type":"text/x-python","patch_set":3,"id":"e663ca71_d3a2b6aa","line":704,"updated":"2025-07-22 15:22:20.000000000","message":"Where are the shell tests for this and `do_image_stage()` below? I know they\u0027re sorta tested via the tests for above, but above will always pass the size argument, AFAICT. If you DRY up the tests it seems like it should be easy to run these directly anyway.","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"9beecffb11ba5acfdbc6d8f69bdf6a39f22e586d","unresolved":false,"context_lines":[{"line_number":701,"context_line":"@utils.arg(\u0027--store\u0027, metavar\u003d\u0027\u003cSTORE\u003e\u0027,"},{"line_number":702,"context_line":"           default\u003dutils.env(\u0027OS_IMAGE_STORE\u0027, default\u003dNone),"},{"line_number":703,"context_line":"           help\u003d\u0027Backend store to upload image to.\u0027)"},{"line_number":704,"context_line":"def do_image_upload(gc, args):"},{"line_number":705,"context_line":"    \"\"\"Upload data for a specific image.\"\"\""},{"line_number":706,"context_line":"    backend \u003d None"},{"line_number":707,"context_line":"    if args.store:"}],"source_content_type":"text/x-python","patch_set":3,"id":"e070b985_45f6e9c7","line":704,"in_reply_to":"e663ca71_d3a2b6aa","updated":"2025-07-23 09:24:01.000000000","message":"Acknowledged","commit_id":"0dd340f7089cdb90e3bfaa7970ab3fb58fc0120c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"eb8c1a0d7ec4a180c0c0ef45f137542d34cd71ec","unresolved":true,"context_lines":[{"line_number":88,"context_line":"        fields[key] \u003d value"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    backend \u003d args.store"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    file_name \u003d fields.pop(\u0027file\u0027, None)"},{"line_number":93,"context_line":"    using_stdin \u003d hasattr(sys.stdin, \u0027isatty\u0027) and not sys.stdin.isatty()"},{"line_number":94,"context_line":"    if args.store and not (file_name or using_stdin):"}],"source_content_type":"text/x-python","patch_set":4,"id":"f6578ef9_45ce76b5","side":"PARENT","line":91,"updated":"2025-07-31 15:22:40.000000000","message":"Random whitespace damage.","commit_id":"0b3a8ab2c79ce60b241e0d105fb10a0288d0d7b6"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"61507c32891ba136f0dc85e9d1d48fe414137ed1","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        fields[key] \u003d value"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    backend \u003d args.store"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    file_name \u003d fields.pop(\u0027file\u0027, None)"},{"line_number":93,"context_line":"    using_stdin \u003d hasattr(sys.stdin, \u0027isatty\u0027) and not sys.stdin.isatty()"},{"line_number":94,"context_line":"    if args.store and not (file_name or using_stdin):"}],"source_content_type":"text/x-python","patch_set":4,"id":"aae32402_41648cf0","side":"PARENT","line":91,"in_reply_to":"f6578ef9_45ce76b5","updated":"2025-07-31 16:46:34.000000000","message":"Acknowledged","commit_id":"0b3a8ab2c79ce60b241e0d105fb10a0288d0d7b6"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"eb8c1a0d7ec4a180c0c0ef45f137542d34cd71ec","unresolved":true,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    backend \u003d args.store"},{"line_number":96,"context_line":"    file_name \u003d fields.pop(\u0027file\u0027, None)"},{"line_number":97,"context_line":"    fields.pop(\u0027size\u0027, None)"},{"line_number":98,"context_line":"    using_stdin \u003d hasattr(sys.stdin, \u0027isatty\u0027) and not sys.stdin.isatty()"},{"line_number":99,"context_line":"    if args.store and not (file_name or using_stdin):"},{"line_number":100,"context_line":"        utils.exit(\"--store option should only be provided with --file \""}],"source_content_type":"text/x-python","patch_set":4,"id":"8ebc0109_d1054452","line":97,"updated":"2025-07-31 15:22:40.000000000","message":"Why would we not raise here to alert the user that this is not allowed/supported? Silently ignoring this is likely to be super frustrating to the user, especially since I think they would expect to be able to do this given this is how it is exposed to them after the fact. As I mentioned, I _want_ to be able to provide the size ahead of time in the body, so I suspect others will expect to be able to do that as well. If we\u0027re not going to support it, let\u0027s please be clear about it being unsupported in this way.","commit_id":"85730183c441bb64772dbd7272e18ddf6c29ebf2"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"61507c32891ba136f0dc85e9d1d48fe414137ed1","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    backend \u003d args.store"},{"line_number":96,"context_line":"    file_name \u003d fields.pop(\u0027file\u0027, None)"},{"line_number":97,"context_line":"    fields.pop(\u0027size\u0027, None)"},{"line_number":98,"context_line":"    using_stdin \u003d hasattr(sys.stdin, \u0027isatty\u0027) and not sys.stdin.isatty()"},{"line_number":99,"context_line":"    if args.store and not (file_name or using_stdin):"},{"line_number":100,"context_line":"        utils.exit(\"--store option should only be provided with --file \""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f80faf1_41c18a36","line":97,"in_reply_to":"8ebc0109_d1054452","updated":"2025-07-31 16:46:34.000000000","message":"Acknowledged","commit_id":"85730183c441bb64772dbd7272e18ddf6c29ebf2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"eb8c1a0d7ec4a180c0c0ef45f137542d34cd71ec","unresolved":true,"context_lines":[{"line_number":750,"context_line":"        if actual_size !\u003d args.size:"},{"line_number":751,"context_line":"            raise ValueError(\"Size mismatch: provided size %s does not match \""},{"line_number":752,"context_line":"                             \"the size of the image %s\" % ("},{"line_number":753,"context_line":"                                 args.size, actual_size))"},{"line_number":754,"context_line":""},{"line_number":755,"context_line":"    if args.progress:"},{"line_number":756,"context_line":"        if filesize is not None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"f416b110_cf808133","line":753,"updated":"2025-07-31 15:22:40.000000000","message":"Seems like this could be DRYed up into a helper to validate the size argument, file size, and return the value we should be using for the size.","commit_id":"85730183c441bb64772dbd7272e18ddf6c29ebf2"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"61507c32891ba136f0dc85e9d1d48fe414137ed1","unresolved":false,"context_lines":[{"line_number":750,"context_line":"        if actual_size !\u003d args.size:"},{"line_number":751,"context_line":"            raise ValueError(\"Size mismatch: provided size %s does not match \""},{"line_number":752,"context_line":"                             \"the size of the image %s\" % ("},{"line_number":753,"context_line":"                                 args.size, actual_size))"},{"line_number":754,"context_line":""},{"line_number":755,"context_line":"    if args.progress:"},{"line_number":756,"context_line":"        if filesize is not None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"0f94a363_8a817420","line":753,"in_reply_to":"f416b110_cf808133","updated":"2025-07-31 16:46:34.000000000","message":"Acknowledged","commit_id":"85730183c441bb64772dbd7272e18ddf6c29ebf2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2a0386d0c94c8e07833bd9c355795477f47d5e85","unresolved":true,"context_lines":[{"line_number":104,"context_line":"        fields[key] \u003d value"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    backend \u003d args.store"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    file_name \u003d fields.pop(\u0027file\u0027, None)"},{"line_number":109,"context_line":"    if \u0027size\u0027 in fields:"},{"line_number":110,"context_line":"        utils.exit("}],"source_content_type":"text/x-python","patch_set":5,"id":"66345ca6_54b68bea","line":107,"updated":"2025-08-01 14:29:05.000000000","message":"Random whitespace damage :(","commit_id":"90d15f65a63bacb233eb1d9d42345bd6e6e9e6d1"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"80b28a962ec1adcbc674ab7bb098b776254f8dd1","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        fields[key] \u003d value"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    backend \u003d args.store"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    file_name \u003d fields.pop(\u0027file\u0027, None)"},{"line_number":109,"context_line":"    if \u0027size\u0027 in fields:"},{"line_number":110,"context_line":"        utils.exit("}],"source_content_type":"text/x-python","patch_set":5,"id":"07e2bb12_8fde1927","line":107,"in_reply_to":"279d602d_9c600959","updated":"2025-08-01 14:43:46.000000000","message":"NO problem, thank you for review!!","commit_id":"90d15f65a63bacb233eb1d9d42345bd6e6e9e6d1"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"65934b914f122cc4a9dadeec868c54b1cf073033","unresolved":true,"context_lines":[{"line_number":104,"context_line":"        fields[key] \u003d value"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    backend \u003d args.store"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    file_name \u003d fields.pop(\u0027file\u0027, None)"},{"line_number":109,"context_line":"    if \u0027size\u0027 in fields:"},{"line_number":110,"context_line":"        utils.exit("}],"source_content_type":"text/x-python","patch_set":5,"id":"af83e2dd_605b5442","line":107,"in_reply_to":"66345ca6_54b68bea","updated":"2025-08-01 14:39:57.000000000","message":"Do you want me to remove this line #107 or #113","commit_id":"90d15f65a63bacb233eb1d9d42345bd6e6e9e6d1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5f9285b22fbc78ae1b1db9326575608ef214ebb9","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        fields[key] \u003d value"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    backend \u003d args.store"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    file_name \u003d fields.pop(\u0027file\u0027, None)"},{"line_number":109,"context_line":"    if \u0027size\u0027 in fields:"},{"line_number":110,"context_line":"        utils.exit("}],"source_content_type":"text/x-python","patch_set":5,"id":"279d602d_9c600959","line":107,"in_reply_to":"af83e2dd_605b5442","updated":"2025-08-01 14:42:36.000000000","message":"Oh, sorry, I was looking at the delta between PS4 and PS5. Now that I see it from base, you were just fixing the previous. My apologies :)","commit_id":"90d15f65a63bacb233eb1d9d42345bd6e6e9e6d1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2a0386d0c94c8e07833bd9c355795477f47d5e85","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    if \u0027size\u0027 in fields:"},{"line_number":110,"context_line":"        utils.exit("},{"line_number":111,"context_line":"            \"Setting \u0027size\u0027 during image creation is not supported. \""},{"line_number":112,"context_line":"            \"Please use --size only when uploading data.\")"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    using_stdin \u003d hasattr(sys.stdin, \u0027isatty\u0027) and not sys.stdin.isatty()"},{"line_number":115,"context_line":"    if args.store and not (file_name or using_stdin):"}],"source_content_type":"text/x-python","patch_set":5,"id":"bbc5e94c_8f1263b0","line":112,"range":{"start_line":112,"start_character":13,"end_line":112,"end_character":35},"updated":"2025-08-01 14:29:05.000000000","message":"exactly!","commit_id":"90d15f65a63bacb233eb1d9d42345bd6e6e9e6d1"}]}
