)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7f74a0d2a8de6ddc3eefa4b908ef1cf96ee963d1","unresolved":false,"context_lines":[{"line_number":10,"context_line":"* zip"},{"line_number":11,"context_line":"* gzip"},{"line_number":12,"context_line":"* lha/lzh _if_ lhafile is installed"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Id125ebb5e8a9b22a8797d3158e60451d80bfaa14"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"df33271e_2ad51544","line":13,"updated":"2020-03-26 03:56:17.000000000","message":"Can we associate this feature with blueprint,\nalso release note will be good to have.","commit_id":"e3b2cd05faf8aeaa7770b50d8031ece632b53133"}],"glance/async_/flows/plugins/image_decompression.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d518166290592923876270b32db44fc64a1143a6","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            offset \u003d int(offset)"},{"line_number":117,"context_line":"            key \u003d \"_\" + key"},{"line_number":118,"context_line":"            if head.startswith(val, offset):"},{"line_number":119,"context_line":"                locals()[key](src_path)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        os.replace(self.dest_path, self.src_path)"},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_1597d692","line":119,"range":{"start_line":119,"start_character":16,"end_line":119,"end_character":24},"updated":"2020-03-23 04:10:44.000000000","message":"These are the contents of locals()\n\n{\u0027offset\u0027: 0, \u0027val\u0027: b\u0027\\x1f\\x8b\\x08\u0027, \u0027key\u0027: \u0027_gzipfile\u0027, \u0027fd\u0027: \u003c_io.BufferedReader name\u003d\u0027/opt/stack/data/glance/os_glance_staging_store/6e020279-26dd-456f-9219-3964a2b17561\u0027\u003e, \u0027head\u0027: b\u0027\\x1f\\x8b\\x08\\x00\\xe5\u0027, \u0027src_path\u0027: \u0027/opt/stack/data/glance/os_glance_staging_store/6e020279-26dd-456f-9219-3964a2b17561\u0027, \u0027kwargs\u0027: {}, \u0027file_path\u0027: \u0027file:///opt/stack/data/glance/os_glance_staging_store/6e020279-26dd-456f-9219-3964a2b17561\u0027, \u0027self\u0027: \u003cglance.async_.flows.plugins.image_decompression._DecompressImage api_image_import-Decompress_Image-d45df96d-600b-43c2-9e8b-232f6bf0dd97\u003d\u003d1.0\u003e}","commit_id":"75d667bdd253fb101fd08af74d99a56d9867a5d8"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d518166290592923876270b32db44fc64a1143a6","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            offset \u003d int(offset)"},{"line_number":117,"context_line":"            key \u003d \"_\" + key"},{"line_number":118,"context_line":"            if head.startswith(val, offset):"},{"line_number":119,"context_line":"                locals()[key](src_path)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        os.replace(self.dest_path, self.src_path)"},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_f59352a2","line":119,"range":{"start_line":119,"start_character":16,"end_line":119,"end_character":29},"updated":"2020-03-23 04:10:44.000000000","message":"so this line results in;\n\nMar 23 03:06:41 ussuri-dev glance-api[25461]: WARNING glance.async_.taskflow_executor [-] Task \u0027api_image_import-Decompress_Image-d45df96d-600b-43c2-9e8b-232f6bf0dd97\u0027 (3c0efb3f-5550-4303-90d5-5487cb87fb48) transitioned into state \u0027FAILURE\u0027 from state \u0027RUNNING\u0027\nMar 23 03:06:41 ussuri-dev glance-api[25461]: 4 predecessors (most recent first):\nMar 23 03:06:41 ussuri-dev glance-api[25461]:   Flow \u0027api_image_import\u0027\nMar 23 03:06:41 ussuri-dev glance-api[25461]:   |__Atom \u0027api_image_import-ConfigureStaging-d45df96d-600b-43c2-9e8b-232f6bf0dd97\u0027 {\u0027intention\u0027: \u0027EXECUTE\u0027, \u0027state\u0027: \u0027SUCCESS\u0027, \u0027requires\u0027: {}, \u0027provides\u0027: \u0027file:///opt/stack/data/glance/os_glance_staging_store/6e020279-26dd-456f-9219-3964a2b17561\u0027}\nMar 23 03:06:41 ussuri-dev glance-api[25461]:      |__Atom \u0027api_image_import_retry\u0027 {\u0027intention\u0027: \u0027EXECUTE\u0027, \u0027state\u0027: \u0027SUCCESS\u0027, \u0027requires\u0027: {}, \u0027provides\u0027: [(None, {})]}\nMar 23 03:06:41 ussuri-dev glance-api[25461]:         |__Flow \u0027api_image_import\u0027: KeyError: \u0027_gzipfile\u0027\nMar 23 03:06:41 ussuri-dev glance-api[25461]: ERROR glance.async_.taskflow_executor Traceback (most recent call last):\nMar 23 03:06:41 ussuri-dev glance-api[25461]: ERROR glance.async_.taskflow_executor   File \"/usr/local/lib/python3.6/dist-packages/taskflow/engines/action_engine/executor.py\", line 53, in _execute_task\nMar 23 03:06:41 ussuri-dev glance-api[25461]: ERROR glance.async_.taskflow_executor     result \u003d task.execute(**arguments)\nMar 23 03:06:41 ussuri-dev glance-api[25461]: ERROR glance.async_.taskflow_executor   File \"/opt/stack/glance/glance/async_/flows/plugins/image_decompression.py\", line 121, in execute\nMar 23 03:06:41 ussuri-dev glance-api[25461]: ERROR glance.async_.taskflow_executor     locals()[key](src_path)\nMar 23 03:06:41 ussuri-dev glance-api[25461]: ERROR glance.async_.taskflow_executor KeyError: \u0027_gzipfile\u0027\nMar 23 03:06:41 ussuri-dev glance-api[25461]: ERROR glance.async_.taskflow_executor","commit_id":"75d667bdd253fb101fd08af74d99a56d9867a5d8"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d518166290592923876270b32db44fc64a1143a6","unresolved":false,"context_lines":[{"line_number":118,"context_line":"            if head.startswith(val, offset):"},{"line_number":119,"context_line":"                locals()[key](src_path)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        os.replace(self.dest_path, self.src_path)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        return \"file://%s\" % src_path"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_d57d6e6f","line":121,"range":{"start_line":121,"start_character":35,"end_line":121,"end_character":48},"updated":"2020-03-23 04:10:44.000000000","message":"this should be src_path","commit_id":"75d667bdd253fb101fd08af74d99a56d9867a5d8"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"43314f44fa452176b0471714ced9f6f5726c3209","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        raise e"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"def _lhafile(self, src_path, dest_path, image_id):"},{"line_number":69,"context_line":"    if NO_LHA:"},{"line_number":70,"context_line":"        raise Exception(\"No lhafile available.\")"},{"line_number":71,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_31730583","line":68,"range":{"start_line":68,"start_character":13,"end_line":68,"end_character":19},"updated":"2020-03-23 15:45:58.000000000","message":"remove this","commit_id":"3d0b35c54e34901a3ee58b483f64cb33ca65f302"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"43314f44fa452176b0471714ced9f6f5726c3209","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        raise e"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def _gzipfile(self, src_path, dest_path, image_id):"},{"line_number":86,"context_line":"    try:"},{"line_number":87,"context_line":"        with gzip.open(src_path, \u0027r\u0027) as gzfd:"},{"line_number":88,"context_line":"            with open(dest_path, \u0027wb\u0027) as fd:"}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_716d8d97","line":85,"range":{"start_line":85,"start_character":14,"end_line":85,"end_character":20},"updated":"2020-03-23 15:45:58.000000000","message":"remove this","commit_id":"3d0b35c54e34901a3ee58b483f64cb33ca65f302"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"43314f44fa452176b0471714ced9f6f5726c3209","unresolved":false,"context_lines":[{"line_number":130,"context_line":"            if head.startswith(val, offset):"},{"line_number":131,"context_line":"                globals()[key](src_path, dest_path, self.image_id)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        os.replace(self.dest_path, src_path)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        return \"file://%s\" % src_path"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_d113b90c","line":133,"range":{"start_line":133,"start_character":19,"end_line":133,"end_character":33},"updated":"2020-03-23 15:45:58.000000000","message":"change line number #122 to self.dest_path otherwise it will give problem on revert","commit_id":"3d0b35c54e34901a3ee58b483f64cb33ca65f302"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"6c591965b5b22f762504a14f4a3e7a6681aaee6e","unresolved":false,"context_lines":[{"line_number":130,"context_line":"            if head.startswith(val, offset):"},{"line_number":131,"context_line":"                globals()[key](src_path, self.dest_path, self.image_id)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        os.replace(self.dest_path, src_path)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        return \"file://%s\" % src_path"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"df33271e_ec7897f9","line":133,"range":{"start_line":133,"start_character":8,"end_line":133,"end_character":44},"updated":"2020-03-24 03:56:58.000000000","message":"If operator or user provides normal image file (i.e. not compressed) then this line will throw \u0027FileNotFoundError\u0027\n\nWe need to handle this situation.","commit_id":"c92278a5b67091333e163c2536ab66e2c4ea184b"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"28981885e682fb42741d7496c4166979f4d54af4","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    except Exception as e:"},{"line_number":62,"context_line":"        LOG.debug(\"ZIP: Error decompressing image %(iid)s: %(msg)s\" % {"},{"line_number":63,"context_line":"                  \"iid\": image_id,"},{"line_number":64,"context_line":"                  \"msg\": e.msg})"},{"line_number":65,"context_line":"        raise e"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_8ab261e5","line":64,"range":{"start_line":64,"start_character":25,"end_line":64,"end_character":30},"updated":"2020-03-26 04:53:10.000000000","message":"this will raise error as\nAttributeError: \u0027FileNotFoundError\u0027 object has no attribute \u0027msg\u0027\n\ninstead you should use;\n\nencodeutils.exception_to_unicode(e)","commit_id":"e3b2cd05faf8aeaa7770b50d8031ece632b53133"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"4a57bdc118845db2b9fc5e95a952de2c885f28b6","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    except Exception as e:"},{"line_number":62,"context_line":"        LOG.debug(\"ZIP: Error decompressing image %(iid)s: %(msg)s\" % {"},{"line_number":63,"context_line":"                  \"iid\": image_id,"},{"line_number":64,"context_line":"                  \"msg\": e.msg})"},{"line_number":65,"context_line":"        raise e"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_b05a33f0","line":64,"range":{"start_line":64,"start_character":25,"end_line":64,"end_character":30},"in_reply_to":"df33271e_8ab261e5","updated":"2020-03-26 13:29:58.000000000","message":"How did you get FileNotFoundError out of this?","commit_id":"e3b2cd05faf8aeaa7770b50d8031ece632b53133"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"28981885e682fb42741d7496c4166979f4d54af4","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        LOG.debug(\"ZIP: Error decompressing image %(iid)s: %(msg)s\" % {"},{"line_number":63,"context_line":"                  \"iid\": image_id,"},{"line_number":64,"context_line":"                  \"msg\": e.msg})"},{"line_number":65,"context_line":"        raise e"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"def _lhafile(src_path, dest_path, image_id):"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_eac04d2d","line":65,"range":{"start_line":65,"start_character":8,"end_line":65,"end_character":15},"updated":"2020-03-26 04:53:10.000000000","message":"shouldn\u0027t we use with excutils.save_and_reraise_exception()??","commit_id":"e3b2cd05faf8aeaa7770b50d8031ece632b53133"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"28981885e682fb42741d7496c4166979f4d54af4","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    except Exception as e:"},{"line_number":79,"context_line":"        LOG.debug(\"LHA: Error decompressing image %(iid)s: %(msg)s\" % {"},{"line_number":80,"context_line":"                  \"iid\": image_id,"},{"line_number":81,"context_line":"                  \"msg\": e.msg})"},{"line_number":82,"context_line":"        raise e"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_6ab55dcd","line":81,"range":{"start_line":81,"start_character":24,"end_line":81,"end_character":30},"updated":"2020-03-26 04:53:10.000000000","message":"ditto","commit_id":"e3b2cd05faf8aeaa7770b50d8031ece632b53133"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"28981885e682fb42741d7496c4166979f4d54af4","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        LOG.debug(\"LHA: Error decompressing image %(iid)s: %(msg)s\" % {"},{"line_number":80,"context_line":"                  \"iid\": image_id,"},{"line_number":81,"context_line":"                  \"msg\": e.msg})"},{"line_number":82,"context_line":"        raise e"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def _gzipfile(src_path, dest_path, image_id):"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_aac64548","line":82,"range":{"start_line":82,"start_character":8,"end_line":82,"end_character":15},"updated":"2020-03-26 04:53:10.000000000","message":"ditto","commit_id":"e3b2cd05faf8aeaa7770b50d8031ece632b53133"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"28981885e682fb42741d7496c4166979f4d54af4","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        LOG.debug(\"ZIP: Error decompressing image %(iid)s: Bad GZip file: \""},{"line_number":92,"context_line":"                  \"%(msg)s\" % {\"iid\": image_id,"},{"line_number":93,"context_line":"                               \"msg\": e.msg})"},{"line_number":94,"context_line":"        raise e"},{"line_number":95,"context_line":"    except Exception as e:"},{"line_number":96,"context_line":"        LOG.debug(\"GZIP: Error decompressing image %(iid)s: %(msg)s\" % {"},{"line_number":97,"context_line":"                  \"iid\": image_id,"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_4addf912","line":94,"range":{"start_line":94,"start_character":8,"end_line":94,"end_character":15},"updated":"2020-03-26 04:53:10.000000000","message":"ditto","commit_id":"e3b2cd05faf8aeaa7770b50d8031ece632b53133"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"28981885e682fb42741d7496c4166979f4d54af4","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    except Exception as e:"},{"line_number":96,"context_line":"        LOG.debug(\"GZIP: Error decompressing image %(iid)s: %(msg)s\" % {"},{"line_number":97,"context_line":"                  \"iid\": image_id,"},{"line_number":98,"context_line":"                  \"msg\": e.msg})"},{"line_number":99,"context_line":"        raise e"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_2ae075cc","line":98,"range":{"start_line":98,"start_character":25,"end_line":98,"end_character":30},"updated":"2020-03-26 04:53:10.000000000","message":"ditto","commit_id":"e3b2cd05faf8aeaa7770b50d8031ece632b53133"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"28981885e682fb42741d7496c4166979f4d54af4","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        LOG.debug(\"GZIP: Error decompressing image %(iid)s: %(msg)s\" % {"},{"line_number":97,"context_line":"                  \"iid\": image_id,"},{"line_number":98,"context_line":"                  \"msg\": e.msg})"},{"line_number":99,"context_line":"        raise e"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"class _DecompressImage(task.Task):"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_8ae701e5","line":99,"range":{"start_line":99,"start_character":8,"end_line":99,"end_character":15},"updated":"2020-03-26 04:53:10.000000000","message":"ditto","commit_id":"e3b2cd05faf8aeaa7770b50d8031ece632b53133"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"00f10d576057cfa0779ee923dc6505924c473e05","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        self.context \u003d context"},{"line_number":109,"context_line":"        self.task_id \u003d task_id"},{"line_number":110,"context_line":"        self.task_type \u003d task_type"},{"line_number":111,"context_line":"        self.image_repo \u003d image_repo"},{"line_number":112,"context_line":"        self.image_id \u003d image_id"},{"line_number":113,"context_line":"        self.dest_path \u003d \"\""},{"line_number":114,"context_line":"        super(_DecompressImage, self).__init__("}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_ca946947","line":111,"range":{"start_line":111,"start_character":7,"end_line":111,"end_character":36},"updated":"2020-03-26 04:30:21.000000000","message":"I guess this is unused, so safe to remove it","commit_id":"e3b2cd05faf8aeaa7770b50d8031ece632b53133"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"4a57bdc118845db2b9fc5e95a952de2c885f28b6","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        self.context \u003d context"},{"line_number":109,"context_line":"        self.task_id \u003d task_id"},{"line_number":110,"context_line":"        self.task_type \u003d task_type"},{"line_number":111,"context_line":"        self.image_repo \u003d image_repo"},{"line_number":112,"context_line":"        self.image_id \u003d image_id"},{"line_number":113,"context_line":"        self.dest_path \u003d \"\""},{"line_number":114,"context_line":"        super(_DecompressImage, self).__init__("}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_503ac797","line":111,"range":{"start_line":111,"start_character":7,"end_line":111,"end_character":36},"in_reply_to":"df33271e_ca946947","updated":"2020-03-26 13:29:58.000000000","message":"There is actually addition/follow up for this which is why I didn\u0027t. So we have this \"compressed\" container_format which probably should cause us skipping those images. Just forgot to implement that while fixing the issues this had.","commit_id":"e3b2cd05faf8aeaa7770b50d8031ece632b53133"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"c1ccaa37a1cab8b493db743eaad93eed770d7aae","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        head \u003d None"},{"line_number":124,"context_line":"        with open(src_path, \u0027rb\u0027) as fd:"},{"line_number":125,"context_line":"            head \u003d fd.read(MAX_HEADER)"},{"line_number":126,"context_line":"        for key, val in MAGIC_NUMBERS.items():"},{"line_number":127,"context_line":"            offset, key \u003d key.split(\"_\")"},{"line_number":128,"context_line":"            offset \u003d int(offset)"},{"line_number":129,"context_line":"            key \u003d \"_\" + key"},{"line_number":130,"context_line":"            if head.startswith(val, offset):"},{"line_number":131,"context_line":"                globals()[key](src_path, self.dest_path, self.image_id)"},{"line_number":132,"context_line":"                os.replace(self.dest_path, src_path)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        return \"file://%s\" % src_path"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_6a86fddd","line":132,"range":{"start_line":126,"start_character":8,"end_line":132,"end_character":52},"updated":"2020-03-26 05:20:58.000000000","message":"Need to break after first successful iteration, otherwise it will iterate full every time;\n\nfor example if we have de-compressed zip format successfully even though it will go to \u0027_lhafile\u0027 and can raise exception if lhafile is not available.","commit_id":"e3b2cd05faf8aeaa7770b50d8031ece632b53133"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3f5cc95e1a1b49462928aab501395a727d5cecc","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        head \u003d None"},{"line_number":124,"context_line":"        with open(src_path, \u0027rb\u0027) as fd:"},{"line_number":125,"context_line":"            head \u003d fd.read(MAX_HEADER)"},{"line_number":126,"context_line":"        for key, val in MAGIC_NUMBERS.items():"},{"line_number":127,"context_line":"            offset, key \u003d key.split(\"_\")"},{"line_number":128,"context_line":"            offset \u003d int(offset)"},{"line_number":129,"context_line":"            key \u003d \"_\" + key"},{"line_number":130,"context_line":"            if head.startswith(val, offset):"},{"line_number":131,"context_line":"                globals()[key](src_path, self.dest_path, self.image_id)"},{"line_number":132,"context_line":"                os.replace(self.dest_path, src_path)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        return \"file://%s\" % src_path"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_4d06b388","line":132,"range":{"start_line":126,"start_character":8,"end_line":132,"end_character":52},"in_reply_to":"df33271e_6a86fddd","updated":"2020-03-26 07:20:58.000000000","message":"Ignore my this comment, as it will call decompress function only if line #130 is satisfied.\n\nSorry for the shout.","commit_id":"e3b2cd05faf8aeaa7770b50d8031ece632b53133"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"6a502429e7dc212d9c5dbc4fc84bd7a0ef56f3d6","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        with zipfile.ZipFile(src_path, \u0027r\u0027) as zfd:"},{"line_number":57,"context_line":"            content \u003d zfd.namelist()"},{"line_number":58,"context_line":"            if len(content) !\u003d 1:"},{"line_number":59,"context_line":"                raise Exception(\"Archive contains more than one file.\")"},{"line_number":60,"context_line":"            else:"},{"line_number":61,"context_line":"                zfd.extract(content[0], dest_path)"},{"line_number":62,"context_line":"    except Exception as e:"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_660591c2","line":59,"range":{"start_line":59,"start_character":32,"end_line":59,"end_character":33},"updated":"2020-03-26 14:59:20.000000000","message":"Does this bubble up to the end users? If so, we should have _() on here so it gets translated.","commit_id":"fe7668b8d7e60e2de25abcefe100abb5ebdc517a"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"841e924e4af137990db34f36e320589528235e2a","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        with zipfile.ZipFile(src_path, \u0027r\u0027) as zfd:"},{"line_number":57,"context_line":"            content \u003d zfd.namelist()"},{"line_number":58,"context_line":"            if len(content) !\u003d 1:"},{"line_number":59,"context_line":"                raise Exception(\"Archive contains more than one file.\")"},{"line_number":60,"context_line":"            else:"},{"line_number":61,"context_line":"                zfd.extract(content[0], dest_path)"},{"line_number":62,"context_line":"    except Exception as e:"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_c93bcec5","line":59,"range":{"start_line":59,"start_character":32,"end_line":59,"end_character":33},"in_reply_to":"df33271e_660591c2","updated":"2020-03-26 15:24:41.000000000","message":"nope","commit_id":"fe7668b8d7e60e2de25abcefe100abb5ebdc517a"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"6a502429e7dc212d9c5dbc4fc84bd7a0ef56f3d6","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            else:"},{"line_number":61,"context_line":"                zfd.extract(content[0], dest_path)"},{"line_number":62,"context_line":"    except Exception as e:"},{"line_number":63,"context_line":"        LOG.debug(\"ZIP: Error decompressing image %(iid)s: %(msg)s\" % {"},{"line_number":64,"context_line":"                  \"iid\": image_id,"},{"line_number":65,"context_line":"                  \"msg\": encodeutils.exception_to_unicode(e)})"},{"line_number":66,"context_line":"        raise e"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_e6f881c5","line":63,"range":{"start_line":63,"start_character":67,"end_line":63,"end_character":69},"updated":"2020-03-26 14:59:20.000000000","message":"Should be \u0027,\u0027 instead of \u0027%\u0027 so the logger can take care of formatting the string if/when needed.","commit_id":"fe7668b8d7e60e2de25abcefe100abb5ebdc517a"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"6a502429e7dc212d9c5dbc4fc84bd7a0ef56f3d6","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        LOG.debug(\"ZIP: Error decompressing image %(iid)s: %(msg)s\" % {"},{"line_number":64,"context_line":"                  \"iid\": image_id,"},{"line_number":65,"context_line":"                  \"msg\": encodeutils.exception_to_unicode(e)})"},{"line_number":66,"context_line":"        raise e"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"def _lhafile(src_path, dest_path, image_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_46316da2","line":66,"range":{"start_line":66,"start_character":8,"end_line":66,"end_character":15},"updated":"2020-03-26 14:59:20.000000000","message":"Should be \"raise\", not \"raise e\". Otherwise the traceback gets messed up.","commit_id":"fe7668b8d7e60e2de25abcefe100abb5ebdc517a"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"841e924e4af137990db34f36e320589528235e2a","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        LOG.debug(\"ZIP: Error decompressing image %(iid)s: %(msg)s\" % {"},{"line_number":64,"context_line":"                  \"iid\": image_id,"},{"line_number":65,"context_line":"                  \"msg\": encodeutils.exception_to_unicode(e)})"},{"line_number":66,"context_line":"        raise e"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"def _lhafile(src_path, dest_path, image_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_29923a9f","line":66,"range":{"start_line":66,"start_character":8,"end_line":66,"end_character":15},"in_reply_to":"df33271e_46316da2","updated":"2020-03-26 15:24:41.000000000","message":"We never record traces for these. Just log debug and taskflow utilizes the raise from here to know it went wrong and run reverts.","commit_id":"fe7668b8d7e60e2de25abcefe100abb5ebdc517a"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"6a502429e7dc212d9c5dbc4fc84bd7a0ef56f3d6","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            else:"},{"line_number":78,"context_line":"                lfd.extract(content[0], dest_path)"},{"line_number":79,"context_line":"    except Exception as e:"},{"line_number":80,"context_line":"        LOG.debug(\"LHA: Error decompressing image %(iid)s: %(msg)s\" % {"},{"line_number":81,"context_line":"                  \"iid\": image_id,"},{"line_number":82,"context_line":"                  \"msg\": encodeutils.exception_to_unicode(e)})"},{"line_number":83,"context_line":"        raise e"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_862b752e","line":80,"range":{"start_line":80,"start_character":67,"end_line":80,"end_character":69},"updated":"2020-03-26 14:59:20.000000000","message":",","commit_id":"fe7668b8d7e60e2de25abcefe100abb5ebdc517a"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"6a502429e7dc212d9c5dbc4fc84bd7a0ef56f3d6","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        LOG.debug(\"LHA: Error decompressing image %(iid)s: %(msg)s\" % {"},{"line_number":81,"context_line":"                  \"iid\": image_id,"},{"line_number":82,"context_line":"                  \"msg\": encodeutils.exception_to_unicode(e)})"},{"line_number":83,"context_line":"        raise e"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"def _gzipfile(src_path, dest_path, image_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_e621a14f","line":83,"range":{"start_line":83,"start_character":8,"end_line":83,"end_character":15},"updated":"2020-03-26 14:59:20.000000000","message":"raise","commit_id":"fe7668b8d7e60e2de25abcefe100abb5ebdc517a"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"6a502429e7dc212d9c5dbc4fc84bd7a0ef56f3d6","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                shutil.copyfileobj(gzfd, fd)"},{"line_number":91,"context_line":"    except gzip.BadGzipFile as e:"},{"line_number":92,"context_line":"        LOG.debug(\"ZIP: Error decompressing image %(iid)s: Bad GZip file: \""},{"line_number":93,"context_line":"                  \"%(msg)s\" % {\"iid\": image_id,"},{"line_number":94,"context_line":"                               \"msg\": encodeutils.exception_to_unicode(e)})"},{"line_number":95,"context_line":"        raise e"},{"line_number":96,"context_line":"    except Exception as e:"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_061765ef","line":93,"range":{"start_line":93,"start_character":27,"end_line":93,"end_character":29},"updated":"2020-03-26 14:59:20.000000000","message":",","commit_id":"fe7668b8d7e60e2de25abcefe100abb5ebdc517a"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"6a502429e7dc212d9c5dbc4fc84bd7a0ef56f3d6","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        LOG.debug(\"ZIP: Error decompressing image %(iid)s: Bad GZip file: \""},{"line_number":93,"context_line":"                  \"%(msg)s\" % {\"iid\": image_id,"},{"line_number":94,"context_line":"                               \"msg\": encodeutils.exception_to_unicode(e)})"},{"line_number":95,"context_line":"        raise e"},{"line_number":96,"context_line":"    except Exception as e:"},{"line_number":97,"context_line":"        LOG.debug(\"GZIP: Error decompressing image %(iid)s: %(msg)s\" % {"},{"line_number":98,"context_line":"                  \"iid\": image_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_c6e1fdfe","line":95,"range":{"start_line":95,"start_character":8,"end_line":95,"end_character":15},"updated":"2020-03-26 14:59:20.000000000","message":"raise","commit_id":"fe7668b8d7e60e2de25abcefe100abb5ebdc517a"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"6a502429e7dc212d9c5dbc4fc84bd7a0ef56f3d6","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                               \"msg\": encodeutils.exception_to_unicode(e)})"},{"line_number":95,"context_line":"        raise e"},{"line_number":96,"context_line":"    except Exception as e:"},{"line_number":97,"context_line":"        LOG.debug(\"GZIP: Error decompressing image %(iid)s: %(msg)s\" % {"},{"line_number":98,"context_line":"                  \"iid\": image_id,"},{"line_number":99,"context_line":"                  \"msg\": encodeutils.exception_to_unicode(e)})"},{"line_number":100,"context_line":"        raise e"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_26f1c9ce","line":97,"range":{"start_line":97,"start_character":68,"end_line":97,"end_character":70},"updated":"2020-03-26 14:59:20.000000000","message":",","commit_id":"fe7668b8d7e60e2de25abcefe100abb5ebdc517a"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"6a502429e7dc212d9c5dbc4fc84bd7a0ef56f3d6","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        LOG.debug(\"GZIP: Error decompressing image %(iid)s: %(msg)s\" % {"},{"line_number":98,"context_line":"                  \"iid\": image_id,"},{"line_number":99,"context_line":"                  \"msg\": encodeutils.exception_to_unicode(e)})"},{"line_number":100,"context_line":"        raise e"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class _DecompressImage(task.Task):"}],"source_content_type":"text/x-python","patch_set":8,"id":"df33271e_06ec85f1","line":100,"range":{"start_line":100,"start_character":8,"end_line":100,"end_character":15},"updated":"2020-03-26 14:59:20.000000000","message":"raise","commit_id":"fe7668b8d7e60e2de25abcefe100abb5ebdc517a"}]}
