Page MenuHomePhabricator

Wikitech: Preferences not updating after email change
Closed, ResolvedPublicPRODUCTION ERROR

Description

Steps to reproduce:

  1. Log-in to your wikitech.wikimedia.org account.
  2. Change your registered email address.
  3. Confirm your new email address through the confirmation email link received in your inbox (the one that opens Special:ConfirmEmail).
  4. Check back your Special:Preferences.

Actual results:

  • Your old email address and confirmation date still appears in Special:Preferences
    • According to @Reedy which verified this with my permission, the user.user_email and user.user_touched fields, these are updated.
  • LDAP records on the other hand do get updated without any apparent issue, so is toolsadmin.wikimedia.

Expected results:

  • Email records on Special:Preferences updated accordingly.

Additional information:

Discovered changing the email address of my account there today. Fixed it somehow confirming again my email address using the same confirmation email link I received.

Reproduced the same issue trying to change the email address for my bot although in this case and to facilitate debuging I did not attempt to re-confirm the email address.

Caching issue?

Site / Software:

Thank you.

Event Timeline

MarcoAurelio changed the subtype of this task from "Task" to "Bug Report".Apr 5 2023, 3:09 PM
MarcoAurelio updated the task description. (Show Details)
wikiadmin2023@10.64.16.187(labswiki)> select * from user where user_name='MABot'\G
*************************** 1. row ***************************
                 user_id: 10804
               user_name: MABot
          user_real_name:
           user_password: <REDACTED>
        user_newpassword:
       user_newpass_time: NULL
              user_email: <REDACTED>
            user_touched: 20230405151600
              user_token: <REDACTED>
user_email_authenticated: 20230405145537
        user_email_token: <REDACTED>
user_email_token_expires: 20230412145505
       user_registration: 20170720192839
          user_editcount: 521
   user_password_expires: NULL
1 row in set (0.001 sec)
$ ldap cn=MABot mail modifyTimestamp
dn: uid=mabot,ou=people,dc=wikimedia,dc=org
mail: <REDACTED>
modifyTimestamp: 20230405151601Z

The <REDACTED> email values in both systems match.

@MarcoAurelio I'm not sure I understand your expected/actual issue here. I will try to state what I think you have reported, and I hope you will correct anything I am getting wrong. I believe that the report is that the changed email value is showing in the backend database and LDAP services but that stale data is being shown in the Wikitech UI. Is that correct?

@MarcoAurelio I'm not sure I understand your expected/actual issue here. I will try to state what I think you have reported, and I hope you will correct anything I am getting wrong. I believe that the report is that the changed email value is showing in the backend database and LDAP services but that stale data is being shown in the Wikitech UI. Is that correct?

@bd808 : Thank you for investigating. Correct. The stale email data is still being displayed at https://wikitech.wikimedia.org/wiki/Special:Preferences as if the email address never changed. This is also true for the email confirmation date, which keeps displaying Your email address was confirmed on 20 July 2017 at 19:28.

I have attempted to purge the cache via ?debug=true&action=purge as well, but it did not refresh any of the UI data, and I don't see any errors in the firefox dev console either.

If you need further information, please let me know.

[15:56]  <   herzog> bd808: not sure if you did something in the background, but the UI is now displaying the new email after ~1 hour
[15:56]  <    Reedy> cache expired :D
[15:56]  <    bd808> herzog: I didn't do anything, but this maybe confirms that there is a missing cache purge somewhere
[15:57]  <   herzog> so the email is actually changed in the db and ldap but the ui takes a while to refresh
[15:57]  <   herzog> no idea if this is exclusive for wikitech or it can be reproduced in prod
[15:57]  <   herzog> in any case, thanks all
[15:57]  <    bd808> Sounds a bit like T333925 and T249623
[15:57]  < stashbot> T333925: Error during MFA setup for wikitech.wikimedia.org: MWException: CAS update failed on user_touched. The version of the user to be saved is older than the current version. - https://phabricator.wikimedia.org/T333925
[15:57]  < stashbot> T249623: Logging in on Wikitech can throw fatal from LdapAuthentication "CAS update failed on user_touched" - https://phabricator.wikimedia.org/T249623
[15:58]  <    bd808> both are cache vs db mismatch errors on wikitech
[15:59]  <    bd808> wikitech things like caching get messed up more often than we would like in part because wikitech is the only "production" wiki that is not hosted in the production wiki cluster. This leads to weird config drifts and mismatches.
bd808 changed the subtype of this task from "Bug Report" to "Production Error".
bd808 assigned this task to Krinkle.
bd808 added a subscriber: Krinkle.

Change 912421 merged by jenkins-bot:

[operations/mediawiki-config@master] mc: Fix accidental mcrouter prefix $wgWANObjectCache on labswiki

https://gerrit.wikimedia.org/r/912421

I was able to change my email, see it showing as changed in the UI and backend, and change it again with no issues following @Krinkle's configuration update.