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

Delete old versions of derived images #15

Open
deanmoses opened this issue Nov 29, 2023 · 1 comment
Open

Delete old versions of derived images #15

deanmoses opened this issue Nov 29, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@deanmoses
Copy link
Owner

Derived images live in a S3 bucket path like this: /i/2001/12-31/image.jpg/**versionId**/jpeg/200x200

When there's a new version of the original image, all the derived images under **versionId** are no longer used. They should be deleted.

  • I think I can have a trigger that listens for a new version in the original images bucket, and cleans up previous derived images?
  • I would like to not delete them instantly, in case people are actively looking at the older version
  • Maybe that trigger sets some sort of tag on the old images, which get cleaned up after 30 days or so
    • No - I CAN delete by tag, but not delete by the day on which it was tagged
    • However, expiration time is based on the last modified timestamp of the object
    • Unfortunately, tagging does not update last modified
    • I'm not sure how to update last modified -- needs more research
@deanmoses deanmoses added the enhancement New feature or request label Nov 29, 2023
@deanmoses deanmoses added this to the AWS v1 milestone Nov 29, 2023
@deanmoses
Copy link
Owner Author

The live site uploads new versions so rarely that I can live with the duplication for v1.

I'll have to clean up the test bucket at some point, but I can do that manually.

@deanmoses deanmoses removed this from the AWS v1 milestone Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant