From dbbc10f77eb914798d0a1dedf35e04e66191c63f Mon Sep 17 00:00:00 2001 From: "Huang, Wei" Date: Mon, 31 Jul 2023 19:21:46 +0800 Subject: [PATCH] fix assertion of compression and encryption --- skyplane/gateway/operators/gateway_operator.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/skyplane/gateway/operators/gateway_operator.py b/skyplane/gateway/operators/gateway_operator.py index e02cb647a..958befdb0 100644 --- a/skyplane/gateway/operators/gateway_operator.py +++ b/skyplane/gateway/operators/gateway_operator.py @@ -615,7 +615,6 @@ def process(self, chunk_req: ChunkRequest): with open(chunk_file_path, "rb") as f: data = f.read() - assert len(data) == chunk.chunk_length_bytes, f"chunk {chunk_id} has size {len(data)} but should be {chunk.chunk_length_bytes}" data = lz4.frame.compress(data) wire_length = len(data) @@ -659,7 +658,6 @@ def process(self, chunk_req: ChunkRequest): with open(chunk_file_path, "rb") as f: data = f.read() - assert len(data) == chunk.chunk_length_bytes, f"chunk {chunk_id} has size {len(data)} but should be {chunk.chunk_length_bytes}" data = lz4.frame.decompress(data) wire_length = len(data) @@ -707,7 +705,6 @@ def process(self, chunk_req: ChunkRequest): with open(chunk_file_path, "rb") as f: data = f.read() - assert len(data) == chunk.chunk_length_bytes, f"chunk {chunk_id} has size {len(data)} but should be {chunk.chunk_length_bytes}" data = self.e2ee_secretbox.encrypt(data) wire_length = len(data) @@ -756,7 +753,6 @@ def process(self, chunk_req: ChunkRequest): with open(chunk_file_path, "rb") as f: data = f.read() - assert len(data) == chunk.chunk_length_bytes, f"chunk {chunk_id} has size {len(data)} but should be {chunk.chunk_length_bytes}" data = self.e2ee_secretbox.decrypt(data) wire_length = len(data)