)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"cca1cf1a7fe3fbf1745afa025637a1bfaf7467ec","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"c6338c6c_3b181cde","updated":"2022-11-03 17:41:57.000000000","message":"looks good to me","commit_id":"086d683ca840d84f4cfcae621d212b6bc7e0bbf1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1bdf0c5c97d6f1300ce1a70933798be656d396f1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"ff4a057a_d3ae478b","updated":"2022-10-28 19:31:55.000000000","message":"recheck neutron timeout (dependent job succeeded with this enabled)","commit_id":"086d683ca840d84f4cfcae621d212b6bc7e0bbf1"}],"functions":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"adfe0fdcf52affea6b7123d6c5a58858b2bcb4f8","unresolved":true,"context_lines":[{"line_number":167,"context_line":"            raw_image\u003d\"${FILES}/raw-${image_fname}\""},{"line_number":168,"context_line":"            qemu-img convert -O raw \"$image\" \"$raw_image\""},{"line_number":169,"context_line":"            image\u003d\"$raw_image\""},{"line_number":170,"context_line":"            truncate --size $IMG_IMAGES_MIN_SIZE \"$image\""},{"line_number":171,"context_line":"        fi"},{"line_number":172,"context_line":"    fi"},{"line_number":173,"context_line":""}],"source_content_type":"application/x-shellscript","patch_set":5,"id":"316709f7_8c82434f","line":170,"updated":"2022-10-28 14:35:46.000000000","message":"I think you\u0027ll need to check the size of the raw image again here to make sure you aren\u0027t actually truncating it (in case $IMG_IMAGES_MIN_SIZE lies between original size and raw size).","commit_id":"386fe806a6e26ad107dd52c6c37dd1aeaa1de2f6"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ffd1484a9ad4a93957f2aa8666f518d4a661fb4c","unresolved":true,"context_lines":[{"line_number":167,"context_line":"            raw_image\u003d\"${FILES}/raw-${image_fname}\""},{"line_number":168,"context_line":"            qemu-img convert -O raw \"$image\" \"$raw_image\""},{"line_number":169,"context_line":"            image\u003d\"$raw_image\""},{"line_number":170,"context_line":"            truncate --size $IMG_IMAGES_MIN_SIZE \"$image\""},{"line_number":171,"context_line":"        fi"},{"line_number":172,"context_line":"    fi"},{"line_number":173,"context_line":""}],"source_content_type":"application/x-shellscript","patch_set":5,"id":"fa17e4c2_52a77ebd","line":170,"in_reply_to":"316709f7_8c82434f","updated":"2022-10-28 16:24:32.000000000","message":"Hmm, okay I guess if the virtual size was less but the inflated size was more, yeah.","commit_id":"386fe806a6e26ad107dd52c6c37dd1aeaa1de2f6"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"cb4eca343060f9e2a541dd55c9c507b0022f1b24","unresolved":true,"context_lines":[{"line_number":172,"context_line":"            else"},{"line_number":173,"context_line":"                # Image Is still below the threshold, so delete the raw"},{"line_number":174,"context_line":"                # version and do not change anything."},{"line_number":175,"context_line":"                rm \"$raw_image\""},{"line_number":176,"context_line":"            fi"},{"line_number":177,"context_line":"        fi"},{"line_number":178,"context_line":"    fi"}],"source_content_type":"application/x-shellscript","patch_set":6,"id":"aef7c8a2_72b00148","line":175,"updated":"2022-11-07 11:07:25.000000000","message":"The comment is the wrong way around, this case will happen when the raw image size is above the threshold. The correct action in this case IMO would be to use the raw image, too, just don\u0027t truncate it.\n\nAlso this whole discussion IMO shows that this functionality is so complex that it would be good to add some test cases for it. Maybe best done by moving this whole block into a helper function that can receive some dedicated tests? Using the standard cirros image with values for $IMG_IMAGES_MIN_SIZE of 8M, 64M and 512M should cover all three relevant cases.","commit_id":"086d683ca840d84f4cfcae621d212b6bc7e0bbf1"}]}
