From 94eb9b4a7cb11426f4f3f3ae3270faaf5ba02439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20V=C3=A1rady?= Date: Thu, 17 Oct 2024 18:32:03 +0200 Subject: [PATCH] package-indexer: list nightly/stable separately MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: László Várady --- .../remote_storage_synchronizer/s3_bucket_synchronizer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packaging/package-indexer/remote_storage_synchronizer/s3_bucket_synchronizer.py b/packaging/package-indexer/remote_storage_synchronizer/s3_bucket_synchronizer.py index 6cdddb63d8..9e4eb3195f 100644 --- a/packaging/package-indexer/remote_storage_synchronizer/s3_bucket_synchronizer.py +++ b/packaging/package-indexer/remote_storage_synchronizer/s3_bucket_synchronizer.py @@ -91,10 +91,13 @@ def _list_remote_files(self) -> List[Dict[str, Any]]: objects: List[Dict[str, Any]] = [] pagination_options: Dict[str, str] = {} + file_name_prefix = "{}/".format(self.remote_dir.working_dir) + while True: try: response: Dict[str, Any] = self.__client.list_objects( Bucket=self.__bucket, + Prefix=file_name_prefix, **pagination_options, ) except (ClientError, EndpointConnectionError) as e: