)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"dd8b56d8ac4fef796bebef45f93ead33840d6035","unresolved":false,"context_lines":[{"line_number":9,"context_line":"While doing other work, I noticed that _check_traits_for_alloc_request"},{"line_number":10,"context_line":"traverses a list of summaries multiple time to find the \"right one\"."},{"line_number":11,"context_line":"This is a classic case of a list being the wrong data structure for"},{"line_number":12,"context_line":"the job."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The method now takes a summaries which is a dict keyed by uuid and"},{"line_number":15,"context_line":"uses the uuid it has from the AllocationResourceRequests to find"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bfb3d3c7_aaed128c","line":12,"updated":"2019-05-24 05:52:32.000000000","message":"Good catch.","commit_id":"078e69d97cc13ce7d13cdfacbb6ae4381d9d78b5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"17adf4f432b812da8673552cc70a4232c16c250f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Avoid traversing summaries in _check_traits_for_alloc_request"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"While doing other work, I noticed that _check_traits_for_alloc_request"},{"line_number":10,"context_line":"traverses a list of summaries multiple time to find the \"right one\"."},{"line_number":11,"context_line":"This is a classic case of a list being the wrong data structure for"},{"line_number":12,"context_line":"the job."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bfb3d3c7_e0d9b456","line":10,"range":{"start_line":10,"start_character":39,"end_line":10,"end_character":43},"updated":"2019-05-28 20:12:06.000000000","message":"times","commit_id":"346509f8fa2f0410aba5db07f75577454502dd28"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"17adf4f432b812da8673552cc70a4232c16c250f","unresolved":false,"context_lines":[{"line_number":11,"context_line":"This is a classic case of a list being the wrong data structure for"},{"line_number":12,"context_line":"the job."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Instead use the request resource resource provider\u0027s id to key into"},{"line_number":15,"context_line":"the summaries dict directly to get the relevant summary."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Then, since we know the summary has the trait info we need, we don\u0027t"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bfb3d3c7_60e5c408","line":14,"range":{"start_line":14,"start_character":16,"end_line":14,"end_character":50},"updated":"2019-05-28 20:12:06.000000000","message":"?","commit_id":"346509f8fa2f0410aba5db07f75577454502dd28"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"bbc524ae78cb8de980fc1bed3d87637239ce68fe","unresolved":false,"context_lines":[{"line_number":11,"context_line":"This is a classic case of a list being the wrong data structure for"},{"line_number":12,"context_line":"the job."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Instead use the request resource resource provider\u0027s id to key into"},{"line_number":15,"context_line":"the summaries dict directly to get the relevant summary."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Then, since we know the summary has the trait info we need, we don\u0027t"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bfb3d3c7_72802f47","line":14,"range":{"start_line":14,"start_character":16,"end_line":14,"end_character":50},"in_reply_to":"bfb3d3c7_60e5c408","updated":"2019-05-29 08:35:33.000000000","message":"I should have used the explicit class name: AllocationRequestResource","commit_id":"346509f8fa2f0410aba5db07f75577454502dd28"}],"placement/objects/allocation_candidate.py":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"dd8b56d8ac4fef796bebef45f93ead33840d6035","unresolved":false,"context_lines":[{"line_number":638,"context_line":"    all_prov_ids \u003d []"},{"line_number":639,"context_line":"    all_traits \u003d set()"},{"line_number":640,"context_line":"    for res_req in res_requests:"},{"line_number":641,"context_line":"        rp_uuid \u003d res_req.resource_provider.uuid"},{"line_number":642,"context_line":"        rp_summary \u003d summaries[rp_uuid]"},{"line_number":643,"context_line":"        rp_id \u003d rp_summary.resource_provider.id"},{"line_number":644,"context_line":"        rp_traits \u003d set([trait.name for trait in rp_summary.traits])"},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"        # Check if there are forbidden_traits"}],"source_content_type":"text/x-python","patch_set":2,"id":"bfb3d3c7_ca1ac67b","line":643,"range":{"start_line":641,"start_character":0,"end_line":643,"end_character":47},"updated":"2019-05-24 05:52:32.000000000","message":"Why not just\n\n   rp_id \u003d res_req.resource_provider.id\n\nhere, instead of having the new uuid keyed summary?","commit_id":"078e69d97cc13ce7d13cdfacbb6ae4381d9d78b5"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"6417d7ecccbd4872914af24d02ec2eb3c1aee143","unresolved":false,"context_lines":[{"line_number":638,"context_line":"    all_prov_ids \u003d []"},{"line_number":639,"context_line":"    all_traits \u003d set()"},{"line_number":640,"context_line":"    for res_req in res_requests:"},{"line_number":641,"context_line":"        rp_uuid \u003d res_req.resource_provider.uuid"},{"line_number":642,"context_line":"        rp_summary \u003d summaries[rp_uuid]"},{"line_number":643,"context_line":"        rp_id \u003d rp_summary.resource_provider.id"},{"line_number":644,"context_line":"        rp_traits \u003d set([trait.name for trait in rp_summary.traits])"},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"        # Check if there are forbidden_traits"}],"source_content_type":"text/x-python","patch_set":2,"id":"bfb3d3c7_9b6adfea","line":643,"range":{"start_line":641,"start_character":0,"end_line":643,"end_character":47},"in_reply_to":"bfb3d3c7_ca1ac67b","updated":"2019-05-24 08:10:18.000000000","message":"Ah yeah, good catch, I had rolled to this solution because I was also using parent_provider_uuid in similar code in https://review.opendev.org/#/c/657510/5/placement/objects/allocation_candidate.py but in this change we don\u0027t need that. When pulling back to the more limited solution I lost sight of what I was really trying to do.\n\nAlso, I struggle to find may way around all these auxiliary objects and remember what info each of them has.\n\nBut yeah, much better idea. I\u0027ll do that.","commit_id":"078e69d97cc13ce7d13cdfacbb6ae4381d9d78b5"}]}
