Page MenuHomePhabricator

Hard-deprecate use of disabled variables
Closed, ResolvedPublic

Description

We have three disabled variables. Two of them, old_text and old_html, were disabled in 2009 (!) with rEABFce47bca4a8fde0a0e99f8241b93a1b1955ffa028. A pretty error message was added with rEABF79ec4ebf8b40925ea0d1f1220e2d877b901781ea last year, but any filter using them was already broken.
The last one, minor_edit, was removed with r296268 in 2016, and disabled with rEABF921db0397e21ab75c18fdc452d417bd3537b5c25 last year.

AbuseFilterVariableHolder has:

$this->logger->warning(
	"Disabled variable $varName requested. Please fix the filter as this will be removed soon."
);

Now it's time to make the warning state that those variables are deprecated for real since 1.34, and also add the filter ID to the message. Since 1.35, that should throw an exception (which BTW, will be swallowed when parsing a filter).

Note that there are several uses in production (logstash), but we don't know for what filters.

Details

Related Gerrit Patches:
mediawiki/extensions/AbuseFilter : masterRemove disabled variables deprecation
mediawiki/extensions/AbuseFilter : masterHard-deprecate requesting disabled variables

Event Timeline

Daimona created this task.Sep 27 2019, 2:50 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 27 2019, 2:50 PM
Daimona claimed this task.Sep 27 2019, 2:50 PM
Daimona moved this task from Blocker to Deprecate/Remove on the MW-1.34-release board.

Change 539545 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Hard-deprecate requesting disabled variables

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

Change 539545 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Hard-deprecate requesting disabled variables

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

Change 540864 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Remove disabled variables deprecation

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

Change 540864 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Remove disabled variables deprecation

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

Daimona closed this task as Resolved.Oct 5 2019, 9:44 AM