`delete_namespace` can leave leftover data
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 30
- Forks
- 13
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 8
Description
If possible delete_namespace should delete everything in a single transaction. It seems in its current form it can leave leftover data (eg: an Account that doesn't belong to a Namespace).
I have not been able to reproduce the error, but I noticed the following chain of events:
- Account deletion was requested (endpoint here).
- Account is queried using
namespace_public_idand succeeded
- Account is queried using
- Account deletion started. The account namespace is deleted at this point
- A deployment happened, leaving that account in a "half-deleted" status
delete-marked-accountstries toget_accounts_to_delete, but it fails when building the list of tuples because the account doesn't have a namespace anympre
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with delete_namespace and get_accounts_to_delete in inbox/models/util.py, then trace the account-deletion endpoint in inbox/api/srv.py and delete-marked-accounts.py. Determine whether the deletion workflow can be made atomic, and verify that an interrupted deletion cannot leave an Account without its Namespace.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100