sillsdev / languageforge-lexbox

Language Forge / Language Depot unification project
MIT License
7 stars 2 forks source link

allow permanently deleting project #69

Open hahn-kev opened 1 year ago

hahn-kev commented 1 year ago

we probably want to have a fairly dynamic strategy with this one. Some projects we may want to archive (like a language project), others like a training or test project we are probably fine with an immediate cleanup, but some we may want to schedule a full delete in like a month and give any other managers a chance to abort the delete.

design ideas: when a job is marked to be deleted, we will soft delete as we do now, we will notify any users and project mangers about the deletion, then we will have a job that runs once a day and permanently deletes any projects that are older than n days (configuration tbd, maybe determined by project type).

rmunn commented 1 month ago

One place this will come in handy is in automated testing, where a ReallyDeleteProject mutation would be handy so that deleted projects don't pile up too much. Alternately, #663 would be enough for the purposes of cleaning up after automated testing creates and deletes a bunch of random projects.

rmunn commented 1 month ago

Case in point: I've been running LfMerge end-to-end tests, which create a new LexBox project and delete it when the test is done, and my local copy of LexBox now has over 140 deleted projects in it, which I will never need to use again. That eventually adds up to a lot of data on the hg-repos volume which needs to be gotten rid of.

hahn-kev commented 1 month ago

Well when running tests you should be using the endpoint here https://github.com/sillsdev/languageforge-lexbox/blob/develop/backend%2FLexBoxApi%2FControllers%2FProjectController.cs#L171

This issue is for production reasons.