)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"3d93e3d575ef79d120fe71a0682b5daf9a1190d8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"bc72312e_de1324aa","updated":"2023-11-08 21:48:19.000000000","message":"it was hard to find this bug at first because the be_cowardly short-circut on any device change.  I needed rebalance to\n\n1) not improve dispersion\n2) not make any changes to devices\n3) still have infinately bad balance\n4) actually make progress (this was the easy part!)\n\n... the s-r-b test is what I came up with!\n\nthe fix was just the first thing I had in mind before I even started writing the test - once I saw where I wanted be_cowardly False I already felt it was stupid my problem ring\u0027s balance was \"only\" 100 while i was staring at code that would \"do the right thing\" if balance would just admit it was terrible enough!","commit_id":"fc14b4527d4ae275f5bdb8c867103ffd02fe632b"}],"swift/common/ring/builder.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2699c8d65b9cdea89b42c989aab83786977ef3c7","unresolved":true,"context_lines":[{"line_number":805,"context_line":"            else:"},{"line_number":806,"context_line":"                balance \u003d 100.0 * dev[\u0027parts\u0027] / ("},{"line_number":807,"context_line":"                    dev[\u0027weight\u0027] * weight_of_one_part) - 100.0"},{"line_number":808,"context_line":"                if not (-100.0 \u003c balance \u003c\u003d 100.0):"},{"line_number":809,"context_line":"                    # If a device has weight, but no partitions, then its under"},{"line_number":810,"context_line":"                    # assignment is considered \"infinity\" and therefore always"},{"line_number":811,"context_line":"                    # the worst possible. We show MAX_BALANCE for convenience."}],"source_content_type":"text/x-python","patch_set":1,"id":"c3908125_4340fb17","line":808,"updated":"2023-11-09 00:03:06.000000000","message":"It\u0027s really not obvious to me why we have this inclusive on one side but not the other.","commit_id":"fc14b4527d4ae275f5bdb8c867103ffd02fe632b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2699c8d65b9cdea89b42c989aab83786977ef3c7","unresolved":true,"context_lines":[{"line_number":808,"context_line":"                if not (-100.0 \u003c balance \u003c\u003d 100.0):"},{"line_number":809,"context_line":"                    # If a device has weight, but no partitions, then its under"},{"line_number":810,"context_line":"                    # assignment is considered \"infinity\" and therefore always"},{"line_number":811,"context_line":"                    # the worst possible. We show MAX_BALANCE for convenience."},{"line_number":812,"context_line":"                    balance \u003d MAX_BALANCE"},{"line_number":813,"context_line":"            balance_per_dev[dev[\u0027id\u0027]] \u003d balance"},{"line_number":814,"context_line":"        return balance_per_dev"}],"source_content_type":"text/x-python","patch_set":1,"id":"7b800198_93b38be1","line":811,"range":{"start_line":811,"start_character":42,"end_line":811,"end_character":78},"updated":"2023-11-09 00:03:06.000000000","message":"This is about more than just display or convenience, though, yeah?","commit_id":"fc14b4527d4ae275f5bdb8c867103ffd02fe632b"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"3d93e3d575ef79d120fe71a0682b5daf9a1190d8","unresolved":true,"context_lines":[{"line_number":809,"context_line":"                    # If a device has weight, but no partitions, then its under"},{"line_number":810,"context_line":"                    # assignment is considered \"infinity\" and therefore always"},{"line_number":811,"context_line":"                    # the worst possible. We show MAX_BALANCE for convenience."},{"line_number":812,"context_line":"                    balance \u003d MAX_BALANCE"},{"line_number":813,"context_line":"            balance_per_dev[dev[\u0027id\u0027]] \u003d balance"},{"line_number":814,"context_line":"        return balance_per_dev"},{"line_number":815,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"f304b03c_d387649a","line":812,"updated":"2023-11-08 21:48:19.000000000","message":"there\u0027s definately more than one way to address the bug - you could argue it\u0027s actually over in cli.ringbuilder\n\n... but the SAME bug is in another code base that does ring rebalance BECAUSE it copied s-r-b and saw it saying \"999 is how you spell infinity bad\", and a device with weight that doesn\u0027t have any parts is bad enough to blow out the whole ring\u0027s balance calculation, so ALL tools doing ring management need to know to save that rebalance and keep chugging along.","commit_id":"fc14b4527d4ae275f5bdb8c867103ffd02fe632b"}],"test/unit/cli/test_ringbuilder.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"3d93e3d575ef79d120fe71a0682b5daf9a1190d8","unresolved":true,"context_lines":[{"line_number":2480,"context_line":"                self.assertGreaterEqual(bpz[z], 100)"},{"line_number":2481,"context_line":"            else:"},{"line_number":2482,"context_line":"                self.assertLess(bpz[z], 75.0)"},{"line_number":2483,"context_line":"        self.assertEqual(rb.version, old_version + 2, out)"},{"line_number":2484,"context_line":"        self.assertEqual(rb.dispersion, 0.0)"},{"line_number":2485,"context_line":"        self.assertGreaterEqual(rb.get_balance(), 100.0)"},{"line_number":2486,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"d1f60c3d_9a11ed5b","line":2483,"updated":"2023-11-08 21:48:19.000000000","message":"before:\n\n\t\tbpz \u003d balance_per_zone(rb)\n\t\tfor z in range(num_zones_start + num_zones_add):\n\t\t    if z \u003d\u003d 0:\n\t\t\tself.assertGreaterEqual(bpz[z], 100)\n\t\t    else:\n\t\t\tself.assertLess(bpz[z], 75.0)\n\t\u003e       self.assertEqual(rb.version, old_version + 2, out)\n\tE       AssertionError: 245 !\u003d 246 : Cowardly refusing to save rebalance as it did not change at least 1%.\n\n\tswift/test/unit/cli/test_ringbuilder.py:2483: AssertionError\n\t\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d short test summary info \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\tFAILED swift/test/unit/cli/test_ringbuilder.py::TestCommands::test_rebalance_saves_balance_progress - AssertionError: 245 !\u003d 246 : Cowardly refusing to save rebalance as it did not change at least 1%.\n\t\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d 1 failed in 1.97s \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nafter:\n\n\tvagrant@saio:~$ pytest swift/test/unit/cli/test_ringbuilder.py::TestCommands::test_rebalance_saves_balance_progress\n\t\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d test session starts \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\tplatform linux -- Python 3.8.10, pytest-7.4.2, pluggy-1.3.0 -- /usr/bin/python\n\tcachedir: .pytest_cache\n\trootdir: /home/vagrant/swift\n\tconfigfile: tox.ini\n\tplugins: cov-4.1.0\n\tcollected 1 item                                                                                                                                                                      \n\n\tswift/test/unit/cli/test_ringbuilder.py::TestCommands::test_rebalance_saves_balance_progress PASSED                                                                             [100%]\n\n\t\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d 1 passed in 2.08s \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","commit_id":"fc14b4527d4ae275f5bdb8c867103ffd02fe632b"}],"test/unit/common/ring/test_builder.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2699c8d65b9cdea89b42c989aab83786977ef3c7","unresolved":true,"context_lines":[{"line_number":2996,"context_line":"        rb.rebalance()"},{"line_number":2997,"context_line":"        # since we have to move \u003e1 replicanth it takes multiple rebalance"},{"line_number":2998,"context_line":"        for i in range(2):"},{"line_number":2999,"context_line":"            self.assertEqual(100.0, rb.get_balance())"},{"line_number":3000,"context_line":"            rb.pretend_min_part_hours_passed()"},{"line_number":3001,"context_line":"            rb.rebalance()"},{"line_number":3002,"context_line":"        self.assertEqual(0.0, rb.get_balance())"}],"source_content_type":"text/x-python","patch_set":1,"id":"d3112e52_bb5a35b3","line":2999,"updated":"2023-11-09 00:03:06.000000000","message":"This guy failed in the gate:\n```\n\u003e           self.assertEqual(100.0, rb.get_balance())\nE           AssertionError: 100.0 !\u003d 999.99\n\ntest/unit/common/ring/test_builder.py:2999: AssertionError\n```","commit_id":"fc14b4527d4ae275f5bdb8c867103ffd02fe632b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2699c8d65b9cdea89b42c989aab83786977ef3c7","unresolved":true,"context_lines":[{"line_number":3721,"context_line":"        # but in reality, these devices having such disparate weights"},{"line_number":3722,"context_line":"        # leads to a *terrible* balance even w/o overload!"},{"line_number":3723,"context_line":"        rb.rebalance(seed\u003d9)"},{"line_number":3724,"context_line":"        self.assertEqual(rb.get_balance(), 1308.2031249999998)"},{"line_number":3725,"context_line":""},{"line_number":3726,"context_line":"        # even though part assignment is pretty reasonable"},{"line_number":3727,"context_line":"        expected \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"6b437d4e_30a1f922","line":3724,"updated":"2023-11-09 00:03:06.000000000","message":"This\u0027ll need to change.","commit_id":"fc14b4527d4ae275f5bdb8c867103ffd02fe632b"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"3d93e3d575ef79d120fe71a0682b5daf9a1190d8","unresolved":true,"context_lines":[{"line_number":4670,"context_line":"            1: -25,"},{"line_number":4671,"context_line":"        }"},{"line_number":4672,"context_line":"        self.assertEqual(expected, rb._build_balance_per_dev())"},{"line_number":4673,"context_line":"        self.assertEqual(50.0, rb.get_balance())"},{"line_number":4674,"context_line":""},{"line_number":4675,"context_line":""},{"line_number":4676,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"6997783e_2e9a5e33","line":4673,"updated":"2023-11-08 21:48:19.000000000","message":"i\u0027m not sure how many of these are useful or relevant - i was still looking for the bug when i wrote these.","commit_id":"fc14b4527d4ae275f5bdb8c867103ffd02fe632b"}]}
