Merge lp:~sinzui/launchpad/cleanup-merged-people-1 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Curtis Hovey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 16338 |
Proposed branch: | lp:~sinzui/launchpad/cleanup-merged-people-1 |
Merge into: | lp:launchpad |
Diff against target: |
97 lines (+42/-0) 3 files modified
database/schema/security.cfg (+1/-0) lib/lp/scripts/garbo.py (+20/-0) lib/lp/scripts/tests/test_garbo.py (+21/-0) |
To merge this branch: | bzr merge lp:~sinzui/launchpad/cleanup-merged-people-1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Richard Harding (community) | Approve | ||
Review via email: mp+137700@code.launchpad.net |
Commit message
clean up merged people data.
Description of the change
Merged teams and users continue to have relationships because some data
could not be transferred or deleted during the merge process, because
there are race conditions. TeamMembership records continue to exist for
example and they cause 404's because they are listed in pending,
invited, and former members. In the case or merged private-teams, the
+members page will raise a 403 error for team admins.
RULES
Pre-
* Create a daily garbo job that deletes TeamMembership rows for
merged people.
* This could also do the same for deactivated users or user who
are suspended for more than 30 days.
* A successful implementation could also be extended to remove
archive, bug, blueprint, branch, and question subscriptions.
QA
* Ask a webops to run ./cronscripts/
(wampee).
* Visit https:/
and step to the second batch of Former members
* Verify that easter_egg (a.j-merged) is not listed among the former
members.
LINT
database/
lib/
lib/
LoC
I have more than 10,000 lines of credit this week.
TEST
./bin/test -vvc -t TeamMembershipP
IMPLEMENTATION
I added a garbo job that deletes all the membership records for merged
users and teams. There are about 176 TeamMemberships that were left
behind by merge. The TeamParticipation rules already discounted the
merged users, so it is just the TM rows that are causing 403 and 404
issues for team admins.
database/
lib/
lib/