Page MenuHomePhabricator

AbuseFilter's update keys aren't guaranteed to be stable
Open, Stalled, Needs TriagePublic


(21:16) root@localhost:[wiki]> select * from updatelog where ul_key like 'abuse%';
| ul_key                                                                                                          | ul_value |
| abuse_filter_log-afl_namespace-/vagrant/mediawiki/extensions/AbuseFilter/db_patches/patch-afl-namespace_int.sql | NULL     |

Full paths in update keys mean that when the wiki gets moved around or AbuseFilter gets refactored, some updates will be run for the second time.

Event Timeline

MaxSem created this task.Oct 6 2017, 9:22 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 6 2017, 9:22 PM
Aklapper renamed this task from AbuseFiler's update keys aren't guaranteed to be stable to AbuseFilter's update keys aren't guaranteed to be stable.Oct 7 2017, 4:01 PM

@MaxSem I can see the problem comes from here, however I'm not sure how to solve it. I suppose we'd need to set a backward compatibility check, but is it possible to specify a custom update key for DatabaseUpdater->modifyField?

It's not supported, but the SQL file path can be made relative. Unfortunately, if you pass $fullpath = false to DatabaseUpdater::modifyField() it will break as the core doesn't support relative paths for extensions - I wonder if the best solution would be to add another condition for that in DatabaseUpdater::patchPath()?

IMHO adding a parameter for a custom update key would be painless and handy.

Ugh, I install every MediaWiki update on a different path, and then change the web published directory to point to the new one...

Daimona changed the task status from Open to Stalled.Oct 21 2018, 11:29 AM