)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"238dc81d23aaae69efcb1d59ac44e3a74995d3cb","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add functional test for get_all_with_shared()"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There are some tests in AllocationCandidatesTestCase to"},{"line_number":10,"context_line":"validate get_by_requests() in candidates. But there is no"},{"line_number":11,"context_line":"functional test of get_all_with_shared, which is more primitive"},{"line_number":12,"context_line":"SQL API."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This patch adds test_get_all_with_shared function in"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"ff82abbf_3829619a","line":11,"range":{"start_line":10,"start_character":45,"end_line":11,"end_character":38},"updated":"2017-11-24 07:42:49.000000000","message":"The functional test of \u0027get_all_with_shared\u0027 already exists.\nShould it be modified?\n\nhttps://github.com/openstack/nova/blob/22a790ef45b0523e8cf2ed97d14e050431c90fd9/nova/tests/functional/db/test_resource_provider.py#L2190-L2491","commit_id":"d873b64b98de93dccf938ebccb7e7308980193de"}],"nova/tests/functional/db/test_allocation_candidates.py":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"fa731026a56c171626848bf1ee55f98c6e27f059","unresolved":false,"context_lines":[{"line_number":346,"context_line":"        # we should get"},{"line_number":347,"context_line":"        # expected \u003d [cn1, cn3, cn5, cn6, cn8]"},{"line_number":348,"context_line":"        # actual is"},{"line_number":349,"context_line":"        expected \u003d [cn3, cn5, ss5, cn8]"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        self.assertEqual(set(rp.id for rp in expected), set(res))"},{"line_number":352,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_c6496431","line":349,"range":{"start_line":349,"start_character":25,"end_line":349,"end_character":33},"updated":"2017-11-26 22:51:13.000000000","message":"This is the root cause of the duplicate bug, that is, later cn5 takes ss5 for its mate, while ss5 takes cn5 for its mate, and both come to candidates.\n\nIt is great to check this here in get_all_with_shared(), but so far I have no idea. I at first thought \u0027grouping by agg_id\u0027 and \u0027picking only one rp representing the aggregate\u0027 would help us, but it risks deleting candidates if there are more than three rps in the aggregate.\n\nSo far the best idea in my head is just to avoid duplication just before response, after they choose their mates, by doing like list(set(result)).\n\nThoughts?","commit_id":"d873b64b98de93dccf938ebccb7e7308980193de"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"fa731026a56c171626848bf1ee55f98c6e27f059","unresolved":false,"context_lines":[{"line_number":1419,"context_line":"            )]"},{"line_number":1420,"context_line":"        )"},{"line_number":1421,"context_line":""},{"line_number":1422,"context_line":"        # TODO(gibi): Bug https://bugs.launchpad.net/nova/+bug/1730730"},{"line_number":1423,"context_line":"        # We expect only one candidate where IPV4_ADDRESS comes from ss1 and"},{"line_number":1424,"context_line":"        # DISK_GB comes from ss2"},{"line_number":1425,"context_line":"        # expected \u003d ["},{"line_number":1426,"context_line":"        #     [(\u0027ss1\u0027, fields.ResourceClass.IPV4_ADDRESS, 2),"},{"line_number":1427,"context_line":"        #      (\u0027ss2\u0027, fields.ResourceClass.DISK_GB, 1500)]"},{"line_number":1428,"context_line":"        # ]"},{"line_number":1429,"context_line":"        # But we are getting the same candidate twice"},{"line_number":1430,"context_line":"        expected \u003d ["},{"line_number":1431,"context_line":"            # this is what we expect but then"},{"line_number":1432,"context_line":"            [(\u0027ss1\u0027, fields.ResourceClass.IPV4_ADDRESS, 2),"},{"line_number":1433,"context_line":"             (\u0027ss2\u0027, fields.ResourceClass.DISK_GB, 1500)],"},{"line_number":1434,"context_line":"            # we get the same thing again"},{"line_number":1435,"context_line":"            [(\u0027ss1\u0027, fields.ResourceClass.IPV4_ADDRESS, 2),"},{"line_number":1436,"context_line":"             (\u0027ss2\u0027, fields.ResourceClass.DISK_GB, 1500)],"},{"line_number":1437,"context_line":"        ]"},{"line_number":1438,"context_line":"        self._validate_allocation_requests(expected, alloc_cands)"},{"line_number":1439,"context_line":""},{"line_number":1440,"context_line":"    def test_all_sharing_providers_no_rc_overlap_more_classes(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_26eb7013","line":1437,"range":{"start_line":1422,"start_character":0,"end_line":1437,"end_character":9},"updated":"2017-11-26 22:51:13.000000000","message":"Not sure what the duplicate bug is? It is this.","commit_id":"d873b64b98de93dccf938ebccb7e7308980193de"}]}
