Skip to content

Commit

Permalink
[S3 storage] Fix parent creation bug when downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
rzvoncek committed Dec 7, 2023
1 parent cfa3c57 commit cb230e9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions medusa/storage/s3_base_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,13 @@ def __download_blob(self, src: str, dest: str):

# print also object size
logging.debug(
'[S3 Storage] Downloading {} -> {}/{}'.format(
object_key, self.bucket_name, object_key
'[S3 Storage] Downloading s3://{}/{} -> {}'.format(
self.bucket_name, object_key, file_path
)
)

try:
Path(file_path).parent.mkdir(parents=True, exist_ok=True)
self.s3_client.download_file(
Bucket=self.bucket_name,
Key=object_key,
Expand Down
5 changes: 5 additions & 0 deletions tests/integration/features/integration_tests.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1078,3 +1078,8 @@ Feature: Integration tests
Examples: Local storage
| storage | client encryption |
| local | without_client_encryption |

@s3
Examples: S3 storage
| storage | client encryption |
| s3_us_west_oregon | without_client_encryption |

0 comments on commit cb230e9

Please sign in to comment.