Merge lp:~milo/linaro-patchmetrics/user-migration into lp:linaro-patchmetrics
Proposed by
Milo Casagrande
Status: | Merged |
---|---|
Merged at revision: | 393 |
Proposed branch: | lp:~milo/linaro-patchmetrics/user-migration |
Merge into: | lp:linaro-patchmetrics |
Diff against target: |
74 lines (+70/-0) 1 file modified
apps/patchmetrics/bin/migrate-linaro-users.py (+70/-0) |
To merge this branch: | bzr merge lp:~milo/linaro-patchmetrics/user-migration |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Sokolovsky | Approve | ||
Linaro Automation & Validation | Pending | ||
Review via email:
|
Description of the change
A simple script to migrate users in the DB to the new Crowd authentication mechanism.
Users will be matched based on their email address.
There is a workaround at the moment in the code for emails longer than 30 chars: Django does not support that.
To post a comment you must log in.
One thing is that I thought this would be belong to django custom management commands, but I see that patchmetrics has that patterns of bin/ utils using _pythonpath module ok.
But the strategy looks pretty surprising. I always thought of something like: when we have both old (LP) and new (Crowd) user (so user would need to login via Crowd), and we migrate all objects from one user id to another. so, we retain both users in there (as backout strategy for example).
So, approach of this script with "destructive" migration of user's identity from Launchpad to Crowd feels almost like cheating. Well, if it works, I cannot really say something bad about it, because it's indeed nice automated en-masse solution. One thing I'd mention though is matter of how complete this "identity switching" is. For example, there's likely openid data linked to this account. I don't think this would interfere with something, but well, worth mentioning.
Otherwise, look good.