Last modified: 2014-10-09 19:09:04 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42061, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40061 - Make it possible to rename users in Gerrit
Make it possible to rename users in Gerrit
Status: RESOLVED WONTFIX
Product: Wikimedia
Classification: Unclassified
Git/Gerrit (Other open bugs)
unspecified
All All
: Normal normal with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-06 19:54 UTC by Chad H.
Modified: 2014-10-09 19:09 UTC (History)
12 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Chad H. 2012-09-06 19:54:15 UTC
A bunch of people have already requested this from me, but I just haven't gotten around to it yet.

It's not as hard as originally thought--what we'll want to do is rename in LDAP (using labsconsole), then have something that updates the gerrit db. There's only two tables needing updating:

accounts -> full_name
account_external_ids => external_id

The two queries are:
update accounts set full_name = "New Name" where full_name = "Old Name"
update account_external_ids set external_id = "gerrit:New Name" where external_id = "gerrit:Old Name"

For the account_external_ids, Old Name may not be the same capitalization as accounts...login is case-insensitive and was stored based on initial login (afaict).

Probably won't get to this immediately, but should only take half a day to whip up  an SSH plugin for gerrit 2.5 that labsconsole can call to rename the user in gerrit.

(Note: the "official" suggestion for this right now is to rename in LDAP, login as the new user, then "merge" the two accounts. This is messy and way more error-prone than my new idea :p)
Comment 1 Chad H. 2012-09-06 19:56:11 UTC
(In reply to comment #0)
> Probably won't get to this immediately, but should only take half a day to whip
> up  an SSH plugin for Gerrit change #2.5 that labsconsole can call to rename the user
> in gerrit.
> 

That's gerrit version 2.5. Really need to adjust that regex...
Comment 2 Juliusz Gonera 2013-01-03 19:56:16 UTC
Maybe just let everyone set it themselves?

https://groups.google.com/forum/?fromgroups=#!topic/repo-discuss/qm9z3VihSrg
Comment 3 Chad H. 2013-01-03 20:00:43 UTC
What we should probably do is have Gerrit pull the full name you provide in labsconsole (so you can edit it in one place).
Comment 4 Juliusz Gonera 2013-01-03 20:09:58 UTC
Ideally yes, I was just suggesting a partial fix for now.
Comment 5 Željko Filipin 2013-01-03 21:20:07 UTC
If for some reason name is not set, "git review -d (number)" does not work[1]:

$ git review -d 37771
Traceback (most recent call last):
  File "/usr/local/bin/git-review", line 863, in <module>
    main()
  File "/usr/local/bin/git-review", line 801, in main
    print_exit_message(download_review(options.download, branch, remote),
  File "/usr/local/bin/git-review", line 643, in download_review
    author = re.sub('\W+', '_', review_info['owner']['name']).lower()
KeyError: 'name'

[1] https://gerrit.wikimedia.org/r/#/c/37771/
Comment 6 Alex Monk 2013-01-04 02:09:44 UTC
(In reply to comment #5)

Fixed in https://review.openstack.org/18940
Comment 7 Chad H. 2013-01-07 12:05:48 UTC
Removing patch-in-gerrit keyword--that's just a fix to git-review being bad, and isn't what this bug is about.
Comment 8 Bartosz Dziewoński 2013-10-18 19:26:07 UTC
OK, this is definitely possible now (I know since I've had my name changed), but it's apparently still a manual process. Should we close this bug or keep it opened until everything is ironed out?
Comment 9 Antoine "hashar" Musso (WMF) 2013-10-18 19:46:33 UTC
If someone managed to get its name changed, I guess we have some howto/process to achieve. If so, that would let us close this bug :-]  Then we can probably announce that possibilities to our users, I guess a bunch of would want a rename.
Comment 11 Bartosz Dziewoński 2014-02-08 22:01:22 UTC
Does anyone want to do anything else with this or can we call it FIXED?
Comment 12 Andre Klapper 2014-02-25 16:42:23 UTC
(In reply to Bartosz Dziewoński from comment #11)
> Does anyone want to do anything else with this or can we call it FIXED?

No reply => Assuming this can be called FIXED.
Comment 13 Helder 2014-10-09 19:09:04 UTC
Given that the recommendation is (or, at least for me, it was) to create a new account instead of renaming an existing one, I assume WONTFIX is a more precise resolution for this bug.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links