)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"32211a9cc52033597219817d4615634265f98d94","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"3c21d59e_b08f6d58","updated":"2022-10-11 13:31:57.000000000","message":"keep trying different things ash!","commit_id":"cc764b4faea4bba5827cf130e441492e66cc6a7f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ff247b9e710bf79342cf683764aa5b6d28fd68be","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"76646e81_75b3c8b4","updated":"2022-10-14 19:56:22.000000000","message":"i could live with this\n\n... but i\u0027m not 100% sure I understand what all the test thinks it\u0027s doing, and I would advocate for supporting the legacy get_ip_port signature (but modifying it to make headers optional)","commit_id":"50d46e3d91ac34f66044488fd9568b4a2b47d55a"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"2b53a87ff52734d83d55011839e8cf51ddf9a034","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":6,"id":"ece7aac1_a10ca8cc","updated":"2022-10-14 23:13:27.000000000","message":"There are some errors with Zuul func tests, \"Container PUT failed\", maybe it\u0027s caused by this patch?","commit_id":"a015001ec7207dbb5ce24d2e783e1cacd6e7b8bb"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"c8ef49d1_ffb48604","in_reply_to":"ece7aac1_a10ca8cc","updated":"2023-02-03 20:51:17.000000000","message":"Ack","commit_id":"a015001ec7207dbb5ce24d2e783e1cacd6e7b8bb"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"1e0b745dbe66b4f0d93bdb9fd24462ea2c093343","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"c8121e46_62d8696b","updated":"2022-10-17 15:32:47.000000000","message":"i hope it\u0027s not TOO subtle - for me supporting the legacy interface/interaction and skipping all the chrun in direct/internal client was a win","commit_id":"fe4e2d9011aa8d05fdb0ca1da1dad1645594bc98"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0f165379bdba5089fd3df99321c1a98cac5e57f0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"3028a36f_3732f5e0","updated":"2022-10-17 17:47:46.000000000","message":"so we\u0027ll see what the gate thinks here","commit_id":"57c2f9481d293262ce94b8686c9927f6cc2421ed"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"566a2aa121fc3295b1abf8c76dfb31e822d438e0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"3ad42821_8b4de036","updated":"2022-10-18 14:14:37.000000000","message":"The probe tests are failing because we are mutating node dicts ! 😭\n\nThe probe tests filter node dicts here [1]. But once a node dict (e.g. one of the brain nodes) has been used for a direct client operation than it will be mutated to have use_replication key, which will cause it to mismatch an excluded node i.e. excluded nodes are being included!\n\nI think this is a warning sign that mutating node dicts may not be such a great idea (as opposed to replacing them with annotated versions somewhere early in the request handling path).\n\nAlso, I had a go at a more direct unit test, see https://review.opendev.org/c/openstack/swift/+/861761\n\n[1] https://github.com/openstack/swift/blob/a53270a15a97c4e4d1c384a1cd10fef0a36af9b5/test/probe/common.py#L349-L368 ","commit_id":"e0848435462e5d4cb4f31fa11af1deb888b45731"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"461a119178ad38226dae571ab09c946c285a3e0c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"9a98050c_da219ae3","updated":"2022-10-17 19:57:25.000000000","message":"these test changes don\u0027t really make sense to me yet - i\u0027ll keep looking at it while we\u0027re waiting to see what zuul says.","commit_id":"e0848435462e5d4cb4f31fa11af1deb888b45731"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"962af8a4af3820813369d012c6bee6b071f94c6c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"527b85f7_55531f24","in_reply_to":"00c8629e_999365ec","updated":"2023-02-13 18:57:59.000000000","message":"Done","commit_id":"e0848435462e5d4cb4f31fa11af1deb888b45731"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":13,"id":"00c8629e_999365ec","in_reply_to":"3ad42821_8b4de036","updated":"2023-02-03 20:51:17.000000000","message":"I had to fix up a whole set of unit tests to address most of the failures we got for mutating dicts, fixing up the probe tests is still pending","commit_id":"e0848435462e5d4cb4f31fa11af1deb888b45731"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"b22fe041_c18208d2","in_reply_to":"9a98050c_da219ae3","updated":"2023-02-03 20:51:17.000000000","message":"Your right, I am trying to figure out a way to test the logging for app\u0027s error limiting and exception_occured, but maybe I will have to add all these methods to the FakeSwift() class as well","commit_id":"e0848435462e5d4cb4f31fa11af1deb888b45731"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f4f7da7fdaab6df3cba727caf1270b66fd01437","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"3388281d_310fb482","updated":"2022-11-02 20:59:16.000000000","message":"@Ash lots of comments - please ask if anything needs clarifying 😊\n\nmy suggestions in this patch: https://review.opendev.org/c/openstack/swift/+/863438","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0eaf6f101f83ffc5c273761a48715b64515df861","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":26,"id":"10e3e896_27669baf","updated":"2022-11-18 16:58:31.000000000","message":"Thanks for updating the patch! looking good but there\u0027s still some cleanup needed in the unit tests, and a few comments unaddressed from patchset 22","commit_id":"fc7275d940b7149f92bae9efa63c63be15a4524b"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"69f1e89937b67db22ff8a221de61e8caa66e8f72","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":27,"id":"4b5a8255_7c48d81b","updated":"2022-11-28 23:50:43.000000000","message":"This looks like it was more work then originally expected.. welcome to the world of Swift development :P\n\nThis is looking really good. Needing to pass the request around feels like what I\u0027ve been doing with tracing, where you need access to the request environment, so I feel your pain.. but on the plus side, if we want to instrument the node iters in the future it\u0027ll be much easier now :P\n\nAnyway, got some comments inline. Mostly if we can pass an iter into the nodes iter which might have already been annotated with use_replication then we don\u0027t wont to loose that. Ie, I think we should annotate only if we need to.","commit_id":"14b1f87bb7da1905a4a91723e8f3bbc907710336"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"add7c332ffb427d8d94b8c95de88ea589c5cde70","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"9d146968_a20ec01f","updated":"2023-01-16 01:26:50.000000000","message":"There seems to be some valid questions and comments inline, I don\u0027t think we can land this until they are discussed at least.","commit_id":"f8e17d7859ba82804c588dcfc7b5a1dffdd3bd65"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4dd7e18b5c25d5bae38f6c27cfced1282cfc4bb4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"3afe4210_a064c341","updated":"2023-01-20 15:27:03.000000000","message":"i\u0027m not sure there\u0027s much more worth holding this up - maybe we can just make progress and keep going","commit_id":"f8e17d7859ba82804c588dcfc7b5a1dffdd3bd65"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0064a07dfecd7d39eaa9a019f810d27f1803dcce","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":32,"id":"94ccd165_dc944ddd","updated":"2023-02-07 10:33:06.000000000","message":"-1 because request is still optional in inter_nodes_local_first, but if not set a ValueError will be raised","commit_id":"c5b77a0bef1bdce703eb0f36582ca34edf380548"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"962af8a4af3820813369d012c6bee6b071f94c6c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":32,"id":"5eb4e6e0_bd421553","in_reply_to":"94ccd165_dc944ddd","updated":"2023-02-13 18:57:59.000000000","message":"Accounted for.","commit_id":"c5b77a0bef1bdce703eb0f36582ca34edf380548"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2357595cc336f4152a3e980eeb71597bea45281e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":35,"id":"0f49ea39_f425ef2b","updated":"2023-02-08 11:14:16.000000000","message":"sorry, I didn\u0027t notice the arg order in calls on last review. I think it worth getting the caller order lined up with the method signature and not relying on arg naming.","commit_id":"1da86d5d79e00c486128cbc4fe911cb4f562f7ca"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"fc9628ff5bf617f5401de3acfa4f72d80677d70a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":37,"id":"d8ed2b94_5963e62a","updated":"2023-02-09 20:53:18.000000000","message":"recheck\n\nthe probe test failure seems unrelated and I could not reproduce locally","commit_id":"27763441486a472491e2421463a7ba8ceb02be84"}],"swift/common/direct_client.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ff247b9e710bf79342cf683764aa5b6d28fd68be","unresolved":true,"context_lines":[{"line_number":594,"context_line":"        headers \u003d {}"},{"line_number":595,"context_line":""},{"line_number":596,"context_line":"    headers.setdefault(USE_REPLICATION_NETWORK_HEADER, \u0027true\u0027)"},{"line_number":597,"context_line":"    ip, port \u003d get_ip_port(node, headers)"},{"line_number":598,"context_line":"    path \u003d \u0027/%s\u0027 % \u0027-\u0027.join(suffixes)"},{"line_number":599,"context_line":"    with Timeout(conn_timeout):"},{"line_number":600,"context_line":"        conn \u003d http_connect(ip, port,"}],"source_content_type":"text/x-python","patch_set":4,"id":"00424357_86826738","side":"PARENT","line":597,"updated":"2022-10-14 19:56:22.000000000","message":"i think it\u0027d be a huge win to keep this signature working","commit_id":"3ad39cd0b83a7f70d6c559c7b0e68a2e625be179"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"8f74713d24070a4cbce3106043f3d795f95f1914","unresolved":false,"context_lines":[{"line_number":594,"context_line":"        headers \u003d {}"},{"line_number":595,"context_line":""},{"line_number":596,"context_line":"    headers.setdefault(USE_REPLICATION_NETWORK_HEADER, \u0027true\u0027)"},{"line_number":597,"context_line":"    ip, port \u003d get_ip_port(node, headers)"},{"line_number":598,"context_line":"    path \u003d \u0027/%s\u0027 % \u0027-\u0027.join(suffixes)"},{"line_number":599,"context_line":"    with Timeout(conn_timeout):"},{"line_number":600,"context_line":"        conn \u003d http_connect(ip, port,"}],"source_content_type":"text/x-python","patch_set":4,"id":"0dd92678_bc93ded8","side":"PARENT","line":597,"in_reply_to":"00424357_86826738","updated":"2022-10-14 21:54:06.000000000","message":"Ack","commit_id":"3ad39cd0b83a7f70d6c559c7b0e68a2e625be179"}],"swift/common/request_helpers.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ff247b9e710bf79342cf683764aa5b6d28fd68be","unresolved":true,"context_lines":[{"line_number":505,"context_line":"                        yield pending_req, pending_etag, pending_size"},{"line_number":506,"context_line":""},{"line_number":507,"context_line":"                    to_yield \u003d seg_dict[\u0027raw_data\u0027]["},{"line_number":508,"context_line":"                               seg_dict[\u0027first_byte\u0027]:seg_dict[\u0027last_byte\u0027] + 1]"},{"line_number":509,"context_line":"                    yield to_yield, None, len(seg_dict[\u0027raw_data\u0027])"},{"line_number":510,"context_line":"                    pending_req \u003d pending_etag \u003d pending_size \u003d None"},{"line_number":511,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"6c708d06_f44b091e","line":508,"updated":"2022-10-14 19:56:22.000000000","message":"my flake8 did NOT like this change\n\nswift/common/request_helpers.py|508 col 32| E126 continuation line over-indented for hanging indent\n||                                seg_dict[\u0027first_byte\u0027]:seg_dict[\u0027last_byte\u0027] + 1]\n||                                ^_","commit_id":"50d46e3d91ac34f66044488fd9568b4a2b47d55a"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"8f74713d24070a4cbce3106043f3d795f95f1914","unresolved":false,"context_lines":[{"line_number":505,"context_line":"                        yield pending_req, pending_etag, pending_size"},{"line_number":506,"context_line":""},{"line_number":507,"context_line":"                    to_yield \u003d seg_dict[\u0027raw_data\u0027]["},{"line_number":508,"context_line":"                               seg_dict[\u0027first_byte\u0027]:seg_dict[\u0027last_byte\u0027] + 1]"},{"line_number":509,"context_line":"                    yield to_yield, None, len(seg_dict[\u0027raw_data\u0027])"},{"line_number":510,"context_line":"                    pending_req \u003d pending_etag \u003d pending_size \u003d None"},{"line_number":511,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"acf3a2cc_c348a8d7","line":508,"in_reply_to":"6c708d06_f44b091e","updated":"2022-10-14 21:54:06.000000000","message":"Done","commit_id":"50d46e3d91ac34f66044488fd9568b4a2b47d55a"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ff247b9e710bf79342cf683764aa5b6d28fd68be","unresolved":true,"context_lines":[{"line_number":607,"context_line":"                raise SegmentError(msg)"},{"line_number":608,"context_line":"            elif ((seg_etag and (seg_resp.etag !\u003d seg_etag)) or"},{"line_number":609,"context_line":"                  (seg_size and (seg_resp.content_length !\u003d seg_size) and"},{"line_number":610,"context_line":"                   not seg_req.range)):"},{"line_number":611,"context_line":"                # The content-length check is for security reasons. Seems"},{"line_number":612,"context_line":"                # possible that an attacker could upload a \u003e1mb object and"},{"line_number":613,"context_line":"                # then replace it with a much smaller object with same"}],"source_content_type":"text/x-python","patch_set":4,"id":"54f29281_1773ce15","line":610,"updated":"2022-10-14 19:56:22.000000000","message":"these are fine, but normally you want to minimize this stuff because it distacts reviewers from the \"meat\" of the change.","commit_id":"50d46e3d91ac34f66044488fd9568b4a2b47d55a"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"8f74713d24070a4cbce3106043f3d795f95f1914","unresolved":false,"context_lines":[{"line_number":607,"context_line":"                raise SegmentError(msg)"},{"line_number":608,"context_line":"            elif ((seg_etag and (seg_resp.etag !\u003d seg_etag)) or"},{"line_number":609,"context_line":"                  (seg_size and (seg_resp.content_length !\u003d seg_size) and"},{"line_number":610,"context_line":"                   not seg_req.range)):"},{"line_number":611,"context_line":"                # The content-length check is for security reasons. Seems"},{"line_number":612,"context_line":"                # possible that an attacker could upload a \u003e1mb object and"},{"line_number":613,"context_line":"                # then replace it with a much smaller object with same"}],"source_content_type":"text/x-python","patch_set":4,"id":"564efbab_59e55e63","line":610,"in_reply_to":"54f29281_1773ce15","updated":"2022-10-14 21:54:06.000000000","message":"Done","commit_id":"50d46e3d91ac34f66044488fd9568b4a2b47d55a"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"719bbb9661d09a3f1dce902d3d5620a0bfef1cfc","unresolved":true,"context_lines":[{"line_number":901,"context_line":"    req.headers[hdr] \u003d csv_append(req.headers.get(hdr), name)"},{"line_number":902,"context_line":""},{"line_number":903,"context_line":""},{"line_number":904,"context_line":"def get_annotated_node(node, headers\u003dNone):"},{"line_number":905,"context_line":"    \"\"\""},{"line_number":906,"context_line":"    Helper function to set use_replication dict value for a node by looking up"},{"line_number":907,"context_line":"    the header value for x-backend-use-replication-network."}],"source_content_type":"text/x-python","patch_set":22,"id":"7ae14ca8_f527af75","line":904,"updated":"2022-11-02 21:00:44.000000000","message":"oh, I meant to say - although I suggested this helper, I now prefer what it is the follow on patch https://review.opendev.org/c/openstack/swift/+/863438","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0eaf6f101f83ffc5c273761a48715b64515df861","unresolved":false,"context_lines":[{"line_number":901,"context_line":"    req.headers[hdr] \u003d csv_append(req.headers.get(hdr), name)"},{"line_number":902,"context_line":""},{"line_number":903,"context_line":""},{"line_number":904,"context_line":"def get_annotated_node(node, headers\u003dNone):"},{"line_number":905,"context_line":"    \"\"\""},{"line_number":906,"context_line":"    Helper function to set use_replication dict value for a node by looking up"},{"line_number":907,"context_line":"    the header value for x-backend-use-replication-network."}],"source_content_type":"text/x-python","patch_set":22,"id":"6f64b07e_96f2ed49","line":904,"in_reply_to":"7ae14ca8_f527af75","updated":"2022-11-18 16:58:31.000000000","message":"Done","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"719bbb9661d09a3f1dce902d3d5620a0bfef1cfc","unresolved":true,"context_lines":[{"line_number":922,"context_line":""},{"line_number":923,"context_line":""},{"line_number":924,"context_line":"def get_ip_port(node, headers\u003dNone):"},{"line_number":925,"context_line":"    node \u003d get_annotated_node(node, headers)"},{"line_number":926,"context_line":"    if node.get(\u0027use_replication\u0027, False):"},{"line_number":927,"context_line":"        return node[\u0027replication_ip\u0027], node[\u0027replication_port\u0027]"},{"line_number":928,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":22,"id":"42d9451c_18b0225d","line":925,"updated":"2022-11-02 21:00:44.000000000","message":"It seems overkill to build a new dict just to get the boolean: see https://review.opendev.org/c/openstack/swift/+/863438","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0eaf6f101f83ffc5c273761a48715b64515df861","unresolved":false,"context_lines":[{"line_number":922,"context_line":""},{"line_number":923,"context_line":""},{"line_number":924,"context_line":"def get_ip_port(node, headers\u003dNone):"},{"line_number":925,"context_line":"    node \u003d get_annotated_node(node, headers)"},{"line_number":926,"context_line":"    if node.get(\u0027use_replication\u0027, False):"},{"line_number":927,"context_line":"        return node[\u0027replication_ip\u0027], node[\u0027replication_port\u0027]"},{"line_number":928,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":22,"id":"44518e6e_818bb890","line":925,"in_reply_to":"42d9451c_18b0225d","updated":"2022-11-18 16:58:31.000000000","message":"Done","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"dce40bbc4e5f7ee7ea88474b319abfc30e89fd47","unresolved":true,"context_lines":[{"line_number":901,"context_line":"    req.headers[hdr] \u003d csv_append(req.headers.get(hdr), name)"},{"line_number":902,"context_line":""},{"line_number":903,"context_line":""},{"line_number":904,"context_line":"def is_use_replication_network(headers\u003dNone):"},{"line_number":905,"context_line":"    \"\"\""},{"line_number":906,"context_line":"    Determine if replication network should be used."},{"line_number":907,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"8ae30f51_b683fbf0","line":904,"range":{"start_line":904,"start_character":4,"end_line":904,"end_character":6},"updated":"2022-11-30 17:53:55.000000000","message":"nit: Maybe better as \"should\"?","commit_id":"f8e17d7859ba82804c588dcfc7b5a1dffdd3bd65"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":901,"context_line":"    req.headers[hdr] \u003d csv_append(req.headers.get(hdr), name)"},{"line_number":902,"context_line":""},{"line_number":903,"context_line":""},{"line_number":904,"context_line":"def is_use_replication_network(headers\u003dNone):"},{"line_number":905,"context_line":"    \"\"\""},{"line_number":906,"context_line":"    Determine if replication network should be used."},{"line_number":907,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"16fc6e6c_914b6e90","line":904,"range":{"start_line":904,"start_character":4,"end_line":904,"end_character":6},"in_reply_to":"8ae30f51_b683fbf0","updated":"2023-02-03 20:51:17.000000000","message":"Ack","commit_id":"f8e17d7859ba82804c588dcfc7b5a1dffdd3bd65"}],"swift/common/utils.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"69f1e89937b67db22ff8a221de61e8caa66e8f72","unresolved":true,"context_lines":[{"line_number":2805,"context_line":"    \"\"\""},{"line_number":2806,"context_line":"    if use_replication or node_dict.get(\u0027use_replication\u0027, False):"},{"line_number":2807,"context_line":"        node_ip \u003d node_dict[\u0027replication_ip\u0027]"},{"line_number":2808,"context_line":"        node_port \u003d node_dict[\u0027replication_port\u0027]"},{"line_number":2809,"context_line":"    else:"},{"line_number":2810,"context_line":"        node_ip \u003d node_dict[\u0027ip\u0027]"},{"line_number":2811,"context_line":"        node_port \u003d node_dict[\u0027port\u0027]"}],"source_content_type":"text/x-python","patch_set":27,"id":"d0b30d45_3bbd0c03","line":2808,"updated":"2022-11-28 23:50:43.000000000","message":"I know when we create rings, if a replication ip and port are not supplied we put the normal ip and port in \u0027replication_ip\u0027 and \u0027replication_port\u0027. So this should be fine...\n\nBut just in case, belts and brances, we could use:\n\n  node_ip \u003d node_dict.get(\u0027replication_ip\u0027, node_dict[\u0027ip\u0027])\n  node_port \u003d node_dict.get(\u0027replication_port\u0027, node_dict[\u0027port\u0027])\n\nBut that certainly isn\u0027t a blocker.","commit_id":"14b1f87bb7da1905a4a91723e8f3bbc907710336"}],"swift/proxy/controllers/base.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ff247b9e710bf79342cf683764aa5b6d28fd68be","unresolved":true,"context_lines":[{"line_number":1902,"context_line":"            headers[\u0027Content-Length\u0027] \u003d str(len(body))"},{"line_number":1903,"context_line":"        for node in nodes:"},{"line_number":1904,"context_line":"            try:"},{"line_number":1905,"context_line":"                set_node_replication(node, headers)"},{"line_number":1906,"context_line":"                ip, port \u003d get_ip_port(node)"},{"line_number":1907,"context_line":"                start_node_timing \u003d time.time()"},{"line_number":1908,"context_line":"                with ConnectionTimeout(self.app.conn_timeout):"}],"source_content_type":"text/x-python","patch_set":4,"id":"56b8b79c_2ccaad73","line":1905,"updated":"2022-10-14 19:56:22.000000000","message":"i think we could avoid some of this churn by keeping the optional headers kwarg on get_ip_port\n\n-def get_ip_port(node):\n+def get_ip_port(node, headers\u003dNone):\n+    if headers is not None:\n+        set_node_replication(node, headers)","commit_id":"50d46e3d91ac34f66044488fd9568b4a2b47d55a"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"8f74713d24070a4cbce3106043f3d795f95f1914","unresolved":false,"context_lines":[{"line_number":1902,"context_line":"            headers[\u0027Content-Length\u0027] \u003d str(len(body))"},{"line_number":1903,"context_line":"        for node in nodes:"},{"line_number":1904,"context_line":"            try:"},{"line_number":1905,"context_line":"                set_node_replication(node, headers)"},{"line_number":1906,"context_line":"                ip, port \u003d get_ip_port(node)"},{"line_number":1907,"context_line":"                start_node_timing \u003d time.time()"},{"line_number":1908,"context_line":"                with ConnectionTimeout(self.app.conn_timeout):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9b3e0cb7_85538465","line":1905,"in_reply_to":"56b8b79c_2ccaad73","updated":"2022-10-14 21:54:06.000000000","message":"I just understood what you meant here","commit_id":"50d46e3d91ac34f66044488fd9568b4a2b47d55a"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0eaf6f101f83ffc5c273761a48715b64515df861","unresolved":true,"context_lines":[{"line_number":1707,"context_line":"        Helper function to set use_replication dict value for a node by looking"},{"line_number":1708,"context_line":"        up the header value for x-backend-use-replication-network."},{"line_number":1709,"context_line":""},{"line_number":1710,"context_line":"        :param node: node dictionary from the ring; this may be modified."},{"line_number":1711,"context_line":"        \"\"\""},{"line_number":1712,"context_line":"        # nodes may have come from a ring or a node_iter passed to the"},{"line_number":1713,"context_line":"        # constructor: be careful not to mutate them!"}],"source_content_type":"text/x-python","patch_set":26,"id":"a6d2eb01_5a2d6ede","line":1710,"range":{"start_line":1710,"start_character":52,"end_line":1710,"end_character":73},"updated":"2022-11-18 16:58:31.000000000","message":"this isn\u0027t true any more - a new dict is always created, so the docstring should also have a :return: item","commit_id":"fc7275d940b7149f92bae9efa63c63be15a4524b"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8d5a74b6ae43621ddb6822e043993c823b90726a","unresolved":false,"context_lines":[{"line_number":1707,"context_line":"        Helper function to set use_replication dict value for a node by looking"},{"line_number":1708,"context_line":"        up the header value for x-backend-use-replication-network."},{"line_number":1709,"context_line":""},{"line_number":1710,"context_line":"        :param node: node dictionary from the ring; this may be modified."},{"line_number":1711,"context_line":"        \"\"\""},{"line_number":1712,"context_line":"        # nodes may have come from a ring or a node_iter passed to the"},{"line_number":1713,"context_line":"        # constructor: be careful not to mutate them!"}],"source_content_type":"text/x-python","patch_set":26,"id":"fe0b84aa_f35ab10c","line":1710,"range":{"start_line":1710,"start_character":52,"end_line":1710,"end_character":73},"in_reply_to":"a6d2eb01_5a2d6ede","updated":"2022-11-28 10:52:26.000000000","message":"Done","commit_id":"fc7275d940b7149f92bae9efa63c63be15a4524b"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"69f1e89937b67db22ff8a221de61e8caa66e8f72","unresolved":true,"context_lines":[{"line_number":1713,"context_line":"        # nodes may have come from a ring or a node_iter passed to the"},{"line_number":1714,"context_line":"        # constructor: be careful not to mutate them!"},{"line_number":1715,"context_line":"        return dict(node, use_replication\u003dis_use_replication_network("},{"line_number":1716,"context_line":"            self.request.headers if self.request else None))"},{"line_number":1717,"context_line":""},{"line_number":1718,"context_line":"    def next(self):"},{"line_number":1719,"context_line":"        node \u003d None"}],"source_content_type":"text/x-python","patch_set":27,"id":"64e8014f_c2198006","line":1716,"updated":"2022-11-28 23:50:43.000000000","message":"If somehow the nodes being provided have already added the use_replication key to the node dict then it\u0027ll get overrided. ie, it\u0027s coming from a different iterator, and doesn\u0027t provide a req (because it\u0027s already adding the use_request) this will basically remove them right?\n\nI wonder if we need to be sure, if no req is provided we don\u0027t annotate/change the node dicts at all:\n\n  if self.request:\n      node \u003d dict(node, use_replication\u003dis_use_replication_network(\n                  self.request.headers))\n  return node\n\nOr if we don\u0027t want to ever override the use_replication if it was already defined, we might be able to do something like:\n\n  node_dict \u003d dict(use_replication\u003dis_use_replication_network(\n                   self.request.headers if self.request else None))\n  node_dict.update(node)\n  return node","commit_id":"14b1f87bb7da1905a4a91723e8f3bbc907710336"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"962af8a4af3820813369d012c6bee6b071f94c6c","unresolved":false,"context_lines":[{"line_number":1713,"context_line":"        # nodes may have come from a ring or a node_iter passed to the"},{"line_number":1714,"context_line":"        # constructor: be careful not to mutate them!"},{"line_number":1715,"context_line":"        return dict(node, use_replication\u003dis_use_replication_network("},{"line_number":1716,"context_line":"            self.request.headers if self.request else None))"},{"line_number":1717,"context_line":""},{"line_number":1718,"context_line":"    def next(self):"},{"line_number":1719,"context_line":"        node \u003d None"}],"source_content_type":"text/x-python","patch_set":27,"id":"6f0c9dbd_0962b1f4","line":1716,"in_reply_to":"5c0aac7c_eaec5b8e","updated":"2023-02-13 18:57:59.000000000","message":"Ack","commit_id":"14b1f87bb7da1905a4a91723e8f3bbc907710336"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"064314b255a34aae96df5d5429194a25f5ea7975","unresolved":true,"context_lines":[{"line_number":1713,"context_line":"        # nodes may have come from a ring or a node_iter passed to the"},{"line_number":1714,"context_line":"        # constructor: be careful not to mutate them!"},{"line_number":1715,"context_line":"        return dict(node, use_replication\u003dis_use_replication_network("},{"line_number":1716,"context_line":"            self.request.headers if self.request else None))"},{"line_number":1717,"context_line":""},{"line_number":1718,"context_line":"    def next(self):"},{"line_number":1719,"context_line":"        node \u003d None"}],"source_content_type":"text/x-python","patch_set":27,"id":"5c0aac7c_eaec5b8e","line":1716,"in_reply_to":"64e8014f_c2198006","updated":"2023-02-03 21:53:13.000000000","message":"Request is always set now; we can drop the\n\n if self.request else None","commit_id":"14b1f87bb7da1905a4a91723e8f3bbc907710336"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":1713,"context_line":"        # nodes may have come from a ring or a node_iter passed to the"},{"line_number":1714,"context_line":"        # constructor: be careful not to mutate them!"},{"line_number":1715,"context_line":"        return dict(node, use_replication\u003dis_use_replication_network("},{"line_number":1716,"context_line":"            self.request.headers if self.request else None))"},{"line_number":1717,"context_line":""},{"line_number":1718,"context_line":"    def next(self):"},{"line_number":1719,"context_line":"        node \u003d None"}],"source_content_type":"text/x-python","patch_set":27,"id":"a5e60de0_d4c0d0f6","line":1716,"in_reply_to":"64e8014f_c2198006","updated":"2023-02-03 20:51:17.000000000","message":"Yes if no request is provided the node dicts remain unmutated or a request with no \u0027x-backend-use-replication-network\u0027 is ineffectual see, https://review.opendev.org/c/openstack/swift/+/860866/28/test/unit/proxy/test_server.py#5442","commit_id":"14b1f87bb7da1905a4a91723e8f3bbc907710336"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"dce40bbc4e5f7ee7ea88474b319abfc30e89fd47","unresolved":true,"context_lines":[{"line_number":1611,"context_line":"        want to filter or reorder the nodes."},{"line_number":1612,"context_line":"    :param policy: an instance of :class:`BaseStoragePolicy`. This should be"},{"line_number":1613,"context_line":"        None for an account or container ring."},{"line_number":1614,"context_line":"    :param request: if, and only if, a ``request`` is given then yielded nodes"},{"line_number":1615,"context_line":"        will be annotated with a ``use_replication \u003d True|False`` item based"},{"line_number":1616,"context_line":"        on the ``request`` headers"},{"line_number":1617,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":28,"id":"1307bfe7_820aae2f","line":1614,"range":{"start_line":1614,"start_character":24,"end_line":1614,"end_character":35},"updated":"2022-11-30 17:53:55.000000000","message":"Under what circumstances do we *not* plumb in request? Should we just make this required?","commit_id":"f8e17d7859ba82804c588dcfc7b5a1dffdd3bd65"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":1611,"context_line":"        want to filter or reorder the nodes."},{"line_number":1612,"context_line":"    :param policy: an instance of :class:`BaseStoragePolicy`. This should be"},{"line_number":1613,"context_line":"        None for an account or container ring."},{"line_number":1614,"context_line":"    :param request: if, and only if, a ``request`` is given then yielded nodes"},{"line_number":1615,"context_line":"        will be annotated with a ``use_replication \u003d True|False`` item based"},{"line_number":1616,"context_line":"        on the ``request`` headers"},{"line_number":1617,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":28,"id":"916adbdd_57eaccec","line":1614,"range":{"start_line":1614,"start_character":24,"end_line":1614,"end_character":35},"in_reply_to":"1307bfe7_820aae2f","updated":"2023-02-03 20:51:17.000000000","message":"Ack","commit_id":"f8e17d7859ba82804c588dcfc7b5a1dffdd3bd65"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4dd7e18b5c25d5bae38f6c27cfced1282cfc4bb4","unresolved":true,"context_lines":[{"line_number":1611,"context_line":"        want to filter or reorder the nodes."},{"line_number":1612,"context_line":"    :param policy: an instance of :class:`BaseStoragePolicy`. This should be"},{"line_number":1613,"context_line":"        None for an account or container ring."},{"line_number":1614,"context_line":"    :param request: if, and only if, a ``request`` is given then yielded nodes"},{"line_number":1615,"context_line":"        will be annotated with a ``use_replication \u003d True|False`` item based"},{"line_number":1616,"context_line":"        on the ``request`` headers"},{"line_number":1617,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":28,"id":"d977e62a_4a42a0e7","line":1614,"range":{"start_line":1614,"start_character":24,"end_line":1614,"end_character":35},"in_reply_to":"1307bfe7_820aae2f","updated":"2023-01-20 15:27:03.000000000","message":"there\u0027s 55 test failures under unit/proxy when i raise an exception on request is None\n\nit might be a good goal to make it requried - for our sanity and possibly correctness - but it\u0027s definately going to be more work.\n\nit looks like there\u0027s a bunch of tests that just explicitly pass request\u003dNone tho - it could change to pass Request.blank() https://review.opendev.org/c/openstack/swift/+/871288","commit_id":"f8e17d7859ba82804c588dcfc7b5a1dffdd3bd65"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"962af8a4af3820813369d012c6bee6b071f94c6c","unresolved":false,"context_lines":[{"line_number":1611,"context_line":"        want to filter or reorder the nodes."},{"line_number":1612,"context_line":"    :param policy: an instance of :class:`BaseStoragePolicy`. This should be"},{"line_number":1613,"context_line":"        None for an account or container ring."},{"line_number":1614,"context_line":"    :param request: if, and only if, a ``request`` is given then yielded nodes"},{"line_number":1615,"context_line":"        will be annotated with a ``use_replication \u003d True|False`` item based"},{"line_number":1616,"context_line":"        on the ``request`` headers"},{"line_number":1617,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":28,"id":"e9850089_f2a3b8bf","line":1614,"range":{"start_line":1614,"start_character":24,"end_line":1614,"end_character":35},"in_reply_to":"76746dd1_d324864e","updated":"2023-02-13 18:57:59.000000000","message":"Ack","commit_id":"f8e17d7859ba82804c588dcfc7b5a1dffdd3bd65"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"064314b255a34aae96df5d5429194a25f5ea7975","unresolved":true,"context_lines":[{"line_number":1611,"context_line":"        want to filter or reorder the nodes."},{"line_number":1612,"context_line":"    :param policy: an instance of :class:`BaseStoragePolicy`. This should be"},{"line_number":1613,"context_line":"        None for an account or container ring."},{"line_number":1614,"context_line":"    :param request: if, and only if, a ``request`` is given then yielded nodes"},{"line_number":1615,"context_line":"        will be annotated with a ``use_replication \u003d True|False`` item based"},{"line_number":1616,"context_line":"        on the ``request`` headers"},{"line_number":1617,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":28,"id":"76746dd1_d324864e","line":1614,"range":{"start_line":1614,"start_character":24,"end_line":1614,"end_character":35},"in_reply_to":"d977e62a_4a42a0e7","updated":"2023-02-03 21:53:13.000000000","message":"This is required now; we should probably update the doc string.","commit_id":"f8e17d7859ba82804c588dcfc7b5a1dffdd3bd65"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0064a07dfecd7d39eaa9a019f810d27f1803dcce","unresolved":true,"context_lines":[{"line_number":1612,"context_line":"    :param policy: an instance of :class:`BaseStoragePolicy`. This should be"},{"line_number":1613,"context_line":"        None for an account or container ring."},{"line_number":1614,"context_line":"    :param request: yielded nodes will be annotated with `use_replication`"},{"line_number":1615,"context_line":"        based on the `request` headers."},{"line_number":1616,"context_line":"    \"\"\""},{"line_number":1617,"context_line":""},{"line_number":1618,"context_line":"    def __init__(self, app, ring, partition, logger, request, node_iter\u003dNone,"}],"source_content_type":"text/x-python","patch_set":32,"id":"4bac1b0e_0a11529a","line":1615,"updated":"2023-02-07 10:33:06.000000000","message":"it\u0027s usual to list the params in the same order as the method signature","commit_id":"c5b77a0bef1bdce703eb0f36582ca34edf380548"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"962af8a4af3820813369d012c6bee6b071f94c6c","unresolved":false,"context_lines":[{"line_number":1612,"context_line":"    :param policy: an instance of :class:`BaseStoragePolicy`. This should be"},{"line_number":1613,"context_line":"        None for an account or container ring."},{"line_number":1614,"context_line":"    :param request: yielded nodes will be annotated with `use_replication`"},{"line_number":1615,"context_line":"        based on the `request` headers."},{"line_number":1616,"context_line":"    \"\"\""},{"line_number":1617,"context_line":""},{"line_number":1618,"context_line":"    def __init__(self, app, ring, partition, logger, request, node_iter\u003dNone,"}],"source_content_type":"text/x-python","patch_set":32,"id":"78aa2e62_0f90057c","line":1615,"in_reply_to":"4bac1b0e_0a11529a","updated":"2023-02-13 18:57:59.000000000","message":"Ack","commit_id":"c5b77a0bef1bdce703eb0f36582ca34edf380548"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2357595cc336f4152a3e980eeb71597bea45281e","unresolved":true,"context_lines":[{"line_number":1608,"context_line":"    :param partition: ring partition to yield nodes for"},{"line_number":1609,"context_line":"    :param logger: a logger instance"},{"line_number":1610,"context_line":"    :param request: yielded nodes will be annotated with `use_replication`"},{"line_number":1611,"context_line":"    based on the `request` headers."},{"line_number":1612,"context_line":"    :param node_iter: optional iterable of nodes to try. Useful if you"},{"line_number":1613,"context_line":"        want to filter or reorder the nodes."},{"line_number":1614,"context_line":"    :param policy: an instance of :class:`BaseStoragePolicy`. This should be"}],"source_content_type":"text/x-python","patch_set":35,"id":"da44da0a_0b5386a8","line":1611,"updated":"2023-02-08 11:14:16.000000000","message":"I think you need an indent here? https://zuul.opendev.org/t/openstack/build/a423cadb021e4601b238cf707586f081","commit_id":"1da86d5d79e00c486128cbc4fe911cb4f562f7ca"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"962af8a4af3820813369d012c6bee6b071f94c6c","unresolved":false,"context_lines":[{"line_number":1608,"context_line":"    :param partition: ring partition to yield nodes for"},{"line_number":1609,"context_line":"    :param logger: a logger instance"},{"line_number":1610,"context_line":"    :param request: yielded nodes will be annotated with `use_replication`"},{"line_number":1611,"context_line":"    based on the `request` headers."},{"line_number":1612,"context_line":"    :param node_iter: optional iterable of nodes to try. Useful if you"},{"line_number":1613,"context_line":"        want to filter or reorder the nodes."},{"line_number":1614,"context_line":"    :param policy: an instance of :class:`BaseStoragePolicy`. This should be"}],"source_content_type":"text/x-python","patch_set":35,"id":"14dde65b_ed655b2c","line":1611,"in_reply_to":"da44da0a_0b5386a8","updated":"2023-02-13 18:57:59.000000000","message":"Ack","commit_id":"1da86d5d79e00c486128cbc4fe911cb4f562f7ca"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2357595cc336f4152a3e980eeb71597bea45281e","unresolved":true,"context_lines":[{"line_number":1622,"context_line":"        self.partition \u003d partition"},{"line_number":1623,"context_line":"        self.logger \u003d logger"},{"line_number":1624,"context_line":"        if not request:"},{"line_number":1625,"context_line":"            raise ValueError(\u0027You must have a request to iter nodes\u0027)"},{"line_number":1626,"context_line":"        self.request \u003d request"},{"line_number":1627,"context_line":""},{"line_number":1628,"context_line":"        part_nodes \u003d ring.get_part_nodes(partition)"}],"source_content_type":"text/x-python","patch_set":35,"id":"44a78daf_e2a61629","line":1625,"updated":"2023-02-08 11:14:16.000000000","message":"I\u0027m not sure this is necessary (and AFAICT not tested) - we don\u0027t check any other required arg is not None","commit_id":"1da86d5d79e00c486128cbc4fe911cb4f562f7ca"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"962af8a4af3820813369d012c6bee6b071f94c6c","unresolved":false,"context_lines":[{"line_number":1622,"context_line":"        self.partition \u003d partition"},{"line_number":1623,"context_line":"        self.logger \u003d logger"},{"line_number":1624,"context_line":"        if not request:"},{"line_number":1625,"context_line":"            raise ValueError(\u0027You must have a request to iter nodes\u0027)"},{"line_number":1626,"context_line":"        self.request \u003d request"},{"line_number":1627,"context_line":""},{"line_number":1628,"context_line":"        part_nodes \u003d ring.get_part_nodes(partition)"}],"source_content_type":"text/x-python","patch_set":35,"id":"967505f5_7bebcd70","line":1625,"in_reply_to":"44a78daf_e2a61629","updated":"2023-02-13 18:57:59.000000000","message":"Ack","commit_id":"1da86d5d79e00c486128cbc4fe911cb4f562f7ca"}],"swift/proxy/controllers/obj.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ff247b9e710bf79342cf683764aa5b6d28fd68be","unresolved":true,"context_lines":[{"line_number":1707,"context_line":"    @classmethod"},{"line_number":1708,"context_line":"    def _make_connection(cls, node, part, path, headers, conn_timeout,"},{"line_number":1709,"context_line":"                         node_timeout):"},{"line_number":1710,"context_line":"        ip, port \u003d get_ip_port(node, headers)"},{"line_number":1711,"context_line":"        start_time \u003d time.time()"},{"line_number":1712,"context_line":"        with ConnectionTimeout(conn_timeout):"},{"line_number":1713,"context_line":"            conn \u003d http_connect(ip, port, node[\u0027device\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"14f67398_745366ac","side":"PARENT","line":1710,"updated":"2022-10-14 19:56:22.000000000","message":"I think there might be some value in keeping this signature working so we can stay out of this file.","commit_id":"3ad39cd0b83a7f70d6c559c7b0e68a2e625be179"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"8f74713d24070a4cbce3106043f3d795f95f1914","unresolved":false,"context_lines":[{"line_number":1707,"context_line":"    @classmethod"},{"line_number":1708,"context_line":"    def _make_connection(cls, node, part, path, headers, conn_timeout,"},{"line_number":1709,"context_line":"                         node_timeout):"},{"line_number":1710,"context_line":"        ip, port \u003d get_ip_port(node, headers)"},{"line_number":1711,"context_line":"        start_time \u003d time.time()"},{"line_number":1712,"context_line":"        with ConnectionTimeout(conn_timeout):"},{"line_number":1713,"context_line":"            conn \u003d http_connect(ip, port, node[\u0027device\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"8de5c174_aa065945","side":"PARENT","line":1710,"in_reply_to":"14f67398_745366ac","updated":"2022-10-14 21:54:06.000000000","message":"Understood, but all that function really does is lookup the \u0027x-backend-use-replication-network\u0027 header for us. So are we saying is that the header is not read in this file in any use-case ?","commit_id":"3ad39cd0b83a7f70d6c559c7b0e68a2e625be179"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f4f7da7fdaab6df3cba727caf1270b66fd01437","unresolved":true,"context_lines":[{"line_number":197,"context_line":"        is_local \u003d policy_options.write_affinity_is_local_fn"},{"line_number":198,"context_line":"        if is_local is None:"},{"line_number":199,"context_line":"            return self.app.iter_nodes(ring, partition, self.logger,"},{"line_number":200,"context_line":"                                       policy\u003dpolicy, request\u003drequest)"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        primary_nodes \u003d ring.get_part_nodes(partition)"},{"line_number":203,"context_line":"        handoff_nodes \u003d ring.get_more_nodes(partition)"}],"source_content_type":"text/x-python","patch_set":22,"id":"309391ec_cbd09671","line":200,"updated":"2022-11-02 20:59:16.000000000","message":"similar change is needed in proxy/controllers/account.py and proxy/controllers/container.py where iter_nodes is called","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0eaf6f101f83ffc5c273761a48715b64515df861","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        is_local \u003d policy_options.write_affinity_is_local_fn"},{"line_number":198,"context_line":"        if is_local is None:"},{"line_number":199,"context_line":"            return self.app.iter_nodes(ring, partition, self.logger,"},{"line_number":200,"context_line":"                                       policy\u003dpolicy, request\u003drequest)"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        primary_nodes \u003d ring.get_part_nodes(partition)"},{"line_number":203,"context_line":"        handoff_nodes \u003d ring.get_more_nodes(partition)"}],"source_content_type":"text/x-python","patch_set":22,"id":"a02df7db_99b5e937","line":200,"in_reply_to":"309391ec_cbd09671","updated":"2022-11-18 16:58:31.000000000","message":"Done","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"064314b255a34aae96df5d5429194a25f5ea7975","unresolved":true,"context_lines":[{"line_number":192,"context_line":"            :class:`~swift.common.storage_policy.BaseStoragePolicy`"},{"line_number":193,"context_line":"        :param local_handoffs_first: optional, if True prefer primaries and"},{"line_number":194,"context_line":"            local handoff nodes first before looking elsewhere."},{"line_number":195,"context_line":"        \"\"\""},{"line_number":196,"context_line":"        policy_options \u003d self.app.get_policy_options(policy)"},{"line_number":197,"context_line":"        is_local \u003d policy_options.write_affinity_is_local_fn"},{"line_number":198,"context_line":"        if is_local is None:"}],"source_content_type":"text/x-python","patch_set":29,"id":"8db5e458_71b61b6d","line":195,"updated":"2023-02-03 21:53:13.000000000","message":"It\u0027d probably be good to include a\n\n :param request:\n\nin the docstring, if only to call out that it\u0027s required.","commit_id":"08c0eb8454aaa9b76fe62031c8ac446d3ef8f6bd"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"962af8a4af3820813369d012c6bee6b071f94c6c","unresolved":false,"context_lines":[{"line_number":192,"context_line":"            :class:`~swift.common.storage_policy.BaseStoragePolicy`"},{"line_number":193,"context_line":"        :param local_handoffs_first: optional, if True prefer primaries and"},{"line_number":194,"context_line":"            local handoff nodes first before looking elsewhere."},{"line_number":195,"context_line":"        \"\"\""},{"line_number":196,"context_line":"        policy_options \u003d self.app.get_policy_options(policy)"},{"line_number":197,"context_line":"        is_local \u003d policy_options.write_affinity_is_local_fn"},{"line_number":198,"context_line":"        if is_local is None:"}],"source_content_type":"text/x-python","patch_set":29,"id":"bf6b2505_fef7e680","line":195,"in_reply_to":"8db5e458_71b61b6d","updated":"2023-02-13 18:57:59.000000000","message":"Ack","commit_id":"08c0eb8454aaa9b76fe62031c8ac446d3ef8f6bd"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2357595cc336f4152a3e980eeb71597bea45281e","unresolved":false,"context_lines":[{"line_number":192,"context_line":"            :class:`~swift.common.storage_policy.BaseStoragePolicy`"},{"line_number":193,"context_line":"        :param local_handoffs_first: optional, if True prefer primaries and"},{"line_number":194,"context_line":"            local handoff nodes first before looking elsewhere."},{"line_number":195,"context_line":"        \"\"\""},{"line_number":196,"context_line":"        policy_options \u003d self.app.get_policy_options(policy)"},{"line_number":197,"context_line":"        is_local \u003d policy_options.write_affinity_is_local_fn"},{"line_number":198,"context_line":"        if is_local is None:"}],"source_content_type":"text/x-python","patch_set":29,"id":"2af1712f_6d509ce4","line":195,"in_reply_to":"8db5e458_71b61b6d","updated":"2023-02-08 11:14:16.000000000","message":"Done","commit_id":"08c0eb8454aaa9b76fe62031c8ac446d3ef8f6bd"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0064a07dfecd7d39eaa9a019f810d27f1803dcce","unresolved":true,"context_lines":[{"line_number":175,"context_line":"            self.account_name, self.container_name, self.object_name)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def iter_nodes_local_first(self, ring, partition, policy\u003dNone,"},{"line_number":178,"context_line":"                               local_handoffs_first\u003dFalse, request\u003dNone):"},{"line_number":179,"context_line":"        \"\"\""},{"line_number":180,"context_line":"        Yields nodes for a ring partition."},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"2d3b9be4_1f8a15a6","line":178,"range":{"start_line":178,"start_character":59,"end_line":178,"end_character":71},"updated":"2023-02-07 10:33:06.000000000","message":"this needs to become a required arg too","commit_id":"c5b77a0bef1bdce703eb0f36582ca34edf380548"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"962af8a4af3820813369d012c6bee6b071f94c6c","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            self.account_name, self.container_name, self.object_name)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def iter_nodes_local_first(self, ring, partition, policy\u003dNone,"},{"line_number":178,"context_line":"                               local_handoffs_first\u003dFalse, request\u003dNone):"},{"line_number":179,"context_line":"        \"\"\""},{"line_number":180,"context_line":"        Yields nodes for a ring partition."},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"cd4c072a_7b331d62","line":178,"range":{"start_line":178,"start_character":59,"end_line":178,"end_character":71},"in_reply_to":"2d3b9be4_1f8a15a6","updated":"2023-02-13 18:57:59.000000000","message":"Ack","commit_id":"c5b77a0bef1bdce703eb0f36582ca34edf380548"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"839656a9de0e69ff2c2df5b6e2baae8610e45a70","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            self.account_name, self.container_name, self.object_name)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def iter_nodes_local_first(self, ring, partition, policy\u003dNone,"},{"line_number":178,"context_line":"                               local_handoffs_first\u003dFalse, request\u003dNone):"},{"line_number":179,"context_line":"        \"\"\""},{"line_number":180,"context_line":"        Yields nodes for a ring partition."},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"fdf7064a_e4ddc2c0","line":178,"range":{"start_line":178,"start_character":59,"end_line":178,"end_character":71},"in_reply_to":"2d3b9be4_1f8a15a6","updated":"2023-02-09 13:28:36.000000000","message":"Done","commit_id":"c5b77a0bef1bdce703eb0f36582ca34edf380548"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2357595cc336f4152a3e980eeb71597bea45281e","unresolved":true,"context_lines":[{"line_number":193,"context_line":"        :param local_handoffs_first: optional, if True prefer primaries and"},{"line_number":194,"context_line":"            local handoff nodes first before looking elsewhere."},{"line_number":195,"context_line":"        :param request: nodes will be annotated with `use_replication` based on"},{"line_number":196,"context_line":"            the `request` headers"},{"line_number":197,"context_line":"        \"\"\""},{"line_number":198,"context_line":"        policy_options \u003d self.app.get_policy_options(policy)"},{"line_number":199,"context_line":"        is_local \u003d policy_options.write_affinity_is_local_fn"}],"source_content_type":"text/x-python","patch_set":35,"id":"2dd81608_5dc6bf04","line":196,"updated":"2023-02-08 11:14:16.000000000","message":"please move the param to match the signature","commit_id":"1da86d5d79e00c486128cbc4fe911cb4f562f7ca"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"962af8a4af3820813369d012c6bee6b071f94c6c","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        :param local_handoffs_first: optional, if True prefer primaries and"},{"line_number":194,"context_line":"            local handoff nodes first before looking elsewhere."},{"line_number":195,"context_line":"        :param request: nodes will be annotated with `use_replication` based on"},{"line_number":196,"context_line":"            the `request` headers"},{"line_number":197,"context_line":"        \"\"\""},{"line_number":198,"context_line":"        policy_options \u003d self.app.get_policy_options(policy)"},{"line_number":199,"context_line":"        is_local \u003d policy_options.write_affinity_is_local_fn"}],"source_content_type":"text/x-python","patch_set":35,"id":"d81346cc_4df5599f","line":196,"in_reply_to":"2dd81608_5dc6bf04","updated":"2023-02-13 18:57:59.000000000","message":"Ack","commit_id":"1da86d5d79e00c486128cbc4fe911cb4f562f7ca"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"839656a9de0e69ff2c2df5b6e2baae8610e45a70","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        :param local_handoffs_first: optional, if True prefer primaries and"},{"line_number":194,"context_line":"            local handoff nodes first before looking elsewhere."},{"line_number":195,"context_line":"        :param request: nodes will be annotated with `use_replication` based on"},{"line_number":196,"context_line":"            the `request` headers"},{"line_number":197,"context_line":"        \"\"\""},{"line_number":198,"context_line":"        policy_options \u003d self.app.get_policy_options(policy)"},{"line_number":199,"context_line":"        is_local \u003d policy_options.write_affinity_is_local_fn"}],"source_content_type":"text/x-python","patch_set":35,"id":"024cbbef_72ee4744","line":196,"in_reply_to":"2dd81608_5dc6bf04","updated":"2023-02-09 13:28:36.000000000","message":"Done","commit_id":"1da86d5d79e00c486128cbc4fe911cb4f562f7ca"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2357595cc336f4152a3e980eeb71597bea45281e","unresolved":true,"context_lines":[{"line_number":199,"context_line":"        is_local \u003d policy_options.write_affinity_is_local_fn"},{"line_number":200,"context_line":"        if is_local is None:"},{"line_number":201,"context_line":"            return self.app.iter_nodes(ring, partition, self.logger,"},{"line_number":202,"context_line":"                                       policy\u003dpolicy, request\u003drequest)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        primary_nodes \u003d ring.get_part_nodes(partition)"},{"line_number":205,"context_line":"        handoff_nodes \u003d ring.get_more_nodes(partition)"}],"source_content_type":"text/x-python","patch_set":35,"id":"e6477b56_1b391a28","line":202,"updated":"2023-02-08 11:14:16.000000000","message":"the language allows this but I would much prefer the call to pass the required args in the order of the method signature, i.e.:\n\n  self.app.iter_nodes(ring, partition, self.logger, request,\n                      policy\u003dpolicy)\n    \nSame comment for all call sites for iter_nodes, iter_nodes_local_first and NodeIter.","commit_id":"1da86d5d79e00c486128cbc4fe911cb4f562f7ca"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"962af8a4af3820813369d012c6bee6b071f94c6c","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        is_local \u003d policy_options.write_affinity_is_local_fn"},{"line_number":200,"context_line":"        if is_local is None:"},{"line_number":201,"context_line":"            return self.app.iter_nodes(ring, partition, self.logger,"},{"line_number":202,"context_line":"                                       policy\u003dpolicy, request\u003drequest)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        primary_nodes \u003d ring.get_part_nodes(partition)"},{"line_number":205,"context_line":"        handoff_nodes \u003d ring.get_more_nodes(partition)"}],"source_content_type":"text/x-python","patch_set":35,"id":"8698a9ca_de0db065","line":202,"in_reply_to":"e6477b56_1b391a28","updated":"2023-02-13 18:57:59.000000000","message":"Ack","commit_id":"1da86d5d79e00c486128cbc4fe911cb4f562f7ca"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"839656a9de0e69ff2c2df5b6e2baae8610e45a70","unresolved":true,"context_lines":[{"line_number":198,"context_line":"        policy_options \u003d self.app.get_policy_options(policy)"},{"line_number":199,"context_line":"        is_local \u003d policy_options.write_affinity_is_local_fn"},{"line_number":200,"context_line":"        if is_local is None:"},{"line_number":201,"context_line":"            return self.app.iter_nodes(ring, partition, request, self.logger,"},{"line_number":202,"context_line":"                                       policy\u003dpolicy)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        primary_nodes \u003d ring.get_part_nodes(partition)"}],"source_content_type":"text/x-python","patch_set":36,"id":"170dc327_28a9b7d7","line":201,"range":{"start_line":201,"start_character":39,"end_line":201,"end_character":77},"updated":"2023-02-09 13:28:36.000000000","message":"should be:\n\n  ring, partition, self.logger, request, policy\u003dpolicy","commit_id":"c167d3ce003da99f77b7c7988834f3ed0f6a734e"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"962af8a4af3820813369d012c6bee6b071f94c6c","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        policy_options \u003d self.app.get_policy_options(policy)"},{"line_number":199,"context_line":"        is_local \u003d policy_options.write_affinity_is_local_fn"},{"line_number":200,"context_line":"        if is_local is None:"},{"line_number":201,"context_line":"            return self.app.iter_nodes(ring, partition, request, self.logger,"},{"line_number":202,"context_line":"                                       policy\u003dpolicy)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        primary_nodes \u003d ring.get_part_nodes(partition)"}],"source_content_type":"text/x-python","patch_set":36,"id":"3065e064_7504cbb5","line":201,"range":{"start_line":201,"start_character":39,"end_line":201,"end_character":77},"in_reply_to":"170dc327_28a9b7d7","updated":"2023-02-13 18:57:59.000000000","message":"Ack","commit_id":"c167d3ce003da99f77b7c7988834f3ed0f6a734e"}],"swift/proxy/server.py":[{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"48008c5ea6a04c64d5e3cae676e9748b31a91c92","unresolved":true,"context_lines":[{"line_number":733,"context_line":"            log \u003d self.logger.exception"},{"line_number":734,"context_line":"        if isinstance(additional_info, bytes):"},{"line_number":735,"context_line":"            additional_info \u003d additional_info.decode(\u0027utf-8\u0027)"},{"line_number":736,"context_line":"        node_ip, node_port \u003d get_ip_port(node)"},{"line_number":737,"context_line":"        log(\u0027ERROR with %(type)s server %(ip)s:%(port)s/%(device)s\u0027"},{"line_number":738,"context_line":"            \u0027 re: %(info)s\u0027,"},{"line_number":739,"context_line":"            {\u0027type\u0027: typ, \u0027ip\u0027: node_ip,"}],"source_content_type":"text/x-python","patch_set":3,"id":"110a3792_4249f37d","line":736,"updated":"2022-10-10 20:31:26.000000000","message":"This is unfinished currently, trying to figure out a way to pass the value for x-backend-use-replication-network, which will help embed the logs correctly since we want the exception logs displaying the correct ip::port","commit_id":"cc764b4faea4bba5827cf130e441492e66cc6a7f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6a592a1a6761d5434d9dc28cc2ff27faa3e24a59","unresolved":true,"context_lines":[{"line_number":733,"context_line":"            log \u003d self.logger.exception"},{"line_number":734,"context_line":"        if isinstance(additional_info, bytes):"},{"line_number":735,"context_line":"            additional_info \u003d additional_info.decode(\u0027utf-8\u0027)"},{"line_number":736,"context_line":"        node_ip, node_port \u003d get_ip_port(node)"},{"line_number":737,"context_line":"        log(\u0027ERROR with %(type)s server %(ip)s:%(port)s/%(device)s\u0027"},{"line_number":738,"context_line":"            \u0027 re: %(info)s\u0027,"},{"line_number":739,"context_line":"            {\u0027type\u0027: typ, \u0027ip\u0027: node_ip,"}],"source_content_type":"text/x-python","patch_set":3,"id":"fe329589_c1ecb210","line":736,"in_reply_to":"110a3792_4249f37d","updated":"2022-10-11 11:45:46.000000000","message":"an idea:\n\nrather than starting to pass headers, or a \"use_replication_ip\" flag, around with the node, and changing method signatures, so that the required info finds its way to exception_occurred, how about adding a \"use_replication\" field to the node dict somewhere early on in the request handlers?\n\nFor example, we might wrap the iter_nodes and iter_nodes_local_first generators in another generator that annotates the node dicts based on x-backend-use-replication-network header value. In fact, better might be to parameterise the NodeIter class since both of those methods end up constructing a NodeIter. Then make NodeIter annotate nodes that is yields in its next() method.\n\nThen get_ip_port would only need the node arg.\n\nGetting more ambitious: we could introduce a Node class and have Node.get_ip and Node.get_port methods that do the right thing based on a use_replication parameter.","commit_id":"cc764b4faea4bba5827cf130e441492e66cc6a7f"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"8f74713d24070a4cbce3106043f3d795f95f1914","unresolved":false,"context_lines":[{"line_number":733,"context_line":"            log \u003d self.logger.exception"},{"line_number":734,"context_line":"        if isinstance(additional_info, bytes):"},{"line_number":735,"context_line":"            additional_info \u003d additional_info.decode(\u0027utf-8\u0027)"},{"line_number":736,"context_line":"        node_ip, node_port \u003d get_ip_port(node)"},{"line_number":737,"context_line":"        log(\u0027ERROR with %(type)s server %(ip)s:%(port)s/%(device)s\u0027"},{"line_number":738,"context_line":"            \u0027 re: %(info)s\u0027,"},{"line_number":739,"context_line":"            {\u0027type\u0027: typ, \u0027ip\u0027: node_ip,"}],"source_content_type":"text/x-python","patch_set":3,"id":"27142ab2_c69e789c","line":736,"in_reply_to":"8788cb3f_333549db","updated":"2022-10-14 21:54:06.000000000","message":"Ack","commit_id":"cc764b4faea4bba5827cf130e441492e66cc6a7f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"32211a9cc52033597219817d4615634265f98d94","unresolved":true,"context_lines":[{"line_number":733,"context_line":"            log \u003d self.logger.exception"},{"line_number":734,"context_line":"        if isinstance(additional_info, bytes):"},{"line_number":735,"context_line":"            additional_info \u003d additional_info.decode(\u0027utf-8\u0027)"},{"line_number":736,"context_line":"        node_ip, node_port \u003d get_ip_port(node)"},{"line_number":737,"context_line":"        log(\u0027ERROR with %(type)s server %(ip)s:%(port)s/%(device)s\u0027"},{"line_number":738,"context_line":"            \u0027 re: %(info)s\u0027,"},{"line_number":739,"context_line":"            {\u0027type\u0027: typ, \u0027ip\u0027: node_ip,"}],"source_content_type":"text/x-python","patch_set":3,"id":"8788cb3f_333549db","line":736,"in_reply_to":"fe329589_c1ecb210","updated":"2022-10-11 13:31:57.000000000","message":"another idea (we can try different things and see what we like) - it\u0027s not like an instance of the proxy app is making one request to front-end services and others to backend-services, so maybe set self.app.use_replication_networks in InternalClient.__init__ and use self.app.use_replication_netowrks in make_reqeust to set the headers and here again as just self.use_replication_network to log the correct ips and ports.\n\n... unless I\u0027m mis-reading the plumbing there - I haven\u0027t tried this idea.","commit_id":"cc764b4faea4bba5827cf130e441492e66cc6a7f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ff247b9e710bf79342cf683764aa5b6d28fd68be","unresolved":true,"context_lines":[{"line_number":651,"context_line":"        if node[\u0027use_replication\u0027]:"},{"line_number":652,"context_line":"            return \"{replication_ip}:{replication_port}/{device}\".format(**node)"},{"line_number":653,"context_line":"        else:"},{"line_number":654,"context_line":"            return \"{ip}:{port}/device\".format(**node)"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"    def error_limited(self, node):"},{"line_number":657,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"e95b4708_ac010013","line":654,"updated":"2022-10-14 19:56:22.000000000","message":"somehow bums me out we can\u0027t use our helpers here - get_ip_port doesn\u0027t do much for us WRT the device key tho","commit_id":"50d46e3d91ac34f66044488fd9568b4a2b47d55a"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":651,"context_line":"        if node[\u0027use_replication\u0027]:"},{"line_number":652,"context_line":"            return \"{replication_ip}:{replication_port}/{device}\".format(**node)"},{"line_number":653,"context_line":"        else:"},{"line_number":654,"context_line":"            return \"{ip}:{port}/device\".format(**node)"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"    def error_limited(self, node):"},{"line_number":657,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"c89f996c_45183a06","line":654,"in_reply_to":"1575fd98_8c73619d","updated":"2023-02-03 20:51:17.000000000","message":"Ack","commit_id":"50d46e3d91ac34f66044488fd9568b4a2b47d55a"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4dd7e18b5c25d5bae38f6c27cfced1282cfc4bb4","unresolved":false,"context_lines":[{"line_number":651,"context_line":"        if node[\u0027use_replication\u0027]:"},{"line_number":652,"context_line":"            return \"{replication_ip}:{replication_port}/{device}\".format(**node)"},{"line_number":653,"context_line":"        else:"},{"line_number":654,"context_line":"            return \"{ip}:{port}/device\".format(**node)"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"    def error_limited(self, node):"},{"line_number":657,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"fc79b64a_d14999b4","line":654,"in_reply_to":"1575fd98_8c73619d","updated":"2023-01-20 15:27:03.000000000","message":"Done","commit_id":"50d46e3d91ac34f66044488fd9568b4a2b47d55a"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"8f74713d24070a4cbce3106043f3d795f95f1914","unresolved":true,"context_lines":[{"line_number":651,"context_line":"        if node[\u0027use_replication\u0027]:"},{"line_number":652,"context_line":"            return \"{replication_ip}:{replication_port}/{device}\".format(**node)"},{"line_number":653,"context_line":"        else:"},{"line_number":654,"context_line":"            return \"{ip}:{port}/device\".format(**node)"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"    def error_limited(self, node):"},{"line_number":657,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"1575fd98_8c73619d","line":654,"in_reply_to":"e95b4708_ac010013","updated":"2022-10-14 21:54:06.000000000","message":"Can this remain as is or do you want me to change this function to use the helper method ?","commit_id":"50d46e3d91ac34f66044488fd9568b4a2b47d55a"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"23c9044f132ac6926cb147191f6fb8f0af352f4b","unresolved":true,"context_lines":[{"line_number":648,"context_line":"        self.node_timings[node[\u0027ip\u0027]] \u003d (timing, now + self.timing_expiry)"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"    def _error_limit_node_key(self, node):"},{"line_number":651,"context_line":"        if node[\u0027use_replication\u0027]:"},{"line_number":652,"context_line":"            return \"{replication_ip}:{replication_port}/{device}\".format(**node)"},{"line_number":653,"context_line":"        else:"},{"line_number":654,"context_line":"            return \"{ip}:{port}/device\".format(**node)"}],"source_content_type":"text/x-python","patch_set":6,"id":"23462eff_f359a72f","line":651,"updated":"2022-10-17 09:05:50.000000000","message":"This is blowing up in unit tests because use_replication has not been set. \n\nThis method could at least be defensive i.e.:\n\n  if node.get(\u0027use_replication\u0027):\n\nBut defensive coding may obscure a regression back to the original bug. There is an assumption here that get_ip_port will always have been called prior to this method, but clearly it is not. I\u0027d suggest getting use_replication set in the node dict somewhere early in the request handling call chain, along with a comment making it the significance clear.\n\nIMHO Setting use_replication as a side effect of calling get_ip_port is too subtle, as the test failures in this patchset proves!","commit_id":"a015001ec7207dbb5ce24d2e783e1cacd6e7b8bb"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"1e0b745dbe66b4f0d93bdb9fd24462ea2c093343","unresolved":true,"context_lines":[{"line_number":648,"context_line":"        self.node_timings[node[\u0027ip\u0027]] \u003d (timing, now + self.timing_expiry)"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"    def _error_limit_node_key(self, node):"},{"line_number":651,"context_line":"        if node[\u0027use_replication\u0027]:"},{"line_number":652,"context_line":"            return \"{replication_ip}:{replication_port}/{device}\".format(**node)"},{"line_number":653,"context_line":"        else:"},{"line_number":654,"context_line":"            return \"{ip}:{port}/device\".format(**node)"}],"source_content_type":"text/x-python","patch_set":6,"id":"409d25b6_b5fd1c9f","line":651,"in_reply_to":"23462eff_f359a72f","updated":"2022-10-17 15:32:47.000000000","message":"I agree we can\u0027t ship like this; the idom node.get(\u0027use_replication\u0027, False) that we identify in get_node_ip is what we should do here - another good reason to use the helpers\n\nI agree forgetting to pass in headers *could* be a source of a bug (request xyz doesn\u0027t use replication_ip, or log them on error - because we forgot to pass in headers) - explicit set/get also works - but created more churn that looked uglier to me than just supporting the old interface.","commit_id":"a015001ec7207dbb5ce24d2e783e1cacd6e7b8bb"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":648,"context_line":"        self.node_timings[node[\u0027ip\u0027]] \u003d (timing, now + self.timing_expiry)"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"    def _error_limit_node_key(self, node):"},{"line_number":651,"context_line":"        if node[\u0027use_replication\u0027]:"},{"line_number":652,"context_line":"            return \"{replication_ip}:{replication_port}/{device}\".format(**node)"},{"line_number":653,"context_line":"        else:"},{"line_number":654,"context_line":"            return \"{ip}:{port}/device\".format(**node)"}],"source_content_type":"text/x-python","patch_set":6,"id":"0b8efc8e_465ddd0c","line":651,"in_reply_to":"409d25b6_b5fd1c9f","updated":"2023-02-03 20:51:17.000000000","message":"Ack","commit_id":"a015001ec7207dbb5ce24d2e783e1cacd6e7b8bb"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"89b66df614c51edad43a8b080ab5f56c1ae19955","unresolved":false,"context_lines":[{"line_number":648,"context_line":"        self.node_timings[node[\u0027ip\u0027]] \u003d (timing, now + self.timing_expiry)"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"    def _error_limit_node_key(self, node):"},{"line_number":651,"context_line":"        if node[\u0027use_replication\u0027]:"},{"line_number":652,"context_line":"            return \"{replication_ip}:{replication_port}/{device}\".format(**node)"},{"line_number":653,"context_line":"        else:"},{"line_number":654,"context_line":"            return \"{ip}:{port}/device\".format(**node)"}],"source_content_type":"text/x-python","patch_set":6,"id":"609b673c_7b66b81d","line":651,"in_reply_to":"409d25b6_b5fd1c9f","updated":"2023-01-16 10:19:54.000000000","message":"Done","commit_id":"a015001ec7207dbb5ce24d2e783e1cacd6e7b8bb"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":649,"context_line":""},{"line_number":650,"context_line":"    def _error_limit_node_key(self, node):"},{"line_number":651,"context_line":"        if node[\u0027use_replication\u0027]:"},{"line_number":652,"context_line":"            return \"{replication_ip}:{replication_port}/{device}\".format(**node)"},{"line_number":653,"context_line":"        else:"},{"line_number":654,"context_line":"            return \"{ip}:{port}/device\".format(**node)"},{"line_number":655,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"42a32d51_0a980ebf","line":652,"in_reply_to":"a59df8cc_a10288c9","updated":"2023-02-03 20:51:17.000000000","message":"\u003e pep8: E501 line too long (80 \u003e 79 characters)\n\nPlease fix.","commit_id":"a015001ec7207dbb5ce24d2e783e1cacd6e7b8bb"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f4f7da7fdaab6df3cba727caf1270b66fd01437","unresolved":true,"context_lines":[{"line_number":648,"context_line":"        self.node_timings[node[\u0027ip\u0027]] \u003d (timing, now + self.timing_expiry)"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"    def _error_limit_node_key(self, node):"},{"line_number":651,"context_line":"        ip, port \u003d get_ip_port(node)"},{"line_number":652,"context_line":"        return \"{ip}:{port}/{device}\".format(ip\u003dip, port\u003dport,"},{"line_number":653,"context_line":"                                             device\u003dnode[\u0027device\u0027])"},{"line_number":654,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"62038586_567626ff","line":651,"updated":"2022-11-02 20:59:16.000000000","message":"in this patchset get_ip_port would have returned the normal vs replication ip and port based on use_replication","commit_id":"5e20f78793fc852379e4fb34380d15dceee74174"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"89b66df614c51edad43a8b080ab5f56c1ae19955","unresolved":false,"context_lines":[{"line_number":648,"context_line":"        self.node_timings[node[\u0027ip\u0027]] \u003d (timing, now + self.timing_expiry)"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"    def _error_limit_node_key(self, node):"},{"line_number":651,"context_line":"        ip, port \u003d get_ip_port(node)"},{"line_number":652,"context_line":"        return \"{ip}:{port}/{device}\".format(ip\u003dip, port\u003dport,"},{"line_number":653,"context_line":"                                             device\u003dnode[\u0027device\u0027])"},{"line_number":654,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"2990f11f_dffe400b","line":651,"in_reply_to":"62038586_567626ff","updated":"2023-01-16 10:19:54.000000000","message":"Done","commit_id":"5e20f78793fc852379e4fb34380d15dceee74174"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":648,"context_line":"        self.node_timings[node[\u0027ip\u0027]] \u003d (timing, now + self.timing_expiry)"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"    def _error_limit_node_key(self, node):"},{"line_number":651,"context_line":"        ip, port \u003d get_ip_port(node)"},{"line_number":652,"context_line":"        return \"{ip}:{port}/{device}\".format(ip\u003dip, port\u003dport,"},{"line_number":653,"context_line":"                                             device\u003dnode[\u0027device\u0027])"},{"line_number":654,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"6b744b0b_1998600e","line":651,"in_reply_to":"62038586_567626ff","updated":"2023-02-03 20:51:17.000000000","message":"Done","commit_id":"5e20f78793fc852379e4fb34380d15dceee74174"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":648,"context_line":"        self.node_timings[node[\u0027ip\u0027]] \u003d (timing, now + self.timing_expiry)"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"    def _error_limit_node_key(self, node):"},{"line_number":651,"context_line":"        ip, port \u003d get_ip_port(node)"},{"line_number":652,"context_line":"        return \"{ip}:{port}/{device}\".format(ip\u003dip, port\u003dport,"},{"line_number":653,"context_line":"                                             device\u003dnode[\u0027device\u0027])"},{"line_number":654,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"ab1bfeac_974a9239","line":651,"in_reply_to":"62038586_567626ff","updated":"2023-02-03 20:51:17.000000000","message":"Done","commit_id":"5e20f78793fc852379e4fb34380d15dceee74174"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f4f7da7fdaab6df3cba727caf1270b66fd01437","unresolved":true,"context_lines":[{"line_number":647,"context_line":"        self.node_timings[node[\u0027ip\u0027]] \u003d (timing, now + self.timing_expiry)"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"    def _error_limit_node_key(self, node):"},{"line_number":650,"context_line":"        return node_to_string(node)"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"    def error_limited(self, node):"},{"line_number":653,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"21fbe286_3a5afc0c","line":650,"updated":"2022-11-02 20:59:16.000000000","message":"we lost the discrimination of normal vs replication :(","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0eaf6f101f83ffc5c273761a48715b64515df861","unresolved":false,"context_lines":[{"line_number":647,"context_line":"        self.node_timings[node[\u0027ip\u0027]] \u003d (timing, now + self.timing_expiry)"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"    def _error_limit_node_key(self, node):"},{"line_number":650,"context_line":"        return node_to_string(node)"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"    def error_limited(self, node):"},{"line_number":653,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"df8356c3_fbc8c49b","line":650,"in_reply_to":"21fbe286_3a5afc0c","updated":"2022-11-18 16:58:31.000000000","message":"Done","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f4f7da7fdaab6df3cba727caf1270b66fd01437","unresolved":true,"context_lines":[{"line_number":733,"context_line":"            additional_info \u003d additional_info.decode(\u0027utf-8\u0027)"},{"line_number":734,"context_line":"        log(\u0027ERROR with %(type)s server %(node)s\u0027"},{"line_number":735,"context_line":"            \u0027 re: %(info)s\u0027,"},{"line_number":736,"context_line":"            {\u0027type\u0027: typ, \u0027node\u0027: node_to_string(node),"},{"line_number":737,"context_line":"             \u0027info\u0027: additional_info},"},{"line_number":738,"context_line":"            **kwargs)"},{"line_number":739,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"b268db1a_ee6d9014","line":736,"range":{"start_line":736,"start_character":34,"end_line":736,"end_character":48},"updated":"2022-11-02 20:59:16.000000000","message":"this was changed on master and it broke your fix - which is why the unit test needed to be changed to pass, but instead of the test changing the fix needs to be re-applied here","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":733,"context_line":"            additional_info \u003d additional_info.decode(\u0027utf-8\u0027)"},{"line_number":734,"context_line":"        log(\u0027ERROR with %(type)s server %(node)s\u0027"},{"line_number":735,"context_line":"            \u0027 re: %(info)s\u0027,"},{"line_number":736,"context_line":"            {\u0027type\u0027: typ, \u0027node\u0027: node_to_string(node),"},{"line_number":737,"context_line":"             \u0027info\u0027: additional_info},"},{"line_number":738,"context_line":"            **kwargs)"},{"line_number":739,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"62b8b43e_e3295081","line":736,"range":{"start_line":736,"start_character":34,"end_line":736,"end_character":48},"in_reply_to":"b268db1a_ee6d9014","updated":"2023-02-03 20:51:17.000000000","message":"Done","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"89b66df614c51edad43a8b080ab5f56c1ae19955","unresolved":false,"context_lines":[{"line_number":733,"context_line":"            additional_info \u003d additional_info.decode(\u0027utf-8\u0027)"},{"line_number":734,"context_line":"        log(\u0027ERROR with %(type)s server %(node)s\u0027"},{"line_number":735,"context_line":"            \u0027 re: %(info)s\u0027,"},{"line_number":736,"context_line":"            {\u0027type\u0027: typ, \u0027node\u0027: node_to_string(node),"},{"line_number":737,"context_line":"             \u0027info\u0027: additional_info},"},{"line_number":738,"context_line":"            **kwargs)"},{"line_number":739,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"8144aeb7_a432ec7d","line":736,"range":{"start_line":736,"start_character":34,"end_line":736,"end_character":48},"in_reply_to":"b268db1a_ee6d9014","updated":"2023-01-16 10:19:54.000000000","message":"Done","commit_id":"639a909be3997a957e6d210b5004331e955ee313"}],"test/unit/__init__.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f4f7da7fdaab6df3cba727caf1270b66fd01437","unresolved":true,"context_lines":[{"line_number":263,"context_line":"        self.replicas \u003d replicas"},{"line_number":264,"context_line":"        self._devs \u003d []"},{"line_number":265,"context_line":"        self._init_device_char()"},{"line_number":266,"context_line":"        use_replication \u003d False"},{"line_number":267,"context_line":"        for x in range(self.replicas):"},{"line_number":268,"context_line":"            ip \u003d \u002710.0.0.%s\u0027 % x"},{"line_number":269,"context_line":"            port \u003d self._base_port + x"}],"source_content_type":"text/x-python","patch_set":22,"id":"82074dab_af1fa4cb","line":266,"updated":"2022-11-02 20:59:16.000000000","message":"real rings do not have this flag in their devs","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f4f7da7fdaab6df3cba727caf1270b66fd01437","unresolved":true,"context_lines":[{"line_number":395,"context_line":"            \u0027ip\u0027: \u002710.0.0.%d\u0027 % (i % self.nodes),"},{"line_number":396,"context_line":"            \u0027replication_ip\u0027: \u002710.0.0.%d\u0027 % (i % self.nodes),"},{"line_number":397,"context_line":"            \u0027port\u0027: self.port,"},{"line_number":398,"context_line":"            \u0027use_replication\u0027: False,"},{"line_number":399,"context_line":"            \u0027replication_port\u0027: self.port,"},{"line_number":400,"context_line":"        } for i in range(self.devices)]"},{"line_number":401,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"906c38a4_ad16ffc7","line":398,"updated":"2022-11-02 20:59:16.000000000","message":"ditto: real rings\u0027 devs do not have this flag","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f4f7da7fdaab6df3cba727caf1270b66fd01437","unresolved":true,"context_lines":[{"line_number":1230,"context_line":"        all_nodes.extend(policy.object_ring.get_part_nodes(part))"},{"line_number":1231,"context_line":"        all_nodes.extend(policy.object_ring.get_more_nodes(part))"},{"line_number":1232,"context_line":"        for i, node in enumerate(all_nodes):"},{"line_number":1233,"context_line":"            node_ip, node_port \u003d get_ip_port(node, req)"},{"line_number":1234,"context_line":"            node_map[(node_ip, node_port)] \u003d i"},{"line_number":1235,"context_line":"            call_count[i] \u003d 0"},{"line_number":1236,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"f0b7ca56_f7fa72df","line":1233,"updated":"2022-11-02 20:59:16.000000000","message":"not sure about this change: get_ip_port is expecting headers, not the req object??","commit_id":"639a909be3997a957e6d210b5004331e955ee313"}],"test/unit/common/test_request_helpers.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"dce40bbc4e5f7ee7ea88474b319abfc30e89fd47","unresolved":true,"context_lines":[{"line_number":225,"context_line":"        # True header trumps node"},{"line_number":226,"context_line":"        node[\u0027use_replication\u0027] \u003d False"},{"line_number":227,"context_line":"        self.assertEqual((\u00275.6.7.8\u0027, 7000), rh.get_ip_port(node, {"},{"line_number":228,"context_line":"            rh.USE_REPLICATION_NETWORK_HEADER: \u0027true\u0027}))"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    @patch_policies(with_ec_default\u003dTrue)"},{"line_number":231,"context_line":"    def test_get_name_and_placement_object_req(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"79f82f73_31c3b92d","line":228,"updated":"2022-11-30 17:53:55.000000000","message":"Do we ever bump into this case in practice?","commit_id":"f8e17d7859ba82804c588dcfc7b5a1dffdd3bd65"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        # True header trumps node"},{"line_number":226,"context_line":"        node[\u0027use_replication\u0027] \u003d False"},{"line_number":227,"context_line":"        self.assertEqual((\u00275.6.7.8\u0027, 7000), rh.get_ip_port(node, {"},{"line_number":228,"context_line":"            rh.USE_REPLICATION_NETWORK_HEADER: \u0027true\u0027}))"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    @patch_policies(with_ec_default\u003dTrue)"},{"line_number":231,"context_line":"    def test_get_name_and_placement_object_req(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"64c7f1a0_67814706","line":228,"in_reply_to":"79f82f73_31c3b92d","updated":"2023-02-03 20:51:17.000000000","message":"We don\u0027t now that we have the correct implementation in-place since we will make request as a default parameter for the node_iter, the request header will consistently trump over the node_dict","commit_id":"f8e17d7859ba82804c588dcfc7b5a1dffdd3bd65"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4dd7e18b5c25d5bae38f6c27cfced1282cfc4bb4","unresolved":true,"context_lines":[{"line_number":225,"context_line":"        # True header trumps node"},{"line_number":226,"context_line":"        node[\u0027use_replication\u0027] \u003d False"},{"line_number":227,"context_line":"        self.assertEqual((\u00275.6.7.8\u0027, 7000), rh.get_ip_port(node, {"},{"line_number":228,"context_line":"            rh.USE_REPLICATION_NETWORK_HEADER: \u0027true\u0027}))"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    @patch_policies(with_ec_default\u003dTrue)"},{"line_number":231,"context_line":"    def test_get_name_and_placement_object_req(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"9eff476a_411226bb","line":228,"in_reply_to":"79f82f73_31c3b92d","updated":"2023-01-20 15:27:03.000000000","message":"hopefully not, but I don\u0027t mind the test asserting that if it happens we respect the headers","commit_id":"f8e17d7859ba82804c588dcfc7b5a1dffdd3bd65"}],"test/unit/common/test_utils.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4dd7e18b5c25d5bae38f6c27cfced1282cfc4bb4","unresolved":true,"context_lines":[{"line_number":2251,"context_line":"        dev[\u0027use_replication\u0027] \u003d True"},{"line_number":2252,"context_line":"        self.assertEqual(utils.node_to_string(dev), \u0027127.0.1.1:6400/sdb\u0027)"},{"line_number":2253,"context_line":"        self.assertEqual(utils.node_to_string(dev, replication\u003dFalse),"},{"line_number":2254,"context_line":"                         \u0027127.0.1.1:6400/sdb\u0027)"},{"line_number":2255,"context_line":""},{"line_number":2256,"context_line":"        dev \u003d {"},{"line_number":2257,"context_line":"            \u0027id\u0027: 3,"}],"source_content_type":"text/x-python","patch_set":28,"id":"5754a3f1_83ab80b2","line":2254,"updated":"2023-01-20 15:27:03.000000000","message":"here the node dict takes precedence, good to document that, and verify the behavior if we think we might depend on it.","commit_id":"f8e17d7859ba82804c588dcfc7b5a1dffdd3bd65"}],"test/unit/obj/test_reconstructor.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f4f7da7fdaab6df3cba727caf1270b66fd01437","unresolved":true,"context_lines":[{"line_number":343,"context_line":"                    \u0027device\u0027: \u0027sda2\u0027,"},{"line_number":344,"context_line":"                    \u0027id\u0027: 2,"},{"line_number":345,"context_line":"                    \u0027weight\u0027: 1.0,"},{"line_number":346,"context_line":"                    \u0027use_replication\u0027: False,"},{"line_number":347,"context_line":"                }],"},{"line_number":348,"context_line":"                \u0027job_type\u0027: object_reconstructor.REVERT,"},{"line_number":349,"context_line":"                \u0027suffixes\u0027: [\u0027061\u0027],"}],"source_content_type":"text/x-python","patch_set":22,"id":"413fead8_18d66719","line":346,"updated":"2022-11-02 20:59:16.000000000","message":"These changes are only needed because the fake ring had added use_replication to its devs (which IMHO it should not do).\n\nThe reconstructor gets its nodes direct from the ring, and in real life those node dicts are not annotated with use_replication.\n\nThe reconstructor ends up passing a node dict to an SsyncSender, and ssync is hardwired to use the replication ip and port.","commit_id":"639a909be3997a957e6d210b5004331e955ee313"}],"test/unit/proxy/controllers/test_base.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4dd7e18b5c25d5bae38f6c27cfced1282cfc4bb4","unresolved":true,"context_lines":[{"line_number":1625,"context_line":"        for node in nodes:"},{"line_number":1626,"context_line":"            self.assertIn(\u0027use_replication\u0027, node)"},{"line_number":1627,"context_line":"            self.assertFalse(node[\u0027use_replication\u0027])"},{"line_number":1628,"context_line":"        self.assertEqual(other_iter, ring.get_part_nodes(0))"}],"source_content_type":"text/x-python","patch_set":28,"id":"95677a01_dad5dae5","line":1628,"updated":"2023-01-20 15:27:03.000000000","message":"i wouldn\u0027t mind seeing the assert that other_iter and future calls to get_part_nodes do NOT include the use_replication key","commit_id":"f8e17d7859ba82804c588dcfc7b5a1dffdd3bd65"}],"test/unit/proxy/test_server.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ff247b9e710bf79342cf683764aa5b6d28fd68be","unresolved":true,"context_lines":[{"line_number":1177,"context_line":"                                      use_replication_network\u003dTrue,"},{"line_number":1178,"context_line":"                                      request_tries\u003d1)"},{"line_number":1179,"context_line":"            try:"},{"line_number":1180,"context_line":"                swift_ic.get_object(account\u003d\u0027a\u0027, container\u003d\u0027c\u0027, obj\u003d\u0027obj02365\u0027)"},{"line_number":1181,"context_line":"            except Exception as err:"},{"line_number":1182,"context_line":"                caught_exc \u003d err"},{"line_number":1183,"context_line":"                app.exception_occurred(node, \u0027server-type\u0027, additional_info)"}],"source_content_type":"text/x-python","patch_set":4,"id":"64bc011a_14566259","line":1180,"updated":"2022-10-14 19:56:22.000000000","message":"i wonder what this is actaully trying to do?  like connect to the ip/port we make up in our node?","commit_id":"50d46e3d91ac34f66044488fd9568b4a2b47d55a"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"8f74713d24070a4cbce3106043f3d795f95f1914","unresolved":false,"context_lines":[{"line_number":1177,"context_line":"                                      use_replication_network\u003dTrue,"},{"line_number":1178,"context_line":"                                      request_tries\u003d1)"},{"line_number":1179,"context_line":"            try:"},{"line_number":1180,"context_line":"                swift_ic.get_object(account\u003d\u0027a\u0027, container\u003d\u0027c\u0027, obj\u003d\u0027obj02365\u0027)"},{"line_number":1181,"context_line":"            except Exception as err:"},{"line_number":1182,"context_line":"                caught_exc \u003d err"},{"line_number":1183,"context_line":"                app.exception_occurred(node, \u0027server-type\u0027, additional_info)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bd865445_53dac018","line":1180,"in_reply_to":"64bc011a_14566259","updated":"2022-10-14 21:54:06.000000000","message":"Yes, that is what the intent is, to issue any call from the client that helps us connect to the desired ip/port(replication) we want.","commit_id":"50d46e3d91ac34f66044488fd9568b4a2b47d55a"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ff247b9e710bf79342cf683764aa5b6d28fd68be","unresolved":true,"context_lines":[{"line_number":1197,"context_line":"            self.assertIs(caught_exc, log_kwargs[\u0027exc_info\u0027][1])"},{"line_number":1198,"context_line":""},{"line_number":1199,"context_line":"        do_test(\u0027success\u0027)"},{"line_number":1200,"context_line":"        do_test(\u0027succès\u0027)"},{"line_number":1201,"context_line":""},{"line_number":1202,"context_line":"    def test_exception_occurred(self):"},{"line_number":1203,"context_line":"        def do_test(additional_info):"}],"source_content_type":"text/x-python","patch_set":4,"id":"c18f0c4d_d1d0e5a4","line":1200,"updated":"2022-10-14 19:56:22.000000000","message":"it doesn\u0027t seem that valuable to me to run this test twice","commit_id":"50d46e3d91ac34f66044488fd9568b4a2b47d55a"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"8f74713d24070a4cbce3106043f3d795f95f1914","unresolved":false,"context_lines":[{"line_number":1197,"context_line":"            self.assertIs(caught_exc, log_kwargs[\u0027exc_info\u0027][1])"},{"line_number":1198,"context_line":""},{"line_number":1199,"context_line":"        do_test(\u0027success\u0027)"},{"line_number":1200,"context_line":"        do_test(\u0027succès\u0027)"},{"line_number":1201,"context_line":""},{"line_number":1202,"context_line":"    def test_exception_occurred(self):"},{"line_number":1203,"context_line":"        def do_test(additional_info):"}],"source_content_type":"text/x-python","patch_set":4,"id":"b6be14a9_3cb75489","line":1200,"in_reply_to":"c18f0c4d_d1d0e5a4","updated":"2022-10-14 21:54:06.000000000","message":"Running it only once","commit_id":"50d46e3d91ac34f66044488fd9568b4a2b47d55a"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"23c9044f132ac6926cb147191f6fb8f0af352f4b","unresolved":true,"context_lines":[{"line_number":1162,"context_line":""},{"line_number":1163,"context_line":"        self.assertEqual(controller.__name__, \u0027InfoController\u0027)"},{"line_number":1164,"context_line":""},{"line_number":1165,"context_line":"    def test_exception_occured_using_replication_network(self):"},{"line_number":1166,"context_line":"        def do_test(additional_info):"},{"line_number":1167,"context_line":"            logger \u003d debug_logger(\u0027test\u0027)"},{"line_number":1168,"context_line":"            app \u003d proxy_server.Application({},"}],"source_content_type":"text/x-python","patch_set":6,"id":"941fa55c_c55f0404","line":1165,"updated":"2022-10-17 09:05:50.000000000","message":"this fails OMM due to more mocking being needed for internal client","commit_id":"a015001ec7207dbb5ce24d2e783e1cacd6e7b8bb"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":1162,"context_line":""},{"line_number":1163,"context_line":"        self.assertEqual(controller.__name__, \u0027InfoController\u0027)"},{"line_number":1164,"context_line":""},{"line_number":1165,"context_line":"    def test_exception_occured_using_replication_network(self):"},{"line_number":1166,"context_line":"        def do_test(additional_info):"},{"line_number":1167,"context_line":"            logger \u003d debug_logger(\u0027test\u0027)"},{"line_number":1168,"context_line":"            app \u003d proxy_server.Application({},"}],"source_content_type":"text/x-python","patch_set":6,"id":"7b7d0a55_ff45e854","line":1165,"in_reply_to":"941fa55c_c55f0404","updated":"2023-02-03 20:51:17.000000000","message":"Ack","commit_id":"a015001ec7207dbb5ce24d2e783e1cacd6e7b8bb"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f4f7da7fdaab6df3cba727caf1270b66fd01437","unresolved":false,"context_lines":[{"line_number":1162,"context_line":""},{"line_number":1163,"context_line":"        self.assertEqual(controller.__name__, \u0027InfoController\u0027)"},{"line_number":1164,"context_line":""},{"line_number":1165,"context_line":"    def test_exception_occured_using_replication_network(self):"},{"line_number":1166,"context_line":"        def do_test(additional_info):"},{"line_number":1167,"context_line":"            logger \u003d debug_logger(\u0027test\u0027)"},{"line_number":1168,"context_line":"            app \u003d proxy_server.Application({},"}],"source_content_type":"text/x-python","patch_set":6,"id":"c7974325_22a3e66f","line":1165,"in_reply_to":"941fa55c_c55f0404","updated":"2022-11-02 20:59:16.000000000","message":"Done","commit_id":"a015001ec7207dbb5ce24d2e783e1cacd6e7b8bb"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0f165379bdba5089fd3df99321c1a98cac5e57f0","unresolved":true,"context_lines":[{"line_number":1176,"context_line":"                                      \u0027internal-fetcher\u0027,"},{"line_number":1177,"context_line":"                                      use_replication_network\u003dTrue,"},{"line_number":1178,"context_line":"                                      request_tries\u003d1,"},{"line_number":1179,"context_line":"                                      app\u003dapp)"},{"line_number":1180,"context_line":"            try:"},{"line_number":1181,"context_line":"                swift_ic.get_object(account\u003d\u0027a\u0027, container\u003d\u0027c\u0027, obj\u003d\u0027obj02365\u0027)"},{"line_number":1182,"context_line":"            except Exception as err:"}],"source_content_type":"text/x-python","patch_set":8,"id":"8e253529_477ff70f","line":1179,"updated":"2022-10-17 17:47:46.000000000","message":"oh, nice!","commit_id":"57c2f9481d293262ce94b8686c9927f6cc2421ed"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f4f7da7fdaab6df3cba727caf1270b66fd01437","unresolved":false,"context_lines":[{"line_number":1176,"context_line":"                                      \u0027internal-fetcher\u0027,"},{"line_number":1177,"context_line":"                                      use_replication_network\u003dTrue,"},{"line_number":1178,"context_line":"                                      request_tries\u003d1,"},{"line_number":1179,"context_line":"                                      app\u003dapp)"},{"line_number":1180,"context_line":"            try:"},{"line_number":1181,"context_line":"                swift_ic.get_object(account\u003d\u0027a\u0027, container\u003d\u0027c\u0027, obj\u003d\u0027obj02365\u0027)"},{"line_number":1182,"context_line":"            except Exception as err:"}],"source_content_type":"text/x-python","patch_set":8,"id":"a08060d2_25f614e6","line":1179,"in_reply_to":"697a66dd_87fefb2e","updated":"2022-11-02 20:59:16.000000000","message":"Done","commit_id":"57c2f9481d293262ce94b8686c9927f6cc2421ed"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":1176,"context_line":"                                      \u0027internal-fetcher\u0027,"},{"line_number":1177,"context_line":"                                      use_replication_network\u003dTrue,"},{"line_number":1178,"context_line":"                                      request_tries\u003d1,"},{"line_number":1179,"context_line":"                                      app\u003dapp)"},{"line_number":1180,"context_line":"            try:"},{"line_number":1181,"context_line":"                swift_ic.get_object(account\u003d\u0027a\u0027, container\u003d\u0027c\u0027, obj\u003d\u0027obj02365\u0027)"},{"line_number":1182,"context_line":"            except Exception as err:"}],"source_content_type":"text/x-python","patch_set":8,"id":"0b2a453f_abefdbb0","line":1179,"in_reply_to":"8e253529_477ff70f","updated":"2023-02-03 20:51:17.000000000","message":"Done","commit_id":"57c2f9481d293262ce94b8686c9927f6cc2421ed"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"461a119178ad38226dae571ab09c946c285a3e0c","unresolved":true,"context_lines":[{"line_number":1176,"context_line":"                                      \u0027internal-fetcher\u0027,"},{"line_number":1177,"context_line":"                                      use_replication_network\u003dTrue,"},{"line_number":1178,"context_line":"                                      request_tries\u003d1,"},{"line_number":1179,"context_line":"                                      app\u003dapp)"},{"line_number":1180,"context_line":"            try:"},{"line_number":1181,"context_line":"                swift_ic.get_object(account\u003d\u0027a\u0027, container\u003d\u0027c\u0027, obj\u003d\u0027obj02365\u0027)"},{"line_number":1182,"context_line":"            except Exception as err:"}],"source_content_type":"text/x-python","patch_set":8,"id":"697a66dd_87fefb2e","line":1179,"in_reply_to":"8e253529_477ff70f","updated":"2022-10-17 19:57:25.000000000","message":"wait, if we\u0027re not passing in *our* app to the internal client - how is it annotating our apps error limiting?!?","commit_id":"57c2f9481d293262ce94b8686c9927f6cc2421ed"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"566a2aa121fc3295b1abf8c76dfb31e822d438e0","unresolved":true,"context_lines":[{"line_number":1167,"context_line":"        def do_test(additional_info):"},{"line_number":1168,"context_line":"            logger \u003d debug_logger(\u0027test\u0027)"},{"line_number":1169,"context_line":"            app \u003d proxy_server.Application({},"},{"line_number":1170,"context_line":"                                           account_ring\u003dFakeRing(),"},{"line_number":1171,"context_line":"                                           container_ring\u003dFakeRing(),"},{"line_number":1172,"context_line":"                                           logger\u003dlogger)"},{"line_number":1173,"context_line":"            node \u003d app.container_ring.get_part_nodes(0)[0]"},{"line_number":1174,"context_line":"            node_key \u003d app._error_limit_node_key(node)"}],"source_content_type":"text/x-python","patch_set":13,"id":"12419739_e5024e8a","line":1171,"range":{"start_line":1170,"start_character":43,"end_line":1171,"end_character":68},"updated":"2022-10-18 14:14:37.000000000","message":"need to set separate_replication\u003dTrue for the Fake Ring, otherwise the\ntest passes even if change is reverted","commit_id":"e0848435462e5d4cb4f31fa11af1deb888b45731"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":1167,"context_line":"        def do_test(additional_info):"},{"line_number":1168,"context_line":"            logger \u003d debug_logger(\u0027test\u0027)"},{"line_number":1169,"context_line":"            app \u003d proxy_server.Application({},"},{"line_number":1170,"context_line":"                                           account_ring\u003dFakeRing(),"},{"line_number":1171,"context_line":"                                           container_ring\u003dFakeRing(),"},{"line_number":1172,"context_line":"                                           logger\u003dlogger)"},{"line_number":1173,"context_line":"            node \u003d app.container_ring.get_part_nodes(0)[0]"},{"line_number":1174,"context_line":"            node_key \u003d app._error_limit_node_key(node)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9104af99_c9fc496c","line":1171,"range":{"start_line":1170,"start_character":43,"end_line":1171,"end_character":68},"in_reply_to":"12419739_e5024e8a","updated":"2023-02-03 20:51:17.000000000","message":"Ack","commit_id":"e0848435462e5d4cb4f31fa11af1deb888b45731"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f4f7da7fdaab6df3cba727caf1270b66fd01437","unresolved":false,"context_lines":[{"line_number":1167,"context_line":"        def do_test(additional_info):"},{"line_number":1168,"context_line":"            logger \u003d debug_logger(\u0027test\u0027)"},{"line_number":1169,"context_line":"            app \u003d proxy_server.Application({},"},{"line_number":1170,"context_line":"                                           account_ring\u003dFakeRing(),"},{"line_number":1171,"context_line":"                                           container_ring\u003dFakeRing(),"},{"line_number":1172,"context_line":"                                           logger\u003dlogger)"},{"line_number":1173,"context_line":"            node \u003d app.container_ring.get_part_nodes(0)[0]"},{"line_number":1174,"context_line":"            node_key \u003d app._error_limit_node_key(node)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a844b4f_bba0a373","line":1171,"range":{"start_line":1170,"start_character":43,"end_line":1171,"end_character":68},"in_reply_to":"12419739_e5024e8a","updated":"2022-11-02 20:59:16.000000000","message":"Done","commit_id":"e0848435462e5d4cb4f31fa11af1deb888b45731"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"566a2aa121fc3295b1abf8c76dfb31e822d438e0","unresolved":true,"context_lines":[{"line_number":1183,"context_line":"                                    acceptable_statuses\u003d(4,))"},{"line_number":1184,"context_line":"            except Exception as err:"},{"line_number":1185,"context_line":"                caught_exc \u003d err"},{"line_number":1186,"context_line":"                app.exception_occurred(node, \u0027server-type\u0027, additional_info)"},{"line_number":1187,"context_line":""},{"line_number":1188,"context_line":"            self.assertEqual(1, app._error_limiting[node_key][\u0027errors\u0027])"},{"line_number":1189,"context_line":"            line \u003d logger.get_lines_for_level(\u0027error\u0027)[-1]"}],"source_content_type":"text/x-python","patch_set":13,"id":"450d2104_b899249a","line":1186,"updated":"2022-10-18 14:14:37.000000000","message":"ok, this is a similar pattern as the following test: \n\nFakeSwift does not implement error limiting, so the call to swift_ic, is merely used to generate an exception context, then app.exception_occurred is called directly on our real app.\n\nI\u0027m not sure what I think about InternalClient popping up in these proxy unit tests. test_internal_client covers the header being sent. We could just:\n\n  set_node_replication(node, {\u0027x-backend-use-replication-network\u0027: True})","commit_id":"e0848435462e5d4cb4f31fa11af1deb888b45731"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":1183,"context_line":"                                    acceptable_statuses\u003d(4,))"},{"line_number":1184,"context_line":"            except Exception as err:"},{"line_number":1185,"context_line":"                caught_exc \u003d err"},{"line_number":1186,"context_line":"                app.exception_occurred(node, \u0027server-type\u0027, additional_info)"},{"line_number":1187,"context_line":""},{"line_number":1188,"context_line":"            self.assertEqual(1, app._error_limiting[node_key][\u0027errors\u0027])"},{"line_number":1189,"context_line":"            line \u003d logger.get_lines_for_level(\u0027error\u0027)[-1]"}],"source_content_type":"text/x-python","patch_set":13,"id":"dc778785_fe320d10","line":1186,"in_reply_to":"450d2104_b899249a","updated":"2023-02-03 20:51:17.000000000","message":"Ack","commit_id":"e0848435462e5d4cb4f31fa11af1deb888b45731"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f4f7da7fdaab6df3cba727caf1270b66fd01437","unresolved":false,"context_lines":[{"line_number":1183,"context_line":"                                    acceptable_statuses\u003d(4,))"},{"line_number":1184,"context_line":"            except Exception as err:"},{"line_number":1185,"context_line":"                caught_exc \u003d err"},{"line_number":1186,"context_line":"                app.exception_occurred(node, \u0027server-type\u0027, additional_info)"},{"line_number":1187,"context_line":""},{"line_number":1188,"context_line":"            self.assertEqual(1, app._error_limiting[node_key][\u0027errors\u0027])"},{"line_number":1189,"context_line":"            line \u003d logger.get_lines_for_level(\u0027error\u0027)[-1]"}],"source_content_type":"text/x-python","patch_set":13,"id":"325e69d5_337407b4","line":1186,"in_reply_to":"450d2104_b899249a","updated":"2022-11-02 20:59:16.000000000","message":"Done","commit_id":"e0848435462e5d4cb4f31fa11af1deb888b45731"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"566a2aa121fc3295b1abf8c76dfb31e822d438e0","unresolved":true,"context_lines":[{"line_number":1199,"context_line":"            self.assertTrue(log_kwargs[\u0027exc_info\u0027])"},{"line_number":1200,"context_line":"            self.assertIs(caught_exc, log_kwargs[\u0027exc_info\u0027][1])"},{"line_number":1201,"context_line":""},{"line_number":1202,"context_line":"        do_test(\u0027success\u0027)"},{"line_number":1203,"context_line":""},{"line_number":1204,"context_line":"    def test_exception_occurred(self):"},{"line_number":1205,"context_line":"        def do_test(additional_info):"}],"source_content_type":"text/x-python","patch_set":13,"id":"a9eb17de_20f005aa","line":1202,"updated":"2022-10-18 14:14:37.000000000","message":"did you mean to call do_test again with different args?","commit_id":"e0848435462e5d4cb4f31fa11af1deb888b45731"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":1199,"context_line":"            self.assertTrue(log_kwargs[\u0027exc_info\u0027])"},{"line_number":1200,"context_line":"            self.assertIs(caught_exc, log_kwargs[\u0027exc_info\u0027][1])"},{"line_number":1201,"context_line":""},{"line_number":1202,"context_line":"        do_test(\u0027success\u0027)"},{"line_number":1203,"context_line":""},{"line_number":1204,"context_line":"    def test_exception_occurred(self):"},{"line_number":1205,"context_line":"        def do_test(additional_info):"}],"source_content_type":"text/x-python","patch_set":13,"id":"95a42849_10a95b05","line":1202,"in_reply_to":"a9eb17de_20f005aa","updated":"2023-02-03 20:51:17.000000000","message":"Ack","commit_id":"e0848435462e5d4cb4f31fa11af1deb888b45731"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f4f7da7fdaab6df3cba727caf1270b66fd01437","unresolved":false,"context_lines":[{"line_number":1199,"context_line":"            self.assertTrue(log_kwargs[\u0027exc_info\u0027])"},{"line_number":1200,"context_line":"            self.assertIs(caught_exc, log_kwargs[\u0027exc_info\u0027][1])"},{"line_number":1201,"context_line":""},{"line_number":1202,"context_line":"        do_test(\u0027success\u0027)"},{"line_number":1203,"context_line":""},{"line_number":1204,"context_line":"    def test_exception_occurred(self):"},{"line_number":1205,"context_line":"        def do_test(additional_info):"}],"source_content_type":"text/x-python","patch_set":13,"id":"3191caf9_85dc16e6","line":1202,"in_reply_to":"a9eb17de_20f005aa","updated":"2022-11-02 20:59:16.000000000","message":"Done","commit_id":"e0848435462e5d4cb4f31fa11af1deb888b45731"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a7fa786b23e8430c51a8ed2d5a1bb582ee5344ca","unresolved":true,"context_lines":[{"line_number":1161,"context_line":""},{"line_number":1162,"context_line":"        self.assertEqual(controller.__name__, \u0027InfoController\u0027)"},{"line_number":1163,"context_line":""},{"line_number":1164,"context_line":"    def test_exception_occurred_replication_ip_port_logging(self):"},{"line_number":1165,"context_line":"        logger \u003d debug_logger(\u0027test\u0027)"},{"line_number":1166,"context_line":"        app \u003d proxy_server.Application("},{"line_number":1167,"context_line":"            {},"}],"source_content_type":"text/x-python","patch_set":22,"id":"2924a54e_950f39ae","line":1164,"updated":"2022-11-02 21:01:59.000000000","message":"could you try adding a similar test for error_occurred?","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":1161,"context_line":""},{"line_number":1162,"context_line":"        self.assertEqual(controller.__name__, \u0027InfoController\u0027)"},{"line_number":1163,"context_line":""},{"line_number":1164,"context_line":"    def test_exception_occurred_replication_ip_port_logging(self):"},{"line_number":1165,"context_line":"        logger \u003d debug_logger(\u0027test\u0027)"},{"line_number":1166,"context_line":"        app \u003d proxy_server.Application("},{"line_number":1167,"context_line":"            {},"}],"source_content_type":"text/x-python","patch_set":22,"id":"5ccaf530_78abfd8f","line":1164,"in_reply_to":"2924a54e_950f39ae","updated":"2023-02-03 20:51:17.000000000","message":"Ack","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f4f7da7fdaab6df3cba727caf1270b66fd01437","unresolved":true,"context_lines":[{"line_number":1190,"context_line":"        self.assertEqual(1, sum([node_error_count(app, node)"},{"line_number":1191,"context_line":"                                 for node in nodes]))"},{"line_number":1192,"context_line":"        annotated_nodes \u003d [dict(node, use_replication\u003dTrue) for node in nodes]"},{"line_number":1193,"context_line":"        self.assertEqual(1, sum([node_error_count(app, node)"},{"line_number":1194,"context_line":"                                 for node in annotated_nodes]))"},{"line_number":1195,"context_line":""},{"line_number":1196,"context_line":"        logger.clear()"}],"source_content_type":"text/x-python","patch_set":22,"id":"e27b12a4_72cc5036","line":1193,"updated":"2022-11-02 20:59:16.000000000","message":"why did this value change from patchset 17? (it was zero)\n\nI think it is because the rebase onto the node_string change broke the test - the assertion should still be 0\n\nNote: we\u0027re checking that the error limiter counter is incremented for the right \"node\" - but there is a separate counter for the normal replication vs the replication network for each node, and they are looked up based on the \u0027node_string\u0027","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0eaf6f101f83ffc5c273761a48715b64515df861","unresolved":false,"context_lines":[{"line_number":1190,"context_line":"        self.assertEqual(1, sum([node_error_count(app, node)"},{"line_number":1191,"context_line":"                                 for node in nodes]))"},{"line_number":1192,"context_line":"        annotated_nodes \u003d [dict(node, use_replication\u003dTrue) for node in nodes]"},{"line_number":1193,"context_line":"        self.assertEqual(1, sum([node_error_count(app, node)"},{"line_number":1194,"context_line":"                                 for node in annotated_nodes]))"},{"line_number":1195,"context_line":""},{"line_number":1196,"context_line":"        logger.clear()"}],"source_content_type":"text/x-python","patch_set":22,"id":"f1fc758d_96ab72e3","line":1193,"in_reply_to":"e27b12a4_72cc5036","updated":"2022-11-18 16:58:31.000000000","message":"Done","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f4f7da7fdaab6df3cba727caf1270b66fd01437","unresolved":true,"context_lines":[{"line_number":1207,"context_line":"                                node[\u0027replication_port\u0027],"},{"line_number":1208,"context_line":"                                node[\u0027device\u0027]) in line for node in nodes]"},{"line_number":1209,"context_line":"        logged.sort()"},{"line_number":1210,"context_line":"        self.assertEqual([False, False, False], logged, line)"},{"line_number":1211,"context_line":"        self.assertEqual(2, sum([node_error_count(app, node)"},{"line_number":1212,"context_line":"                                 for node in nodes]))  # unchanged"},{"line_number":1213,"context_line":"        annotated_nodes \u003d [dict(node, use_replication\u003dTrue) for node in nodes]"}],"source_content_type":"text/x-python","patch_set":22,"id":"edbdb49c_c53f07a1","line":1210,"range":{"start_line":1210,"start_character":39,"end_line":1210,"end_character":45},"updated":"2022-11-02 20:59:16.000000000","message":"no, this should be True!","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0eaf6f101f83ffc5c273761a48715b64515df861","unresolved":false,"context_lines":[{"line_number":1207,"context_line":"                                node[\u0027replication_port\u0027],"},{"line_number":1208,"context_line":"                                node[\u0027device\u0027]) in line for node in nodes]"},{"line_number":1209,"context_line":"        logged.sort()"},{"line_number":1210,"context_line":"        self.assertEqual([False, False, False], logged, line)"},{"line_number":1211,"context_line":"        self.assertEqual(2, sum([node_error_count(app, node)"},{"line_number":1212,"context_line":"                                 for node in nodes]))  # unchanged"},{"line_number":1213,"context_line":"        annotated_nodes \u003d [dict(node, use_replication\u003dTrue) for node in nodes]"}],"source_content_type":"text/x-python","patch_set":22,"id":"99351766_b1314e78","line":1210,"range":{"start_line":1210,"start_character":39,"end_line":1210,"end_character":45},"in_reply_to":"edbdb49c_c53f07a1","updated":"2022-11-18 16:58:31.000000000","message":"Done","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a7fa786b23e8430c51a8ed2d5a1bb582ee5344ca","unresolved":true,"context_lines":[{"line_number":1211,"context_line":"        self.assertEqual(2, sum([node_error_count(app, node)"},{"line_number":1212,"context_line":"                                 for node in nodes]))  # unchanged"},{"line_number":1213,"context_line":"        annotated_nodes \u003d [dict(node, use_replication\u003dTrue) for node in nodes]"},{"line_number":1214,"context_line":"        self.assertEqual(2, sum([node_error_count(app, node)"},{"line_number":1215,"context_line":"                                 for node in annotated_nodes]))"},{"line_number":1216,"context_line":""},{"line_number":1217,"context_line":"    def test_exception_occurred(self):"}],"source_content_type":"text/x-python","patch_set":22,"id":"cbf819c7_34051463","line":1214,"range":{"start_line":1214,"start_character":25,"end_line":1214,"end_character":26},"updated":"2022-11-02 21:01:59.000000000","message":"this also changed?","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":1211,"context_line":"        self.assertEqual(2, sum([node_error_count(app, node)"},{"line_number":1212,"context_line":"                                 for node in nodes]))  # unchanged"},{"line_number":1213,"context_line":"        annotated_nodes \u003d [dict(node, use_replication\u003dTrue) for node in nodes]"},{"line_number":1214,"context_line":"        self.assertEqual(2, sum([node_error_count(app, node)"},{"line_number":1215,"context_line":"                                 for node in annotated_nodes]))"},{"line_number":1216,"context_line":""},{"line_number":1217,"context_line":"    def test_exception_occurred(self):"}],"source_content_type":"text/x-python","patch_set":22,"id":"c175d699_bdabbd3e","line":1214,"range":{"start_line":1214,"start_character":25,"end_line":1214,"end_character":26},"in_reply_to":"cbf819c7_34051463","updated":"2023-02-03 20:51:17.000000000","message":"Ack","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0eaf6f101f83ffc5c273761a48715b64515df861","unresolved":false,"context_lines":[{"line_number":1211,"context_line":"        self.assertEqual(2, sum([node_error_count(app, node)"},{"line_number":1212,"context_line":"                                 for node in nodes]))  # unchanged"},{"line_number":1213,"context_line":"        annotated_nodes \u003d [dict(node, use_replication\u003dTrue) for node in nodes]"},{"line_number":1214,"context_line":"        self.assertEqual(2, sum([node_error_count(app, node)"},{"line_number":1215,"context_line":"                                 for node in annotated_nodes]))"},{"line_number":1216,"context_line":""},{"line_number":1217,"context_line":"    def test_exception_occurred(self):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1b5e8f44_81300f2e","line":1214,"range":{"start_line":1214,"start_character":25,"end_line":1214,"end_character":26},"in_reply_to":"cbf819c7_34051463","updated":"2022-11-18 16:58:31.000000000","message":"Done","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f4f7da7fdaab6df3cba727caf1270b66fd01437","unresolved":true,"context_lines":[{"line_number":5257,"context_line":"    def test_iter_nodes_with_custom_node_iter(self):"},{"line_number":5258,"context_line":"        object_ring \u003d self.app.get_object_ring(None)"},{"line_number":5259,"context_line":"        node_list \u003d [dict(id\u003dn, ip\u003d\u00271.2.3.4\u0027, port\u003dn, device\u003d\u0027D\u0027,"},{"line_number":5260,"context_line":"                          use_replication\u003dFalse)"},{"line_number":5261,"context_line":"                     for n in range(10)]"},{"line_number":5262,"context_line":"        with mock.patch.object(self.app, \u0027sort_nodes\u0027,"},{"line_number":5263,"context_line":"                               lambda n, *args, **kwargs: n), \\"}],"source_content_type":"text/x-python","patch_set":22,"id":"c777fb86_4aebe926","line":5260,"updated":"2022-11-02 20:59:16.000000000","message":"these nodes are fed into the NodeIter so should not be annotated","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":5257,"context_line":"    def test_iter_nodes_with_custom_node_iter(self):"},{"line_number":5258,"context_line":"        object_ring \u003d self.app.get_object_ring(None)"},{"line_number":5259,"context_line":"        node_list \u003d [dict(id\u003dn, ip\u003d\u00271.2.3.4\u0027, port\u003dn, device\u003d\u0027D\u0027,"},{"line_number":5260,"context_line":"                          use_replication\u003dFalse)"},{"line_number":5261,"context_line":"                     for n in range(10)]"},{"line_number":5262,"context_line":"        with mock.patch.object(self.app, \u0027sort_nodes\u0027,"},{"line_number":5263,"context_line":"                               lambda n, *args, **kwargs: n), \\"}],"source_content_type":"text/x-python","patch_set":22,"id":"0fca2435_74aceef2","line":5260,"in_reply_to":"c777fb86_4aebe926","updated":"2023-02-03 20:51:17.000000000","message":"Ack","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8d5a74b6ae43621ddb6822e043993c823b90726a","unresolved":false,"context_lines":[{"line_number":5257,"context_line":"    def test_iter_nodes_with_custom_node_iter(self):"},{"line_number":5258,"context_line":"        object_ring \u003d self.app.get_object_ring(None)"},{"line_number":5259,"context_line":"        node_list \u003d [dict(id\u003dn, ip\u003d\u00271.2.3.4\u0027, port\u003dn, device\u003d\u0027D\u0027,"},{"line_number":5260,"context_line":"                          use_replication\u003dFalse)"},{"line_number":5261,"context_line":"                     for n in range(10)]"},{"line_number":5262,"context_line":"        with mock.patch.object(self.app, \u0027sort_nodes\u0027,"},{"line_number":5263,"context_line":"                               lambda n, *args, **kwargs: n), \\"}],"source_content_type":"text/x-python","patch_set":22,"id":"4307e5d4_27deec3e","line":5260,"in_reply_to":"c777fb86_4aebe926","updated":"2022-11-28 10:52:26.000000000","message":"So here\u0027s what I was concerned about in more detail:\n\nUsually the NodeIter is taking source node dicts from a Ring, and those source node dicts do not have a use_replication item. Then the NodeIter adds use_replication to the dict. In that sense the test is unrealistic in that the NodeIter is being fed source dicts that already have use_replication. I therefore expected line 5429 to change to remove us_replication\u003dFalse.\n\nHowever, on reflection, I can see that it is useful to test the case when a custom iter is given to the NodeIter and the source dicts DO have use_replication, because that is allowed by the interface. So let\u0027s stick with line 5429 as you have it.\n\nBUT let\u0027s actually assert that the NodeIter would *change* use_replication in the source dict when required....","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f4f7da7fdaab6df3cba727caf1270b66fd01437","unresolved":true,"context_lines":[{"line_number":5266,"context_line":"            got_nodes \u003d list(self.app.iter_nodes(object_ring, 0, self.logger,"},{"line_number":5267,"context_line":"                                                 node_iter\u003diter(node_list),"},{"line_number":5268,"context_line":"                                                 request\u003dNone))"},{"line_number":5269,"context_line":"        self.assertEqual(node_list[:3], got_nodes)"},{"line_number":5270,"context_line":""},{"line_number":5271,"context_line":"        with mock.patch.object(self.app, \u0027sort_nodes\u0027,"},{"line_number":5272,"context_line":"                               lambda n, *args, **kwargs: n), \\"}],"source_content_type":"text/x-python","patch_set":22,"id":"65652da2_a01dc45e","line":5269,"range":{"start_line":5269,"start_character":25,"end_line":5269,"end_character":38},"updated":"2022-11-02 20:59:16.000000000","message":"but the expected nodes do need to be annotated","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":5266,"context_line":"            got_nodes \u003d list(self.app.iter_nodes(object_ring, 0, self.logger,"},{"line_number":5267,"context_line":"                                                 node_iter\u003diter(node_list),"},{"line_number":5268,"context_line":"                                                 request\u003dNone))"},{"line_number":5269,"context_line":"        self.assertEqual(node_list[:3], got_nodes)"},{"line_number":5270,"context_line":""},{"line_number":5271,"context_line":"        with mock.patch.object(self.app, \u0027sort_nodes\u0027,"},{"line_number":5272,"context_line":"                               lambda n, *args, **kwargs: n), \\"}],"source_content_type":"text/x-python","patch_set":22,"id":"881dbd96_f7ed31fb","line":5269,"range":{"start_line":5269,"start_character":25,"end_line":5269,"end_character":38},"in_reply_to":"65652da2_a01dc45e","updated":"2023-02-03 20:51:17.000000000","message":"Ack","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"89b66df614c51edad43a8b080ab5f56c1ae19955","unresolved":false,"context_lines":[{"line_number":5266,"context_line":"            got_nodes \u003d list(self.app.iter_nodes(object_ring, 0, self.logger,"},{"line_number":5267,"context_line":"                                                 node_iter\u003diter(node_list),"},{"line_number":5268,"context_line":"                                                 request\u003dNone))"},{"line_number":5269,"context_line":"        self.assertEqual(node_list[:3], got_nodes)"},{"line_number":5270,"context_line":""},{"line_number":5271,"context_line":"        with mock.patch.object(self.app, \u0027sort_nodes\u0027,"},{"line_number":5272,"context_line":"                               lambda n, *args, **kwargs: n), \\"}],"source_content_type":"text/x-python","patch_set":22,"id":"23f16cae_ba9db23d","line":5269,"range":{"start_line":5269,"start_character":25,"end_line":5269,"end_character":38},"in_reply_to":"65652da2_a01dc45e","updated":"2023-01-16 10:19:54.000000000","message":"Done","commit_id":"639a909be3997a957e6d210b5004331e955ee313"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0eaf6f101f83ffc5c273761a48715b64515df861","unresolved":true,"context_lines":[{"line_number":1192,"context_line":"        self.assertIn(\u0027%s:%s/%s\u0027 % (nodes[0][\u0027ip\u0027],"},{"line_number":1193,"context_line":"                                    nodes[0][\u0027port\u0027],"},{"line_number":1194,"context_line":"                                    nodes[0][\u0027device\u0027]), line)"},{"line_number":1195,"context_line":"        logged \u003d [\u0027%s:%s/%s\u0027 % (node[\u0027ip\u0027],"},{"line_number":1196,"context_line":"                                node[\u0027port\u0027],"},{"line_number":1197,"context_line":"                                node[\u0027device\u0027]) in line for node in nodes]"},{"line_number":1198,"context_line":"        logged.sort()"},{"line_number":1199,"context_line":"        self.assertEqual([False, False, True], logged, line)"},{"line_number":1200,"context_line":"        self.assertEqual(1, sum([node_error_count(app, node)"},{"line_number":1201,"context_line":"                                 for node in nodes]))"},{"line_number":1202,"context_line":"        annotated_nodes \u003d [dict(node, use_replication\u003dTrue) for node in nodes]"}],"source_content_type":"text/x-python","patch_set":26,"id":"39f059da_2c849ee2","line":1199,"range":{"start_line":1195,"start_character":8,"end_line":1199,"end_character":60},"updated":"2022-11-18 16:58:31.000000000","message":"this isn\u0027t necessary - the app is monkey-patched to return nodes in original order, so node[0] is always used, and line 1192 assert that node is logged","commit_id":"fc7275d940b7149f92bae9efa63c63be15a4524b"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8d5a74b6ae43621ddb6822e043993c823b90726a","unresolved":false,"context_lines":[{"line_number":1192,"context_line":"        self.assertIn(\u0027%s:%s/%s\u0027 % (nodes[0][\u0027ip\u0027],"},{"line_number":1193,"context_line":"                                    nodes[0][\u0027port\u0027],"},{"line_number":1194,"context_line":"                                    nodes[0][\u0027device\u0027]), line)"},{"line_number":1195,"context_line":"        logged \u003d [\u0027%s:%s/%s\u0027 % (node[\u0027ip\u0027],"},{"line_number":1196,"context_line":"                                node[\u0027port\u0027],"},{"line_number":1197,"context_line":"                                node[\u0027device\u0027]) in line for node in nodes]"},{"line_number":1198,"context_line":"        logged.sort()"},{"line_number":1199,"context_line":"        self.assertEqual([False, False, True], logged, line)"},{"line_number":1200,"context_line":"        self.assertEqual(1, sum([node_error_count(app, node)"},{"line_number":1201,"context_line":"                                 for node in nodes]))"},{"line_number":1202,"context_line":"        annotated_nodes \u003d [dict(node, use_replication\u003dTrue) for node in nodes]"}],"source_content_type":"text/x-python","patch_set":26,"id":"10706baa_ee5c9def","line":1199,"range":{"start_line":1195,"start_character":8,"end_line":1199,"end_character":60},"in_reply_to":"39f059da_2c849ee2","updated":"2022-11-28 10:52:26.000000000","message":"Done","commit_id":"fc7275d940b7149f92bae9efa63c63be15a4524b"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0eaf6f101f83ffc5c273761a48715b64515df861","unresolved":true,"context_lines":[{"line_number":1216,"context_line":"                                    nodes[0][\u0027device\u0027]), line)"},{"line_number":1217,"context_line":"        self.assertEqual(1, sum([node_error_count(app, node)"},{"line_number":1218,"context_line":"                                 for node in nodes]))"},{"line_number":1219,"context_line":"        self.assertEqual([False, False, True], logged, line)"},{"line_number":1220,"context_line":"        annotated_nodes \u003d [dict(node, use_replication\u003dTrue) for node in nodes]"},{"line_number":1221,"context_line":"        self.assertEqual(1, sum([node_error_count(app, node)"},{"line_number":1222,"context_line":"                                 for node in annotated_nodes]))"}],"source_content_type":"text/x-python","patch_set":26,"id":"63af44b0_a2e25e6e","line":1219,"range":{"start_line":1219,"start_character":47,"end_line":1219,"end_character":53},"updated":"2022-11-18 16:58:31.000000000","message":"this is the logged that was assigned at line 1195 - it hasn\u0027t been reassigned - I think this line needs to go?","commit_id":"fc7275d940b7149f92bae9efa63c63be15a4524b"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8d5a74b6ae43621ddb6822e043993c823b90726a","unresolved":false,"context_lines":[{"line_number":1216,"context_line":"                                    nodes[0][\u0027device\u0027]), line)"},{"line_number":1217,"context_line":"        self.assertEqual(1, sum([node_error_count(app, node)"},{"line_number":1218,"context_line":"                                 for node in nodes]))"},{"line_number":1219,"context_line":"        self.assertEqual([False, False, True], logged, line)"},{"line_number":1220,"context_line":"        annotated_nodes \u003d [dict(node, use_replication\u003dTrue) for node in nodes]"},{"line_number":1221,"context_line":"        self.assertEqual(1, sum([node_error_count(app, node)"},{"line_number":1222,"context_line":"                                 for node in annotated_nodes]))"}],"source_content_type":"text/x-python","patch_set":26,"id":"47130c6f_e103062d","line":1219,"range":{"start_line":1219,"start_character":47,"end_line":1219,"end_character":53},"in_reply_to":"63af44b0_a2e25e6e","updated":"2022-11-28 10:52:26.000000000","message":"Done","commit_id":"fc7275d940b7149f92bae9efa63c63be15a4524b"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0eaf6f101f83ffc5c273761a48715b64515df861","unresolved":true,"context_lines":[{"line_number":5450,"context_line":"                                  lambda r: 1000000):"},{"line_number":5451,"context_line":"            got_nodes \u003d list(self.app.iter_nodes(object_ring, 0, self.logger,"},{"line_number":5452,"context_line":"                                                 node_iter\u003diter(node_list)))"},{"line_number":5453,"context_line":"        self.assertEqual(node_list, got_nodes)"},{"line_number":5454,"context_line":""},{"line_number":5455,"context_line":"    def test_best_response_sets_headers(self):"},{"line_number":5456,"context_line":"        controller \u003d ReplicatedObjectController("}],"source_content_type":"text/x-python","patch_set":26,"id":"c2e2bf80_69125837","line":5453,"updated":"2022-11-18 16:58:31.000000000","message":"I suggested one more test here https://review.opendev.org/c/openstack/swift/+/863438/1/test/unit/proxy/test_server.py#5280","commit_id":"fc7275d940b7149f92bae9efa63c63be15a4524b"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8d5a74b6ae43621ddb6822e043993c823b90726a","unresolved":false,"context_lines":[{"line_number":5450,"context_line":"                                  lambda r: 1000000):"},{"line_number":5451,"context_line":"            got_nodes \u003d list(self.app.iter_nodes(object_ring, 0, self.logger,"},{"line_number":5452,"context_line":"                                                 node_iter\u003diter(node_list)))"},{"line_number":5453,"context_line":"        self.assertEqual(node_list, got_nodes)"},{"line_number":5454,"context_line":""},{"line_number":5455,"context_line":"    def test_best_response_sets_headers(self):"},{"line_number":5456,"context_line":"        controller \u003d ReplicatedObjectController("}],"source_content_type":"text/x-python","patch_set":26,"id":"ea08d0d6_7c123bdc","line":5453,"in_reply_to":"c2e2bf80_69125837","updated":"2022-11-28 10:52:26.000000000","message":"Done","commit_id":"fc7275d940b7149f92bae9efa63c63be15a4524b"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8d5a74b6ae43621ddb6822e043993c823b90726a","unresolved":true,"context_lines":[{"line_number":5436,"context_line":"            got_nodes \u003d list(self.app.iter_nodes(object_ring, 0, self.logger,"},{"line_number":5437,"context_line":"                                                 node_iter\u003diter(node_list),"},{"line_number":5438,"context_line":"                                                 request\u003dNone))"},{"line_number":5439,"context_line":"        expected \u003d [dict(n, use_replication\u003dFalse) for n in node_list]"},{"line_number":5440,"context_line":"        self.assertEqual(expected[:3], got_nodes)"},{"line_number":5441,"context_line":""},{"line_number":5442,"context_line":"        with mock.patch.object(self.app, \u0027sort_nodes\u0027,"}],"source_content_type":"text/x-python","patch_set":27,"id":"ceebc3f6_225cdab0","line":5439,"updated":"2022-11-28 10:52:26.000000000","message":"ok, use_replication may have been modified so explicitly reset it in the expected list.\n\nnit: if expected was assigned before line 5432, before iter_nodes is called, you would not have to set use_replication\u003dFalse again here.","commit_id":"14b1f87bb7da1905a4a91723e8f3bbc907710336"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"89b66df614c51edad43a8b080ab5f56c1ae19955","unresolved":false,"context_lines":[{"line_number":5436,"context_line":"            got_nodes \u003d list(self.app.iter_nodes(object_ring, 0, self.logger,"},{"line_number":5437,"context_line":"                                                 node_iter\u003diter(node_list),"},{"line_number":5438,"context_line":"                                                 request\u003dNone))"},{"line_number":5439,"context_line":"        expected \u003d [dict(n, use_replication\u003dFalse) for n in node_list]"},{"line_number":5440,"context_line":"        self.assertEqual(expected[:3], got_nodes)"},{"line_number":5441,"context_line":""},{"line_number":5442,"context_line":"        with mock.patch.object(self.app, \u0027sort_nodes\u0027,"}],"source_content_type":"text/x-python","patch_set":27,"id":"c6351508_08bd2b4a","line":5439,"in_reply_to":"ceebc3f6_225cdab0","updated":"2023-01-16 10:19:54.000000000","message":"Done","commit_id":"14b1f87bb7da1905a4a91723e8f3bbc907710336"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8d5a74b6ae43621ddb6822e043993c823b90726a","unresolved":true,"context_lines":[{"line_number":5447,"context_line":"                                                 node_iter\u003diter(node_list)))"},{"line_number":5448,"context_line":"        self.assertEqual(expected, got_nodes)"},{"line_number":5449,"context_line":""},{"line_number":5450,"context_line":"    def test_iter_nodes_with_replication_network(self):"},{"line_number":5451,"context_line":"        object_ring \u003d self.app.get_object_ring(None)"},{"line_number":5452,"context_line":"        node_list \u003d [dict(id\u003dn, ip\u003d\u00271.2.3.4\u0027, port\u003dn, device\u003d\u0027D\u0027)"},{"line_number":5453,"context_line":"                     for n in range(10)]"}],"source_content_type":"text/x-python","patch_set":27,"id":"d82facfe_2ca1d10b","line":5450,"updated":"2022-11-28 10:52:26.000000000","message":"nit: this is very similar to the previous test but the test names are very different - future us will appreciate a hint in the naming that they are similar. Maybe this test should be called test_iter_nodes_with_replication_network and the one above called test_iter_nodes_without_replication_network","commit_id":"14b1f87bb7da1905a4a91723e8f3bbc907710336"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0064a07dfecd7d39eaa9a019f810d27f1803dcce","unresolved":false,"context_lines":[{"line_number":5447,"context_line":"                                                 node_iter\u003diter(node_list)))"},{"line_number":5448,"context_line":"        self.assertEqual(expected, got_nodes)"},{"line_number":5449,"context_line":""},{"line_number":5450,"context_line":"    def test_iter_nodes_with_replication_network(self):"},{"line_number":5451,"context_line":"        object_ring \u003d self.app.get_object_ring(None)"},{"line_number":5452,"context_line":"        node_list \u003d [dict(id\u003dn, ip\u003d\u00271.2.3.4\u0027, port\u003dn, device\u003d\u0027D\u0027)"},{"line_number":5453,"context_line":"                     for n in range(10)]"}],"source_content_type":"text/x-python","patch_set":27,"id":"cc1e1006_44950e3a","line":5450,"in_reply_to":"d82facfe_2ca1d10b","updated":"2023-02-07 10:33:06.000000000","message":"Done","commit_id":"14b1f87bb7da1905a4a91723e8f3bbc907710336"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8d5a74b6ae43621ddb6822e043993c823b90726a","unresolved":true,"context_lines":[{"line_number":5451,"context_line":"        object_ring \u003d self.app.get_object_ring(None)"},{"line_number":5452,"context_line":"        node_list \u003d [dict(id\u003dn, ip\u003d\u00271.2.3.4\u0027, port\u003dn, device\u003d\u0027D\u0027)"},{"line_number":5453,"context_line":"                     for n in range(10)]"},{"line_number":5454,"context_line":"        req \u003d Request.blank("},{"line_number":5455,"context_line":"            \u0027/v1/a/c\u0027, headers\u003d{\u0027x-backend-use-replication-network\u0027: \u0027true\u0027})"},{"line_number":5456,"context_line":"        with mock.patch.object(self.app, \u0027sort_nodes\u0027,"},{"line_number":5457,"context_line":"                               lambda n, *args, **kwargs: n), \\"},{"line_number":5458,"context_line":"                mock.patch.object(self.app, \u0027request_node_count\u0027,"},{"line_number":5459,"context_line":"                                  lambda r: 3):"},{"line_number":5460,"context_line":"            got_nodes \u003d list(self.app.iter_nodes(object_ring, 0, self.logger,"},{"line_number":5461,"context_line":"                                                 node_iter\u003diter(node_list),"},{"line_number":5462,"context_line":"                                                 request\u003dreq))"},{"line_number":5463,"context_line":"        expected \u003d [dict(n, use_replication\u003dTrue) for n in node_list]"},{"line_number":5464,"context_line":"        self.assertEqual(expected[:3], got_nodes)"},{"line_number":5465,"context_line":""},{"line_number":5466,"context_line":"        with mock.patch.object(self.app, \u0027sort_nodes\u0027,"},{"line_number":5467,"context_line":"                               lambda n, *args, **kwargs: n), \\"}],"source_content_type":"text/x-python","patch_set":27,"id":"f9af26fa_977a2307","line":5464,"range":{"start_line":5454,"start_character":7,"end_line":5464,"end_character":49},"updated":"2022-11-28 10:52:26.000000000","message":"It would be great to have this test scenario added to the previous test so that we cover these vectors:\n\n* custom node_iter had source node dicts with and without the use_replication item\n\n* call to iter_nodes passes a Request with and without a \u0027x-backend-use-replication-network\u0027 header\n\nThe interesting scenario that is not yet covered is to pass a request to iter_nodes with a header that causes use_replication to be set to True, when the source dicts already have use_replication\u003dFalse, and to assert that even when the source_node dicts have use_replication\u003dFalse, the NodeIter will set use_replication according to the Request headers.\n\nAnd, ditto, that if source_dicts have use_replication\u003dTrue but the header has \u0027x-backend-use-replication-network\u0027\u003dFalse, then the output dicts will have use_replication\u003dTrue","commit_id":"14b1f87bb7da1905a4a91723e8f3bbc907710336"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"66d139e67eca6099c3b4faa54e8187c8f2230ad6","unresolved":false,"context_lines":[{"line_number":5451,"context_line":"        object_ring \u003d self.app.get_object_ring(None)"},{"line_number":5452,"context_line":"        node_list \u003d [dict(id\u003dn, ip\u003d\u00271.2.3.4\u0027, port\u003dn, device\u003d\u0027D\u0027)"},{"line_number":5453,"context_line":"                     for n in range(10)]"},{"line_number":5454,"context_line":"        req \u003d Request.blank("},{"line_number":5455,"context_line":"            \u0027/v1/a/c\u0027, headers\u003d{\u0027x-backend-use-replication-network\u0027: \u0027true\u0027})"},{"line_number":5456,"context_line":"        with mock.patch.object(self.app, \u0027sort_nodes\u0027,"},{"line_number":5457,"context_line":"                               lambda n, *args, **kwargs: n), \\"},{"line_number":5458,"context_line":"                mock.patch.object(self.app, \u0027request_node_count\u0027,"},{"line_number":5459,"context_line":"                                  lambda r: 3):"},{"line_number":5460,"context_line":"            got_nodes \u003d list(self.app.iter_nodes(object_ring, 0, self.logger,"},{"line_number":5461,"context_line":"                                                 node_iter\u003diter(node_list),"},{"line_number":5462,"context_line":"                                                 request\u003dreq))"},{"line_number":5463,"context_line":"        expected \u003d [dict(n, use_replication\u003dTrue) for n in node_list]"},{"line_number":5464,"context_line":"        self.assertEqual(expected[:3], got_nodes)"},{"line_number":5465,"context_line":""},{"line_number":5466,"context_line":"        with mock.patch.object(self.app, \u0027sort_nodes\u0027,"},{"line_number":5467,"context_line":"                               lambda n, *args, **kwargs: n), \\"}],"source_content_type":"text/x-python","patch_set":27,"id":"c95afeb2_eb8d3dfd","line":5464,"range":{"start_line":5454,"start_character":7,"end_line":5464,"end_character":49},"in_reply_to":"f9af26fa_977a2307","updated":"2023-02-03 20:51:17.000000000","message":"Ack","commit_id":"14b1f87bb7da1905a4a91723e8f3bbc907710336"}]}
