)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"be70aa4a45017748892e82031c0692d2f6e9208d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"04a7afcb_6ed8c469","updated":"2021-12-13 20:00:42.000000000","message":"Thanks! This looks great. Please update API docs and also add a release note using reno to describe the change (I think this would go in the \"feature\" section.)","commit_id":"8b647c4312b6d2c9c57a3427d367797c70e02d33"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"6f69040ef5d5c847aff51d2715a757bdc8e0963c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"c96b8475_b3b9250d","in_reply_to":"04a7afcb_6ed8c469","updated":"2021-12-16 17:47:53.000000000","message":"Done","commit_id":"8b647c4312b6d2c9c57a3427d367797c70e02d33"},{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"63d750d863971f46f5dc1298951b5de57a5039e6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"d179f48c_ef556680","updated":"2021-12-20 23:35:33.000000000","message":"LGTM!","commit_id":"58e05c30af2f380ce8efa17fa732011ce889c034"},{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"5b8617a818ae54022c508286d99bb4fe79c9092b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"e3dfed3a_66e7e2c4","updated":"2022-01-27 16:16:29.000000000","message":"Thanks!","commit_id":"bf38e16ec3807536a421ba9d6249171742f1b960"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"c8cd593651e2eb27a860cf1adbb482eeea97ed54","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"86ea3fcc_31380b81","updated":"2022-01-27 14:41:27.000000000","message":"Works great, thanks!","commit_id":"bf38e16ec3807536a421ba9d6249171742f1b960"}],"blazar/db/sqlalchemy/utils.py":[{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"168f1aab5ac153680befac5cf8fe2ebe8e05f9e1","unresolved":true,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    allocations \u003d defaultdict(list)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    for row in allocations_query.all():"},{"line_number":147,"context_line":"        allocations[row[0]].append(row[1])"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    for r in reservations:"}],"source_content_type":"text/x-python","patch_set":2,"id":"146ae179_44aa4276","line":146,"updated":"2021-09-08 17:57:54.000000000","message":"Is there support for groupby in sqlalchemy? It seems that this is effectively what the code is doing, and it may be more obvious if it\u0027s done in the DB query itself.","commit_id":"cdffdb9300d89c4c3854cdf1987149676e318c27"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"bdfb8c3eca7a7ee7de3df0f570ce3973b10f1ea2","unresolved":true,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    allocations \u003d defaultdict(list)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    for row in allocations_query.all():"},{"line_number":147,"context_line":"        allocations[row[0]].append(row[1])"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    for r in reservations:"}],"source_content_type":"text/x-python","patch_set":2,"id":"dcf456b4_023846fa","line":146,"in_reply_to":"146ae179_44aa4276","updated":"2021-09-15 22:05:28.000000000","message":"Can you clarify what you mean? There is sqlalchemy support for group_by, but I do not believe there is a way to group by reservation ID that results in a list of compute host ids. I\u0027ve added some comments here to make things more clear.","commit_id":"cdffdb9300d89c4c3854cdf1987149676e318c27"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"ac01cf116382980e05198a2fa9dea921e8e0aaf0","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    allocations \u003d defaultdict(list)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    for row in allocations_query.all():"},{"line_number":147,"context_line":"        allocations[row[0]].append(row[1])"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    for r in reservations:"}],"source_content_type":"text/x-python","patch_set":2,"id":"20234115_66a40dfb","line":146,"in_reply_to":"dcf456b4_023846fa","updated":"2022-01-27 14:41:55.000000000","message":"Done","commit_id":"cdffdb9300d89c4c3854cdf1987149676e318c27"}],"blazar/plugins/instances/instance_plugin.py":[{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"168f1aab5ac153680befac5cf8fe2ebe8e05f9e1","unresolved":true,"context_lines":[{"line_number":160,"context_line":"          \u0027host-id\u0027: ["},{"line_number":161,"context_line":"                       {"},{"line_number":162,"context_line":"                         \u0027lease_id\u0027: lease_id,"},{"line_number":163,"context_line":"                         \u0027id\u0027: reservation_id"},{"line_number":164,"context_line":"                       },"},{"line_number":165,"context_line":"                     ]"},{"line_number":166,"context_line":"        }."}],"source_content_type":"text/x-python","patch_set":2,"id":"e60edb97_359ba4af","line":163,"updated":"2021-09-08 17:57:54.000000000","message":"These docs should probably be updated similar to host_plugin.py","commit_id":"cdffdb9300d89c4c3854cdf1987149676e318c27"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"bdfb8c3eca7a7ee7de3df0f570ce3973b10f1ea2","unresolved":false,"context_lines":[{"line_number":160,"context_line":"          \u0027host-id\u0027: ["},{"line_number":161,"context_line":"                       {"},{"line_number":162,"context_line":"                         \u0027lease_id\u0027: lease_id,"},{"line_number":163,"context_line":"                         \u0027id\u0027: reservation_id"},{"line_number":164,"context_line":"                       },"},{"line_number":165,"context_line":"                     ]"},{"line_number":166,"context_line":"        }."}],"source_content_type":"text/x-python","patch_set":2,"id":"8fa87a1a_32aa0768","line":163,"in_reply_to":"e60edb97_359ba4af","updated":"2021-09-15 22:05:28.000000000","message":"Done","commit_id":"cdffdb9300d89c4c3854cdf1987149676e318c27"},{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"168f1aab5ac153680befac5cf8fe2ebe8e05f9e1","unresolved":true,"context_lines":[{"line_number":172,"context_line":"        # to get the allocation information"},{"line_number":173,"context_line":"        reservations \u003d db_utils.get_reservation_allocations_by_host_ids("},{"line_number":174,"context_line":"            hosts, start, end, lease_id, reservation_id)"},{"line_number":175,"context_line":"        host_allocs \u003d {h: [] for h in hosts}"},{"line_number":176,"context_line":"        attributes_to_copy \u003d [\"id\", \"lease_id\", \"start_date\", \"end_date\"]"},{"line_number":177,"context_line":"        for reservation in reservations:"},{"line_number":178,"context_line":"            for host_id in reservation[\u0027host_ids\u0027]:"}],"source_content_type":"text/x-python","patch_set":2,"id":"d59493f4_b549ea3a","line":175,"updated":"2021-09-08 17:57:54.000000000","message":"Why not keep using defaultdict?","commit_id":"cdffdb9300d89c4c3854cdf1987149676e318c27"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"bdfb8c3eca7a7ee7de3df0f570ce3973b10f1ea2","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        # to get the allocation information"},{"line_number":173,"context_line":"        reservations \u003d db_utils.get_reservation_allocations_by_host_ids("},{"line_number":174,"context_line":"            hosts, start, end, lease_id, reservation_id)"},{"line_number":175,"context_line":"        host_allocs \u003d {h: [] for h in hosts}"},{"line_number":176,"context_line":"        attributes_to_copy \u003d [\"id\", \"lease_id\", \"start_date\", \"end_date\"]"},{"line_number":177,"context_line":"        for reservation in reservations:"},{"line_number":178,"context_line":"            for host_id in reservation[\u0027host_ids\u0027]:"}],"source_content_type":"text/x-python","patch_set":2,"id":"72bd66b2_743acb2e","line":175,"in_reply_to":"d59493f4_b549ea3a","updated":"2021-09-15 22:05:28.000000000","message":"The hosts appearing in reservations will be a subset of hosts, and so if we want to include all hosts on the calendar, defaultdict cannot be used.","commit_id":"cdffdb9300d89c4c3854cdf1987149676e318c27"},{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"168f1aab5ac153680befac5cf8fe2ebe8e05f9e1","unresolved":true,"context_lines":[{"line_number":176,"context_line":"        attributes_to_copy \u003d [\"id\", \"lease_id\", \"start_date\", \"end_date\"]"},{"line_number":177,"context_line":"        for reservation in reservations:"},{"line_number":178,"context_line":"            for host_id in reservation[\u0027host_ids\u0027]:"},{"line_number":179,"context_line":"                if host_id in host_allocs.keys():"},{"line_number":180,"context_line":"                    host_allocs[host_id].append({"},{"line_number":181,"context_line":"                        k: v for k, v in reservation.items()"},{"line_number":182,"context_line":"                        if k in attributes_to_copy})"}],"source_content_type":"text/x-python","patch_set":2,"id":"bd25c264_cec0b14d","line":179,"updated":"2021-09-08 17:57:54.000000000","message":"You don\u0027t need this check if using defaultdict","commit_id":"cdffdb9300d89c4c3854cdf1987149676e318c27"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"bdfb8c3eca7a7ee7de3df0f570ce3973b10f1ea2","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        attributes_to_copy \u003d [\"id\", \"lease_id\", \"start_date\", \"end_date\"]"},{"line_number":177,"context_line":"        for reservation in reservations:"},{"line_number":178,"context_line":"            for host_id in reservation[\u0027host_ids\u0027]:"},{"line_number":179,"context_line":"                if host_id in host_allocs.keys():"},{"line_number":180,"context_line":"                    host_allocs[host_id].append({"},{"line_number":181,"context_line":"                        k: v for k, v in reservation.items()"},{"line_number":182,"context_line":"                        if k in attributes_to_copy})"}],"source_content_type":"text/x-python","patch_set":2,"id":"55620ca8_d3916c86","line":179,"in_reply_to":"bd25c264_cec0b14d","updated":"2021-09-15 22:05:28.000000000","message":"see above","commit_id":"cdffdb9300d89c4c3854cdf1987149676e318c27"}]}
