Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3Store: Apply tags to temporary S3 objects #336

Closed
wants to merge 4 commits into from

Conversation

acj
Copy link
Contributor

@acj acj commented Dec 23, 2019

tusd's temporary metadata objects (.info, .part, etc) can become a maintenance burden for certain applications. For example, applications may place uploaded objects directly into their final bucket in order to avoid slow copy operations. However, this means that the metadata objects are also placed in the same bucket. This can confuse automated tools and creates a nontrivial amount of cruft in the bucket over time.

This PR introduces an optional TransientObjectTags field on S3Store that takes a comma-separated list of tags to be applied to tusd's metadata objects. By tagging these objects, tusd operators can define an S3 object lifecycle policy that automatically removes the objects after a period of time.

I still need to test a handful of edge cases, but this is ready for general feedback.

The initial discussion for this feature is in #219.

@Acconut
Copy link
Member

Acconut commented Dec 31, 2019

Thanks for the PR! If I recall correctly, you proposed this idea because S3 lifecycle rules can only filter objects based on prefixes but not suffixes, didn't you? If so, I wonder if it would be simpler to allow a custom object name prefix for the .part and .info files, so you could target those based on a simple prefix rule. What do you think?

@acj
Copy link
Contributor Author

acj commented Jan 11, 2020

Sorry for the delay on my end. Yes, lifecycle rules can apply to prefixes. That approach would be simpler than using tags, but I'm concerned that existing tusd deployments wouldn't be able to safely transition to it. If there are pending uploads that are partially completed, they could fail when the prefix change is deployed because any existing .info and .part objects would still have the old name.

@Acconut
Copy link
Member

Acconut commented Jan 16, 2020

That's a good point you bring up. However, personally I prefer the more simple approach (object prefixes) as in the long term more users will be using this feature rather than transitioning to it. So from that perspective it makes sense to choose the solution which is easier to use, understand and maintain.

I do agree that tusd has not the best support for changing storage options and would like to make this process easier but our resources are also limited so this point has received not much love in the past.

@acj
Copy link
Contributor Author

acj commented Jan 31, 2020

Okay, sounds good. I'll rework this to use object prefixes and then open a followup PR.

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.

2 participants