Page MenuHomePhabricator

Move Dashiki config from CommonSettings to extension
Closed, ResolvedPublic8 Estimated Story Points

Description

So this is partly done, but has a few parts

CommonSettings-labs.php and CommonSettings.php have duplicated Dashiki configuration. This isn't needed, neither is the wfLoadExtension() in CommonSettings-labs.php. Remove it from CommonSettings-lab.php, add wmgEnableDashikiData to InitialiseSettings-labs.php, and default => true to enable it everywhere

// register the custom view implemented by the Dashiki extension
$wgJsonConfigModels['JsonConfig.Dashiki'] = array(
	'class' => null,
	'view'  => 'Dashiki\DashikiView',
);

is now in extension.json as of https://github.com/wikimedia/mediawiki-extensions-Dashiki/commit/fa2fe77e17e1467799057b4616c6d7b0ed5c1dc9 so should be removed from CommonSettings too

$wgJsonConfigs['JsonConfig.Dashiki'] = array(
  'pattern' => '/^Dashiki\:./',
  'isLocal' => true,
);

^ this should be moved to extension.json too

Which then makes all of this https://github.com/wikimedia/mediawiki-extensions-Dashiki/blob/master/README#L6-L18 useless, so should be removed. And therefore just tell people to wfLoadExtension( 'Dashiki' );

Event Timeline

Thanks @Reedy, I'll make a patch right now.

Reedy, I was attempting to fix some of that with https://gerrit.wikimedia.org/r/#/c/336446/ but I didn't know I could move this stuff to extension.json. Is that patch ok and then I'll do the extension.json move separately?

Reedy, I was attempting to fix some of that with https://gerrit.wikimedia.org/r/#/c/336446/ but I didn't know I could move this stuff to extension.json. Is that patch ok and then I'll do the extension.json move separately?

That patch is fine, standalone, yup. That does most of the fixing up.

You could remove https://github.com/wikimedia/operations-mediawiki-config/blob/b5baf7f/wmf-config/CommonSettings.php#L3207-L3211 in the same patch, but it's maybe not worth it.. When the $wgJsonConfigs part is in Dashiki's extension.json, you can just remove https://github.com/wikimedia/operations-mediawiki-config/blob/b5baf7f/wmf-config/CommonSettings.php#L3201-L3211 in one patch after that

ok, cool, I'll tag this task with those patches, I'd appreciate merges 'cause none of us on our team have +2.

Change 344007 had a related patch set uploaded (by Milimetric):
[mediawiki/extensions/Dashiki] Move as much config in extension.json as possible

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

Change 336446 had a related patch set uploaded (by Milimetric):
[operations/mediawiki-config] Fix labs-specific Dashiki hack with generic enable

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

Milimetric edited projects, added Analytics-Kanban; removed Analytics.
Milimetric moved this task from Next Up to In Code Review on the Analytics-Kanban board.

Change 336446 merged by jenkins-bot:
[operations/mediawiki-config@master] Fix labs-specific Dashiki hack with generic enable

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

Change 344007 merged by jenkins-bot:
[mediawiki/extensions/Dashiki@master] Move as much config in extension.json as possible

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

Change 346657 had a related patch set uploaded (by Chad; owner: Milimetric):
[mediawiki/extensions/Dashiki@wmf/1.29.0-wmf.19] Move as much config in extension.json as possible

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

Change 346657 merged by jenkins-bot:
[mediawiki/extensions/Dashiki@wmf/1.29.0-wmf.19] Move as much config in extension.json as possible

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

Milimetric triaged this task as Medium priority.May 8 2017, 2:03 PM
Milimetric set the point value for this task to 8.