jenkins-bot has submitted this change and it was merged.
Change subject: beta: tweak $wgLoadScript to use the bits cache
......................................................................
beta: tweak $wgLoadScript to use the bits cache
On beta, the load.php script was relative whereas production points it
to the bits cache. This patch adds a realm varying entry in
$wmfHostnames which we can then use to set $wgLoadScript.
Change-Id: I12e7064805646a3f7b933654c25c83217bb333e4
---
M wmf-config/CommonSettings.php
1 file changed, 5 insertions(+), 3 deletions(-)
Approvals:
Hashar: Looks good to me, approved
jenkins-bot: Verified
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 87f1164..97ecb5d 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -96,7 +96,7 @@
# 'meta' : meta wiki for user editable content
# 'upload' : hostname where files are hosted
# 'wikidata': hostname for the data repository
-# TODO: 'bits'
+# 'bits' : for load.php and js/css assets
# Whenever all realms/datacenters should use the same host, do not use
# $wmfHostnames but use the hardcoded hostname instead. A good example are the
# spam blacklists hosted on meta.wikimedia.org which you will surely want to
@@ -104,12 +104,14 @@
$wmfHostnames = array();
switch( $wmfRealm ) {
case 'labs':
+ $wmfHostnames['bits'] = 'bits.beta.wmflabs.org';
$wmfHostnames['meta'] = 'meta.wikimedia.beta.wmflabs.org';
$wmfHostnames['upload'] = 'upload.beta.wmflabs.org';
$wmfHostnames['wikidata'] = 'wikidata.beta.wmflabs.org';
break;
case 'production':
default:
+ $wmfHostnames['bits'] = 'bits.wikimedia.org';
$wmfHostnames['meta'] = 'meta.wikimedia.org';
$wmfHostnames['upload'] = 'upload.wikimedia.org';
$wmfHostnames['wikidata'] = 'www.wikidata.org';
@@ -282,9 +284,9 @@
$wgRedirectScript = $wgScriptPath . '/redirect.php';
$wgInternalServer = $wgCanonicalServer;
-if ( $wmfRealm == 'production' && $wgDBname != 'testwiki' && isset(
$_SERVER['SERVER_NAME'] ) ) {
+if ( $wgDBname != 'testwiki' && isset( $_SERVER['SERVER_NAME'] ) ) {
// Make testing JS/skin changes easy by not running load.php through
bits for testwiki
- $wgLoadScript =
"//bits.wikimedia.org/{$_SERVER['SERVER_NAME']}/load.php";
+ $wgLoadScript =
"//{$wmfHostnames['bits']}/{$_SERVER['SERVER_NAME']}/load.php";
}
$wgCacheDirectory = '/tmp/mw-cache-' . $wmfVersionNumber;
--
To view, visit https://gerrit.wikimedia.org/r/70322
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I12e7064805646a3f7b933654c25c83217bb333e4
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits