close-account.py tests cannot detect conflicting schema updates
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
Unfortunately, we have no way of detecting schema updates containing new
information that needs to be removed or sanitized on account closure apart
from reviewers noticing and prompting developers to update this script.
Hmm... actually, we may be able to. In the test setup, create a
user and fill in sample data such that every column that references
person has at least one entry for this user (slow and painful :-( ).
Then sanity check in a way similar to people merge, checking every
column referencing Person confirming there is now a reference to this new
user. This will fix many cases of schema creep that will break this code,
but not all (eg. a new table is added that references a table we handle
by deleting the entries from it. We won't notice that this might fail,
because no such referencing row actually exists. Perhaps we can handle
this too by keeping a list of tables we do deletions from and ensuring
that any references to them, and references to the references etc.,
are handled but we are getting really complicated and ending up with
diminishing returns. And still no guarantees :-(
Changed in launchpad: | |
importance: | Undecided → Wishlist |
status: | Unconfirmed → Confirmed |
visibility: | private → public |