)]}'
{"swift/obj/replicator.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"91870c38a74ba19f5b93fcfe35ebb7467325c008","unresolved":false,"context_lines":[{"line_number":824,"context_line":"                if (partition.startswith(\u0027auditor_status_\u0027) and"},{"line_number":825,"context_line":"                        partition.endswith(\u0027.json\u0027)):"},{"line_number":826,"context_line":"                    # ignore auditor status files"},{"line_number":827,"context_line":"                    continue"},{"line_number":828,"context_line":""},{"line_number":829,"context_line":"                part_nodes \u003d None"},{"line_number":830,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_53448f19","line":827,"updated":"2019-04-03 15:06:13.000000000","message":"I think this is going to be a problem... sometimes `partition` isn\u0027t going to be something we can int()\n\n... essentially the above will TypeError sometimes :\u0027(\n\n\tdiff --git a/test/unit/obj/test_replicator.py b/test/unit/obj/test_replicator.py\n\tindex 60d18b9b6..c5afecf04 100644\n\t--- a/test/unit/obj/test_replicator.py\n\t+++ b/test/unit/obj/test_replicator.py\n\t@@ -536,7 +536,7 @@ class TestObjectReplicator(unittest.TestCase):\n\t\t     self._write_disk_data(\u0027sdd\u0027, with_json\u003dTrue)\n\t\t _create_test_rings(self.testdir, devs)\n\t \n\t-        self.replicator.collect_jobs()\n\t+        self.replicator.collect_jobs(override_partitions\u003d[1])\n\t\t self.assertEqual(self.replicator.total_stats.failure, 0)\n\t \n\t     @mock.patch(\u0027swift.obj.replicator.random.shuffle\u0027, side_effect\u003dlambda l: l)","commit_id":"da16157a17d7563897b55f8d76ec3da2a46690bb"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"676936eabe40a8d282712d3c9c25791deea888a4","unresolved":false,"context_lines":[{"line_number":830,"context_line":"                try:"},{"line_number":831,"context_line":"                    job_path \u003d join(obj_path, partition)"},{"line_number":832,"context_line":"                    part_nodes \u003d policy.object_ring.get_part_nodes("},{"line_number":833,"context_line":"                        int(partition))"},{"line_number":834,"context_line":"                    nodes \u003d [node for node in part_nodes"},{"line_number":835,"context_line":"                             if node[\u0027id\u0027] !\u003d local_dev[\u0027id\u0027]]"},{"line_number":836,"context_line":"                    jobs.append("}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_d3acfeef","line":833,"updated":"2019-04-03 15:12:11.000000000","message":"Err... ValueError\n\n    ValueError: invalid literal for int() with base 10: \u0027auditor_status_ZBF.json\u0027\n\nI think just need to lift the type conversion up to the top of the loop along with the \"if not part_nodes\" failure counting and and the auditor_status handling\n\n... or something.","commit_id":"da16157a17d7563897b55f8d76ec3da2a46690bb"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"694e22264a7d6c47b571c5bfe4b9f39caa04d766","unresolved":false,"context_lines":[{"line_number":818,"context_line":"                continue"},{"line_number":819,"context_line":"            for partition in os.listdir(obj_path):"},{"line_number":820,"context_line":"                if (override_partitions is not None and partition.isdigit()"},{"line_number":821,"context_line":"                        and int(partition) not in override_partitions):"},{"line_number":822,"context_line":"                    continue"},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"                if (partition.startswith(\u0027auditor_status_\u0027) and"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_e3c46d94","line":821,"updated":"2019-04-09 19:32:26.000000000","message":"the isdigit short-circut before the TypeError is pretty subtle.\n\nI would be a lot happier with a test, I\u0027ll purpose that in a follow-up.","commit_id":"08d59ebcd4fa39085d069125fffc5af75e4d735b"}],"test/unit/obj/test_replicator.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"91870c38a74ba19f5b93fcfe35ebb7467325c008","unresolved":false,"context_lines":[{"line_number":1404,"context_line":"        self.replicator.replicate(override_partitions\u003d[9])"},{"line_number":1405,"context_line":"        self.assertTrue(os.access(part_path, os.F_OK))"},{"line_number":1406,"context_line":"        self.replicator.replicate(override_devices\u003d[\u0027sda\u0027],"},{"line_number":1407,"context_line":"                                  override_partitions\u003d[1])"},{"line_number":1408,"context_line":"        self.assertFalse(os.access(part_path, os.F_OK))"},{"line_number":1409,"context_line":""},{"line_number":1410,"context_line":"    def test_delete_policy_override_params(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_534fafbd","line":1407,"updated":"2019-04-03 15:06:13.000000000","message":"This is correct as best I can tell from my digging into the plumbing of the command line parsing options.\n\nhttps://github.com/openstack/swift/blob/master/test/unit/common/test_utils.py#L3455\n\nEssentially replicate will only get called with override_partitions from run_once - but it\u0027s always converted to a list of ints by parse_override_options - either in run_once directly for inline daemon strategy, or previously in get_worker_args\n\ndevices/override_devices is more complicated - since it\u0027s also passed from run_forever - but we don\u0027t have any type conversion going on with those strings","commit_id":"da16157a17d7563897b55f8d76ec3da2a46690bb"}]}
