)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"9d175e4b542719ac8c76834dead084fd04f3ed5c","unresolved":false,"context_lines":[{"line_number":13,"context_line":"because it thinks the client ID has changed"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"When reload_allocations() is called, DHCP agent parses the leases file,"},{"line_number":16,"context_line":"the hosts file, and gets the list all the ports in the network from DB,"},{"line_number":17,"context_line":"computing 3 different sets. The set from leases file (v4_leases) will have"},{"line_number":18,"context_line":"some client ID. The set from port DB and hosts file will have None."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9fdfeff1_ad2ec1f7","line":16,"range":{"start_line":16,"start_character":29,"end_line":16,"end_character":33},"updated":"2019-01-23 09:36:40.000000000","message":"list of all","commit_id":"9872664b74af8717f4b5f667f9e3f7945a556028"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"9d175e4b542719ac8c76834dead084fd04f3ed5c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"In fact, there is a Windows bug which prevents you from even turning this off:"},{"line_number":35,"context_line":"https://support.microsoft.com/en-us/help/3004537/dhcp-client-always-includes-option-61-in-the-dhcp-request-in-windows-8"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Linux VMs dont have this on by default, but they may be enabled"},{"line_number":38,"context_line":"in some templates unknown to users."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Change-Id: I8021f740bd78e654915337bd3287b45b2c422e95"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9fdfeff1_4d35d545","line":37,"range":{"start_line":37,"start_character":10,"end_line":37,"end_character":14},"updated":"2019-01-23 09:36:40.000000000","message":"don\u0027t","commit_id":"9872664b74af8717f4b5f667f9e3f7945a556028"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"9d175e4b542719ac8c76834dead084fd04f3ed5c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"In fact, there is a Windows bug which prevents you from even turning this off:"},{"line_number":35,"context_line":"https://support.microsoft.com/en-us/help/3004537/dhcp-client-always-includes-option-61-in-the-dhcp-request-in-windows-8"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Linux VMs dont have this on by default, but they may be enabled"},{"line_number":38,"context_line":"in some templates unknown to users."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Change-Id: I8021f740bd78e654915337bd3287b45b2c422e95"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9fdfeff1_0d3fcd25","line":37,"range":{"start_line":37,"start_character":44,"end_line":37,"end_character":48},"updated":"2019-01-23 09:36:40.000000000","message":"it","commit_id":"9872664b74af8717f4b5f667f9e3f7945a556028"}],"neutron/agent/linux/dhcp.py":[{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"278f6a7c75403bda7c98e8b9507eac6c6f8e733e","unresolved":false,"context_lines":[{"line_number":852,"context_line":""},{"line_number":853,"context_line":"        # If an entry is in the leases or host file(s), but doesn\u0027t have"},{"line_number":854,"context_line":"        # a fixed IP on a corresponding neutron port, consider it stale."},{"line_number":855,"context_line":"        # If an entry is in the leases or host file(s), but doesn\u0027t have"},{"line_number":856,"context_line":"        # a fixed IP on a corresponding neutron port, consider it stale."},{"line_number":857,"context_line":"        lease_differences \u003d (v4_leases | old_leases) - new_leases"},{"line_number":858,"context_line":"        if not lease_differences:"},{"line_number":859,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_882b6b30","line":856,"range":{"start_line":855,"start_character":0,"end_line":856,"end_character":72},"updated":"2018-12-06 15:10:55.000000000","message":"The comment was duplicated accidentally.","commit_id":"97dc9084934f610ee1276d72a2b86c4bf378e7be"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"278f6a7c75403bda7c98e8b9507eac6c6f8e733e","unresolved":false,"context_lines":[{"line_number":872,"context_line":"                    continue"},{"line_number":873,"context_line":""},{"line_number":874,"context_line":"            # Add entry to entries_to_release"},{"line_number":875,"context_line":"            entries_to_release.append(entry)"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"        entries_to_release \u003d set(entries_to_release)"},{"line_number":878,"context_line":"        # Try DHCP_RELEASE_TRIES times to release a lease, re-reading the"},{"line_number":879,"context_line":"        # file each time to see if it\u0027s still there.  We loop +1 times to"},{"line_number":880,"context_line":"        # check the lease file one last time before logging any remaining"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_e8de9f3b","line":877,"range":{"start_line":875,"start_character":0,"end_line":877,"end_character":52},"updated":"2018-12-06 15:10:55.000000000","message":"What\u0027s the point of makings this a list first then converting it to a set? Why couldn\u0027t it be treated as a set in the first place?","commit_id":"97dc9084934f610ee1276d72a2b86c4bf378e7be"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"537f27cb037f46b41e40f628d5a30168d176b367","unresolved":false,"context_lines":[{"line_number":866,"context_line":"            if entry[2]:"},{"line_number":867,"context_line":"                entry_no_client_id \u003d (entry[0], entry[1], None)"},{"line_number":868,"context_line":"                if ((entry_no_client_id in old_leases and"},{"line_number":869,"context_line":"                    entry_no_client_id in new_leases)):"},{"line_number":870,"context_line":"                    continue"},{"line_number":871,"context_line":""},{"line_number":872,"context_line":"            # Add entry to entries_to_release"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_f2918845","line":869,"updated":"2018-12-08 01:30:07.000000000","message":"You have a double set of parens here, and the indentation could throw a pep8 error.\n\nAnd did you determine you need to check both old and new leases?","commit_id":"2fc3f98036edd045748d16b1ab83e3c8e0f71b06"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"537f27cb037f46b41e40f628d5a30168d176b367","unresolved":false,"context_lines":[{"line_number":870,"context_line":"                    continue"},{"line_number":871,"context_line":""},{"line_number":872,"context_line":"            # Add entry to entries_to_release"},{"line_number":873,"context_line":"            entries_to_release.add(entry)"},{"line_number":874,"context_line":""},{"line_number":875,"context_line":"        # Try DHCP_RELEASE_TRIES times to release a lease, re-reading the"},{"line_number":876,"context_line":"        # file each time to see if it\u0027s still there.  We loop +1 times to"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_92c5b440","line":873,"updated":"2018-12-08 01:30:07.000000000","message":"So if there are 1000 differences, we are going to copy each one by one to the new set.  It would be better to add to a set in the above if():\n\n    entries_with_no_client_id \u003d set()\n    for entry in entries_to_release:\n        ...\n        if ...\n            entries_with_no_client_id.add(entry)\n\nthen do a:\n\n    entries_to_release -\u003d entries_with_no_client_id\n\nThen you could leave L855-56 alone as well.","commit_id":"2fc3f98036edd045748d16b1ab83e3c8e0f71b06"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"e50fd1333d29c24decbbecea822771515d7c757a","unresolved":false,"context_lines":[{"line_number":862,"context_line":"        # Release the lease only if client ID is set in port DB and a mismatch"},{"line_number":863,"context_line":"        # Otherwise the lease is released when other ports are deleted/updated"},{"line_number":864,"context_line":"        entries_with_no_client_id \u003d set()"},{"line_number":865,"context_line":"        for entry in entries_to_release:"},{"line_number":866,"context_line":"            # If client ID is set"},{"line_number":867,"context_line":"            if entry[2]:"},{"line_number":868,"context_line":"                entry_no_client_id \u003d (entry[0], entry[1], None)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_2e0b3e7d","line":865,"range":{"start_line":865,"start_character":8,"end_line":865,"end_character":40},"updated":"2019-01-29 20:22:49.000000000","message":"nit: for better readability, it is better to name the three items in the entry:\n\n  for ip, mac, client_id in entries_to_release:\n      ...","commit_id":"0a9323937f4dcad7ff26a353933afe9c539b1438"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f13b7654d0539badae52d965045bc82e8a9f28ab","unresolved":false,"context_lines":[{"line_number":862,"context_line":"        # Release the lease only if client ID is set in port DB and a mismatch"},{"line_number":863,"context_line":"        # Otherwise the lease is released when other ports are deleted/updated"},{"line_number":864,"context_line":"        entries_with_no_client_id \u003d set()"},{"line_number":865,"context_line":"        for entry in entries_to_release:"},{"line_number":866,"context_line":"            # If client ID is set"},{"line_number":867,"context_line":"            if entry[2]:"},{"line_number":868,"context_line":"                entry_no_client_id \u003d (entry[0], entry[1], None)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_a932c8f0","line":865,"range":{"start_line":865,"start_character":8,"end_line":865,"end_character":40},"in_reply_to":"9fdfeff1_2e0b3e7d","updated":"2019-01-29 20:50:37.000000000","message":"Yes, agreed.  If it fails CI I\u0027ll update it.","commit_id":"0a9323937f4dcad7ff26a353933afe9c539b1438"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"1103f2ea3fea6a4a69361f7723a630f9f18d018b","unresolved":false,"context_lines":[{"line_number":862,"context_line":"        # Release the lease only if client ID is set in port DB and a mismatch"},{"line_number":863,"context_line":"        # Otherwise the lease is released when other ports are deleted/updated"},{"line_number":864,"context_line":"        entries_with_no_client_id \u003d set()"},{"line_number":865,"context_line":"        for entry in entries_to_release:"},{"line_number":866,"context_line":"            # If client ID is set"},{"line_number":867,"context_line":"            if entry[2]:"},{"line_number":868,"context_line":"                entry_no_client_id \u003d (entry[0], entry[1], None)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_c6e4c40f","line":865,"range":{"start_line":865,"start_character":8,"end_line":865,"end_character":40},"in_reply_to":"9fdfeff1_a932c8f0","updated":"2019-01-30 23:22:27.000000000","message":"It failed CI so I\u0027ll change this, which will make it match L880 too.","commit_id":"0a9323937f4dcad7ff26a353933afe9c539b1438"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"db328072e114293811d87a6a891e9ca9ca96ae6d","unresolved":false,"context_lines":[{"line_number":867,"context_line":"                if (entry_no_client_id in old_leases and"},{"line_number":868,"context_line":"                        entry_no_client_id in new_leases):"},{"line_number":869,"context_line":"                    entries_with_no_client_id.add((ip, mac, client_id))"},{"line_number":870,"context_line":"        entries_to_release -\u003d entries_with_no_client_id"},{"line_number":871,"context_line":""},{"line_number":872,"context_line":"        # Try DHCP_RELEASE_TRIES times to release a lease, re-reading the"},{"line_number":873,"context_line":"        # file each time to see if it\u0027s still there.  We loop +1 times to"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_2692fdfd","line":870,"updated":"2019-03-05 15:15:56.000000000","message":"I\u0027ll +1 this patch, but are we considering something more readable to be implemented? Let me explain myself. (ip, mac) tuple is enough to identify a lease. We can build a dict with:\n  entries_to_release \u003d {(ip, mac): client_id, ...}\n\nThis dict should be built in this order:\n- \"entries_to_release\" adds \"old_leases\"\n- \"entries_to_release\" updates \"v4_leases\". All (ip, mac) with a new client_id will be updated.\n- \"entries_to_release\" removes \"new_leases\".\n\nIMO, this sequence is more clear and we still have, per entry, the tuple (ip, mac, client_id).","commit_id":"f2111e035424bf714099966ad724e9a4bd604c18"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"18c884ee4b010a062e97bc55f9de3394fcdd2b6b","unresolved":false,"context_lines":[{"line_number":867,"context_line":"                if (entry_no_client_id in old_leases and"},{"line_number":868,"context_line":"                        entry_no_client_id in new_leases):"},{"line_number":869,"context_line":"                    entries_with_no_client_id.add((ip, mac, client_id))"},{"line_number":870,"context_line":"        entries_to_release -\u003d entries_with_no_client_id"},{"line_number":871,"context_line":""},{"line_number":872,"context_line":"        # Try DHCP_RELEASE_TRIES times to release a lease, re-reading the"},{"line_number":873,"context_line":"        # file each time to see if it\u0027s still there.  We loop +1 times to"}],"source_content_type":"text/x-python","patch_set":7,"id":"5fc1f717_41a3a250","line":870,"in_reply_to":"9fdfeff1_2692fdfd","updated":"2019-03-05 20:58:16.000000000","message":"Rodolfo - yes, that\u0027s probably more readable, but would require more extensive changes than just here, i\u0027ll work on it on the side as a follow-on.","commit_id":"f2111e035424bf714099966ad724e9a4bd604c18"}]}
