Altinn / altinn-studio

Next generation open source Altinn platform and applications.
https://docs.altinn.studio
BSD 3-Clause "New" or "Revised" License
109 stars 73 forks source link

Deleting a repository should delete all its data #12904

Open mlqn opened 1 month ago

mlqn commented 1 month ago

Description

Deleting a repository in Gitea should result in the deletion of all associated data.

Here is a non-exhaustive list of data that are not deleted :

A possible solution could be to add a new endpoint to our API that decommissions apps and cleans up all data, and then call this endpoint via webhooks when deleting the repository in Gitea

Additional Information

No response

### Tasks
- [ ] https://github.com/Altinn/altinn-studio/issues/3717
- [ ] https://github.com/Altinn/altinn-studio/issues/11776
- [ ] Create a new endpoint that cleans up repo/app data
- [ ] Create a new webhook for when a repository is deleted
nkylstad commented 3 weeks ago

This is a bit of a dangerous path, as the interface in Gitea gives no indication/status as to whether an app is deployed. It would be very easy to accidentally delete a repo, and with that also remove a critical app from production.

Should we look into some other alternatives here? Is there any way to f.ex. disable repo delete in Gitea? Or at the very least limit that options only to a very limited number of people. And instead offer the option to delete repos in the designer interface. That way we can have much more control over when it is OK to delete an app. F.ex.: