Page MenuHomePhabricator

Patch Demo failed: no class Wikimedia\Equivset\Equivset
Open, Needs TriagePublic2 Estimated Story PointsBUG REPORT

Description

Hi. I just tried to create my first Patch Demo, so it is possible I did something wrong.
I started a35f3cd3eb wiki and got a message Log stream has terminated, but deployment is not complete. Status is: starting.
Searching the problem I found these lines:

2025-12-06T11:39:41.423377422Z: wiki_a35f3cd3eb__main: Promoting User:Patch Demo into electionadmin...
2025-12-06T11:39:41.544823587Z: [5a96b8ae4ac42d978b75539c] [no req] Error: Class "Wikimedia\Equivset\Equivset" not found
2025-12-06T11:39:41.544868725Z: Backtrace:
2025-12-06T11:39:41.544876889Z: from /var/www/html/w/extensions/AbuseFilter/includes/ServiceWiring.php(139)
2025-12-06T11:39:41.545092660Z: #0 /var/www/html/w/vendor/wikimedia/services/src/ServiceContainer.php(440): Wikimedia\Services\ServiceContainer::{closure}()
2025-12-06T11:39:41.545900641Z: #1 /var/www/html/w/vendor/wikimedia/services/src/ServiceContainer.php(406): Wikimedia\Services\ServiceContainer->createService()
2025-12-06T11:39:41.545937040Z: #2 /var/www/html/w/includes/MediaWikiServices.php(377): Wikimedia\Services\ServiceContainer->getService()
2025-12-06T11:39:41.545948233Z: #3 /var/www/html/w/vendor/wikimedia/services/src/ServiceContainer.php(414): MediaWiki\MediaWikiServices->getService()
2025-12-06T11:39:41.546043149Z: #4 /var/www/html/w/extensions/AbuseFilter/includes/ServiceWiring.php(313): Wikimedia\Services\ServiceContainer->get()
2025-12-06T11:39:41.546353412Z: #5 /var/www/html/w/vendor/wikimedia/services/src/ServiceContainer.php(440): Wikimedia\Services\ServiceContainer::{closure}()
2025-12-06T11:39:41.546582884Z: #6 /var/www/html/w/vendor/wikimedia/services/src/ServiceContainer.php(406): Wikimedia\Services\ServiceContainer->createService()
2025-12-06T11:39:41.546888165Z: #7 /var/www/html/w/includes/MediaWikiServices.php(377): Wikimedia\Services\ServiceContainer->getService()
2025-12-06T11:39:41.547195429Z: #8 /var/www/html/w/vendor/wikimedia/services/src/ServiceContainer.php(414): MediaWiki\MediaWikiServices->getService()
2025-12-06T11:39:41.547917443Z: #9 /var/www/html/w/vendor/wikimedia/object-factory/src/ObjectFactory.php(204): Wikimedia\Services\ServiceContainer->get()
2025-12-06T11:39:41.547939053Z: #10 /var/www/html/w/vendor/wikimedia/object-factory/src/ObjectFactory.php(149): Wikimedia\ObjectFactory\ObjectFactory::getObjectFromSpec()
2025-12-06T11:39:41.547948499Z: #11 /var/www/html/w/includes/Auth/AuthManager.php(2809): Wikimedia\ObjectFactory\ObjectFactory->createObject()
2025-12-06T11:39:41.548157271Z: #12 /var/www/html/w/includes/Auth/AuthManager.php(2876): MediaWiki\Auth\AuthManager->providerArrayFromSpecs()
2025-12-06T11:39:41.548379874Z: #13 /var/www/html/w/includes/Auth/AuthManager.php(2842): MediaWiki\Auth\AuthManager->initializeAuthenticationProviders()
2025-12-06T11:39:41.548661289Z: #14 /var/www/html/w/includes/Auth/AuthManager.php(949): MediaWiki\Auth\AuthManager->getPrimaryAuthenticationProviders()
2025-12-06T11:39:41.548831985Z: #15 /var/www/html/w/includes/User/User.php(2112): MediaWiki\Auth\AuthManager->userCanAuthenticate()
2025-12-06T11:39:41.549046979Z: #16 /var/www/html/w/includes/User/User.php(865): MediaWiki\User\User->isSystemUser()
2025-12-06T11:39:41.549224510Z: #17 /var/www/html/w/maintenance/createAndPromote.php(218): MediaWiki\User\User::newSystemUser()
2025-12-06T11:39:41.549416974Z: #18 /var/www/html/w/maintenance/createAndPromote.php(168): CreateAndPromote->addLogEntry()
2025-12-06T11:39:41.549616111Z: #19 /var/www/html/w/maintenance/includes/MaintenanceRunner.php(696): CreateAndPromote->execute()
2025-12-06T11:39:41.549821736Z: #20 /var/www/html/w/maintenance/doMaintenance.php(88): MediaWiki\Maintenance\MaintenanceRunner->run()
2025-12-06T11:39:41.549984361Z: #21 /var/www/html/w/maintenance/createAndPromote.php(232): require_once(string)
2025-12-06T11:39:41.549992978Z: #22 {main}
Log stream has terminated, but deployment is not complete. Status is: starting

The demo appears as failed at the main page:

image.png (227×1 px, 43 KB)

image.png (878×1 px, 241 KB)

What can I do? Thank you.

Event Timeline

I tried to rebuild the wiki, removing as much extensions as possible. The result is the same.

I just tried to create my first Patch Demo, so it is possible I did something wrong.

It looks like a real bug, not you doing something wrong. It seems like the Composer dependency of AbuseFilter wasn’t installed by the point the code tries to add a user – this shouldn’t happen. Is there any chance you still have access to the entire log? If you could paste it here (you can use the ‘lines’ parameter to avoid your post getting too long), maybe I could spot something in it.

I tried to rebuild the wiki, removing as much extensions as possible. The result is the same.

Are you sure the result is the exact same? According to https://patchdemo.wmcloud.org/, you have a number of extensions enabled (AntiSpoof, CampaignEvents, CategoryTree, CentralAuth, CheckUser, DarkMode, Echo, EventBus, EventLogging, EventStreamConfig, GlobalPreferences, GlobalWatchlist, IPInfo, Interwiki, JsonConfig, MobileFrontend, OATHAuth, ParserFunctions, Renameuser, Scribunto, SyntaxHighlight_GeSHi, TextExtracts, Thanks, Translate, UniversalLanguageSelector, VisualEditor, WebAuthn, WikiEditor, WikimediaMessages, cldr, wikihiero), but AbuseFilter is no longer one of them, so it’d be quite surprising if the exception still came from there.

On the other hand, it looks a lot more than necessary – extensions like CampaignEvents, CategoryTree, CheckUser, Scribunto, Translate or WikiHiero don’t look necessary for testing a GlobalWatchlist patch.

If you could remove more extensions, maybe it could unblock your workflow before the bug itself gets fixed.

Is there any chance you still have access to the entire log? If you could paste it here (you can use the ‘lines’ parameter to avoid your post getting too long), maybe I could spot something in it.

Sorry, I don't.

I tried to rebuild the wiki, removing as much extensions as possible. The result is the same.

Are you sure the result is the exact same? According to https://patchdemo.wmcloud.org/, you have a number of extensions enabled (AntiSpoof, CampaignEvents, CategoryTree, CentralAuth, CheckUser, DarkMode, Echo, EventBus, EventLogging, EventStreamConfig, GlobalPreferences, GlobalWatchlist, IPInfo, Interwiki, JsonConfig, MobileFrontend, OATHAuth, ParserFunctions, Renameuser, Scribunto, SyntaxHighlight_GeSHi, TextExtracts, Thanks, Translate, UniversalLanguageSelector, VisualEditor, WebAuthn, WikiEditor, WikimediaMessages, cldr, wikihiero), but AbuseFilter is no longer one of them, so it’d be quite surprising if the exception still came from there.

