aws / aws-toolkit-azure-devops

AWS Toolkit for Azure DevOps
Other
243 stars 101 forks source link

AWS S3Upload task add --sync or equivalent operation #398

Open coffeedome opened 3 years ago

coffeedome commented 3 years ago

Describe the bug

Task isn't overwriting files that already exist

To reproduce

Run S3 Upload task in yaml pipeline to a bucket with a target file that already exists.

Expected behavior

Existing files should be overwritten.

Screenshots

Your Environment

Additional context

hunterwerlla commented 3 years ago

Hello, can you provide additional information like logs?

The toolkit just uses an S3 PutObjectRequest which will always overrides unless the bucket is versioned, so I'm struggling to think that it could cause an issue with that

j0nathontayl0r commented 3 years ago

I'd assume the bug report is incorrectly written, the package successfully copies and replaces files with the same object name. But if an object is deleted at the source (e.g. an Azure DevOps repo), the destination S3 bucket doesn't perform the same action since, as intended. This is only copying the files, it's not performing sync with the additional --delete parameter.

The reporter may not have noticed the above and that the S3 object has changed names between source/destination.