)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"583eca5edae6a0cf6790f9db4f0198a3422aa0d1","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow sending hashes by json in the reconstructor"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is a follow up patch to also allow the reconstructor to send hashes"},{"line_number":10,"context_line":"via json. However there is a problem. The hashes.pkl format we\u0027ve"},{"line_number":11,"context_line":"decided to use for EC doesn\u0027t nicely support json\u0027s definition of dicts."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"e1b070ba_c9c35ab0","line":9,"range":{"start_line":9,"start_character":61,"end_line":9,"end_character":65},"updated":"2021-02-16 03:38:56.000000000","message":"nit: accept ;-)","commit_id":"d95d20f999304969da5ccff81d67c453d3b3d5eb"}],"swift/obj/reconstructor.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"66f149ae1884aec832359ae09823f963dc45e0ca","unresolved":true,"context_lines":[{"line_number":677,"context_line":"            elif isinstance(k, six.text_type) and k.isdigit() \\"},{"line_number":678,"context_line":"                    and int(k) not in d:"},{"line_number":679,"context_line":"                d[int(k)] \u003d d.pop(k)"},{"line_number":680,"context_line":"        return d"},{"line_number":681,"context_line":""},{"line_number":682,"context_line":"    def get_suffix_delta(self, local_suff, local_index,"},{"line_number":683,"context_line":"                         remote_suff, remote_index):"}],"source_content_type":"text/x-python","patch_set":2,"id":"d1076812_25ceb5f8","line":680,"updated":"2021-02-16 03:28:20.000000000","message":"opps should probably write a test for this method. Or maybe even move it out of the reconstructor as it can be static.\n\nAlso I wonder if I should just create a new dict here rather then modifying the old one. I guess it depends on if we\u0027d ever have dict in a mixed state. Seeing as we always expect a NONE and frag ints. Might be quicker then continueally modifying the same structure. Though I\u0027m probably over thinking it :P","commit_id":"d95d20f999304969da5ccff81d67c453d3b3d5eb"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"583eca5edae6a0cf6790f9db4f0198a3422aa0d1","unresolved":true,"context_lines":[{"line_number":677,"context_line":"            elif isinstance(k, six.text_type) and k.isdigit() \\"},{"line_number":678,"context_line":"                    and int(k) not in d:"},{"line_number":679,"context_line":"                d[int(k)] \u003d d.pop(k)"},{"line_number":680,"context_line":"        return d"},{"line_number":681,"context_line":""},{"line_number":682,"context_line":"    def get_suffix_delta(self, local_suff, local_index,"},{"line_number":683,"context_line":"                         remote_suff, remote_index):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fede45b7_5c4350da","line":680,"in_reply_to":"d1076812_25ceb5f8","updated":"2021-02-16 03:38:56.000000000","message":"Yeah, the mutation is a little weird -- though if we document it and keep it close to where we receive the response, I\u0027m not so worried about it. Probably should either stop mutating the input or not return anything.","commit_id":"d95d20f999304969da5ccff81d67c453d3b3d5eb"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"329fa9bdbd640983ce34c517dd6ebf94353dbd18","unresolved":false,"context_lines":[{"line_number":677,"context_line":"            elif isinstance(k, six.text_type) and k.isdigit() \\"},{"line_number":678,"context_line":"                    and int(k) not in d:"},{"line_number":679,"context_line":"                d[int(k)] \u003d d.pop(k)"},{"line_number":680,"context_line":"        return d"},{"line_number":681,"context_line":""},{"line_number":682,"context_line":"    def get_suffix_delta(self, local_suff, local_index,"},{"line_number":683,"context_line":"                         remote_suff, remote_index):"}],"source_content_type":"text/x-python","patch_set":2,"id":"b6945e83_d3af9d55","line":680,"in_reply_to":"fede45b7_5c4350da","updated":"2021-02-16 05:25:30.000000000","message":"Done","commit_id":"d95d20f999304969da5ccff81d67c453d3b3d5eb"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"66f149ae1884aec832359ae09823f963dc45e0ca","unresolved":true,"context_lines":[{"line_number":696,"context_line":"        \"\"\""},{"line_number":697,"context_line":"        suffixes \u003d []"},{"line_number":698,"context_line":"        for suffix, sub_dict_local in local_suff.items():"},{"line_number":699,"context_line":"            self._sanitize_json_dict(sub_dict_local)"},{"line_number":700,"context_line":"            sub_dict_remote \u003d self._sanitize_json_dict("},{"line_number":701,"context_line":"                remote_suff.get(suffix, {}))"},{"line_number":702,"context_line":"            if (sub_dict_local.get(None) !\u003d sub_dict_remote.get(None) or"}],"source_content_type":"text/x-python","patch_set":2,"id":"e45e955a_3ebb5353","line":699,"updated":"2021-02-16 03:28:20.000000000","message":"We dont actually need to run it on the local dict as it\u0027s come straight from pickle format, but just added it for completeness. to make sure we\u0027re comparing apples to apples.. though it\u0027s not an NOOP so might remove it.","commit_id":"d95d20f999304969da5ccff81d67c453d3b3d5eb"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"329fa9bdbd640983ce34c517dd6ebf94353dbd18","unresolved":false,"context_lines":[{"line_number":696,"context_line":"        \"\"\""},{"line_number":697,"context_line":"        suffixes \u003d []"},{"line_number":698,"context_line":"        for suffix, sub_dict_local in local_suff.items():"},{"line_number":699,"context_line":"            self._sanitize_json_dict(sub_dict_local)"},{"line_number":700,"context_line":"            sub_dict_remote \u003d self._sanitize_json_dict("},{"line_number":701,"context_line":"                remote_suff.get(suffix, {}))"},{"line_number":702,"context_line":"            if (sub_dict_local.get(None) !\u003d sub_dict_remote.get(None) or"}],"source_content_type":"text/x-python","patch_set":2,"id":"5d818d96_4d727798","line":699,"in_reply_to":"8415e9a4_b2144a50","updated":"2021-02-16 05:25:30.000000000","message":"Done","commit_id":"d95d20f999304969da5ccff81d67c453d3b3d5eb"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"583eca5edae6a0cf6790f9db4f0198a3422aa0d1","unresolved":true,"context_lines":[{"line_number":696,"context_line":"        \"\"\""},{"line_number":697,"context_line":"        suffixes \u003d []"},{"line_number":698,"context_line":"        for suffix, sub_dict_local in local_suff.items():"},{"line_number":699,"context_line":"            self._sanitize_json_dict(sub_dict_local)"},{"line_number":700,"context_line":"            sub_dict_remote \u003d self._sanitize_json_dict("},{"line_number":701,"context_line":"                remote_suff.get(suffix, {}))"},{"line_number":702,"context_line":"            if (sub_dict_local.get(None) !\u003d sub_dict_remote.get(None) or"}],"source_content_type":"text/x-python","patch_set":2,"id":"8415e9a4_b2144a50","line":699,"in_reply_to":"e45e955a_3ebb5353","updated":"2021-02-16 03:38:56.000000000","message":"I was about to ask about that ;-)","commit_id":"d95d20f999304969da5ccff81d67c453d3b3d5eb"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"583eca5edae6a0cf6790f9db4f0198a3422aa0d1","unresolved":true,"context_lines":[{"line_number":779,"context_line":"                    resp_body \u003d resp.read()"},{"line_number":780,"context_line":"                    resp_content_type \u003d resp.getheader(\u0027Content-Type\u0027)"},{"line_number":781,"context_line":"                    if resp_content_type \u003d\u003d \u0027application/json\u0027:"},{"line_number":782,"context_line":"                        remote_suffixes \u003d json.loads(resp_body)"},{"line_number":783,"context_line":"                    else:"},{"line_number":784,"context_line":"                        remote_suffixes \u003d pickle.loads(resp_body)"},{"line_number":785,"context_line":"            except (Exception, Timeout):"}],"source_content_type":"text/x-python","patch_set":2,"id":"087ddf3e_f1d3df14","line":782,"updated":"2021-02-16 03:38:56.000000000","message":"Since the problem is localized to json responses, should we move the sanitize calls here? Would also lessen the inclination to sanitize the local dict.","commit_id":"d95d20f999304969da5ccff81d67c453d3b3d5eb"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"329fa9bdbd640983ce34c517dd6ebf94353dbd18","unresolved":false,"context_lines":[{"line_number":779,"context_line":"                    resp_body \u003d resp.read()"},{"line_number":780,"context_line":"                    resp_content_type \u003d resp.getheader(\u0027Content-Type\u0027)"},{"line_number":781,"context_line":"                    if resp_content_type \u003d\u003d \u0027application/json\u0027:"},{"line_number":782,"context_line":"                        remote_suffixes \u003d json.loads(resp_body)"},{"line_number":783,"context_line":"                    else:"},{"line_number":784,"context_line":"                        remote_suffixes \u003d pickle.loads(resp_body)"},{"line_number":785,"context_line":"            except (Exception, Timeout):"}],"source_content_type":"text/x-python","patch_set":2,"id":"f1404607_7630d9e7","line":782,"in_reply_to":"087ddf3e_f1d3df14","updated":"2021-02-16 05:25:30.000000000","message":"Done","commit_id":"d95d20f999304969da5ccff81d67c453d3b3d5eb"}],"test/unit/obj/test_reconstructor.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a925ead5cbc116b16cd29ec64898460d4ca2749a","unresolved":true,"context_lines":[{"line_number":1516,"context_line":""},{"line_number":1517,"context_line":"        # A now how json would return it"},{"line_number":1518,"context_line":"        bad_dict \u003d {\"suf\": {\"null\": \"some_hash\","},{"line_number":1519,"context_line":"                            \"1\": \"another_hash\"},"},{"line_number":1520,"context_line":"                    \"fix\": {\"null\": \"hsah_emos\","},{"line_number":1521,"context_line":"                            \"99\": \u0027hsah_rehtona\u0027}}"},{"line_number":1522,"context_line":"        self.assertEqual("}],"source_content_type":"text/x-python","patch_set":3,"id":"896f00d8_c0e7ec1e","line":1519,"range":{"start_line":1519,"start_character":28,"end_line":1519,"end_character":31},"updated":"2021-02-22 06:52:48.000000000","message":"This isn\u0027t quite how json.loads() would return it, at least on py2. There, it\u0027ll be unicode (u\u00271\u0027), not str (\u00271\u0027). Pretty sure that\u0027s the cause of the test failures.","commit_id":"5e0cc5855d069c117c1d69b225fa7933fbba132b"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"50e49a0c8f882d0a8623bbe974b48c6cb2fdbb7d","unresolved":true,"context_lines":[{"line_number":1516,"context_line":""},{"line_number":1517,"context_line":"        # A now how json would return it"},{"line_number":1518,"context_line":"        bad_dict \u003d {\"suf\": {\"null\": \"some_hash\","},{"line_number":1519,"context_line":"                            \"1\": \"another_hash\"},"},{"line_number":1520,"context_line":"                    \"fix\": {\"null\": \"hsah_emos\","},{"line_number":1521,"context_line":"                            \"99\": \u0027hsah_rehtona\u0027}}"},{"line_number":1522,"context_line":"        self.assertEqual("}],"source_content_type":"text/x-python","patch_set":3,"id":"5c816efc_53f1d369","line":1519,"range":{"start_line":1519,"start_character":28,"end_line":1519,"end_character":31},"in_reply_to":"896f00d8_c0e7ec1e","updated":"2021-02-23 00:40:00.000000000","message":"sigh, good point, thanks PY2/PY3. I seem to use more py3 now days in dev","commit_id":"5e0cc5855d069c117c1d69b225fa7933fbba132b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a925ead5cbc116b16cd29ec64898460d4ca2749a","unresolved":true,"context_lines":[{"line_number":1540,"context_line":"            hashes_dict)"},{"line_number":1541,"context_line":""},{"line_number":1542,"context_line":"        # but if we get to state where a sanitized key already existed then"},{"line_number":1543,"context_line":"        # we throw value errors."},{"line_number":1544,"context_line":"        nones_dict \u003d {\"suf\": {None: \"some_hash\","},{"line_number":1545,"context_line":"                              \"null\": \"some_other_hash\","},{"line_number":1546,"context_line":"                              \"1\": \"another_hash\"},"}],"source_content_type":"text/x-python","patch_set":3,"id":"dbe61d55_62d373de","line":1543,"updated":"2021-02-22 06:52:48.000000000","message":"This should never actually come up when taking json.loads() output as input, right? Still seems like reasonable behavior if it ever came up -- just checking assumptions.","commit_id":"5e0cc5855d069c117c1d69b225fa7933fbba132b"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"50e49a0c8f882d0a8623bbe974b48c6cb2fdbb7d","unresolved":true,"context_lines":[{"line_number":1540,"context_line":"            hashes_dict)"},{"line_number":1541,"context_line":""},{"line_number":1542,"context_line":"        # but if we get to state where a sanitized key already existed then"},{"line_number":1543,"context_line":"        # we throw value errors."},{"line_number":1544,"context_line":"        nones_dict \u003d {\"suf\": {None: \"some_hash\","},{"line_number":1545,"context_line":"                              \"null\": \"some_other_hash\","},{"line_number":1546,"context_line":"                              \"1\": \"another_hash\"},"}],"source_content_type":"text/x-python","patch_set":3,"id":"29accfbf_2918085c","line":1543,"in_reply_to":"dbe61d55_62d373de","updated":"2021-02-23 00:40:00.000000000","message":"yeah, no idea how this could happen. Unless we ever use the sanitize function on a dict we\u0027ve used .update() on.. which we currently don\u0027t do. But wanted to be sure it did the right thing if we\u0027re overwriting any key.","commit_id":"5e0cc5855d069c117c1d69b225fa7933fbba132b"}]}