I have an answer for that. Somewhere today, don't remember when, I saw a message that two extensions need it, I think, don't remember which one was the second one.

On the other hand, it looks a lot more than necessary – extensions like CampaignEvents, CategoryTree, CheckUser, Scribunto, Translate or WikiHiero don’t look necessary for testing a GlobalWatchlist patch.

If you could remove more extensions, maybe it could unblock your workflow before the bug itself gets fixed.

Done. Same. See the full log at P86438. Looks like the second extension is AntiSpoof.

Sorry, I don't. […] See the full log at P86438. Looks like the second extension is AntiSpoof.

Thanks! It actually doesn’t really matter which log you paste, as long as the errors are roughly the same. I see there

2025-12-06T19:05:23.229218541Z: + composer require 'oojs/oojs-ui @dev' --update-no-dev
2025-12-06T19:05:23.364972084Z: Composer plugins have been disabled for safety in this non-interactive session.
2025-12-06T19:05:23.365021154Z: Set COMPOSER_ALLOW_SUPERUSER=1 if you want to allow plugins to run as root/super user.
2025-12-06T19:05:23.365033373Z: Do not run Composer as root/super user! See https://getcomposer.org/root for details
2025-12-06T19:05:23.451191122Z: ./composer.json has been updated
2025-12-06T19:05:23.517516264Z: Running composer update oojs/oojs-ui
2025-12-06T19:05:23.560679429Z: > MediaWiki\Composer\VersionChecker::onEvent
2025-12-06T19:05:23.565259267Z: Loading composer repositories with package information
2025-12-06T19:05:23.625277788Z: Updating dependencies
2025-12-06T19:05:23.654601077Z: Lock file operations: 0 installs, 1 update, 21 removals
2025-12-06T19:05:23.654628713Z: - Removing bacon/bacon-qr-code (v3.0.3)
2025-12-06T19:05:23.654636085Z: - Removing brick/math (0.13.1)
2025-12-06T19:05:23.654712876Z: - Removing christian-riesen/base32 (1.6.0)
2025-12-06T19:05:23.654828434Z: - Removing composer/ca-bundle (1.5.9)
2025-12-06T19:05:23.654836252Z: - Removing dasprid/enum (1.0.7)
2025-12-06T19:05:23.654841926Z: - Removing endroid/qr-code (6.0.9)
2025-12-06T19:05:23.654889638Z: - Removing geoip2/geoip2 (v3.3.0)
2025-12-06T19:05:23.655001829Z: - Removing jakobo/hotp-php (v2.0.0)
2025-12-06T19:05:23.655005370Z: - Removing maxmind-db/reader (v1.13.1)
2025-12-06T19:05:23.655044597Z: - Removing maxmind/web-service-common (v0.11.0)
2025-12-06T19:05:23.655578469Z: - Removing paragonie/constant_time_encoding (v3.1.3)
2025-12-06T19:05:23.655597301Z: - Removing psr/event-dispatcher (1.0.0)
2025-12-06T19:05:23.655601938Z: - Removing spomky-labs/cbor-php (3.2.2)
2025-12-06T19:05:23.655605635Z: - Removing spomky-labs/pki-framework (1.4.0)
2025-12-06T19:05:23.655609689Z: - Removing symfony/polyfill-uuid (v1.33.0)
2025-12-06T19:05:23.655613674Z: - Removing symfony/uid (v7.4.0)
2025-12-06T19:05:23.655617602Z: - Removing web-auth/cose-lib (4.4.2)
2025-12-06T19:05:23.655621959Z: - Removing web-auth/webauthn-lib (4.9.2)
2025-12-06T19:05:23.655625775Z: - Removing wikimedia/equivset (1.7.1)
2025-12-06T19:05:23.655630016Z: - Removing wikimedia/idle-dom (v2.1.0)
2025-12-06T19:05:23.655633932Z: - Removing wikimedia/zest-css (4.1.0)
2025-12-06T19:05:23.655673617Z: - Upgrading oojs/oojs-ui (v0.53.0 => dev-3d788261b1daf985a13143594ad3bf08c79534aa)

