From 8901a0121dda36b822fbabe62f8a172ba72c6c6e Mon Sep 17 00:00:00 2001 From: Varun Shenoy Date: Fri, 10 Nov 2023 11:50:22 -0800 Subject: [PATCH] do not cache s3 folders, only files (#730) --- truss/contexts/image_builder/serving_image_builder.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/truss/contexts/image_builder/serving_image_builder.py b/truss/contexts/image_builder/serving_image_builder.py index 89b3cfb4b..c8d1025da 100644 --- a/truss/contexts/image_builder/serving_image_builder.py +++ b/truss/contexts/image_builder/serving_image_builder.py @@ -157,7 +157,11 @@ def list_files(self, revision=None): all_objects = [] for blob in bucket.objects.filter(Prefix=path): + # leave out folders + if blob.key[-1] == "/": + continue all_objects.append(blob.key) + return all_objects def prepare_for_cache(self, filenames):