Merge lp:~cjwatson/launchpad/close-account-message-owner into lp:launchpad
Proposed by
Colin Watson
Status: | Merged |
---|---|
Merged at revision: | 18831 |
Proposed branch: | lp:~cjwatson/launchpad/close-account-message-owner |
Merge into: | lp:launchpad |
Diff against target: |
31 lines (+3/-0) 2 files modified
lib/lp/registry/scripts/closeaccount.py (+1/-0) lib/lp/registry/scripts/tests/test_closeaccount.py (+2/-0) |
To merge this branch: | bzr merge lp:~cjwatson/launchpad/close-account-message-owner |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Natalia Bidart (community) | Approve | ||
Launchpad code reviewers | Pending | ||
Review via email: mp+360056@code.launchpad.net |
Commit message
Skip Message.owner references in close-account.
Description of the change
These are created if (e.g.) the user had commented on a question at some point. There's no need to break those links.
To post a comment you must log in.
13:37 < nessita> cjwatson, question about your branch: the commit says "skip owner references..." but the code adds them, so I'm not sure I understand what is going on /paste. ubuntu. com/p/DcKHgpfRP n/
13:39 < cjwatson> nessita: It adds them to a set called "skip" :)
13:41 < cjwatson>| close-account's job is to do as full an erasure of an account as is possible (to satisfy legal demands etc.) while not breaking referential integrity. There are way too many FKs on Person.id to be realistic to decide what to do about all of them up-front, so the purpose of the "skip" set is to be a list of FKs that we've determined are OK to keep around even after an account has been wiped ...
13:41 < cjwatson>| ... and replaced with a minimal placeholder.
13:43 < nessita> cjwatson, I understand, thanks. And the tests, do they have a machinery where by adding an owner there are asserts that will ensure is not there?
13:45 < cjwatson> nessita: Indeed. With only the test changes, one gets https:/
13:45 < cjwatson>| I recently refactored close-account to be super-paranoid about what happens if any unhandled FKs are left over
13:46 < cjwatson>| So we are forced to make some kind of decision about them
13:46 < nessita> cjwatson, great, it makes sense and I think it looks good