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

Scope trailing delete policy to blobs prefix only #190

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

mvandenburgh
Copy link
Member

Addresses #186 (comment).

Currently, the trailing delete lifecycle policy applies to the entire bucket. This PR updates it to only apply to the blobs/ prefix, i.e. the prefix where asset blobs are stored. With this change, other objects in the bucket such as Zarr data and manifest files will not be impacted by the lifecycle policy.

filter {
# We only want to expire objects with the `blobs/` prefix, i.e. Asset Blobs.
# Other objects in this bucket are not subject to this lifecycle policy.
prefix = "blobs/"
Copy link
Member

Choose a reason for hiding this comment

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

could it be multiple? IIRC there was some bug and we were breeding versions for dandiset manifest exports etc. And also then we keep updating manifests for draft version, and all those could be GCed as well. Eg. for 000003 alone for draft version we have over 200 in the history of those keys

(3) dandi@drogon:~/proj/datalad/datalad-deprecated$ datalad ls -aL s3://dandiarchive/dandisets/000003/draft/assets.yaml | grep DeleteMarker | wc -l
[INFO] S3 session: Connecting to the bucket dandiarchive with authentication 
263

so what about trailing delete also for dandisets/?

Copy link
Member Author

Choose a reason for hiding this comment

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

The asset trailing delete mechanism requires the dandi-archive application itself to put a delete marker on objects that are ready to be garbage collected. For manifest files, garbage collection is presumably more straightforward and can likely be done with just a single s3 bucket lifecycle rule - to keep this PR scoped to its original purpose, I've opened an issue to discuss that further #192.

@mvandenburgh mvandenburgh merged commit 7937110 into master Oct 28, 2024
2 checks passed
@mvandenburgh mvandenburgh deleted the scoped-lifecycle-policy branch October 28, 2024 19:26
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