So the installation of oojs/ui removes a bunch of Composer dependencies, including wikimedia/equivset. I don’t know why this happens, but my next tip for a workaround is that you uncheck oojs/ui in the included repos section. In fact, that won’t remove OOUI, it will just keep it at v0.53.0 and not update it to rGOJU3d788261b1daf985a13143594ad3bf08c79534aa. (Checking it would only be necessary if you would need the latest OOUI version, for example to demo a change in OOUI itself. Yeah, the interface doesn’t make this obvious.)

So the installation of oojs/ui removes a bunch of Composer dependencies, including wikimedia/equivset. I don’t know why this happens [...]

This is the reason:

2025-12-06T19:05:23.364972084Z: Composer plugins have been disabled for safety in this non-interactive session.
2025-12-06T19:05:23.365021154Z: Set COMPOSER_ALLOW_SUPERUSER=1 if you want to allow plugins to run as root/super user.
2025-12-06T19:05:23.365033373Z: Do not run Composer as root/super user! See https://getcomposer.org/root for details

composer-merge-plugin is required for composer to pick up dependencies from extensions, and if that does not run then exactly this will happen.

So the installation of oojs/ui removes a bunch of Composer dependencies, including wikimedia/equivset. I don’t know why this happens, but my next tip for a workaround is that you uncheck oojs/ui in the included repos section. In fact, that won’t remove OOUI, it will just keep it at v0.53.0 and not update it to rGOJU3d788261b1daf985a13143594ad3bf08c79534aa. (Checking it would only be necessary if you would need the latest OOUI version, for example to demo a change in OOUI itself. Yeah, the interface doesn’t make this obvious.)

Thank you. I tried, but the Patch Demo destroyed the wiki entirely, because I've fixed the patch after your comments, and it needs Jenkins bot approval. And since its my first patch, I'm not allowed to comment "recheck", so I can only wait when somebody will do it.
UPD: Thanks, running.

Thanks a lot, @Tacsipacsi, it works. Part of the patch is fine, part isn't, I'll debug it tomorrow, I think.

IKhitron assigned this task to Tacsipacsi.
Tacsipacsi removed Tacsipacsi as the assignee of this task.

This is the reason:

2025-12-06T19:05:23.364972084Z: Composer plugins have been disabled for safety in this non-interactive session.
2025-12-06T19:05:23.365021154Z: Set COMPOSER_ALLOW_SUPERUSER=1 if you want to allow plugins to run as root/super user.
2025-12-06T19:05:23.365033373Z: Do not run Composer as root/super user! See https://getcomposer.org/root for details

composer-merge-plugin is required for composer to pick up dependencies from extensions, and if that does not run then exactly this will happen.

I see, thanks for the explanation! Questions arising are:

I tried, but the Patch Demo destroyed the wiki entirely, because I've fixed the patch after your comments, and it needs Jenkins bot approval.

That sounds like another bug: if you’re not allowed to update a patch demo, it should just not do anything, rather than destroying the existing patch demo…

Thanks a lot, @Tacsipacsi, it works. Part of the patch is fine, part isn't, I'll debug it tomorrow, I think.

I’m glad it works, but this is just a workaround, the bug itself still needs to be fixed.

I tried, but the Patch Demo destroyed the wiki entirely, because I've fixed the patch after your comments, and it needs Jenkins bot approval.

That sounds like another bug: if you’re not allowed to update a patch demo, it should just not do anything, rather than destroying the existing patch demo…

You are absolutely right.

I’m glad it works, but this is just a workaround, the bug itself still needs to be fixed.

