Page MenuHomePhabricator

CentralAuthExtensionJsonTest fails if SecurePoll is not installed
Closed, ResolvedPublic

Description

If you enable CentralAuth but don't have SecurePoll installed and run CentralAuthExtensionJsonTest, it will fail:

1) CentralAuthExtensionJsonTest::testHookHandler with data set #11 ('securepoll')
Error: Interface "MediaWiki\Extension\SecurePoll\Hooks\SecurePoll_GetUserParamsHook" not found

/var/www/html/w/extensions/CentralAuth/includes/Hooks/Handlers/SecurePollHookHandler.php:30
/var/www/html/w/includes/AutoLoader.php:222
/var/www/html/w/vendor/wikimedia/object-factory/src/ObjectFactory.php:240
/var/www/html/w/vendor/wikimedia/object-factory/src/ObjectFactory.php:149
/var/www/html/w/tests/phpunit/integration/includes/ExtensionJsonTestBase.php:97
/var/www/html/w/tests/phpunit/MediaWikiIntegrationTestCase.php:518

This is blocking merges to the integration/quibble repository.

Event Timeline

And it looks like this can be reproduced with pretty much any extension that handles hooks from another extension using the "new" hook system. For instance, AbuseFilterExtensionJsonTest fails the same way if CheckUser is not installed.

Daimona added a project: MediaWiki-Core-Tests.

This is actually caused by a core test class, ExtensionJsonTestBase. I'm not sure how it should handle this case. Maybe the test could skip validation of hook handlers, I don't know...

This is blocking merges to the integration/quibble repository.

Is Quibble installing CentralAuth without SecurePoll? At least in the usual CI config, CentralAuth is supposed to pull in SecurePoll (see also T341556, especially T341556#9004491 and the next comment).

This is blocking merges to the integration/quibble repository.

Is Quibble installing CentralAuth without SecurePoll? At least in the usual CI config, CentralAuth is supposed to pull in SecurePoll (see also T341556, especially T341556#9004491 and the next comment).

I think this is the case, yes... I'm going to temporarily disable the test to unblock CI (T90875#9015487), but I'll leave this task open.

Change 938245 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CentralAuth@master] Disable CentralAuthExtensionJsonTest

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

Change 938254 had a related patch set uploaded (by Majavah; author: Majavah):

[integration/quibble@master] utils: fullrun-extensions: Clone SecurePoll

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

Apparently Quibble has its own list of repeos to clone that doesn't follow the normal dependencies system. The above patch adds SecurePoll to that list.

Change 938245 abandoned by Daimona Eaytoy:

[mediawiki/extensions/CentralAuth@master] Disable CentralAuthExtensionJsonTest

Reason:

Fixing quibble instead

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

Change 938254 merged by Majavah:

[integration/quibble@master] utils: fullrun-extensions: Clone SecurePoll

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

Quibble is fixed now, but leaving this open because the bug remains.

Quibble is fixed now, but leaving this open because the bug remains.

Quibble won't be fixed in practice until someone does the release, builds the new images, and switches all of CI over to them. I can help out a bit; normally this is a @hashar-only activity, but given it's a holiday…

Quibble is fixed now, but leaving this open because the bug remains.

Quibble won't be fixed in practice until someone does the release, builds the new images, and switches all of CI over to them. I can help out a bit; normally this is a @hashar-only activity, but given it's a holiday…

It's just quibble's own CI that was failing, not quibble itself, AIUI. That said, there are two quibble patches (r938010, r938012) that could definitely use some love :)

Quibble is fixed now, but leaving this open because the bug remains.

Quibble won't be fixed in practice until someone does the release, builds the new images, and switches all of CI over to them. I can help out a bit; normally this is a @hashar-only activity, but given it's a holiday…

It's just quibble's own CI that was failing, not quibble itself, AIUI. That said, there are two quibble patches (r938010, r938012) that could definitely use some love :)

Ah, sorry, got lost between tasks and thought this was that one. :-(

Change 938289 had a related patch set uploaded (by Jforrester; author: Jforrester):

[integration/quibble@master] release: Quibble 1.5.5

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

Change 938289 merged by jenkins-bot:

[integration/quibble@master] release: Quibble 1.5.5

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

Change 938296 had a related patch set uploaded (by Jforrester; author: Jforrester):

[integration/config@master] Docker [quibble] Upgrade Quibble to 1.5.5

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

Change 938296 merged by jenkins-bot:

[integration/config@master] Docker [quibble] Upgrade Quibble to 1.5.5

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

Mentioned in SAL (#wikimedia-releng) [2023-07-14T18:56:23Z] <James_F> Docker: Building and publishing quibble images # T90875 T227900 T341840

Change 938298 had a related patch set uploaded (by Jforrester; author: Jforrester):

[integration/config@master] jjb: Update quibble jobs to images with Quibble 1.5.5

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

Change 961903 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/CentralAuth@master] tests: Skip SecurePoll hook handler when extension is not loaded

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

Change 961903 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] tests: Skip SecurePoll hook handler when extension is not loaded

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

I don’t think so. Boldly resolving.