)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"159cef81503a3723cb37656548ac16cab44c6bae","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"5feb2a52_76153641","updated":"2024-11-06 22:54:19.000000000","message":"I think there\u0027s a typo in the release note.  Otherwise, code and tests LGTM.","commit_id":"f745dc2f6f833f23ad5bc0fd3804c18799a4f2e7"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3d87ae26d20d7c5494f415450653de2c435b93a8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"9551e434_e3d4f9f3","updated":"2024-11-06 21:55:11.000000000","message":"Thanks Alan for the review","commit_id":"f745dc2f6f833f23ad5bc0fd3804c18799a4f2e7"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"29f64146077b2513ac621c6458f8bdd33b86d91d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"caf83a61_c7e72cbb","updated":"2024-11-08 10:00:05.000000000","message":"Doesn\u0027t work with powerflex driver","commit_id":"4a991b3ce4ca2ee550c165fe5a04dfb16ecb932d"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"08b29f72b07f401d1421dc4c976d03a8ee3dc921","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"0420612f_43b442d9","updated":"2024-11-07 19:35:59.000000000","message":"Not having to keep track of the file pointer is a definite plus, and it\u0027s nice to see that fstat doesn\u0027t degrade performance.","commit_id":"4a991b3ce4ca2ee550c165fe5a04dfb16ecb932d"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"11006c63de16f50c6be149e2143403c2b99b0bdb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"3f41ad36_24222ecc","updated":"2024-11-07 09:48:42.000000000","message":"Thanks Brian!","commit_id":"4a991b3ce4ca2ee550c165fe5a04dfb16ecb932d"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"18ac8f50544e0ec51528be3c2cec806ca7bbd852","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"5877a029_4860fa78","updated":"2024-11-08 18:46:48.000000000","message":"Forgot to vote.","commit_id":"55cefedd169b84d713a8ff080d909483ea51c913"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"1e1c3220e0afe2b04311df5ecf16f42f82be7944","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"a814d294_5ddbf8e7","updated":"2024-11-11 14:27:13.000000000","message":"I buy Rajat\u0027s argument that this fix is going to work; I think the function can be hardened as a follow up.","commit_id":"55cefedd169b84d713a8ff080d909483ea51c913"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"96769dd872318c1c8107a529f8d0b8ca24fc8e2e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"de199a83_5818ea98","updated":"2024-11-11 08:59:28.000000000","message":"Thanks Brian and Abhishek, I\u0027ve left a reply inline.","commit_id":"55cefedd169b84d713a8ff080d909483ea51c913"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"440762ba9519be5e57f5c22397a2521d44b49576","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"ca2446ca_15fc0b1a","updated":"2024-11-08 18:46:33.000000000","message":"Too bad fstat can\u0027t be used.  Left a suggestion inline; otherwise the code and tests look fine.","commit_id":"55cefedd169b84d713a8ff080d909483ea51c913"}],"glance_store/_drivers/cinder/scaleio.py":[{"author":{"_account_id":21129,"name":"Alan Bishop","email":"abishopsweng@gmail.com","username":"ASBishop","status":"ex Red Hat"},"change_message_id":"753790024350811adc89f99c7478bd56c7f36e02","unresolved":true,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @staticmethod"},{"line_number":35,"context_line":"    def _get_device_size(device_file):"},{"line_number":36,"context_line":"        # Comparing the results for seek()/tell() method"},{"line_number":37,"context_line":"        # vs fstat for a 1GB and 10GB file, they offer similar"},{"line_number":38,"context_line":"        # performance so preferring the less LOC solution:"},{"line_number":39,"context_line":"        # SIZE FSTAT SEEK/TELL"},{"line_number":40,"context_line":"        # 1GB: 1.5974044799804688e-05 vs 1.5497207641601562e-05"},{"line_number":41,"context_line":"        # 10GB: 1.6927719116210938e-05 vs 1.6927719116210938e-05"},{"line_number":42,"context_line":"        device_size \u003d os.fstat(device_file.fileno()).st_size"},{"line_number":43,"context_line":"        device_size \u003d int(math.ceil(float(device_size) / units.Gi))"},{"line_number":44,"context_line":"        return device_size"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ef8bcca3_3214bc33","line":42,"range":{"start_line":36,"start_character":0,"end_line":42,"end_character":0},"updated":"2024-11-06 16:54:42.000000000","message":"I\u0027m ambivalent about including this comment, though I won\u0027t downvote its presence. Someone with a lot of UNIX system programming experience would predict the tell/seek/fstat results would be similar.","commit_id":"f745dc2f6f833f23ad5bc0fd3804c18799a4f2e7"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3d87ae26d20d7c5494f415450653de2c435b93a8","unresolved":true,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @staticmethod"},{"line_number":35,"context_line":"    def _get_device_size(device_file):"},{"line_number":36,"context_line":"        # Comparing the results for seek()/tell() method"},{"line_number":37,"context_line":"        # vs fstat for a 1GB and 10GB file, they offer similar"},{"line_number":38,"context_line":"        # performance so preferring the less LOC solution:"},{"line_number":39,"context_line":"        # SIZE FSTAT SEEK/TELL"},{"line_number":40,"context_line":"        # 1GB: 1.5974044799804688e-05 vs 1.5497207641601562e-05"},{"line_number":41,"context_line":"        # 10GB: 1.6927719116210938e-05 vs 1.6927719116210938e-05"},{"line_number":42,"context_line":"        device_size \u003d os.fstat(device_file.fileno()).st_size"},{"line_number":43,"context_line":"        device_size \u003d int(math.ceil(float(device_size) / units.Gi))"},{"line_number":44,"context_line":"        return device_size"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"29ef912a_ac6f156b","line":42,"range":{"start_line":36,"start_character":0,"end_line":42,"end_character":0},"in_reply_to":"ef8bcca3_3214bc33","updated":"2024-11-06 21:55:11.000000000","message":"I was also skeptical to include this comment at first but then i thought that some contributor can change the code and tag it as \"performance improvement\" where it will actually not be the case.\nWe have seen incidents of that in the past introducing bugs and also there are people suggesting seek/tell working faster than fstat that led me to testing it myself","commit_id":"f745dc2f6f833f23ad5bc0fd3804c18799a4f2e7"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"440762ba9519be5e57f5c22397a2521d44b49576","unresolved":true,"context_lines":[{"line_number":46,"context_line":"        device_size \u003d int(math.ceil(float(device_size) / units.Gi))"},{"line_number":47,"context_line":"        # Restore the file pointer to original position"},{"line_number":48,"context_line":"        device_file.seek(current_pos, os.SEEK_SET)"},{"line_number":49,"context_line":"        return device_size"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    @staticmethod"},{"line_number":52,"context_line":"    def _wait_resize_device(volume, device_file):"}],"source_content_type":"text/x-python","patch_set":3,"id":"2f2e7479_cc2e441a","line":49,"updated":"2024-11-08 18:46:33.000000000","message":"Pretty unlikely an exception would be raised before you restore the position, but maybe this would be a good way to guarantee that it gets restored:\n\n```\n        # Get the current position\n        current_pos \u003d device_file.tell()\n        try:\n            # Seek to the end of the file\n            device_file.seek(0, os.SEEK_END)\n            # Get the size of file (in bytes)\n            device_size \u003d device_file.tell()\n            # Convert the bytes size into GB\n            device_size \u003d int(math.ceil(float(device_size) / units.Gi))\n        finally:\n            # Restore the file pointer to original position\n            device_file.seek(current_pos, os.SEEK_SET)\n        return device_size\n```","commit_id":"55cefedd169b84d713a8ff080d909483ea51c913"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"88e691a71d959a57563de3c63bf77b58d3dbf9ff","unresolved":true,"context_lines":[{"line_number":46,"context_line":"        device_size \u003d int(math.ceil(float(device_size) / units.Gi))"},{"line_number":47,"context_line":"        # Restore the file pointer to original position"},{"line_number":48,"context_line":"        device_file.seek(current_pos, os.SEEK_SET)"},{"line_number":49,"context_line":"        return device_size"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    @staticmethod"},{"line_number":52,"context_line":"    def _wait_resize_device(volume, device_file):"}],"source_content_type":"text/x-python","patch_set":3,"id":"429cf5c3_444da024","line":49,"in_reply_to":"2f2e7479_cc2e441a","updated":"2024-11-11 05:27:02.000000000","message":"++","commit_id":"55cefedd169b84d713a8ff080d909483ea51c913"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"96769dd872318c1c8107a529f8d0b8ca24fc8e2e","unresolved":true,"context_lines":[{"line_number":46,"context_line":"        device_size \u003d int(math.ceil(float(device_size) / units.Gi))"},{"line_number":47,"context_line":"        # Restore the file pointer to original position"},{"line_number":48,"context_line":"        device_file.seek(current_pos, os.SEEK_SET)"},{"line_number":49,"context_line":"        return device_size"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    @staticmethod"},{"line_number":52,"context_line":"    def _wait_resize_device(volume, device_file):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7fc6b616_e45c5d89","line":49,"in_reply_to":"429cf5c3_444da024","updated":"2024-11-11 08:59:28.000000000","message":"If an exception occurs, it will fail the operation so restoring the file pointer won\u0027t be necessary as when we reopen the file, the file pointer is already at the start.\n\n\u003e\u003e\u003e import os\n\u003e\u003e\u003e device_file \u003d open(\"demofile.txt\")\n\u003e\u003e\u003e device_file.tell()\n0\n\u003e\u003e\u003e device_file.seek(0, os.SEEK_END)\n64\n\u003e\u003e\u003e device_file.tell()\n64\n\u003e\u003e\u003e device_file.close()\n\u003e\u003e\u003e device_file \u003d open(\"demofile.txt\")\n\u003e\u003e\u003e device_file.tell()\n0\n\n\nClosing of the file is something that is important in finally but that is taken care of by the context manager[1].\nIn any case, it\u0027s a small change that affects readability a little bit, but let me know if you would like me to do the change.\n\n[1] https://github.com/openstack/glance_store/blob/master/glance_store/_drivers/cinder/store.py#L784","commit_id":"55cefedd169b84d713a8ff080d909483ea51c913"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"1e1c3220e0afe2b04311df5ecf16f42f82be7944","unresolved":true,"context_lines":[{"line_number":46,"context_line":"        device_size \u003d int(math.ceil(float(device_size) / units.Gi))"},{"line_number":47,"context_line":"        # Restore the file pointer to original position"},{"line_number":48,"context_line":"        device_file.seek(current_pos, os.SEEK_SET)"},{"line_number":49,"context_line":"        return device_size"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    @staticmethod"},{"line_number":52,"context_line":"    def _wait_resize_device(volume, device_file):"}],"source_content_type":"text/x-python","patch_set":3,"id":"8c35a19c_7338a9d9","line":49,"in_reply_to":"7fc6b616_e45c5d89","updated":"2024-11-11 14:27:13.000000000","message":"I won\u0027t hold the patch up over this; it can be done as a followup.  The main point is that a function that gets the size should leave the device in the same state as it was before the call was made; we don\u0027t want to rely on calling code doing the right thing.","commit_id":"55cefedd169b84d713a8ff080d909483ea51c913"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"9b1e18a52ca9ab5c84bf352ddd12d4aee8119c2b","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        device_size \u003d int(math.ceil(float(device_size) / units.Gi))"},{"line_number":47,"context_line":"        # Restore the file pointer to original position"},{"line_number":48,"context_line":"        device_file.seek(current_pos, os.SEEK_SET)"},{"line_number":49,"context_line":"        return device_size"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    @staticmethod"},{"line_number":52,"context_line":"    def _wait_resize_device(volume, device_file):"}],"source_content_type":"text/x-python","patch_set":3,"id":"dbb1e58a_00d3a3d4","line":49,"in_reply_to":"8c35a19c_7338a9d9","updated":"2024-11-12 08:55:32.000000000","message":"Addressed here https://review.opendev.org/c/openstack/glance_store/+/934726","commit_id":"55cefedd169b84d713a8ff080d909483ea51c913"}],"releasenotes/notes/fix-scaleio-download-image-2563cb2681895d0e.yaml":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"159cef81503a3723cb37656548ac16cab44c6bae","unresolved":true,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    `Bug #2086759 \u003chttps://bugs.launchpad.net/glance-store/+bug/2086759\u003e`_:"},{"line_number":5,"context_line":"    Cinder PowerFlex: Fixed issue when downloading an image."},{"line_number":6,"context_line":"    Previously, we used to fail when downloading an image when using"},{"line_number":7,"context_line":"    Glance -\u003e Cinder -\u003e PowerFlex configuration. This is now fixed with"},{"line_number":8,"context_line":"    better file handling for the volume device."}],"source_content_type":"text/x-yaml","patch_set":1,"id":"b4cb5947_97829eac","line":5,"range":{"start_line":5,"start_character":4,"end_line":5,"end_character":10},"updated":"2024-11-06 22:54:19.000000000","message":"Should this be Dell?\n\nAlso, isn\u0027t the driver bug format \u0027Driver name: bug #123456\u0027 ?\nhttps://docs.openstack.org/cinder/latest/contributor/releasenotes.html#drivers","commit_id":"f745dc2f6f833f23ad5bc0fd3804c18799a4f2e7"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"11006c63de16f50c6be149e2143403c2b99b0bdb","unresolved":false,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    `Bug #2086759 \u003chttps://bugs.launchpad.net/glance-store/+bug/2086759\u003e`_:"},{"line_number":5,"context_line":"    Cinder PowerFlex: Fixed issue when downloading an image."},{"line_number":6,"context_line":"    Previously, we used to fail when downloading an image when using"},{"line_number":7,"context_line":"    Glance -\u003e Cinder -\u003e PowerFlex configuration. This is now fixed with"},{"line_number":8,"context_line":"    better file handling for the volume device."}],"source_content_type":"text/x-yaml","patch_set":1,"id":"6d015391_f1feae68","line":5,"range":{"start_line":5,"start_character":4,"end_line":5,"end_character":10},"in_reply_to":"32198a77_48c8ecef","updated":"2024-11-07 09:48:42.000000000","message":"Done","commit_id":"f745dc2f6f833f23ad5bc0fd3804c18799a4f2e7"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"a502212d2326ed059a3a13638fe02f05c91f9746","unresolved":true,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    `Bug #2086759 \u003chttps://bugs.launchpad.net/glance-store/+bug/2086759\u003e`_:"},{"line_number":5,"context_line":"    Cinder PowerFlex: Fixed issue when downloading an image."},{"line_number":6,"context_line":"    Previously, we used to fail when downloading an image when using"},{"line_number":7,"context_line":"    Glance -\u003e Cinder -\u003e PowerFlex configuration. This is now fixed with"},{"line_number":8,"context_line":"    better file handling for the volume device."}],"source_content_type":"text/x-yaml","patch_set":1,"id":"32198a77_48c8ecef","line":5,"range":{"start_line":5,"start_character":4,"end_line":5,"end_character":10},"in_reply_to":"b4cb5947_97829eac","updated":"2024-11-07 09:08:21.000000000","message":"Here Glance backend is Cinder and glance does not have info about the cinder backend. But the fix here is specific to the Dell powerflex backend.\nWill update it to,\n\n    Cinder (Dell PowerFlex):\n\nAlso will include the same in the previous line.","commit_id":"f745dc2f6f833f23ad5bc0fd3804c18799a4f2e7"}]}
