)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"81d9feb56592a580eea42f1d9416fc3862451809","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Creates disk.fallocate_test"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"fallocate fails if test file does not exist."},{"line_number":10,"context_line":"Create test file, test fallocate."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Id43abc814d29e059e6cd8da70719c54b8e15d6dc"},{"line_number":13,"context_line":"Closes-Bug: 1461740"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9a41bdd9_4d07f381","line":10,"updated":"2015-07-15 19:57:38.000000000","message":"It\u0027s kind of hard to understand what the issue is this is addressing from the commit message, and how it\u0027s been broken for so long. https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message","commit_id":"760aa0839bd8741da00c0fd65323aa1715f237a2"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"2f2b275c5ed6488ed03698fb9659497892f44943","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Creates disk.fallocate_test"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Test of fallocate fails if test file does exist prior"},{"line_number":10,"context_line":"to running fallocate test. fallocate test file needs"},{"line_number":11,"context_line":"to be created prior to testing fallocate."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"fa1b9901_3847ac78","line":9,"updated":"2015-08-25 13:40:43.000000000","message":"does exist?","commit_id":"6e5808116c7dcd8dcd8a0429ec21d6e021d75fda"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"2f2b275c5ed6488ed03698fb9659497892f44943","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Id43abc814d29e059e6cd8da70719c54b8e15d6dc"},{"line_number":14,"context_line":"Closes-Bug: 1461740"},{"line_number":15,"context_line":"Related-Bug: 1461740"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"fa1b9901_d889d0cb","line":15,"updated":"2015-08-25 13:40:43.000000000","message":"Bug ids are the same, I think it is a mistake?","commit_id":"6e5808116c7dcd8dcd8a0429ec21d6e021d75fda"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"9b695b24b15efa671178116c610b6c4effe7dc31","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Id43abc814d29e059e6cd8da70719c54b8e15d6dc"},{"line_number":14,"context_line":"Closes-Bug: 1461740"},{"line_number":15,"context_line":"Related-Bug: 1461740"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"da20952f_a973d24c","line":15,"updated":"2015-08-27 02:50:49.000000000","message":"Remove this line","commit_id":"85efcf5e7e9867088a16b3ab9c28f72292fd708a"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"dfecae9e769000994be00622e33e8a0c685fd83e","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Id43abc814d29e059e6cd8da70719c54b8e15d6dc"},{"line_number":14,"context_line":"Closes-Bug: 1461740"},{"line_number":15,"context_line":"Related-Bug: 1461740"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"da20952f_10bc88b9","line":15,"updated":"2015-09-01 11:10:38.000000000","message":"remove related-bug","commit_id":"a145bd79fc900276e68f9edf226e296a634361fb"}],"nova/tests/unit/virt/libvirt/test_imagebackend.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"81d9feb56592a580eea42f1d9416fc3862451809","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        self.stubs.Set(os.path, \u0027exists\u0027, lambda _: True)"},{"line_number":97,"context_line":"        self.stubs.Set(os, \u0027access\u0027, lambda p, w: True)"},{"line_number":98,"context_line":"        self.stubs.Set(os, \u0027open\u0027, lambda p, w: mock.MagicMock())"},{"line_number":99,"context_line":"        self.stubs.Set(os, \u0027close\u0027, lambda p: mock.MagicMock())"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        # Call twice to verify testing fallocate is only called once."},{"line_number":102,"context_line":"        image.cache(fake_fetch, self.TEMPLATE_PATH, self.SIZE)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_ed3da72b","line":99,"updated":"2015-07-15 19:57:38.000000000","message":"instead of just mocking out open and close you should actually check those things are getting called, especially if the point of this is that the open happens first. Honestly, it seems like it would be better if we could redirect the fallocate to a real file so it\u0027s actual behavior could be seen, not just all mocked.","commit_id":"760aa0839bd8741da00c0fd65323aa1715f237a2"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"9b695b24b15efa671178116c610b6c4effe7dc31","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        self.stubs.Set(os.path, \u0027exists\u0027, lambda _: True)"},{"line_number":111,"context_line":"        self.stubs.Set(os, \u0027access\u0027, lambda p, w: True)"},{"line_number":112,"context_line":"        self.stubs.Set(os, \u0027open\u0027, lambda p, w: mock.MagicMock())"},{"line_number":113,"context_line":"        self.stubs.Set(os, \u0027close\u0027, lambda p: mock.MagicMock())"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        # Call twice to verify testing fallocate is only called once."},{"line_number":116,"context_line":"        image.cache(fake_fetch, self.TEMPLATE_PATH, self.SIZE)"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_e979ca30","line":113,"updated":"2015-08-27 02:50:49.000000000","message":"I think you need to restructure your test somewhat to verify that open() and close() are in fact called.","commit_id":"85efcf5e7e9867088a16b3ab9c28f72292fd708a"},{"author":{"_account_id":6522,"name":"Sean McCully","email":"sean_mccully@yahoo.com","username":"sean-mccully"},"change_message_id":"d0e5e7f79af657ffc9d3fd28ab0b9a65b4c7c57e","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        self.stubs.Set(os.path, \u0027exists\u0027, lambda _: True)"},{"line_number":111,"context_line":"        self.stubs.Set(os, \u0027access\u0027, lambda p, w: True)"},{"line_number":112,"context_line":"        self.stubs.Set(os, \u0027open\u0027, lambda p, w: mock.MagicMock())"},{"line_number":113,"context_line":"        self.stubs.Set(os, \u0027close\u0027, lambda p: mock.MagicMock())"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        # Call twice to verify testing fallocate is only called once."},{"line_number":116,"context_line":"        image.cache(fake_fetch, self.TEMPLATE_PATH, self.SIZE)"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_f5899ccb","line":113,"in_reply_to":"da20952f_e979ca30","updated":"2015-08-27 06:19:02.000000000","message":"Not unless you can elaborate on an adequate reason open/close wouldn\u0027t be called that justify a unit test(s).","commit_id":"85efcf5e7e9867088a16b3ab9c28f72292fd708a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"13e388953b43d6425332bd648361c65e5d385801","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        self.stubs.Set(os.path, \u0027exists\u0027, lambda _: True)"},{"line_number":111,"context_line":"        self.stubs.Set(os, \u0027access\u0027, lambda p, w: True)"},{"line_number":112,"context_line":"        self.stubs.Set(os, \u0027open\u0027, lambda p, w: mock.MagicMock())"},{"line_number":113,"context_line":"        self.stubs.Set(os, \u0027close\u0027, lambda p: mock.MagicMock())"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        # Call twice to verify testing fallocate is only called once."}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_e5ffaf32","line":112,"updated":"2015-09-14 11:57:27.000000000","message":"please don\u0027t mix mock in with the older stub library.","commit_id":"6397f01c4f5e9321ec99da42ef91d61b7313e26b"}],"nova/virt/libvirt/imagebackend.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"13e388953b43d6425332bd648361c65e5d385801","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            _out, err \u003d utils.trycmd(\u0027fallocate\u0027, \u0027-n\u0027, \u0027-l\u0027, \u00271\u0027,"},{"line_number":253,"context_line":"                                     self.path + \u0027.fallocate_test\u0027)"},{"line_number":254,"context_line":"            fileutils.delete_if_exists(self.path + \u0027.fallocate_test\u0027)"},{"line_number":255,"context_line":"            can_fallocate \u003d not err"},{"line_number":256,"context_line":"            self.__class__.can_fallocate \u003d can_fallocate"},{"line_number":257,"context_line":"            if not can_fallocate:"},{"line_number":258,"context_line":"                LOG.error(_LE(\u0027Unable to preallocate image at path: \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_050c2393","side":"PARENT","line":255,"updated":"2015-09-14 11:57:27.000000000","message":"why did you change this logic so its harder to read?\n\nits also an unrelated change, so shouldn\u0027t really be part of this patch, even if we did want it.","commit_id":"bd3b5a62b468c1f35895a73fb3a7da85c01321da"},{"author":{"_account_id":6522,"name":"Sean McCully","email":"sean_mccully@yahoo.com","username":"sean-mccully"},"change_message_id":"bf94dded3b350657507fb7bf360784ac5d5172eb","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            _out, err \u003d utils.trycmd(\u0027fallocate\u0027, \u0027-n\u0027, \u0027-l\u0027, \u00271\u0027,"},{"line_number":253,"context_line":"                                     self.path + \u0027.fallocate_test\u0027)"},{"line_number":254,"context_line":"            fileutils.delete_if_exists(self.path + \u0027.fallocate_test\u0027)"},{"line_number":255,"context_line":"            can_fallocate \u003d not err"},{"line_number":256,"context_line":"            self.__class__.can_fallocate \u003d can_fallocate"},{"line_number":257,"context_line":"            if not can_fallocate:"},{"line_number":258,"context_line":"                LOG.error(_LE(\u0027Unable to preallocate image at path: \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_34395b42","side":"PARENT","line":255,"in_reply_to":"ba15a1d1_050c2393","updated":"2015-09-21 05:14:14.000000000","message":"Not sure how it is harder to read now, since removing the code duplication makes this significantly shorter and easier to comprhend.","commit_id":"bd3b5a62b468c1f35895a73fb3a7da85c01321da"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"13e388953b43d6425332bd648361c65e5d385801","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        can_fallocate \u003d getattr(self.__class__, \u0027can_fallocate\u0027, None)"},{"line_number":251,"context_line":"        if can_fallocate is None:"},{"line_number":252,"context_line":"            fallocate_test \u003d self.path + \u0027.fallocate_test\u0027"},{"line_number":253,"context_line":"            _fd \u003d os.open(fallocate_test, os.O_CREAT | os.O_RDONLY)"},{"line_number":254,"context_line":"            os.close(_fd)"},{"line_number":255,"context_line":"            _out, err \u003d utils.trycmd(\u0027fallocate\u0027, \u0027-n\u0027, \u0027-l\u0027, \u00271\u0027,"},{"line_number":256,"context_line":"                                     fallocate_test)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_a57e97ac","line":253,"updated":"2015-09-14 11:57:27.000000000","message":"why can\u0027t we just use with open(fallicate_test, \u0027r\u0027) as file or similar?","commit_id":"6397f01c4f5e9321ec99da42ef91d61b7313e26b"},{"author":{"_account_id":6522,"name":"Sean McCully","email":"sean_mccully@yahoo.com","username":"sean-mccully"},"change_message_id":"bf94dded3b350657507fb7bf360784ac5d5172eb","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        can_fallocate \u003d getattr(self.__class__, \u0027can_fallocate\u0027, None)"},{"line_number":251,"context_line":"        if can_fallocate is None:"},{"line_number":252,"context_line":"            fallocate_test \u003d self.path + \u0027.fallocate_test\u0027"},{"line_number":253,"context_line":"            _fd \u003d os.open(fallocate_test, os.O_CREAT | os.O_RDONLY)"},{"line_number":254,"context_line":"            os.close(_fd)"},{"line_number":255,"context_line":"            _out, err \u003d utils.trycmd(\u0027fallocate\u0027, \u0027-n\u0027, \u0027-l\u0027, \u00271\u0027,"},{"line_number":256,"context_line":"                                     fallocate_test)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_5403af76","line":253,"in_reply_to":"ba15a1d1_a57e97ac","updated":"2015-09-21 05:14:14.000000000","message":"os.open is what is used throughout the rest of this module","commit_id":"6397f01c4f5e9321ec99da42ef91d61b7313e26b"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"b227841362292c2927c4490fc94c53c76e6762db","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        \"\"\""},{"line_number":250,"context_line":"        can_fallocate \u003d getattr(self.__class__, \u0027can_fallocate\u0027, None)"},{"line_number":251,"context_line":"        if can_fallocate is None:"},{"line_number":252,"context_line":"            fallocate_test \u003d self.path + \u0027.fallocate_test\u0027"},{"line_number":253,"context_line":"            _fd \u003d os.open(fallocate_test, os.O_CREAT | os.O_RDONLY)"},{"line_number":254,"context_line":"            os.close(_fd)"},{"line_number":255,"context_line":"            _out, err \u003d utils.trycmd(\u0027fallocate\u0027, \u0027-n\u0027, \u0027-l\u0027, \u00271\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a740942_b45d687b","line":252,"updated":"2015-12-09 11:57:44.000000000","message":"We should use https://docs.python.org/2/library/tempfile.html just in case we manage to race on this method. Line 251 is insufficient to prevent a race.","commit_id":"f3178baecb763c08e59479d610be2d04ec7b2424"},{"author":{"_account_id":6522,"name":"Sean McCully","email":"sean_mccully@yahoo.com","username":"sean-mccully"},"change_message_id":"c073e39c11ee4861237a5c6ceef9011bffa9d203","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        \"\"\""},{"line_number":250,"context_line":"        can_fallocate \u003d getattr(self.__class__, \u0027can_fallocate\u0027, None)"},{"line_number":251,"context_line":"        if can_fallocate is None:"},{"line_number":252,"context_line":"            fallocate_test \u003d self.path + \u0027.fallocate_test\u0027"},{"line_number":253,"context_line":"            _fd \u003d os.open(fallocate_test, os.O_CREAT | os.O_RDONLY)"},{"line_number":254,"context_line":"            os.close(_fd)"},{"line_number":255,"context_line":"            _out, err \u003d utils.trycmd(\u0027fallocate\u0027, \u0027-n\u0027, \u0027-l\u0027, \u00271\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a7b0d38_596057cf","line":252,"in_reply_to":"7a740942_b45d687b","updated":"2015-12-29 00:20:18.000000000","message":"I don\u0027t think a race is possible here, attribute can_fallocate is set after first run and nova-compute shouldn\u0027t be running multiple processes.","commit_id":"f3178baecb763c08e59479d610be2d04ec7b2424"}]}
