learningequality / kolibri

Kolibri Learning Platform: the offline app for universal education
https://learningequality.org/kolibri/
MIT License
793 stars 656 forks source link

Refactor deprovision and facility deletion utilities to share code #9251

Open rtibbles opened 2 years ago

rtibbles commented 2 years ago

We currently have two sets of utilities that attempt to completely hard delete a facility and all related metadata - due to the complexity of this task, and the history of bugs we have seen in it, it would be wise to attempt to unify the functionality where possible, to ensure that there is no duplication that might lead to bugs in one utility vs another.

I forget if we've discussed this before, but should we be consolidating the deprovision command with the other deletion utilities for deleting a Facility? https://github.com/learningequality/kolibri/blob/develop/kolibri/core/auth/utils/delete.py

It does seem like there would be some room to refactor in order to share code, yeah.

Originally posted by @jamalex in https://github.com/learningequality/kolibri/issues/9208#issuecomment-1089227622

GarvitSinghal47 commented 1 year ago

hey @rtibbles i would like to work on this , can you assign it to me.

rtibbles commented 1 year ago

Great - to clarify, the 'facility deletion' utilities linked above should be canonical, but would be good to double check that there is nothing happening in the deprovision management command https://github.com/learningequality/kolibri/blob/release-v0.16.x/kolibri/core/auth/management/commands/deprovision.py that isn't also happening when we delete a facility.

rtibbles commented 1 year ago

Any work here should be targeted to the develop branch.