Closed mpickering closed 5 years ago
I haven't touched the relevant code, but it seems to be fine on my test install now. @bgamari, have you done anything about this?
I have not.
That's strange. Edsko comes out as edsko
on my test install, but with a full email address as username in the staging version.
Maybe there's some sort of race condition? Suppose we have two Trac users with the same email address, one of them with a proper username, the other with just the email address. Now the migration script will process them in whichever order it sees them. If the one with a username is seen first, then the one without it will resolve to the same user, because the email addresses match (this is how the "search" argument to the gitlab getUser
call works), and we end up with the proper username. But if they are seen the other way around, then the second one resolves to the first one too, this time retaining only the usernameless user.
If this is important, then we might want to amend existing users when this happens, that is:
Instead of the current way, which simply does:
Since users can always log in using their email address, we will leave this as is, users can then pick whichever username they want.
Consider this comment: https://gitlab.staging.haskell.org/ghc/ghc/issues/7206#note_65128
The username should be
edsko
, as it is on trac. For some reason, the username is the email which seems a bit unusual.