#8888 Merging my accounts on badges.fedoraprojec.org
Closed: Fixed 3 years ago by nb. Opened 3 years ago by dcantrell.

This is a straggler from moving to 'dcantrell' as my account. My badges exist in two places on badges.fedoraproject.org:

https://badges.fedoraproject.org/user/dcantrel
https://badges.fedoraproject.org/user/dcantrell

Can the 'dcantrel' data be merged with 'dcantrell' since that's where I'm doing everything?

Thanks.


I guess we (royal we, I guess it would fall on me) can try to do that by fiddling in the DB.

Metadata Update from @mohanboddu:
- Issue assigned to misc
- Issue priority set to: Waiting on Assignee (was: Needs Review)

3 years ago

So before I do anything, how can I verify that this is the same account on both side ?

I can verify for dcantrel. He changed his account name about 100 tickets ago because he was able to finally get Red Hat to add an l to his name. However we can't do that in fas without breaking a lot of things so he opened a new account and we transferred over all the items in fas we could.

Correct. And both accounts should show the same name, email address, phone number, GPG key ID, and ssh public key.

ok, I trust Smooge on that one, I will try to fiddle with the DB. I am not sure if we can disable the old account (other than wiping it), but I can also do that.

The badges.fp.o page also shows "Arrived on 2013-08-27" for dcantrell, but this is me. I was in a badge session at Flock 2013 and logged in to the site at that time. The FAS authentication wasn't what it was back then and it allowed me to create a new account under the name 'dcantrell', but that then didn't work and someone said "oh, you have to auth this way" and I got in as dcantrel.

I think the badges app is now picking up new stuff for me since I now have a legit 'dcantrell' FAS account. So I'd like to have one existence on badges.fp.o and have all that I have collected under my single L existence under my proper username.

Thanks!

The other thing we could do is make a list of all of the badges that he has earned, and pipe that through /usr/local/bin/award-badge on badges-backend01 - that might be easier than messing with the DB. The only drawback I can think of with that would be using award-badge wouldn't preserve the dates that they were awarded, but I don't think that really matters.

@nb idea is a good one. I've never seen a scenario where we have needed the timestamp.

Yeah, that's a good idea. I am still gonna take a look at the backend, as in a ideal world, we should automate the username change if this is not too hard, and I also need to have some idea about what it take to erase a username, so it can't hurt to look (assuming the new stack is not too different in the DB).

Also, I would say timestamp would matter for stats, even if in practice, we can tolerate outliers and we are not doing any stats at all.

so I guess I will award the badge from outside (since there is some uuid and salt in the DB, and it is unclear why they are here, but in doubt...), but fix the timestamp, once I am sure this wouldn't mess much.

This will not be future proof for badges that count actions. Assume you got the "100 builds" badge in the old account, but in fact you did 190 builds already. Now you get the "100 builds" badge manually, but you will not get the "20 builds" badge after 10 more builds, you will need to make 200 under the new account.

Good point, the real fix would be to have a notion of aliases in the application, which is not going to happen until FAS is replaced (there is a ticket on noggin for that).

Then we could adapt our rules to do the counting using that notion, as I do not think it would be wise to hardcode that specific alias in the code for now when we are going to replace all the piece in a 3 month time frame.

Ok, so I followed nb idea, and I am awarding the badges. As chruchyard pointed, that's a hack, but that's the best we can do for now, I do hope we will be able to add the aliases support for badges later once we do have the new system in place.

I open a ticket for that https://pagure.io/fedora-badges/issue/745 and I will close that one once the badges have been warded (it take time because it compute the leaderboard each time, something that should IMHO be pushed in a separate service (so we could do "on demand recomputing" as well as "caching", since that's something that would be fine with a 1 minutes delay in practice)

@dcantrell the script has run, is everything what you wanted ?

The badge count is mismatched, but maybe that's part of the limitation? Under my old account I have 80 badges and under the new account I have 77. The missing ones:

partners-in-crime
white-hat
origin

Thanks.

@misc did you see David's reply?

No, I didn't, I was out for a while (PTO) and didn't check much during that time, will take a look once I have dealt with the mail backlog.

nope, didn't had time yet

I awarded the top two. It says you already have origin.

Ok to close now?

Yes, I see all of my badges under my 'dcantrell' account now. Thanks.

Metadata Update from @nb:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata