S3 should use tagging_directive REPLACE on copy operation #569
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It was always using metadata_directive: REPLACE; this does not apply to AWS tags applied to an S3 object. It should also use tagging_directive to apply to AWS tags as well.
This makes it so tags aren't copied when copying from (say) cache to storage. More significantly, it allows the caller to pass S3
tagging
param inupload_options
, and have this take effect, whether on a promotion or any other kind ofupload
, regardless of whether the S3 adapter decides to use acopy_from
operation under the hood.Without this change, whether
tagging
passed asupload_options
actually works (as well as whether the destination winds up with copied tags from source) depends on whether the S3 adapter decides to usecopy_from
, which should be an implementation detail that does not effect outcomes.More at https://discourse.shrinerb.com/t/gotcha-on-s3-upload-options-and-tags/559