Feature #113
opencreate test to confirm cascade deletion of user owned entities
0%
Description
Technically the issue below is resolved; see the comments for more info.
This ticket is being held open to create a test to confirm cascade deletion.
When a user is deleted, entities owned by that user are not deleted.
this leaves a bunch of orphaned entities in the database with a user ID that doesn't link to a user.
however, when users are created, the ID associated with them appears to get auto-incremented.
So if you have users 1,2, and 3; and then you delete user 3; you'll have users 1 and 2
you will also have whatever tasks/projects/etc users 3 created still in the database.
if you then create a user, that user will be given user id 3. that user will then own all the entities for the previous user 3.
Updated by Sam Pearson 6 months ago
implement a cascading delete to resolve this but also maybe blacklist a user ID once it's been used?
Updated by Sam Pearson 6 months ago
pretty sure I fixed this but need to double-check before closing the ticket;
I tried to simultaneously build tests and fixes into different branches and the merge was a mess.
Updated by Sam Pearson 3 months ago
entities are cascade-deleted when a user is deleted.
but this is a nasty bug; it's worth it to create a battery of tests that confirms cascade delete for all entities by
creating a user
creating one of each entity
deleting the user
creating a new user
confirming the new user has the old user's ID
confirming the new user has no entities through various API GET/list calls
This kind of test would only work on a dev or possibly staging environment, but still worth doing because this bug sounds pretty bad.
Keeping this ticket open until that test is built or another ticket is written to create the test.
Updated by Sam Pearson 3 months ago
- Subject changed from newly created users will own the last deleted user's entities to create test to confirm cascade deletion of user owned entities
- Description updated (diff)
- Priority changed from High to Normal
Updated by Sam Pearson 3 months ago
- Parent task deleted (
#104)
disconnecting this from issue 104; creating a test is its own task.
Updated by Sam Pearson 23 days ago
- Priority changed from Normal to High
- Engineering Effort set to medium
- App Component set to API Testing
with 800 tests I'd be super surprised if every entity didn't have this, but setting the ticket to high prio for investigation.