Page MenuHomePhabricator

quibble-vendor-mysql-php72-docker for ArticleRatings failing
Closed, InvalidPublic

Description

https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/ArticleRatings/+/544452/

https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php72-docker/26636/console

Maybe these lines are the relevants:

14:40:23 Syncing...
14:40:24 rsync: failed to set times on "/cache/.": Operation not permitted (1)
14:40:44 rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1668) [generator=3.1.2]

Event Timeline

Maybe these lines are the relevants:

14:40:23 Syncing...
14:40:24 rsync: failed to set times on "/cache/.": Operation not permitted (1)
14:40:44 rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1668) [generator=3.1.2]

That should be ininfluent, I see it for most CI jobs. The actual error I see (from https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php72-docker/27786/console) is:

There was 1 error:

1) SpecialPageFatalTest::testSpecialPageDoesNotFatal with data set "MassRatings" (SpecialMassRatings Object (...))
=== Logs generated by test case
[objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
[wfDebug] [debug] IP: 127.0.0.1 {"private":false}
[MessageCache] [debug] MessageCache using store {class} {"class":"HashBagOStuff"}
[wfDebug] [debug] User: loading options for user 1 from database. {"private":false}
[wfDebug] [debug] ParserFactory: using preprocessor: Preprocessor_Hash {"private":false}
===
ARE Error: empty JSON

/workspace/src/extensions/ArticleRatings/RatingData.php:7
/workspace/src/extensions/ArticleRatings/RatingData.php:13
/workspace/src/extensions/ArticleRatings/SpecialMassRatings.php:12
/workspace/src/includes/specialpage/QueryPage.php:430
/workspace/src/includes/specialpage/QueryPage.php:636
/workspace/src/tests/phpunit/includes/specials/SpecialPageExecutor.php:108
/workspace/src/tests/phpunit/includes/specials/SpecialPageExecutor.php:36
/workspace/src/tests/phpunit/structure/SpecialPageFatalTest.php:33
/workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:433
/workspace/src/maintenance/doMaintenance.php:99

This is kinda daft

	public static function getJSON() {
		$json = wfMessage( 'are-ratings' )->plain();
		if ( empty( $json ) ) {
			trigger_error( 'ARE Error: empty JSON' );
		}
		return json_decode( $json, true );
	}
	"are-ratings": "",

So unless there is some onwiki override... This is always going to error

This is kinda daft

	public static function getJSON() {
		$json = wfMessage( 'are-ratings' )->plain();
		if ( empty( $json ) ) {
			trigger_error( 'ARE Error: empty JSON' );
		}
		return json_decode( $json, true );
	}
	"are-ratings": "",

So unless there is some onwiki override... This is always going to error

Ah yes, I forgot to say that I had seen this piece of code. I probably was a bit traumatized and forgot to write that down eheh. Anyway, for the special page it should display a pretty error to the user, but for other use cases of that method, I really don't know.

Kizule subscribed.

Not reproducible anymore, there is another error now, I will open new task for this one https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php72-noselenium-docker/61092/console:

23:08:01 PHP Deprecated:  Premature access to service container [Called from MWNamespace::getContentNamespaces in /workspace/src/includes/MWNamespace.php at line 238] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:01 
23:08:01 Deprecated: Premature access to service container [Called from MWNamespace::getContentNamespaces in /workspace/src/includes/MWNamespace.php at line 238] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 
23:08:02 Deprecated: Premature access to service 'HookContainer' [Called from MediaWiki\MediaWikiServices::getInstance in /workspace/src/includes/MediaWikiServices.php at line 243] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 PHP Deprecated:  Premature access to service 'HookContainer' [Called from MediaWiki\MediaWikiServices::getInstance in /workspace/src/includes/MediaWikiServices.php at line 243] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 
23:08:02 Deprecated: Premature access to service 'ObjectFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /workspace/src/includes/ServiceWiring.php at line 497] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 PHP Deprecated:  Premature access to service 'ObjectFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /workspace/src/includes/ServiceWiring.php at line 497] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 
23:08:02 Deprecated: Premature access to service 'NamespaceInfo' [Called from MWNamespace::getContentNamespaces in /workspace/src/includes/MWNamespace.php at line 238] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 PHP Deprecated:  Premature access to service 'NamespaceInfo' [Called from MWNamespace::getContentNamespaces in /workspace/src/includes/MWNamespace.php at line 238] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 
23:08:02 Deprecated: Premature access to service 'MainConfig' [Called from Wikimedia\Services\ServiceContainer::{closure} in /workspace/src/includes/ServiceWiring.php at line 870] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 
23:08:02 Deprecated: Premature access to service 'ConfigFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /workspace/src/includes/ServiceWiring.php at line 696] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 PHP Deprecated:  Premature access to service 'MainConfig' [Called from Wikimedia\Services\ServiceContainer::{closure} in /workspace/src/includes/ServiceWiring.php at line 870] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 PHP Deprecated:  Premature access to service 'ConfigFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /workspace/src/includes/ServiceWiring.php at line 696] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 
23:08:02 Deprecated: Premature access to service 'BootstrapConfig' [Called from Wikimedia\Services\ServiceContainer::{closure} in /workspace/src/includes/ServiceWiring.php at line 249] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 PHP Deprecated:  Premature access to service 'BootstrapConfig' [Called from Wikimedia\Services\ServiceContainer::{closure} in /workspace/src/includes/ServiceWiring.php at line 249] in /workspace/src/includes/debug/MWDebug.php on line 376
23:08:02 
23:08:02 Fatal error: Uncaught InvalidArgumentException: Key "CanonicalNamespaceNames" not found in input sources in /workspace/src/includes/config/ServiceOptions.php:56
23:08:02 Stack trace:
23:08:02 #0 /workspace/src/includes/ServiceWiring.php(870): MediaWiki\Config\ServiceOptions->__construct(Array, Object(GlobalVarConfig))
23:08:02 #1 /workspace/src/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}(Object(MediaWiki\MediaWikiServices))
23:08:02 #2 /workspace/src/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService('NamespaceInfo')
23:08:02 #3 /workspace/src/includes/MediaWikiServices.php(255): Wikimedia\Services\ServiceContainer->getService('NamespaceInfo')
23:08:02 #4 /workspace/src/includes/MediaWikiServices.php(1068): MediaWiki\MediaWikiServices->getService('NamespaceInfo')
23:08:02 #5 /workspace/src/includes/MWNamespace.php(238): MediaWiki\MediaWikiServices->getNamespaceInfo()
23:08:02 #6 /workspace/src/extensions/ArticleRatings/includes/ArticleRatingsHooks.php(10): MWNamespace::getConte in /workspace/src/includes/config/ServiceOptions.php on line 56
23:08:02 PHP Fatal error:  Uncaught InvalidArgumentException: Key "CanonicalNamespaceNames" not found in input sources in /workspace/src/includes/config/ServiceOptions.php:56
23:08:02 Stack trace:
23:08:02 #0 /workspace/src/includes/ServiceWiring.php(870): MediaWiki\Config\ServiceOptions->__construct(Array, Object(GlobalVarConfig))
23:08:02 #1 /workspace/src/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}(Object(MediaWiki\MediaWikiServices))
23:08:02 #2 /workspace/src/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService('NamespaceInfo')
23:08:02 #3 /workspace/src/includes/MediaWikiServices.php(255): Wikimedia\Services\ServiceContainer->getService('NamespaceInfo')
23:08:02 #4 /workspace/src/includes/MediaWikiServices.php(1068): MediaWiki\MediaWikiServices->getService('NamespaceInfo')
23:08:02 #5 /workspace/src/includes/MWNamespace.php(238): MediaWiki\MediaWikiServices->getNamespaceInfo()
23:08:02 #6 /workspace/src/extensions/ArticleRatings/includes/ArticleRatingsHooks.php(10): MWNamespace::getConte in /workspace/src/includes/config/ServiceOptions.php on line 56

The code is still in the extension - https://gerrit.wikimedia.org/g/mediawiki/extensions/ArticleRatings/+/caea8060529604605a1ee1c96fbf04fbcba773de/RatingData.php#7

But the failing test is not reached due to other errors.
The CanonicalNamespaceNames is part of T237032, no new task needed.
"Premature access to service" is part of T273261, possible no new task needed (Because deprecation warning does not trigger fatal)

Oh, I'm sorry. Reopening task...

Not related anymore.