Page MenuHomePhabricator

SettingsTest::testCurrentSettingsValidate fails in quibble-vendor-mysql-php72-noselenium-docker for multiple repos
Open, HighPublic

Description

Similarly to T305635, the test is failing again with this message in the error log:

10:53:22 There was 1 failure:
10:53:22 
10:53:22 1) MediaWiki\Tests\Structure\SettingsTest::testCurrentSettingsValidate
10:53:22 Status should be OK
10:53:22 <Error, collected 10 error(s) on the way, no value set>
10:53:22 +------+---------------------------+------------------------------------------+
10:53:22 |    1 | config-invalid-key        | NamespaceContentModels | Skipping valida |
10:53:22 |      |                           | tion of object with integer keys         |
10:53:22 |    2 | config-invalid-key        | ObjectCaches | Skipping validation of ob |
10:53:22 |      |                           | ject with integer keys                   |
10:53:22 |    3 | config-invalid-key        | WANObjectCaches | Skipping validation of |
10:53:22 |      |                           |  object with integer keys                |
10:53:22 |    4 | config-invalid-key        | CanonicalNamespaceNames | Skipping valid |
10:53:22 |      |                           | ation of object with integer keys        |
10:53:22 |    5 | config-invalid-key        | ExtraNamespaces | Skipping validation of |
10:53:22 |      |                           |  object with integer keys                |
10:53:22 |    6 | config-invalid-key        | NamespacesWithSubpages | Skipping valida |
10:53:22 |      |                           | tion of object with integer keys         |
10:53:22 |    7 | config-invalid-key        | SessionProviders | Array value found, bu |
10:53:22 |      |                           | t an array is required | array (
10:53:22   'Cent |
10:53:22 |      |                           | ralAuthSessionProvider' => 
10:53:22   array (
10:53:22    |
10:53:22 |      |                           |   'class' => 'CentralAuthSessionProvider |
10:53:22 |      |                           | ',
10:53:22  ...                                  |
10:53:22 |    8 | config-invalid-key        | NamespaceProtection | Skipping validatio |
10:53:22 |      |                           | n of object with integer keys            |
10:53:22 |    9 | config-invalid-key        | NamespacesToBeSearchedDefault | Skipping |
10:53:22 |      |                           |  validation of object with integer keys  |
10:53:22 |   10 | config-invalid-key        | PreviewOnOpenNamespaces | Skipping valid |
10:53:22 |      |                           | ation of object with integer keys        |
10:53:22 +------+---------------------------+------------------------------------------+
10:53:22 
10:53:22 /workspace/src/tests/phpunit/MediaWikiTestCaseTrait.php:336
10:53:22 /workspace/src/tests/phpunit/MediaWikiTestCaseTrait.php:341
10:53:22 /workspace/src/tests/phpunit/structure/SettingsTest.php:72
10:53:22 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:467
10:53:22 === Logs generated by test case
10:53:22 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
10:53:22 ===
10:53:22 
10:53:22 FAILURES!
10:53:22 Tests: 24770, Assertions: 80930, Failures: 1, Skipped: 90.

Event Timeline

I can reproduce this locally (with OAuth instead of CentralAuth); git bisect says it broke with rMW67c0766a8477: Use inverted schema definition for fast loading. (Gerrit) by @daniel for T300129: SettingsBuilder: replace DefaultSettings.php.

$ php tests/phpunit/phpunit.php tests/phpunit/structure/SettingsTest.php --filter testCurrentSettingsValidate
Using PHP 8.1.2
PHPUnit 8.5.26 #StandWithUkraine

F                                                                   1 / 1 (100%)

Time: 1.51 seconds, Memory: 72.50 MB

There was 1 failure:

1) MediaWiki\Tests\Structure\SettingsTest::testCurrentSettingsValidate
Status should be OK
<Error, collected 11 error(s) on the way, no value set>
+------+---------------------------+------------------------------------------+
|    1 | config-invalid-key        | NamespaceContentModels | Skipping valida |
|      |                           | tion of object with integer keys         |
|    2 | config-invalid-key        | ObjectCaches | Skipping validation of ob |
|      |                           | ject with integer keys                   |
|    3 | config-invalid-key        | WANObjectCaches | Skipping validation of |
|      |                           |  object with integer keys                |
|    4 | config-invalid-key        | CanonicalNamespaceNames | Skipping valid |
|      |                           | ation of object with integer keys        |
|    5 | config-invalid-key        | ExtraNamespaces | Skipping validation of |
|      |                           |  object with integer keys                |
|    6 | config-invalid-key        | CapitalLinkOverrides | Skipping validati |
|      |                           | on of object with integer keys           |
|    7 | config-invalid-key        | NamespacesWithSubpages | Skipping valida |
|      |                           | tion of object with integer keys         |
|    8 | config-invalid-key        | SessionProviders | Array value found, bu |
|      |                           | t an array is required | array (
  'Medi |
|      |                           | aWiki\\Extension\\OAuth\\SessionProvider |
|      |                           | ' => 
  array (
    'class' => 'MediaWik |
|      |                           | i\\E...                                  |
|    9 | config-invalid-key        | NamespaceProtection | Skipping validatio |
|      |                           | n of object with integer keys            |
|   10 | config-invalid-key        | NamespacesToBeSearchedDefault | Skipping |
|      |                           |  validation of object with integer keys  |
|   11 | config-invalid-key        | PreviewOnOpenNamespaces | Skipping valid |
|      |                           | ation of object with integer keys        |
+------+---------------------------+------------------------------------------+

/var/www/html/wiki1/tests/phpunit/MediaWikiTestCaseTrait.php:336
/var/www/html/wiki1/tests/phpunit/MediaWikiTestCaseTrait.php:341
/var/www/html/wiki1/tests/phpunit/structure/SettingsTest.php:72
/var/www/html/wiki1/tests/phpunit/MediaWikiIntegrationTestCase.php:467

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.

Change 789782 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/core@master] Fix config type of SessionProviders

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

Unassigning myself, the patch above is failing in CI and I’m not sure what the fix is. Needs someone who’s actually familiar with what’s happening in the config schema, I think.

kostajh added a subscriber: kostajh.

This is causing patches for GrowthExperiments to fail as well.

Adding @daniel as someone who's touched this code recently.

Affected extensions include:

I think that’s enough for UBN.

Affected extensions include:

I think that’s enough for UBN.

Can add Echo to the list.

Change 789812 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/core@master] Skip failing structure test in SettingsTest

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

Change 789812 merged by jenkins-bot:

[mediawiki/core@master] Skip failing structure test in SettingsTest

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

Lucas_Werkmeister_WMDE lowered the priority of this task from Unbreak Now! to High.May 9 2022, 8:59 AM

I think the problem here is that the optimized schema array is missing a few things.
generateConfigSchemaArray should output a 'config-schema' section that contains the extra bits that are not in 'config-schema-inverse'.

Change 792627 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] Config Schema: include all schea info in config-schema.php

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

@Lucas_Werkmeister_WMDE @kostajh Can you verify that my patch fixes the issue in the extension repos and merge the patch if so? We had three people quit from the team over the last couple of months and I'm having trouble finding people to review my patches.

@Lucas_Werkmeister_WMDE @kostajh Can you verify that my patch fixes the issue in the extension repos and merge the patch if so? We had three people quit from the team over the last couple of months and I'm having trouble finding people to review my patches.

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GrowthExperiments/+/793115 (depending on your patch) passed.

Change 792627 merged by jenkins-bot:

[mediawiki/core@master] Settings: Add remaining schema info to config-schema.php

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

@Lucas_Werkmeister_WMDE @kostajh Can you verify that my patch fixes the issue in the extension repos and merge the patch if so? We had three people quit from the team over the last couple of months and I'm having trouble finding people to review my patches.

I just pulled MediaWiki core and the test still passes locally.