⚓ T366519 CommunityConfiguration: WikiPageConfigReader should not log WARNINGs when encountering a provider it does not support
Page MenuHomePhabricator

CommunityConfiguration: WikiPageConfigReader should not log WARNINGs when encountering a provider it does not support
Closed, ResolvedPublic

Description

While working on T364892: Enable CommunityConfiguration on all beta wikis with GrowthExperiments, @Sgs noticed many warnings in beta Logstash (https://beta-logs.wmcloud.org/goto/9a42133bf61d7d3441496279dcc8f2a3):

image.png (310×1 px, 122 KB)

This happens because of logging added in WikiPageConfigReader. As of now, that class contains the following:

$providerKeys = $this->providerFactory->getSupportedKeys();
foreach ( $providerKeys as $providerKey ) {
	$provider = $this->providerFactory->newProvider( $providerKey );
	if ( $provider instanceof WikiPageConfigProvider ) {
		// do something useful
	} else {
		$this->logger->warning( ... );
	}
}

In retrospective, warnings are not appropriate in this place, as it is perfectly reasonable for WikiPageConfigReader to encounter something that is not a WikiPageConfigProvider. The log level should be lowered, likely to DEBUG (or possibly, INFO).

Related Objects

Event Timeline

This block testwiki rollout.

Change #1038417 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/CommunityConfiguration@master] Drop logging level for unsupported providers to DEBUG

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

Change #1038425 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/CommunityConfiguration@master] Rename WikiPageConfig{Provider,Reader} to more meaningful name

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

Change #1038417 merged by jenkins-bot:

[mediawiki/extensions/CommunityConfiguration@master] Drop logging level for unsupported providers to DEBUG

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

Change #1038714 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/CommunityConfiguration@wmf/1.43.0-wmf.8] Drop logging level for unsupported providers to DEBUG

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

Change #1038714 merged by jenkins-bot:

[mediawiki/extensions/CommunityConfiguration@wmf/1.43.0-wmf.8] Drop logging level for unsupported providers to DEBUG

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

Mentioned in SAL (#wikimedia-operations) [2024-06-06T20:22:12Z] <urbanecm@deploy1002> Started scap: Backport for [[gerrit:1039729|[mswiktionary] Rename namespace "Wiktionary" to "Wikikamus" (T366549)]], [[gerrit:1038843|Improve navigation link handling in CommunityConfiguration (T364938 T365504 T360954)]], [[gerrit:1038714|Drop logging level for unsupported providers to DEBUG (T366519 T360954)]]

Mentioned in SAL (#wikimedia-operations) [2024-06-06T20:24:30Z] <urbanecm@deploy1002> urbanecm and sgimeno and gergesshamon: Backport for [[gerrit:1039729|[mswiktionary] Rename namespace "Wiktionary" to "Wikikamus" (T366549)]], [[gerrit:1038843|Improve navigation link handling in CommunityConfiguration (T364938 T365504 T360954)]], [[gerrit:1038714|Drop logging level for unsupported providers to DEBUG (T366519 T360954)]] synced to the testservers (https://wikitech.wikimedia.org/wiki

Mentioned in SAL (#wikimedia-operations) [2024-06-06T20:41:54Z] <urbanecm@deploy1002> Finished scap: Backport for [[gerrit:1039729|[mswiktionary] Rename namespace "Wiktionary" to "Wikikamus" (T366549)]], [[gerrit:1038843|Improve navigation link handling in CommunityConfiguration (T364938 T365504 T360954)]], [[gerrit:1038714|Drop logging level for unsupported providers to DEBUG (T366519 T360954)]] (duration: 19m 42s)