Warning: JsonConfig: Invalid $wgJsonConfigs['JsonZeroConfig']['remote']['url']: API URL is not set, and this config is not being stored locally [Called from JsonConfig\JCSingleton::parseConfiguration in /srv/mediawiki/php-1.28.0-wmf.22/extensions/JsonConfig/includes/JCSingleton.php at line 147] in /srv/mediawiki/php-1.28.0-wmf.22/includes/debug/MWDebug.php on line 311
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | thcipriani | T146998 MW-1.28.0-wmf.22 deployment blockers | |||
Resolved | BUG REPORT | Yurik | T147971 [BUG] ZeroConfig broke parsing of configuration | ||
Resolved | Yurik | T148493 Extension loader ignores 'merge_strategy' key |
Event Timeline
ZeroBanner's extension.json:
"JsonConfigs": { "JsonZeroConfig": { "namespace": 480, "nsName": "Zero", "isLocal": false, "cacheKey": "1" } },
wmf-config/mobile.php tries to modify ZeroBanner's values, and I think this is where it fails:
$wgJsonConfigs['JsonZeroConfig']['isLocal'] = false; $wgJsonConfigs['JsonZeroConfig']['remote'] = [ 'url' => 'https://zero.wikimedia.org/w/api.php', 'username' => $wmgZeroPortalApiUserName, 'password' => $wmgZeroPortalApiPassword, ];
Related, higher-frequency warning:
Warning: JsonConfig: In $wgJsonConfigs['JsonZeroConfig']['remote'] is set for the config that will be stored on this wiki. 'remote' parameter will be ignored. [Called from JsonConfig\JCSingleton::parseConfiguration in /srv/mediawiki/php-1.28.0-wmf.22/extensions/JsonConfig/includes/JCSingleton.php at line 161] in /srv/mediawiki/php-1.28.0-wmf.22/includes/debug/MWDebug.php on line 311
From last night:
[00:33:11] <yurik> Reedy, that's fine
I propose we just disable that warning, and/or downgrade it from E_USER_WARNING to something even lower
Oh, and reverting ZeroPortal in master... is broken. Which is a sign of there being bigger issues...
https://gerrit.wikimedia.org/r/#/c/315864/
23:41:24 1) JsonConfig\Tests\JCTitleParsingTest::testTitleParsing with data set #0 (false, null, false) 23:41:24 JsonConfig: Invalid $wgJsonConfigs['JsonZeroConfig']['remote']['url']: API URL is not set, and this config is not being stored locally [Called from JsonConfig\JCSingleton::parseConfiguration in /srv/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/extensions/JsonConfig/includes/JCSingleton.php at line 147] 23:41:24 23:41:24 /srv/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/includes/debug/MWDebug.php:311 23:41:24 /srv/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/includes/debug/MWDebug.php:166 23:41:24 /srv/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/includes/GlobalFunctions.php:1155 23:41:24 /srv/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/extensions/JsonConfig/includes/JCSingleton.php:147 23:41:24 /srv/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/extensions/JsonConfig/includes/JCSingleton.php:74 23:41:24 /srv/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/extensions/JsonConfig/includes/JCSingleton.php:381 23:41:24 /srv/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/extensions/JsonConfig/tests/phpunit/JCTitleParsingTest.php:49 23:41:24 /srv/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/tests/phpunit/MediaWikiTestCase.php:392 23:41:24 /srv/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/maintenance/doMaintenance.php:110 23:41:24
We have https://gerrit.wikimedia.org/r/#/c/315844/ merged into .22, which I guess fixed the issue in production, so should probably be merged into master
Yep, found tons more "bigger issues" :)
T148493 ignores merge strategy, and also zerobanner & zeroconfig config's are incorrect for the 2nd extension.json version -- both jsonconfig values should be moved to the "config" section, and the actual values must be stored under "value" key. Still working on the fix...
Change 316524 had a related patch set uploaded (by Yurik):
Fixed JsonConfigs global var initialization
Change 316523 had a related patch set uploaded (by Yurik):
Use array_replace_recursive to merge jsonconfigs
Change 316525 had a related patch set uploaded (by Yurik):
Fixed JsonConfigs global var initialization