From e7b412b4ed5be429b5feb44dbdf6e9e6c7897645 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 6 Jan 2025 15:58:27 +0000 Subject: [PATCH] fix(batch-exports): Fix missing key in S3 complete multipart upload (#27285) --- posthog/temporal/batch_exports/s3_batch_export.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/posthog/temporal/batch_exports/s3_batch_export.py b/posthog/temporal/batch_exports/s3_batch_export.py index 3d57d55e9ce37..fb649407520ff 100644 --- a/posthog/temporal/batch_exports/s3_batch_export.py +++ b/posthog/temporal/batch_exports/s3_batch_export.py @@ -327,7 +327,7 @@ def continue_from_state(self, state: S3MultiPartUploadState): return self.upload_id - async def complete(self) -> str: + async def complete(self) -> str | None: if self.is_upload_in_progress() is False: raise NoUploadInProgressError() @@ -343,7 +343,7 @@ async def complete(self) -> str: self.upload_id = None self.parts = [] - return response["Location"] + return response.get("Key") async def abort(self): """Abort this S3 multi-part upload."""