I see.

I tried, but the Patch Demo destroyed the wiki entirely, because I've fixed the patch after your comments, and it needs Jenkins bot approval.

That sounds like another bug: if you’re not allowed to update a patch demo, it should just not do anything, rather than destroying the existing patch demo…

You are absolutely right.

Hrm. I'm unclear what happened here. Let me see if I understand, it sounds like patchdemo failed to make the wiki and so removed it, so you couldn't update but had to recreate from scratch, is that right?

This is the reason:

2025-12-06T19:05:23.364972084Z: Composer plugins have been disabled for safety in this non-interactive session.
2025-12-06T19:05:23.365021154Z: Set COMPOSER_ALLOW_SUPERUSER=1 if you want to allow plugins to run as root/super user.
2025-12-06T19:05:23.365033373Z: Do not run Composer as root/super user! See https://getcomposer.org/root for details

composer-merge-plugin is required for composer to pick up dependencies from extensions, and if that does not run then exactly this will happen.

I see, thanks for the explanation! Questions arising are:

Thanks for the insight @taavi! And thanks, as always, for the troubleshooting @Tacsipacsi

As to how long it's been broken, either:

  • Since June, when we first noticed that the initialization wasn't using composer-merge (T394392#10945159), or
  • Since the PHP 8.3 version bump (two weeks ago) — this same problem happened in a non-patchdemo (but still using catalyst) place: T411372#11419612

It should be OK to set that environment variable, though I want to talk it through with other folks. The containers running these wikis are unprivileged. And Patch Demo is RCE as a service, so there's nothing too sensitive in the containers. I'll talk about it with others on the team.

I filed T411944 to fix composer-merge in Patch Demo.

I thought about this and decided to remove this task as the subtask, because it should be open, but isn't a blocker any more. Hope it's fine, it's all very new for me. I intend to return it after this task will be resolved for the history purposes.

I tried, but the Patch Demo destroyed the wiki entirely, because I've fixed the patch after your comments, and it needs Jenkins bot approval.

That sounds like another bug: if you’re not allowed to update a patch demo, it should just not do anything, rather than destroying the existing patch demo…

You are absolutely right.

Hrm. I'm unclear what happened here. Let me see if I understand, it sounds like patchdemo failed to make the wiki and so removed it, so you couldn't update but had to recreate from scratch, is that right?

Yes, it is. I didn't expect this to happen, so I needed to recreate the extensions list from my memory.

Offtopic: Where can I leave a lot of problems and bugs that I met on Patch Demo, is there a Talk Page somewhere? I don't think I can open a task for each.

Offtopic: Where can I leave a lot of problems and bugs that I met on Patch Demo, is there a Talk Page somewhere? I don't think I can open a task for each.

We do talk on https://wikitech.wikimedia.org/wiki/Talk:Catalyst occasionally. But we would prefer talking through problems on Phabricator. We watch and triage Catalyst (PatchDemo) regularly. If there are bugs, we want to fix them, so we'll make a task eventually anyway. If you have a broader topic (i.e., "Get X working on Patch Demo") you could file a task for that and we could break it into subtasks as needed.

Offtopic: Where can I leave a lot of problems and bugs that I met on Patch Demo, is there a Talk Page somewhere? I don't think I can open a task for each.

We do talk on https://wikitech.wikimedia.org/wiki/Talk:Catalyst occasionally. But we would prefer talking through problems on Phabricator. We watch and triage Catalyst (PatchDemo) regularly. If there are bugs, we want to fix them, so we'll make a task eventually anyway. If you have a broader topic (i.e., "Get X working on Patch Demo") you could file a task for that and we could break it into subtasks as needed.

Thank you, but neither. My question could be something like "is this a bug or a feature?

thcipriani set the point value for this task to 2.Thu, Jan 8, 6:22 PM
thcipriani moved this task from Backlog to Ready on the Catalyst (Luka Ijo Pimeja Jan) board.