Page MenuHomePhabricator

Undefined variable: wgFileBlacklist
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

On deployment-deploy01.eqiad.wmflabs, running sql enwiki I see:

Notice: Undefined variable: wgFileBlacklist in /srv/mediawiki-staging/wmf-config/CommonSettings.php on line 678
Warning: array_merge(): Argument #1 is not an array in /srv/mediawiki-staging/wmf-config/CommonSettings.php on line 678

Event Timeline

Joe triaged this task as High priority.Tue, Sep 14, 1:26 PM
Joe added a subscriber: Joe.

This happens with every request to test wikis, see https://logstash.wikimedia.org/goto/b49f81b5ed5d9d5a4ab5f248fa1a9175.

The time corresponds to:

09:38 hashar@deploy1002: Finished scap: testwikis wikis to 1.37.0-wmf.23 (duration: 70m 39s)

Seems to be enough to be a blocker for 1.37.0-wmf.23.

Majavah raised the priority of this task from High to Unbreak Now!.Tue, Sep 14, 1:27 PM

Change 720986 had a related patch set uploaded (by Legoktm; author: Legoktm):

[operations/mediawiki-config@master] Avoid warning about undefined $wgFileBlacklist

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

Change 720986 merged by jenkins-bot:

[operations/mediawiki-config@master] Avoid warning about undefined $wgFileBlacklist

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

Mentioned in SAL (#wikimedia-operations) [2021-09-14T14:10:55Z] <legoktm@deploy1002> Synchronized wmf-config/CommonSettings.php: Avoid warning about undefined $wgFileBlacklist (T290640) (duration: 01m 32s)

hashar added subscribers: Reedy, Jdforrester-WMF, hashar.

That comes from https://gerrit.wikimedia.org/r/c/mediawiki/core/+/680806 which renamed some global variables:

BeforeAfter
$wgFileBlacklist$wgProhibitedFileExtensions
$wgMimeTypeBlacklist$wgMimeTypeExclusions
$wgEnableUserEmailBlacklist$wgEnableUserEmailMuteList
$wgShortPagesNamespaceBlacklist$wgShortPagesNamespaceExclusions

The renaming is part of T277987 I have poked that task.

Yeah, sorry, forgot to write the transition config patch.

hashar lowered the priority of this task from Unbreak Now! to High.Tue, Sep 14, 7:01 PM

Kunal added a back compatibility fix in operations/mediawiki-config which we can remove once 1.37.0-wmf.23 is fully deployed :] I am keeping the task so that we remember to do the cleanup.

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

[operations/mediawiki-config@master] Set wgProhibitedFileExtensions not wgFileBlacklist

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

I'm getting similar errors for $wgMimeTypeBlacklist when I reindex certain wikis:

Notice: Undefined variable: wgMimeTypeBlacklist in /srv/mediawiki/wmf-config/CommonSettings.php on line 737
Warning: array_diff(): Argument #1 is not an array in /srv/mediawiki/wmf-config/CommonSettings.php on line 738

Will all the renamed variabled mentioned above by @hashar be updated?

Change 722919 had a related patch set uploaded (by Reedy; author: Reedy):

[operations/mediawiki-config@master] Update some more renamed $wg

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

Change 722921 had a related patch set uploaded (by Reedy; author: Reedy):

[operations/mediawiki-config@master] Add transtion code to rename $wmgFileBlacklist

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

Change 722923 had a related patch set uploaded (by Reedy; author: Reedy):

[operations/mediawiki-config@master] Remove $wmgFileBlacklist back compat

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

Change 721011 merged by jenkins-bot:

[operations/mediawiki-config@master] Set wgProhibitedFileExtensions not wgFileBlacklist

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

Change 722921 abandoned by Reedy:

[operations/mediawiki-config@master] Add transtion code to rename $wmgFileBlacklist

Reason:

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

Change 722923 abandoned by Reedy:

[operations/mediawiki-config@master] Remove $wmgFileBlacklist back compat

Reason:

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

Change 722919 merged by jenkins-bot:

[operations/mediawiki-config@master] Update some more renamed $wg

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

Reedy assigned this task to Jdforrester-WMF.

Should be all done now.

I created dupe patches that James had already created, so hence the abandoned. But I did do the other needed renames

I'm getting similar errors for $wgMimeTypeBlacklist when I reindex certain wikis:

Notice: Undefined variable: wgMimeTypeBlacklist in /srv/mediawiki/wmf-config/CommonSettings.php on line 737
Warning: array_diff(): Argument #1 is not an array in /srv/mediawiki/wmf-config/CommonSettings.php on line 738

Will all the renamed variabled mentioned above by @hashar be updated?

^ Should have only been on "private wikis", but is fixed too

^ Should have only been on "private wikis", but is fixed too

Indeed, it was on some arbcom wikis. Thanks!