Page MenuHomePhabricator

Global suppressions throw 'Deprecated cross-wiki access' warnings
Closed, ResolvedPublicPRODUCTION ERROR

Description

(context: my two wikis are called 'wikidb' and 'meta', the suppression has been performed on 'wikidb')

Deprecated cross-wiki access to MediaWiki\User\UserIdentityValue. Expected: the local wiki, Actual: 'meta'. Pass expected $wikiId. [Called from MediaWiki\User\UserIdentityValue::getId in /var/www/html/core/includes/user/UserIdentityValue.php at line 144]
Backtrace:

    WikiAwareEntityTrait.php line 75 calls wfDeprecatedMsg()
    UserIdentityValue.php line 144 calls MediaWiki\User\UserIdentityValue->deprecateInvalidCrossWiki()
    DatabaseBlockStore.php line 391 calls MediaWiki\User\UserIdentityValue->getId()
    DatabaseBlockStore.php line 202 calls MediaWiki\Block\DatabaseBlockStore->getArrayForDatabaseBlock()
    DatabaseBlock.php line 500 calls MediaWiki\Block\DatabaseBlockStore->insertBlock()
    CentralAuthUser.php line 1950 calls MediaWiki\Block\DatabaseBlock->insert()
    CentralAuthUser.php line 1876 calls CentralAuthUser->doLocalSuppression()
    CentralAuthUser.php line 1854 calls CentralAuthUser->doCrosswikiSuppression()
    CentralAuthUser.php line 1816 calls CentralAuthUser->suppress()
    SpecialCentralAuth.php line 294 calls CentralAuthUser->adminLockHide()
    SpecialCentralAuth.php line 194 calls MediaWiki\Extension\CentralAuth\Special\SpecialCentralAuth->doSubmit()
    SpecialPage.php line 671 calls MediaWiki\Extension\CentralAuth\Special\SpecialCentralAuth->execute()
    SpecialPageFactory.php line 1378 calls SpecialPage->run()
    MediaWiki.php line 314 calls MediaWiki\SpecialPage\SpecialPageFactory->executePath()
    MediaWiki.php line 903 calls MediaWiki->performRequest()
    MediaWiki.php line 563 calls MediaWiki->main()
    index.php line 53 calls MediaWiki->run()
    index.php line 46 calls wfIndexMain()
Deprecated cross-wiki access to MediaWiki\User\UserIdentityValue. Expected: the local wiki, Actual: 'wikidb'. Pass expected $wikiId. [Called from MediaWiki\User\UserIdentityValue::getId in /var/www/html/core/includes/user/UserIdentityValue.php at line 144]
Backtrace:

    WikiAwareEntityTrait.php line 75 calls wfDeprecatedMsg()
    UserIdentityValue.php line 144 calls MediaWiki\User\UserIdentityValue->deprecateInvalidCrossWiki()
    DatabaseBlockStore.php line 391 calls MediaWiki\User\UserIdentityValue->getId()
    DatabaseBlockStore.php line 202 calls MediaWiki\Block\DatabaseBlockStore->getArrayForDatabaseBlock()
    DatabaseBlock.php line 500 calls MediaWiki\Block\DatabaseBlockStore->insertBlock()
    CentralAuthUser.php line 1950 calls MediaWiki\Block\DatabaseBlock->insert()
    CentralAuthUser.php line 1876 calls CentralAuthUser->doLocalSuppression()
    CentralAuthUser.php line 1854 calls CentralAuthUser->doCrosswikiSuppression()
    CentralAuthUser.php line 1816 calls CentralAuthUser->suppress()
    SpecialCentralAuth.php line 294 calls CentralAuthUser->adminLockHide()
    SpecialCentralAuth.php line 194 calls MediaWiki\Extension\CentralAuth\Special\SpecialCentralAuth->doSubmit()
    SpecialPage.php line 671 calls MediaWiki\Extension\CentralAuth\Special\SpecialCentralAuth->execute()
    SpecialPageFactory.php line 1378 calls SpecialPage->run()
    MediaWiki.php line 314 calls MediaWiki\SpecialPage\SpecialPageFactory->executePath()
    MediaWiki.php line 903 calls MediaWiki->performRequest()
    MediaWiki.php line 563 calls MediaWiki->main()
    index.php line 53 calls MediaWiki->run()
    index.php line 46 calls wfIndexMain()
Deprecated passing invalid cross-wiki user. Expected: 'wikidb', Actual: the local wiki. [Called from MediaWiki\User\ActorStore::validateActorForInsertion in /var/www/html/core/includes/user/ActorStore.php at line 618]
Backtrace:

    ActorStore.php line 740 calls wfDeprecatedMsg()
    ActorStore.php line 618 calls MediaWiki\User\ActorStore->deprecateInvalidCrossWikiParam()
    ActorStore.php line 401 calls MediaWiki\User\ActorStore->validateActorForInsertion()
    DatabaseBlockStore.php line 401 calls MediaWiki\User\ActorStore->acquireActorId()
    DatabaseBlockStore.php line 202 calls MediaWiki\Block\DatabaseBlockStore->getArrayForDatabaseBlock()
    DatabaseBlock.php line 500 calls MediaWiki\Block\DatabaseBlockStore->insertBlock()
    CentralAuthUser.php line 1950 calls MediaWiki\Block\DatabaseBlock->insert()
    CentralAuthUser.php line 1876 calls CentralAuthUser->doLocalSuppression()
    CentralAuthUser.php line 1854 calls CentralAuthUser->doCrosswikiSuppression()
    CentralAuthUser.php line 1816 calls CentralAuthUser->suppress()
    SpecialCentralAuth.php line 294 calls CentralAuthUser->adminLockHide()
    SpecialCentralAuth.php line 194 calls MediaWiki\Extension\CentralAuth\Special\SpecialCentralAuth->doSubmit()
    SpecialPage.php line 671 calls MediaWiki\Extension\CentralAuth\Special\SpecialCentralAuth->execute()
    SpecialPageFactory.php line 1378 calls SpecialPage->run()
    MediaWiki.php line 314 calls MediaWiki\SpecialPage\SpecialPageFactory->executePath()
    MediaWiki.php line 903 calls MediaWiki->performRequest()
    MediaWiki.php line 563 calls MediaWiki->main()
    index.php line 53 calls MediaWiki->run()
    index.php line 46 calls wfIndexMain()

Event Timeline

Zabe changed the subtype of this task from "Task" to "Production Error".

Actually these also show up in production: c2a4eb8a-85fc-4d8c-b624-bcda1f6637bd

The next step here would be to make DatabaseBlockStore wiki-ware. It already kind of is, so this should be easy enough.
This would be a good opportunity to move DB layer code out of DatabaseBlock and BlockUser into DatabaseBlockStore.

daniel triaged this task as Medium priority.Jan 20 2022, 10:45 AM

The next step here would be to make DatabaseBlockStore wiki-ware.

I actually created T291849 for this some time ago.

Change 756137 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/extensions/CentralAuth@master] CentralAuthUser: use WikiAwareEntity::LOCAL for local wiki suppression

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

There are three deprecation warnings. One has been fixed by https://gerrit.wikimedia.org/r/c/723790. The other two should be fixed by the patch above. One of those two has also been reported at T287625.

Change 756137 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] CentralAuthUser: use WikiAwareEntity::LOCAL for local wiki suppression

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

Zabe closed this task as Resolved.EditedFeb 2 2022, 2:47 PM
Zabe claimed this task.

I am no longer getting deprecation warnings locally, should be fixed in wmf.20 on production.