)]}'
{"cinder/image/image_utils.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b098106181e3342edff7c8e03e944e51c5151278","unresolved":false,"context_lines":[{"line_number":59,"context_line":"               help\u003d\u0027Directory used for temporary storage \u0027"},{"line_number":60,"context_line":"               \u0027during image conversion\u0027),"},{"line_number":61,"context_line":"    cfg.BoolOpt(\u0027image_compress_on_upload\u0027,"},{"line_number":62,"context_line":"                default\u003dTrue,"},{"line_number":63,"context_line":"                help\u003d\u0027When possible, compress images uploaded \u0027"},{"line_number":64,"context_line":"                \u0027to the image service\u0027),"},{"line_number":65,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_c2593f8e","line":62,"range":{"start_line":62,"start_character":24,"end_line":62,"end_character":28},"updated":"2019-07-12 16:33:47.000000000","message":"This patch should inclued a release note to mention the new option and pointing out that the default setting could mean an increase in CPU usage which shouldn\u0027t be a problem in most deployments, but could pose an issue if you\u0027re trying to get away with underpowered cinder nodes (there\u0027s probably a more diplomatic way to say that).\n\nI personally think \u0027True\u0027 as the default is OK, but it does put us in an \"opt-out\" model for this feature.","commit_id":"c9dad4cf89cf7a4c4cff855db634ea0cba649d49"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"5f98d761f8b7c68c04f7797d8db9b41ae97faaaa","unresolved":false,"context_lines":[{"line_number":59,"context_line":"               help\u003d\u0027Directory used for temporary storage \u0027"},{"line_number":60,"context_line":"               \u0027during image conversion\u0027),"},{"line_number":61,"context_line":"    cfg.BoolOpt(\u0027image_compress_on_upload\u0027,"},{"line_number":62,"context_line":"                default\u003dTrue,"},{"line_number":63,"context_line":"                help\u003d\u0027When possible, compress images uploaded \u0027"},{"line_number":64,"context_line":"                \u0027to the image service\u0027),"},{"line_number":65,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_8171d446","line":62,"range":{"start_line":62,"start_character":24,"end_line":62,"end_character":28},"in_reply_to":"7faddb67_c2593f8e","updated":"2019-07-16 22:52:43.000000000","message":"Done","commit_id":"c9dad4cf89cf7a4c4cff855db634ea0cba649d49"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b098106181e3342edff7c8e03e944e51c5151278","unresolved":false,"context_lines":[{"line_number":670,"context_line":"        out_format \u003d fixup_disk_format(image_meta[\u0027disk_format\u0027])"},{"line_number":671,"context_line":"        convert_image(volume_path, tmp, out_format,"},{"line_number":672,"context_line":"                      run_as_root\u003drun_as_root,"},{"line_number":673,"context_line":"                      compress\u003dTrue)"},{"line_number":674,"context_line":""},{"line_number":675,"context_line":"        data \u003d qemu_img_info(tmp, run_as_root\u003drun_as_root)"},{"line_number":676,"context_line":"        if data.file_format !\u003d out_format:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_826b47b5","line":673,"range":{"start_line":673,"start_character":22,"end_line":673,"end_character":35},"updated":"2019-07-12 16:33:47.000000000","message":"I thought it was a bit odd to call this with True unconditionally, but eventually the config opt setting and the COMPRESSIBLE_IMAGE_FORMATS list will be checked (in _get_qemu_convert_cmd) before any compression is performed (and that does seem to be the appropriate place to do the checking).","commit_id":"c9dad4cf89cf7a4c4cff855db634ea0cba649d49"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"3b86f5eaf5cf88bd15c9e4e05d27254c9f13793e","unresolved":false,"context_lines":[{"line_number":84,"context_line":"QEMU_IMG_MIN_FORCE_SHARE_VERSION \u003d [2, 10, 0]"},{"line_number":85,"context_line":"QEMU_IMG_MIN_CONVERT_LUKS_VERSION \u003d \u00272.10\u0027"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"COMPRESSIBLE_IMAGE_FORMATS \u003d (\u0027qcow2\u0027)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def fixup_disk_format(disk_format):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_8c14844e","line":87,"updated":"2019-08-06 08:31:55.000000000","message":"-1: This is missing a comma to be a tupple","commit_id":"1e74f318d68c131948dcad566ac11034bcef49ab"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"3b86f5eaf5cf88bd15c9e4e05d27254c9f13793e","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        cmd +\u003d (\u0027-t\u0027, cache_mode)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    if CONF.image_compress_on_upload and compress:"},{"line_number":167,"context_line":"        if out_format in COMPRESSIBLE_IMAGE_FORMATS:"},{"line_number":168,"context_line":"            cmd +\u003d (\u0027-c\u0027,)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    if out_subformat:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_ec04181a","line":167,"updated":"2019-08-06 08:31:55.000000000","message":"Since COMPRESSIBLE_IMAGE_FORMATS is not a tuple this will compare out_format with each of the individual letters of the word \u0027qcow2\u0027","commit_id":"1e74f318d68c131948dcad566ac11034bcef49ab"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"20252e0826a5690d54ccf6731b7fa9ce7d07da0f","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        cmd +\u003d (\u0027-t\u0027, cache_mode)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    if CONF.image_compress_on_upload and compress:"},{"line_number":167,"context_line":"        if out_format in COMPRESSIBLE_IMAGE_FORMATS:"},{"line_number":168,"context_line":"            cmd +\u003d (\u0027-c\u0027,)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    if out_subformat:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_3fe33407","line":167,"in_reply_to":"7faddb67_ec04181a","updated":"2019-08-06 08:52:16.000000000","message":"Actually, since both are strings it will search if out_format is a substring of COMPRESSIBLE_IMAGE_FORMATS, which is not correct.","commit_id":"1e74f318d68c131948dcad566ac11034bcef49ab"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"3b86f5eaf5cf88bd15c9e4e05d27254c9f13793e","unresolved":false,"context_lines":[{"line_number":634,"context_line":""},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"def upload_volume(context, image_service, image_meta, volume_path,"},{"line_number":637,"context_line":"                  volume_format\u003d\u0027raw\u0027, run_as_root\u003dTrue):"},{"line_number":638,"context_line":"    image_id \u003d image_meta[\u0027id\u0027]"},{"line_number":639,"context_line":"    if (image_meta[\u0027disk_format\u0027] \u003d\u003d volume_format):"},{"line_number":640,"context_line":"        LOG.debug(\"%s was %s, no need to convert to %s\","}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_bf03a40c","line":637,"updated":"2019-08-06 08:31:55.000000000","message":"-1: This is missing the compress parameter, so it will break when called from the manager.","commit_id":"1e74f318d68c131948dcad566ac11034bcef49ab"}],"cinder/tests/unit/test_image_utils.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b098106181e3342edff7c8e03e944e51c5151278","unresolved":false,"context_lines":[{"line_number":283,"context_line":"    @mock.patch(\u0027cinder.image.image_utils.qemu_img_info\u0027)"},{"line_number":284,"context_line":"    @mock.patch(\u0027cinder.utils.execute\u0027)"},{"line_number":285,"context_line":"    @mock.patch(\u0027cinder.utils.is_blk_device\u0027, return_value\u003dFalse)"},{"line_number":286,"context_line":"    def test_convert_to_qcow2(self, mock_isblk, mock_exec, mock_info):"},{"line_number":287,"context_line":"        source \u003d mock.sentinel.source"},{"line_number":288,"context_line":"        dest \u003d mock.sentinel.dest"},{"line_number":289,"context_line":"        out_format \u003d \u0027qcow2\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_020757cc","line":286,"updated":"2019-07-12 16:33:47.000000000","message":"This test is assuming that the image_compress_on_upload config opt is at its default setting ... might be a good idea to mock the CONF (as is done in the next test) and explicitly set it to \u0027True\u0027 for this test.  You could also change the setting and then make sure mock_exec is *not* called with the \u0027-c\u0027 option (either in this test or another depending on how you see the test-one-thing line being drawn for this test).","commit_id":"c9dad4cf89cf7a4c4cff855db634ea0cba649d49"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"5f98d761f8b7c68c04f7797d8db9b41ae97faaaa","unresolved":false,"context_lines":[{"line_number":283,"context_line":"    @mock.patch(\u0027cinder.image.image_utils.qemu_img_info\u0027)"},{"line_number":284,"context_line":"    @mock.patch(\u0027cinder.utils.execute\u0027)"},{"line_number":285,"context_line":"    @mock.patch(\u0027cinder.utils.is_blk_device\u0027, return_value\u003dFalse)"},{"line_number":286,"context_line":"    def test_convert_to_qcow2(self, mock_isblk, mock_exec, mock_info):"},{"line_number":287,"context_line":"        source \u003d mock.sentinel.source"},{"line_number":288,"context_line":"        dest \u003d mock.sentinel.dest"},{"line_number":289,"context_line":"        out_format \u003d \u0027qcow2\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_61761841","line":286,"in_reply_to":"7faddb67_020757cc","updated":"2019-07-16 22:52:43.000000000","message":"Done","commit_id":"c9dad4cf89cf7a4c4cff855db634ea0cba649d49"}]}
