Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cosmotech/coal/cli/commands/s3_bucket_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,5 @@ def s3_bucket_delete(
LOGGER.info(f'Deleting {boto_objects}')
boto_delete_request = {'Objects': boto_objects}
bucket.delete_objects(Delete=boto_delete_request)
else:
LOGGER.info('No objects to delete')
6 changes: 3 additions & 3 deletions cosmotech/coal/cli/commands/s3_bucket_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def s3_bucket_upload(

Make use of the boto3 library to access the bucket

More information is available on this page:
More information is available on this page:
[https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html)
"""
source_path = pathlib.Path(source_folder)
Expand All @@ -115,12 +115,12 @@ def s3_bucket_upload(
if ssl_cert_bundle:
boto3_parameters["verify"] = ssl_cert_bundle

s3_client = boto3.client("s3", **boto3_parameters)
s3_resource = boto3.resource("s3", **boto3_parameters)

def file_upload(file_path: pathlib.Path, file_name: str):
uploaded_file_name = file_prefix + file_name
LOGGER.info(f"Sending {file_path} as {uploaded_file_name}")
s3_client.upload_file(file_path, bucket_name, uploaded_file_name)
s3_resource.Bucket(bucket_name).upload_file(file_path, uploaded_file_name)

if source_path.is_dir():
_source_name = str(source_path)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ redisgraph_bulk_loader==0.10.2
cosmotech-api~=3.2

# Commands requirements
boto3~=1.34
boto3~=1.35.19
requests~=2.32.3
singlestoredb~=1.10.0

Expand Down
Loading