Page MenuHomePhabricator

handle Wikibase initialization order and settings without throwing exception
Closed, ResolvedPublic


We cannot enforce Wikibase initialization order by throwing an exception if wrong. It's waaaaaaaay too fragile and interferes with production.

We *must* come up with another way to handle any issues in wikibase that occur with incorrect initialization order.

Version: master
Severity: critical



Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 1:47 AM
bzimport set Reference to bz52039.
bzimport added a subscriber: Unknown Object (MLST).

The issue is "magic" defaults: when client and repo are active on the same wiki, some client settings should default to values from the repo settings. For that to work, the repo must be initialized when the defaults are applied.

So, if we don't want to depend on the order of inclusion in LocalSettings, we have to defer the evaluation of defaults.

One idea I toyed with a while ago is to allow closures as default values, which would automatically get evaluated when the setting is used the first time. This way, the default could depend on other extensions without enforcing the order of inclusion/configuration.

Change 76099 had a related patch set uploaded by Daniel Kinzler:
(bug 52039) Use closures for dynamic defaults.

Change 76099 merged by jenkins-bot:
(bug 52039) Use closures for dynamic defaults.

Verified in Wikidata demo July 31th.