Skip to content

Errors not propagated when upload_file fails #89

@fidel-perez

Description

@fidel-perez

When s3.py -> upload_file fails, the errors are not propagated because of concurrent execution.
After reviewing the last repository changes, I believe this bug was introduced in the latest PR that was merged.

How to reproduce

  • Install following the readme instructions
  • Configure pointing towards an S3 bucket using wrong credentials or wrong URL or any other wrong configuration
  • Run the target using a dummy input tap

You should get no errors, despite no file was uploaded to S3 (because of the miss configuration done on purpose).

I found the problem was in the upload_file method after trying adding this try/except to the code and finally being able to see where it was failing by using the print statement:

try:
    result = config['client'].upload_file(
        file_metadata['absolute_path'].as_posix(),
        config.get('s3_bucket'),
        file_metadata['relative_path'],
        **encryption_args)
except Exception as e:
    print(e)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions