)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":16068,"name":"Tobias Henkel","email":"tobias.henkel@bmw.de","username":"tobias.henkel"},"change_message_id":"415709aa8501ae275b7da280f299c5a746d9a60e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"da33602c_69d37f46","updated":"2022-01-07 11:15:42.000000000","message":"I like this. Depending on wether this is useful and how expensive it is to do the analysis we could think about exporting this in zuul as a metric (maybe running every 15 or 30min)","commit_id":"ebb21baa17d8ede6a0c2bd59dbb9a2737cfe61ed"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"03ae102dbf2df93b3a9645288318e7f7c2b4ef5e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"bc2d38f0_ea9796a7","updated":"2022-01-12 23:25:34.000000000","message":"Left some thoughts. Note I didn\u0027t do a complete line for line review of the larger script, but read it for general understanding of how it works and it seems reasonable.","commit_id":"f590da92cb4f250916ddf6251dd466f902c2cb2b"}],"tools/zk-analyze.py":[{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"6807de0ec9ba0553a5d378d7ec84db318b8e9145","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            for shard in shards:"},{"line_number":209,"context_line":"                d, _ \u003d self.client.get(os.path.join(path, shard))"},{"line_number":210,"context_line":"                data +\u003d d"},{"line_number":211,"context_line":"            data \u003d zlib.decompress(data)"},{"line_number":212,"context_line":"            return Data(path, data)"},{"line_number":213,"context_line":"        except Exception:"},{"line_number":214,"context_line":"            return Data(path, data, failed\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dd008622_4868ff21","line":211,"updated":"2022-01-08 01:11:15.000000000","message":"I think we probably do want both.","commit_id":"ebb21baa17d8ede6a0c2bd59dbb9a2737cfe61ed"},{"author":{"_account_id":16068,"name":"Tobias Henkel","email":"tobias.henkel@bmw.de","username":"tobias.henkel"},"change_message_id":"415709aa8501ae275b7da280f299c5a746d9a60e","unresolved":true,"context_lines":[{"line_number":208,"context_line":"            for shard in shards:"},{"line_number":209,"context_line":"                d, _ \u003d self.client.get(os.path.join(path, shard))"},{"line_number":210,"context_line":"                data +\u003d d"},{"line_number":211,"context_line":"            data \u003d zlib.decompress(data)"},{"line_number":212,"context_line":"            return Data(path, data)"},{"line_number":213,"context_line":"        except Exception:"},{"line_number":214,"context_line":"            return Data(path, data, failed\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"8b5f77f7_f25e4813","line":211,"updated":"2022-01-07 11:15:42.000000000","message":"What\u0027s the primary goal of the analysis? Is it \u0027how much data is in zk\u0027 or \u0027how much data is in the model\u0027? In case of the first we probably don\u0027t want to decompress here. Maybe we even want both?","commit_id":"ebb21baa17d8ede6a0c2bd59dbb9a2737cfe61ed"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"781f2864e1aeff2c8654fb81145564148f89069a","unresolved":true,"context_lines":[{"line_number":230,"context_line":"        try:"},{"line_number":231,"context_line":"            for shard in shards:"},{"line_number":232,"context_line":"                with open(os.path.join(fullpath, shard, \u0027ZKDATA\u0027), \u0027rb\u0027) as f:"},{"line_number":233,"context_line":"                    compressed_data +\u003d f.read()"},{"line_number":234,"context_line":"            data \u003d zlib.decompress(compressed_data)"},{"line_number":235,"context_line":"            return Data(path, data, zk_size\u003dlen(compressed_data))"},{"line_number":236,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"b50ef2d0_51811708","line":233,"updated":"2022-01-11 09:14:23.000000000","message":"The decompression needs to be done here on the node data and not on the concatenated byte string below.\n\n            zk_size \u003d 0\n            for shard in shards:\n                with open(os.path.join(fullpath, shard, \u0027ZKDATA\u0027), \u0027rb\u0027) as f:\n                    compressed_data \u003d f.read()\n                    data +\u003d zlib.decompress(compressed_data)\n                    zk_size \u003d len(compressed_data)\n            return Data(path, data, zk_size\u003dzk_size)","commit_id":"64aaf19558ff808f4516c3092ef0a3828ca9c94e"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"76dd7875b565f51aabc87e8a3dde9020288384f5","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        try:"},{"line_number":231,"context_line":"            for shard in shards:"},{"line_number":232,"context_line":"                with open(os.path.join(fullpath, shard, \u0027ZKDATA\u0027), \u0027rb\u0027) as f:"},{"line_number":233,"context_line":"                    compressed_data +\u003d f.read()"},{"line_number":234,"context_line":"            data \u003d zlib.decompress(compressed_data)"},{"line_number":235,"context_line":"            return Data(path, data, zk_size\u003dlen(compressed_data))"},{"line_number":236,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf3d1f19_bd046dff","line":233,"updated":"2022-01-11 18:06:39.000000000","message":"Yes and yes.","commit_id":"64aaf19558ff808f4516c3092ef0a3828ca9c94e"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"ab6272552dab057214f7ade33ed3ee0926d87a18","unresolved":true,"context_lines":[{"line_number":230,"context_line":"        try:"},{"line_number":231,"context_line":"            for shard in shards:"},{"line_number":232,"context_line":"                with open(os.path.join(fullpath, shard, \u0027ZKDATA\u0027), \u0027rb\u0027) as f:"},{"line_number":233,"context_line":"                    compressed_data +\u003d f.read()"},{"line_number":234,"context_line":"            data \u003d zlib.decompress(compressed_data)"},{"line_number":235,"context_line":"            return Data(path, data, zk_size\u003dlen(compressed_data))"},{"line_number":236,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"77c31e5c_b48a7c1d","line":233,"in_reply_to":"b50ef2d0_51811708","updated":"2022-01-11 14:50:22.000000000","message":"There is a small bug in the above snipped related to the zk_size. This should be:\n\n            zk_size \u003d 0\n            for shard in shards:\n                with open(os.path.join(fullpath, shard, \u0027ZKDATA\u0027), \u0027rb\u0027) as f:\n                    compressed_data \u003d f.read()\n                    data +\u003d zlib.decompress(compressed_data)\n                    zk_size +\u003d len(compressed_data)\n            return Data(path, data, zk_size\u003dzk_size)","commit_id":"64aaf19558ff808f4516c3092ef0a3828ca9c94e"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"781f2864e1aeff2c8654fb81145564148f89069a","unresolved":true,"context_lines":[{"line_number":327,"context_line":"                      \u0027config_errors\u0027]:"},{"line_number":328,"context_line":"                if buildset.data.get(x):"},{"line_number":329,"context_line":"                    node \u003d self.tree.getShardedNode(buildset.data.get(x))"},{"line_number":330,"context_line":"                    buildset_summary.attrs[x] \u003d node.size"},{"line_number":331,"context_line":"                    buildset_summary.size +\u003d node.size"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"            jobs \u003d self.tree.listJobs(buildset.path)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7152011e_aa733332","line":330,"updated":"2022-01-11 09:14:23.000000000","message":"Shouldn\u0027t we use the zk size for the attribute size if the `use_zk_size` flag is set? Same question for the other summary items below that also have \u0027attributes\u0027.","commit_id":"64aaf19558ff808f4516c3092ef0a3828ca9c94e"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"57b6c5f66ff6cdab49f5d5a16b370b3f6b1dc978","unresolved":false,"context_lines":[{"line_number":327,"context_line":"                      \u0027config_errors\u0027]:"},{"line_number":328,"context_line":"                if buildset.data.get(x):"},{"line_number":329,"context_line":"                    node \u003d self.tree.getShardedNode(buildset.data.get(x))"},{"line_number":330,"context_line":"                    buildset_summary.attrs[x] \u003d node.size"},{"line_number":331,"context_line":"                    buildset_summary.size +\u003d node.size"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"            jobs \u003d self.tree.listJobs(buildset.path)"}],"source_content_type":"text/x-python","patch_set":3,"id":"310f8a53_174b93d9","line":330,"updated":"2022-01-11 21:17:29.000000000","message":"Yes to this.","commit_id":"64aaf19558ff808f4516c3092ef0a3828ca9c94e"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"57b6c5f66ff6cdab49f5d5a16b370b3f6b1dc978","unresolved":false,"context_lines":[{"line_number":328,"context_line":"                if buildset.data.get(x):"},{"line_number":329,"context_line":"                    node \u003d self.tree.getShardedNode(buildset.data.get(x))"},{"line_number":330,"context_line":"                    buildset_summary.attrs[x] \u003d node.size"},{"line_number":331,"context_line":"                    buildset_summary.size +\u003d node.size"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"            jobs \u003d self.tree.listJobs(buildset.path)"},{"line_number":334,"context_line":"            for job_i, job_name in enumerate(jobs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"6063d49d_a6678953","line":331,"updated":"2022-01-11 21:17:29.000000000","message":"Actually, no, it\u0027s not reflected in the tree size because this is treating offloaded attributes as part of the object.\n\nBecause offloaded attributes may or may not be offloaded (they are only offloaded if they reach a certain size), this treats them all as if they were part of the object.  For example, a \"Job\" may have its \"vars\" attribute inline in the Job JSON, or it may be offloaded to a different znode.  For the purpose of us finding out whether \"vars\" is really big, we don\u0027t care whether it\u0027s offloaded or not.  If we did this naively, we wight use the \"depth\" option which would end up excluding Job vars if they are large and offloaded but including them if they were small and inline, and that would be weird.\n\nAnd to put this another way, since the vars are not included in the tree_size, we should continue to add them to the size.","commit_id":"64aaf19558ff808f4516c3092ef0a3828ca9c94e"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"781f2864e1aeff2c8654fb81145564148f89069a","unresolved":true,"context_lines":[{"line_number":328,"context_line":"                if buildset.data.get(x):"},{"line_number":329,"context_line":"                    node \u003d self.tree.getShardedNode(buildset.data.get(x))"},{"line_number":330,"context_line":"                    buildset_summary.attrs[x] \u003d node.size"},{"line_number":331,"context_line":"                    buildset_summary.size +\u003d node.size"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"            jobs \u003d self.tree.listJobs(buildset.path)"},{"line_number":334,"context_line":"            for job_i, job_name in enumerate(jobs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"09616435_1c285f41","line":331,"updated":"2022-01-11 09:14:23.000000000","message":"I think we should not add the size of the children to the size of the parent as this is already reflected in the tree size. But then we need to include the attribute sizes in the tree_size/zk_tree_size properties.","commit_id":"64aaf19558ff808f4516c3092ef0a3828ca9c94e"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"76dd7875b565f51aabc87e8a3dde9020288384f5","unresolved":false,"context_lines":[{"line_number":328,"context_line":"                if buildset.data.get(x):"},{"line_number":329,"context_line":"                    node \u003d self.tree.getShardedNode(buildset.data.get(x))"},{"line_number":330,"context_line":"                    buildset_summary.attrs[x] \u003d node.size"},{"line_number":331,"context_line":"                    buildset_summary.size +\u003d node.size"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"            jobs \u003d self.tree.listJobs(buildset.path)"},{"line_number":334,"context_line":"            for job_i, job_name in enumerate(jobs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"811fd878_3cf734f1","line":331,"updated":"2022-01-11 18:06:39.000000000","message":"Yes and yes.","commit_id":"64aaf19558ff808f4516c3092ef0a3828ca9c94e"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"2e27adb26533c07483232b948ae0b29fed5ae8c4","unresolved":true,"context_lines":[{"line_number":116,"context_line":"            ret \u003d (\u0027  \u0027 * indent + f\"{self.kind} {self.path} \""},{"line_number":117,"context_line":"                   f\"size\u003d{size} tree\u003d{tree_size}{attrs}\\n\")"},{"line_number":118,"context_line":"            for child in self.children:"},{"line_number":119,"context_line":"                ret +\u003d child.toStr(indent + 1, depth, conv, limit)"},{"line_number":120,"context_line":"        else:"},{"line_number":121,"context_line":"            ret \u003d \u0027\u0027"},{"line_number":122,"context_line":"        return ret"}],"source_content_type":"text/x-python","patch_set":4,"id":"6bf1abde_c651d199","line":119,"updated":"2022-01-12 09:27:35.000000000","message":"We need to forward the `zk` flag here.","commit_id":"9029c0a4847122760c2309e0d13ebdd67ac59cf9"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"03ae102dbf2df93b3a9645288318e7f7c2b4ef5e","unresolved":true,"context_lines":[{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"# Analyze the contents of the ZK tree (whether in ZK or a dump on the"},{"line_number":16,"context_line":"# local filesystem) to identify large objects."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import argparse"},{"line_number":19,"context_line":"import json"}],"source_content_type":"text/x-python","patch_set":5,"id":"69baafbb_a360c3c8","line":16,"updated":"2022-01-12 23:25:34.000000000","message":"Any concerns around races when either dumping from zk or reading it directly from zk here? Looks like we iterate over shards and just mark them as failed if they don\u0027t exist which is probably good enough for most analysis.","commit_id":"f590da92cb4f250916ddf6251dd466f902c2cb2b"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"3967814ee96cf243baa53df9f69a34f55e1f335e","unresolved":true,"context_lines":[{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"# Analyze the contents of the ZK tree (whether in ZK or a dump on the"},{"line_number":16,"context_line":"# local filesystem) to identify large objects."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import argparse"},{"line_number":19,"context_line":"import json"}],"source_content_type":"text/x-python","patch_set":5,"id":"9d4c072a_95826a26","line":16,"in_reply_to":"69baafbb_a360c3c8","updated":"2022-01-13 13:01:56.000000000","message":"It might be that the dump script is a little faster than the analyzer, but at least I did not encounter any issues when dumping our production ZK during peak hours.","commit_id":"f590da92cb4f250916ddf6251dd466f902c2cb2b"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"6fd445cbf9618e34bbd9eb61d77bd7b57ff7c585","unresolved":true,"context_lines":[{"line_number":84,"context_line":"    def matchesLimit(self, limit):"},{"line_number":85,"context_line":"        if not limit:"},{"line_number":86,"context_line":"            return True"},{"line_number":87,"context_line":"        if self.size \u003e\u003d limit:"},{"line_number":88,"context_line":"            return True"},{"line_number":89,"context_line":"        for child in self.children:"},{"line_number":90,"context_line":"            if child.matchesLimit(limit):"}],"source_content_type":"text/x-python","patch_set":5,"id":"dabb822d_a155f57c","line":87,"updated":"2022-01-13 14:06:35.000000000","message":"I think if we are using the ZK size option we should also limit matches by the ZK size.","commit_id":"f590da92cb4f250916ddf6251dd466f902c2cb2b"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"69471f418d5bcaced862c59b94afa3e186d1fafe","unresolved":true,"context_lines":[{"line_number":212,"context_line":"        if not os.path.exists(fullpath):"},{"line_number":213,"context_line":"            return Data(path, \u0027\u0027, failed\u003dTrue)"},{"line_number":214,"context_line":"        try:"},{"line_number":215,"context_line":"            with open(os.path.join(fullpath, \u0027ZKDATA\u0027)) as f:"},{"line_number":216,"context_line":"                zk_data \u003d f.read()"},{"line_number":217,"context_line":"                data \u003d zk_data"},{"line_number":218,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"90f230ac_d6717966","line":215,"updated":"2022-01-13 12:59:49.000000000","message":"Sorry to -1 this once more, but now that the data in ZK is compressed we need to open this file \u0027rb\u0027.","commit_id":"f590da92cb4f250916ddf6251dd466f902c2cb2b"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"03ae102dbf2df93b3a9645288318e7f7c2b4ef5e","unresolved":true,"context_lines":[{"line_number":446,"context_line":""},{"line_number":447,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":448,"context_line":"    parser \u003d argparse.ArgumentParser()"},{"line_number":449,"context_line":"    parser.add_argument(\u0027--path\u0027, help\u003d\u0027Path to ZK dump\u0027)"},{"line_number":450,"context_line":"    parser.add_argument(\u0027--host\u0027, help\u003d\u0027ZK host string\u0027)"},{"line_number":451,"context_line":"    parser.add_argument(\u0027--cert\u0027, help\u003d\u0027Path to TLS certificate\u0027)"},{"line_number":452,"context_line":"    parser.add_argument(\u0027--key\u0027, help\u003d\u0027Path to TLS key\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"2e96c371_b95258b5","line":449,"range":{"start_line":449,"start_character":40,"end_line":449,"end_character":55},"updated":"2022-01-12 23:25:34.000000000","message":"See comment on the dump script. I think this one will be a bit more clear if the other command is updated. But maybe consider noting this is in lieu of talking to Zk directly?","commit_id":"f590da92cb4f250916ddf6251dd466f902c2cb2b"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"407ac415fb3b0ee5ae38a22ef25d2f291edf93f0","unresolved":false,"context_lines":[{"line_number":446,"context_line":""},{"line_number":447,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":448,"context_line":"    parser \u003d argparse.ArgumentParser()"},{"line_number":449,"context_line":"    parser.add_argument(\u0027--path\u0027, help\u003d\u0027Path to ZK dump\u0027)"},{"line_number":450,"context_line":"    parser.add_argument(\u0027--host\u0027, help\u003d\u0027ZK host string\u0027)"},{"line_number":451,"context_line":"    parser.add_argument(\u0027--cert\u0027, help\u003d\u0027Path to TLS certificate\u0027)"},{"line_number":452,"context_line":"    parser.add_argument(\u0027--key\u0027, help\u003d\u0027Path to TLS key\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"296ac77c_255c0457","line":449,"updated":"2022-01-25 14:52:28.000000000","message":"Yep.","commit_id":"f590da92cb4f250916ddf6251dd466f902c2cb2b"}],"tools/zk-dump.py":[{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"8656ea9f3b62bf0f6f96a24dcd83d394c8d8b533","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        return"},{"line_number":29,"context_line":"    os.makedirs(root + path)"},{"line_number":30,"context_line":"    with open(root + path + \u0027/ZKDATA\u0027, \u0027wb\u0027) as f:"},{"line_number":31,"context_line":"        f.write(data)"},{"line_number":32,"context_line":"    for child in client.get_children(path):"},{"line_number":33,"context_line":"        getTree(client, root, path + \u0027/\u0027 + child)"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"feb267e6_248898e4","line":31,"updated":"2022-01-11 21:27:30.000000000","message":"Added an option for this.","commit_id":"64aaf19558ff808f4516c3092ef0a3828ca9c94e"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"243d09875adb17c059d0f2437bf16b1cef167e59","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        return"},{"line_number":29,"context_line":"    os.makedirs(root + path)"},{"line_number":30,"context_line":"    with open(root + path + \u0027/ZKDATA\u0027, \u0027wb\u0027) as f:"},{"line_number":31,"context_line":"        f.write(data)"},{"line_number":32,"context_line":"    for child in client.get_children(path):"},{"line_number":33,"context_line":"        getTree(client, root, path + \u0027/\u0027 + child)"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"2d6093e1_f7a7538d","line":31,"updated":"2022-01-10 21:42:32.000000000","message":"Good idea, but we should either make that an option, or another script.  That way we can still use this as a way to debug exactly what we have in ZK (basically, if something goes wrong, run this to dump the data, then reset ZK to get production going, then debug with this).","commit_id":"64aaf19558ff808f4516c3092ef0a3828ca9c94e"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"7ea557c62ed3e399930b7ee07c975b6940de6cc4","unresolved":true,"context_lines":[{"line_number":28,"context_line":"        return"},{"line_number":29,"context_line":"    os.makedirs(root + path)"},{"line_number":30,"context_line":"    with open(root + path + \u0027/ZKDATA\u0027, \u0027wb\u0027) as f:"},{"line_number":31,"context_line":"        f.write(data)"},{"line_number":32,"context_line":"    for child in client.get_children(path):"},{"line_number":33,"context_line":"        getTree(client, root, path + \u0027/\u0027 + child)"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"518234fa_6966c56e","line":31,"updated":"2022-01-10 20:36:57.000000000","message":"could we try to decompress so that the data can be read directly?","commit_id":"64aaf19558ff808f4516c3092ef0a3828ca9c94e"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"03ae102dbf2df93b3a9645288318e7f7c2b4ef5e","unresolved":true,"context_lines":[{"line_number":34,"context_line":"        except Exception:"},{"line_number":35,"context_line":"            pass"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    os.makedirs(root + path)"},{"line_number":38,"context_line":"    with open(root + path + \u0027/ZKDATA\u0027, \u0027wb\u0027) as f:"},{"line_number":39,"context_line":"        f.write(data)"},{"line_number":40,"context_line":"    for child in client.get_children(path):"}],"source_content_type":"text/x-python","patch_set":5,"id":"06fc6188_7c9e26a9","line":37,"updated":"2022-01-12 23:25:34.000000000","message":"Any reason to not use os.path.join here and below with the recursive getTree call arg?","commit_id":"f590da92cb4f250916ddf6251dd466f902c2cb2b"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"407ac415fb3b0ee5ae38a22ef25d2f291edf93f0","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        except Exception:"},{"line_number":35,"context_line":"            pass"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    os.makedirs(root + path)"},{"line_number":38,"context_line":"    with open(root + path + \u0027/ZKDATA\u0027, \u0027wb\u0027) as f:"},{"line_number":39,"context_line":"        f.write(data)"},{"line_number":40,"context_line":"    for child in client.get_children(path):"}],"source_content_type":"text/x-python","patch_set":5,"id":"dabf2291_b17ceb5e","line":37,"updated":"2022-01-25 14:52:28.000000000","message":"That would work, but given the tight control of input values it\u0027s not necessary.","commit_id":"f590da92cb4f250916ddf6251dd466f902c2cb2b"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"407ac415fb3b0ee5ae38a22ef25d2f291edf93f0","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    with open(root + path + \u0027/ZKDATA\u0027, \u0027wb\u0027) as f:"},{"line_number":39,"context_line":"        f.write(data)"},{"line_number":40,"context_line":"    for child in client.get_children(path):"},{"line_number":41,"context_line":"        getTree(client, root, path + \u0027/\u0027 + child)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":5,"id":"22240531_4f605f1b","line":41,"updated":"2022-01-25 14:52:28.000000000","message":"Done.","commit_id":"f590da92cb4f250916ddf6251dd466f902c2cb2b"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"8a3724783786105e9eb6ca3992446f11ec4c556e","unresolved":true,"context_lines":[{"line_number":38,"context_line":"    with open(root + path + \u0027/ZKDATA\u0027, \u0027wb\u0027) as f:"},{"line_number":39,"context_line":"        f.write(data)"},{"line_number":40,"context_line":"    for child in client.get_children(path):"},{"line_number":41,"context_line":"        getTree(client, root, path + \u0027/\u0027 + child)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":5,"id":"f285a2c7_aecfbe3e","line":41,"updated":"2022-01-21 09:50:41.000000000","message":"We need to forward the decompress flag here.","commit_id":"f590da92cb4f250916ddf6251dd466f902c2cb2b"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"03ae102dbf2df93b3a9645288318e7f7c2b4ef5e","unresolved":true,"context_lines":[{"line_number":44,"context_line":"def main():"},{"line_number":45,"context_line":"    parser \u003d argparse.ArgumentParser()"},{"line_number":46,"context_line":"    parser.add_argument(\u0027host\u0027, help\u003d\u0027ZK host string\u0027)"},{"line_number":47,"context_line":"    parser.add_argument(\u0027path\u0027, help\u003d\u0027Path to ZK dump\u0027)"},{"line_number":48,"context_line":"    parser.add_argument(\u0027--cert\u0027, help\u003d\u0027Path to TLS certificate\u0027)"},{"line_number":49,"context_line":"    parser.add_argument(\u0027--key\u0027, help\u003d\u0027Path to TLS key\u0027)"},{"line_number":50,"context_line":"    parser.add_argument(\u0027--ca\u0027, help\u003d\u0027Path to TLS CA cert\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"cf69f847_267f3fb2","line":47,"range":{"start_line":47,"start_character":37,"end_line":47,"end_character":54},"updated":"2022-01-12 23:25:34.000000000","message":"Nit this help text is a bit ambiguous. On my first read I read it was the path in ZK to dump. But rereading this is the path on the local disk to write the entire Zuul db to.","commit_id":"f590da92cb4f250916ddf6251dd466f902c2cb2b"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"407ac415fb3b0ee5ae38a22ef25d2f291edf93f0","unresolved":false,"context_lines":[{"line_number":44,"context_line":"def main():"},{"line_number":45,"context_line":"    parser \u003d argparse.ArgumentParser()"},{"line_number":46,"context_line":"    parser.add_argument(\u0027host\u0027, help\u003d\u0027ZK host string\u0027)"},{"line_number":47,"context_line":"    parser.add_argument(\u0027path\u0027, help\u003d\u0027Path to ZK dump\u0027)"},{"line_number":48,"context_line":"    parser.add_argument(\u0027--cert\u0027, help\u003d\u0027Path to TLS certificate\u0027)"},{"line_number":49,"context_line":"    parser.add_argument(\u0027--key\u0027, help\u003d\u0027Path to TLS key\u0027)"},{"line_number":50,"context_line":"    parser.add_argument(\u0027--ca\u0027, help\u003d\u0027Path to TLS CA cert\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"d7dbf3c0_078f694e","line":47,"updated":"2022-01-25 14:52:28.000000000","message":"Will reword.","commit_id":"f590da92cb4f250916ddf6251dd466f902c2cb2b"}]}
