Skip to content

Conversation

@sbkok
Copy link
Collaborator

@sbkok sbkok commented Dec 7, 2022

Why?

When the sync_to_s3.py script is asked to sync files without a prefix set, it will instruct the S3 list-objects-v2 API to list all objects with the prefix "/". This does not return anything. Hence the script thinks it needs to upload the files as they are missing.

What?

  • Added logic to only add the prefix if set.
  • Added test to validate that the lookup without a prefix works as instructed.

By submitting this pull request, I confirm that you can use, modify, copy, and
redistribute this contribution, under the terms of your choice.

**Why?**

When the sync_to_s3.py script is asked to sync files without a prefix set, it
will instruct the S3 list-objects-v2 API to list all objects with the
prefix "/". This does not return anything. Hence the script thinks it needs to
upload the files as they are missing.

**What?**

* Added logic to only add the prefix if set.
* Added test to validate that the lookup without a prefix works as instructed.
@sbkok sbkok added this to the v3.2.0 milestone Dec 7, 2022
Copy link
Contributor

@javydekoning javydekoning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sbkok sbkok merged commit 052080c into awslabs:master Dec 7, 2022
@sbkok sbkok deleted the fix/sync-to-s3-without-prefix branch December 7, 2022 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants