)]}'
{"config_tempest/services/image.py":[{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"ec8e5d55fba94fe6b0626f11701f5c6053c137a4","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        :return: path of the converted image"},{"line_number":238,"context_line":"        :rtype: string"},{"line_number":239,"context_line":"        \"\"\""},{"line_number":240,"context_line":"        head, tail \u003d os.path.split(path)"},{"line_number":241,"context_line":"        name \u003d tail.rsplit(\u0027.\u0027, 1)[0] + \u0027.raw\u0027"},{"line_number":242,"context_line":"        raw_path \u003d os.path.join(head, name)"},{"line_number":243,"context_line":"        # check if converted already"},{"line_number":244,"context_line":"        if os.path.exists(raw_path):"},{"line_number":245,"context_line":"            C.LOG.info(\"Image already converted in \u0027%s\u0027.\", raw_path)"},{"line_number":246,"context_line":"        else:"},{"line_number":247,"context_line":"            C.LOG.info(\"Converting image \u0027%s\u0027 to \u0027%s\u0027\","}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_f6661656","line":244,"range":{"start_line":240,"start_character":8,"end_line":244,"end_character":36},"updated":"2019-03-29 14:43:51.000000000","message":"check the format, don\u0027t rely on the suffix only","commit_id":"971264c0f81ad84e348f5d3e51eee4233b373107"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"0dad2377677610074840b3903c2dd25010263f1d","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        :return: path of the converted image"},{"line_number":238,"context_line":"        :rtype: string"},{"line_number":239,"context_line":"        \"\"\""},{"line_number":240,"context_line":"        head, tail \u003d os.path.split(path)"},{"line_number":241,"context_line":"        name \u003d tail.rsplit(\u0027.\u0027, 1)[0] + \u0027.raw\u0027"},{"line_number":242,"context_line":"        raw_path \u003d os.path.join(head, name)"},{"line_number":243,"context_line":"        # check if converted already"},{"line_number":244,"context_line":"        if os.path.exists(raw_path):"},{"line_number":245,"context_line":"            C.LOG.info(\"Image already converted in \u0027%s\u0027.\", raw_path)"},{"line_number":246,"context_line":"        else:"},{"line_number":247,"context_line":"            C.LOG.info(\"Converting image \u0027%s\u0027 to \u0027%s\u0027\","}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_d3d5111d","line":244,"range":{"start_line":240,"start_character":8,"end_line":244,"end_character":36},"in_reply_to":"5fc1f717_f6661656","updated":"2019-04-01 14:08:11.000000000","message":"I\u0027ve been thinking about it and I actually can rely on the suffix\n\n* given image is downloaded to ./etc\n  * the image doesn\u0027t have .raw suffix AND (it\u0027s not in raw format OR it is not in raw format)\n    * the image is given to qemu-img, it will deal with it, convert it to .raw and save as image.raw under ./etc\nformat\n  * the image has .raw suffix\n    * the image is in raw format - that\u0027s fine, no conversion\n    * the image is not in raw format - any consequences are user\u0027s fault\n\nSo checking the format is not worth it. But as we discussed I\u0027ll add some documentation / example of the usage of the feature.","commit_id":"971264c0f81ad84e348f5d3e51eee4233b373107"},{"author":{"_account_id":24162,"name":"Sorin Sbârnea","display_name":"zbr","email":"ssbarnea@redhat.com","username":"ssbarnea","status":"do not feed the troll 🥕"},"change_message_id":"ec48a4ed67e4c8cbf7eac05658a005ef44b8af8d","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        else:"},{"line_number":253,"context_line":"            C.LOG.info(\"Converting image \u0027%s\u0027 to \u0027%s\u0027\","},{"line_number":254,"context_line":"                       os.path.abspath(path), os.path.abspath(raw_path))"},{"line_number":255,"context_line":"            subprocess.call([\u0027qemu-img\u0027, \u0027convert\u0027, path, raw_path])"},{"line_number":256,"context_line":"        self.disk_format \u003d \u0027raw\u0027"},{"line_number":257,"context_line":"        return raw_path"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_11012707","line":255,"range":{"start_line":255,"start_character":12,"end_line":255,"end_character":68},"updated":"2019-04-03 10:48:56.000000000","message":"This silently ignores a conversion failure. You must assure that the tool fails (or throw exception) when conversion to raw returns non zero exit code.","commit_id":"0c4749de2b7bb5b24b62f40ec9c789159206a604"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"c6f8b9e61977d1783485213f02fb93fe49f9b2db","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                       os.path.abspath(path), os.path.abspath(raw_path))"},{"line_number":255,"context_line":"            rc \u003d subprocess.call([\u0027qemu-img\u0027, \u0027convert\u0027, path, raw_path])"},{"line_number":256,"context_line":"            if rc !\u003d 0:"},{"line_number":257,"context_line":"                raise Exception(\"Converting of the image has finished with \""},{"line_number":258,"context_line":"                                \"non-zero return code. The return code was \""},{"line_number":259,"context_line":"                                \"\u0027%d\u0027\", rc)"},{"line_number":260,"context_line":"        self.disk_format \u003d \u0027raw\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_401f8a6b","line":257,"range":{"start_line":257,"start_character":22,"end_line":257,"end_character":31},"updated":"2019-04-08 06:35:30.000000000","message":"just wondering doesn\u0027t subprocess.call raise some exceptions potentially? i.e. do we want this subprocess in a try catch","commit_id":"9916a0d4a9b9c7772a6ef18e493dce6147e17ffb"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"d7149c3c999342f8f9adfee556c609d9f1545c1d","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                       os.path.abspath(path), os.path.abspath(raw_path))"},{"line_number":255,"context_line":"            rc \u003d subprocess.call([\u0027qemu-img\u0027, \u0027convert\u0027, path, raw_path])"},{"line_number":256,"context_line":"            if rc !\u003d 0:"},{"line_number":257,"context_line":"                raise Exception(\"Converting of the image has finished with \""},{"line_number":258,"context_line":"                                \"non-zero return code. The return code was \""},{"line_number":259,"context_line":"                                \"\u0027%d\u0027\", rc)"},{"line_number":260,"context_line":"        self.disk_format \u003d \u0027raw\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_ca6954be","line":257,"range":{"start_line":257,"start_character":22,"end_line":257,"end_character":31},"in_reply_to":"5fc1f717_401f8a6b","updated":"2019-04-09 13:51:57.000000000","message":"If it raises, we don\u0027t want to catch them. The subprocess here is called only when a user wants to, so if it throws and exception, we can let it be to inform the user.","commit_id":"9916a0d4a9b9c7772a6ef18e493dce6147e17ffb"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"9320583ee6d40e17248e85f88463b9a6ee16b605","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        else:"},{"line_number":257,"context_line":"            C.LOG.info(\"Converting image \u0027%s\u0027 to \u0027%s\u0027\","},{"line_number":258,"context_line":"                       os.path.abspath(path), os.path.abspath(raw_path))"},{"line_number":259,"context_line":"            rc \u003d subprocess.call([\u0027qemu-img\u0027, \u0027convert\u0027, path, raw_path])"},{"line_number":260,"context_line":"            if rc !\u003d 0:"},{"line_number":261,"context_line":"                raise Exception(\"Converting of the image has finished with \""},{"line_number":262,"context_line":"                                \"non-zero return code. The return code was \""},{"line_number":263,"context_line":"                                \"\u0027%d\u0027\", rc)"},{"line_number":264,"context_line":"        self.disk_format \u003d \u0027raw\u0027"},{"line_number":265,"context_line":"        return raw_path"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fce034c_0ed34e3a","line":263,"range":{"start_line":259,"start_character":11,"end_line":263,"end_character":43},"updated":"2019-04-15 07:34:24.000000000","message":"I can write it something like this \nif subprocess.call([\u0027qemu-img\u0027, \u0027convert\u0027, path, raw_path]) !\u003d 0:\n\n   raise Exception(\"Converting of the image has finished with \"\n                                \"non-zero return code. The return code was \"\n                                \"\u0027%d\u0027\", rc)","commit_id":"790f23e22168614400779b975460df6e550e6d64"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"97be9dd16eeef81ff554a05353449e892c10591f","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        else:"},{"line_number":257,"context_line":"            C.LOG.info(\"Converting image \u0027%s\u0027 to \u0027%s\u0027\","},{"line_number":258,"context_line":"                       os.path.abspath(path), os.path.abspath(raw_path))"},{"line_number":259,"context_line":"            rc \u003d subprocess.call([\u0027qemu-img\u0027, \u0027convert\u0027, path, raw_path])"},{"line_number":260,"context_line":"            if rc !\u003d 0:"},{"line_number":261,"context_line":"                raise Exception(\"Converting of the image has finished with \""},{"line_number":262,"context_line":"                                \"non-zero return code. The return code was \""},{"line_number":263,"context_line":"                                \"\u0027%d\u0027\", rc)"},{"line_number":264,"context_line":"        self.disk_format \u003d \u0027raw\u0027"},{"line_number":265,"context_line":"        return raw_path"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fce034c_647312b3","line":263,"range":{"start_line":259,"start_character":11,"end_line":263,"end_character":43},"in_reply_to":"3fce034c_0ed34e3a","updated":"2019-04-15 08:29:18.000000000","message":"Don\u0027t understand, what you\u0027re trying to say. In your example you didn\u0027t save the return code to any variable, so you can\u0027t use it in the log message.","commit_id":"790f23e22168614400779b975460df6e550e6d64"}],"config_tempest/tests/services/test_image.py":[{"author":{"_account_id":10459,"name":"Luigi Toscano","email":"ltoscano@redhat.com","username":"ltoscano"},"change_message_id":"ce889dabf12aa13fb9ed95dbdb4c25c1f4453b17","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from config_tempest.tests.base import BaseServiceTest"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"# disable logging when running unit tests"},{"line_number":25,"context_line":"logging.disable(logging.CRITICAL)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class TestImageService(BaseServiceTest):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5fc1f717_2a3b2f38","line":25,"updated":"2019-04-09 13:01:06.000000000","message":"is this needed for all tests, or just the newly added test? If the latter, maybe this can be moved inside test_convert_image_to_raw.","commit_id":"989c9ac4d7a36bd88c4bf8d9e36bbf5bdf58ae24"}],"doc/source/user/usage.rst":[{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"c6f8b9e61977d1783485213f02fb93fe49f9b2db","unresolved":false,"context_lines":[{"line_number":405,"context_line":"********************************"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"By using ``--convert-to-raw`` argument you can make ``python-tempestconf``"},{"line_number":408,"context_line":"convert the given image by ``--image`` argument to **.raw** format before"},{"line_number":409,"context_line":"uploading it to glance. In some cases the boot time of the image is faster"},{"line_number":410,"context_line":"when the image is already in **.raw** format."},{"line_number":411,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"5fc1f717_4051ca35","line":408,"range":{"start_line":408,"start_character":12,"end_line":408,"end_character":23},"updated":"2019-04-08 06:35:30.000000000","message":"reverse (image given by)","commit_id":"9916a0d4a9b9c7772a6ef18e493dce6147e17ffb"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"c6f8b9e61977d1783485213f02fb93fe49f9b2db","unresolved":false,"context_lines":[{"line_number":406,"context_line":""},{"line_number":407,"context_line":"By using ``--convert-to-raw`` argument you can make ``python-tempestconf``"},{"line_number":408,"context_line":"convert the given image by ``--image`` argument to **.raw** format before"},{"line_number":409,"context_line":"uploading it to glance. In some cases the boot time of the image is faster"},{"line_number":410,"context_line":"when the image is already in **.raw** format."},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"In the following example the ``/my/path/to/myImage.img`` image will be"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5fc1f717_c05cda4c","line":409,"range":{"start_line":409,"start_character":24,"end_line":409,"end_character":42},"updated":"2019-04-08 06:35:30.000000000","message":"which cases? Or always? \"Maybe something like \"Converting the image to .raw format is expected to improve boot times.\"\n\nIf you have something to prove it, point there  \"see [foo] for more info\".","commit_id":"9916a0d4a9b9c7772a6ef18e493dce6147e17ffb"}]}
