hometown-fork / hometown

A supported fork of Mastodon that provides local posting and a wider range of content types.
GNU Affero General Public License v3.0
743 stars 55 forks source link

allow tootctl and the corresponding web interface in 4.0 to delete profile avatars and headers #1209

Open rscmbbng opened 1 year ago

rscmbbng commented 1 year ago

Pitch

Not being able to delete the ever-accumulating header and profile picture of remote accounts is a long standing issue. Smaller instances in particular are affected by this as the remote data far outweighs the local data. The issue thread has plenty of illustrations: https://github.com/mastodon/mastodon/issues/9567. The Mastodon project's official stance has essentially been: "buy a bigger disk". In the mean time there are a variety of dodgy "solutions" proposed as a fix by the community.

However, recently someone started working on a PR that extends tootctl to delete these remote headers and avatars: https://github.com/mastodon/mastodon/pull/21066

Considering 4.0 makes some of the media pruning functions of tootctl available in the web admin view, it would be a good moment to push this PR forward and fold it in the admin settings as part of Hometown's 4.0 release. Going by the fact that this issue has been open for so long, there is really no guarantee the PR will make it in to upstream but could become a feature of Hometown instead.

Motivation

Most Hometown servers are smaller and they will benefit disproportionately from being able to prune these ever-growing media caches. See fedidb.org for hometown size stats.

dunkelstern commented 1 year ago

I can look into integrating it into the admin view. But be aware I am a python/django user and very new to ruby/rails so would probably need some handholding 🙂

WesleyAC commented 1 year ago

This would be really excellent for recurse.social :)

dariusk commented 1 year ago

I like this pitch. I didn't know that some tootctl stuff was added to the admin UI!

dunkelstern commented 1 year ago

Short update: Many edgecases, not so easy, will work on this. I have it integrated into the admin already (with a vacuum worker) but how to exactly prune the data is not so clear. I tried with a dataset from my single user instance and run into missing avatar images too often to be comfortable to integrate it yet. Will have to look into the DB model a bit more.

I'll keep you updated on progress.

dariusk commented 1 year ago

Thank you!

rscmbbng commented 1 year ago

Heads up on someone else trying a PR: https://github.com/mastodon/mastodon/pull/21995

dariusk commented 1 year ago

Excellent, will keep an eye on this. cc @dunkelstern, you may wish to look at mastodon#21995

dariusk commented 1 year ago

Half of this is now complete. The web interface still needs to be updated but I don't think I will have the time to do that for v1.1.0, so I am tagging it for the next release after that.

rscmbbng commented 1 year ago

I just realized that https://github.com/mastodon/mastodon/pull/23261 is not the same as the tootctl commands. For one, it doesn't save any favs or bookmarks. It deletes all remote data regardless of whether people have interacted. The tootctl commands do keep posts one has interacted with..

Realized it after reading this https://github.com/mastodon/mastodon/pull/23261