)]}'
{"test/unit/common/ring/test_ring.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"1c236f2275c724e9171ed8e475e49b7efd2bc3c2","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"            def hook_json_encode(self, input_dict):"},{"line_number":145,"context_line":"                if old_style:"},{"line_number":146,"context_line":"                    input_dict.pop(\u0027byteorder\u0027)"},{"line_number":147,"context_line":"                return orig_func(self, input_dict)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"            with mock.patch.object(sys, \u0027byteorder\u0027, byteorder), \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_9219a425","line":146,"updated":"2016-11-30 00:39:35.000000000","message":"this is a little janky, i think if you look at the container broker tests the pattern we normally follow is to make a PreByteOrderRingData subclass that inlines the implementation from HEAD^2 to overwrite the save method","commit_id":"149d09d3867da7004f663ceaa2dfbcca83cdc32f"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"505ca65067cffe36e267b0b9ab204038833620c6","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"            def hook_json_encode(self, input_dict):"},{"line_number":145,"context_line":"                if old_style:"},{"line_number":146,"context_line":"                    input_dict.pop(\u0027byteorder\u0027)"},{"line_number":147,"context_line":"                return orig_func(self, input_dict)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"            with mock.patch.object(sys, \u0027byteorder\u0027, byteorder), \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_00037577","line":146,"in_reply_to":"5a74a57a_9219a425","updated":"2016-11-30 05:29:10.000000000","message":"Alright, I also thought this is a bit janky. Will try the pattern to make subclass for testing.","commit_id":"149d09d3867da7004f663ceaa2dfbcca83cdc32f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"1c236f2275c724e9171ed8e475e49b7efd2bc3c2","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                    [{\u0027id\u0027: 0, \u0027zone\u0027: 0}, {\u0027id\u0027: 1, \u0027zone\u0027: 1}], 30)"},{"line_number":154,"context_line":"                rds.save(ring_fname)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        # no swappness (sanity)"},{"line_number":157,"context_line":"        prepare_ring()"},{"line_number":158,"context_line":"        actual_ring_data \u003d ring.RingData.load(ring_fname)"},{"line_number":159,"context_line":"        self.assert_ring_data_equal(expected_ring_data, actual_ring_data)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_d2db1c20","line":156,"updated":"2016-11-30 00:39:35.000000000","message":"I think it\u0027d be worth it to refactor the setup above into a full helper and make all of these scenarios their own test methods\n\n    def test_byteorder_saved_in_ring_data ...\n    def test_saved_ring_swapped_byteorder ...\n    def test_legacy_ring_format_assumes_same_byteorder ...","commit_id":"149d09d3867da7004f663ceaa2dfbcca83cdc32f"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"505ca65067cffe36e267b0b9ab204038833620c6","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                    [{\u0027id\u0027: 0, \u0027zone\u0027: 0}, {\u0027id\u0027: 1, \u0027zone\u0027: 1}], 30)"},{"line_number":154,"context_line":"                rds.save(ring_fname)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        # no swappness (sanity)"},{"line_number":157,"context_line":"        prepare_ring()"},{"line_number":158,"context_line":"        actual_ring_data \u003d ring.RingData.load(ring_fname)"},{"line_number":159,"context_line":"        self.assert_ring_data_equal(expected_ring_data, actual_ring_data)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_002a95e7","line":156,"in_reply_to":"5a74a57a_d2db1c20","updated":"2016-11-30 05:29:10.000000000","message":"k, with the try above, I\u0027ll address this too.","commit_id":"149d09d3867da7004f663ceaa2dfbcca83cdc32f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"1c236f2275c724e9171ed8e475e49b7efd2bc3c2","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        gz_file.read(6)"},{"line_number":189,"context_line":"        # sanity, byteorder is not in old_style ring"},{"line_number":190,"context_line":"        ring_dict \u003d ring.RingData.deserialize_v1(gz_file)"},{"line_number":191,"context_line":"        self.assertNotIn(\u0027byteorder\u0027, ring_dict)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        # but if you have an older-styled ring built at different endianness"},{"line_number":194,"context_line":"        # machine, it sitll get failed"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_929e0462","line":191,"updated":"2016-11-30 00:39:35.000000000","message":"this seems like as reasonable test.","commit_id":"149d09d3867da7004f663ceaa2dfbcca83cdc32f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"1c236f2275c724e9171ed8e475e49b7efd2bc3c2","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        self.assertEqual(expected_ring_data._part_shift,"},{"line_number":199,"context_line":"                         actual_ring_data._part_shift)"},{"line_number":200,"context_line":"        self.assertNotEqual(expected_ring_data._replica2part2dev_id,"},{"line_number":201,"context_line":"                            actual_ring_data._replica2part2dev_id)"},{"line_number":202,"context_line":"        # read gzip file and first magic 6 bytes"},{"line_number":203,"context_line":"        gz_file \u003d GzipFile(ring_fname, \u0027rb\u0027)"},{"line_number":204,"context_line":"        gz_file.read(6)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_d25ebc78","line":201,"updated":"2016-11-30 00:39:35.000000000","message":"And here we\u0027re showing that a legacy swapped ring can not be deployed on upgraded code until it\u0027s been re-written from the builder?\n\ni think this is fine of course...","commit_id":"149d09d3867da7004f663ceaa2dfbcca83cdc32f"}]}
