Page MenuHomePhabricator

1.19/1.20 wgResourceBasePath hack for accessing resourceloader /w/resources/ problems
Closed, ResolvedPublic

Description

Branching off from bug 31173

see:


Version: wmf-deployment
Severity: major

Details

Reference
bz35939

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:16 AM
bzimport set Reference to bz35939.
bzimport added a subscriber: Unknown Object (MLST).

Explanation hashed out in http://etherpad.wikimedia.org/bug35939

Current situation

skins/

(site).org/w/skins-$version --> common/php-$version/skins
$wgStylePath / $wgStyleDirectory

extensions

(site).org/w/extensions-$version --> common/php-$version/extensions
$wgExtensionAssetsPath

resources/

(site).org/w/resources-$version --> common/php-$version
$wgResourcesPath/resources

Proposed solution (1)

Phasing out wgStylePath and wgExtensionAssetsPath, instead make broader use of wgResourceBasePath

skins/

(site).org/w-$version/skins --> common/php-$version/skins
$wgResourceBasePath/skins

extensions

(site).org/w-$version/extensions --> common/php-$version/extensions
$wgResourceBasePath/extensions

resources/

(site).org/w-$version/resources --> common/php-$version/resources
$wgResourceBasePath/resources

Proposed solution (2)

(bug 31173) Implement wgResourcesPath / wgResourcesDirectory

skins/

(site).org/w/skins-$version --> common/php-$version/skins
$wgStylePath / $wgStyleDirectory

extensions

(site).org/w/extensions-$version --> common/php-$version/extensions
$wgExtensionAssetsPath

resources/

(site).org/w/resources-$version --> common/php-$version/resources
$wgResourcesPath /wgResourcesDirectory

Moving the milestone to 1.20wmf2. We may kick this one down the road a little bit if we don't get to it immediately. It should not be an emergency blocker for a deployment; just something that we need to get fixed.

We're going with (1);

Proposed solution (1)

Phasing out wgStylePath and wgExtensionAssetsPath, instead make broader use of wgResourceBasePath

skins/

  • (site).org/w/static-$version/skins --> (common)/php-$version/skins
  • Usage: $wgResourceBasePath/skins

extensions

  • (site).org/w/static-$version/extensions --> (common)/php-$version/extensions
  • Usage: $wgResourceBasePath/extensions

resources/

  • (site).org/w/static-$version/resources --> (common)/php-$version/resources
  • Usage: $wgResourceBasePath/resources

Fixed in r114955.

The symlinks will be generated from the next version on. The usage will not be incorporated as described above in the software, instead local configurations can set existing variables to it if they want to use a central bits location like WMF has:

$wgResourceBasePath = 'bits.wikimedia.org/static-{$mwVersion}';
$wgStylePath = "{$wgResourceBasePath}/skins";
$wgExtensionAssetsPath = {$wgResourceBasePath}/extensions";
and resources is already naturally handled by ResourceLoader using wgResourceBasePath as root through "$wgResourceBasePath/resources".