[MediaWiki-commits] [Gerrit] Defer the InfoAction purge in onArticleEdit() - change (mediawiki/core)

2015-07-28 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Defer the InfoAction purge in onArticleEdit()
..

Defer the InfoAction purge in onArticleEdit()

Change-Id: I73fba15c26c12bea1abad219611e660fb3901a86
---
M includes/page/WikiPage.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/29/227629/1

diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index f7f2528..4d4cb03 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -3226,7 +3226,9 @@
 
// Clear file cache for this page only
HTMLFileCache::clearFileCache( $title );
-   InfoAction::invalidateCache( $title );
+   DeferredUpdates::addCallableUpdate( function() use ( $title ) {
+   InfoAction::invalidateCache( $title );
+   } );
}
 
/**#@-*/

-- 
To view, visit https://gerrit.wikimedia.org/r/227629
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I73fba15c26c12bea1abad219611e660fb3901a86
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] On page views, update usage tracking via the job queue. - change (mediawiki...Wikibase)

2015-07-28 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: On page views, update usage tracking via the job queue.
..

On page views, update usage tracking via the job queue.

In some cases, we need to update the usage tracking table during normal
page views. In this case, we should not write to the database directly,
but schedule a job instead.

Bug: T103429
Change-Id: Ied1db3f2ab802ac7d7638b63844598374bd59812
(cherry picked from commit 2bdd21e427cac4f0f5a2a5cdcdd4a276633d7866)
---
M client/WikibaseClient.php
M client/includes/Hooks/DataUpdateHookHandlers.php
M client/includes/Usage/EntityUsage.php
A client/includes/store/AddUsagesForPageJob.php
M client/includes/store/ClientStore.php
M client/includes/store/sql/DirectSqlStore.php
M client/tests/phpunit/MockClientStore.php
A client/tests/phpunit/includes/AddUsagesForPageJobTest.php
M client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
M client/tests/phpunit/includes/Usage/EntityUsageTest.php
10 files changed, 449 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/32/227632/1

diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php
index 6fb840c..9a9ae33 100644
--- a/client/WikibaseClient.php
+++ b/client/WikibaseClient.php
@@ -67,6 +67,7 @@
global $wgExtensionCredits, $wgExtensionMessagesFiles, $wgHooks;
global $wgAPIMetaModules, $wgAPIPropModules, $wgSpecialPages, 
$wgResourceModules;
global $wgWBClientSettings, $wgRecentChangesFlags, $wgMessagesDirs;
+   global $wgJobClasses;
 
$wgExtensionCredits['wikibase'][] = array(
'path' = __DIR__,
@@ -121,6 +122,9 @@
// extension hooks
$wgHooks['WikibaseDeleteData'][] = 
'\Wikibase\ClientHooks::onWikibaseDeleteData';
 
+   // job classes
+   $wgJobClasses['wikibase-addUsagesForPage'] = 
'Wikibase\Client\Store\AddUsagesForPageJob';
+
// api modules
$wgAPIMetaModules['wikibase'] = array(
'class' = 'Wikibase\ApiClientInfo',
diff --git a/client/includes/Hooks/DataUpdateHookHandlers.php 
b/client/includes/Hooks/DataUpdateHookHandlers.php
index 8b12966..42d9d78 100644
--- a/client/includes/Hooks/DataUpdateHookHandlers.php
+++ b/client/includes/Hooks/DataUpdateHookHandlers.php
@@ -3,6 +3,8 @@
 namespace Wikibase\Client\Hooks;
 
 use Content;
+use JobQueueGroup;
+use JobSpecification;
 use LinksUpdate;
 use ManualLogEntry;
 use ParserCache;
@@ -10,7 +12,9 @@
 use ParserOutput;
 use Title;
 use User;
+use Wikibase\Client\Store\AddUsagesForPageJob;
 use Wikibase\Client\Store\UsageUpdater;
+use Wikibase\Client\Usage\EntityUsage;
 use Wikibase\Client\Usage\ParserOutputUsageAccumulator;
 use Wikibase\Client\WikibaseClient;
 use WikiPage;
@@ -34,19 +38,15 @@
 */
private $usageUpdater;
 
+   /**
+* @var JobQueueGroup
+*/
+   private $jobScheduler;
+
public static function newFromGlobalState() {
-   $wikibaseClient = WikibaseClient::getDefaultInstance();
-   $settings = $wikibaseClient-getSettings();
-
-   $usageUpdater = new UsageUpdater(
-   $settings-getSetting( 'siteGlobalID' ),
-   $wikibaseClient-getStore()-getUsageTracker(),
-   $wikibaseClient-getStore()-getUsageLookup(),
-   $wikibaseClient-getStore()-getSubscriptionManager()
-   );
-
return new DataUpdateHookHandlers(
-   $usageUpdater
+   
WikibaseClient::getDefaultInstance()-getStore()-getUsageUpdater(),
+   JobQueueGroup::singleton()
);
}
 
@@ -113,9 +113,11 @@
}
 
public function __construct(
-   UsageUpdater $usageUpdater
+   UsageUpdater $usageUpdater,
+   JobQueueGroup $jobScheduler
) {
$this-usageUpdater = $usageUpdater;
+   $this-jobScheduler = $jobScheduler;
}
 
/**
@@ -169,13 +171,22 @@
// These timestamps should usually be the same, but asking 
$title may cause a database query.
$touched = $parserOutput-getTimestamp() ?: 
$title-getTouched();
 
+   if ( count( $usageAcc-getUsages() ) === 0 ) {
+   // no usages, bail out
+   return;
+   }
+
// Add or touch any usages present in the new rendering.
// This allows us to track usages in each user language 
separately, for multilingual sites.
-   $this-usageUpdater-addUsagesForPage(
-   $title-getArticleId(),
-   $usageAcc-getUsages(),
-   $touched
-   );
+
+   // NOTE: Since parser cache updates may be 

[MediaWiki-commits] [Gerrit] Follow up to Ied1db3f, use lazyPush, remove unused imports, ... - change (mediawiki...Wikibase)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Follow up to Ied1db3f, use lazyPush, remove unused imports, etc.
..


Follow up to Ied1db3f, use lazyPush, remove unused imports, etc.

* moved AddUsagesForPageJobTest to includes/store test subdirectory
to be consistent with location of AddUsagesForPageJob.
* removed unused imports.
* use JobQueueGroup::lazyPush and EnqueueJob. (see how this is
done in WikiPage to add refreshLinks)
* add removeDuplicates to job specification.

Change-Id: If209bbeb8871a3ac9e6c45b3258006a6b45bbad5
---
M client/includes/Hooks/DataUpdateHookHandlers.php
M client/includes/Usage/EntityUsage.php
M client/includes/store/AddUsagesForPageJob.php
M client/includes/store/sql/DirectSqlStore.php
M client/tests/phpunit/MockClientStore.php
M client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
R client/tests/phpunit/includes/store/AddUsagesForPageJobTest.php
7 files changed, 57 insertions(+), 17 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, but someone else must approve
  Addshore: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/client/includes/Hooks/DataUpdateHookHandlers.php 
b/client/includes/Hooks/DataUpdateHookHandlers.php
index 42d9d78..6776f65 100644
--- a/client/includes/Hooks/DataUpdateHookHandlers.php
+++ b/client/includes/Hooks/DataUpdateHookHandlers.php
@@ -3,8 +3,8 @@
 namespace Wikibase\Client\Hooks;
 
 use Content;
+use EnqueueJob;
 use JobQueueGroup;
-use JobSpecification;
 use LinksUpdate;
 use ManualLogEntry;
 use ParserCache;
@@ -14,7 +14,6 @@
 use User;
 use Wikibase\Client\Store\AddUsagesForPageJob;
 use Wikibase\Client\Store\UsageUpdater;
-use Wikibase\Client\Usage\EntityUsage;
 use Wikibase\Client\Usage\ParserOutputUsageAccumulator;
 use Wikibase\Client\WikibaseClient;
 use WikiPage;
@@ -162,7 +161,7 @@
 * Implemented to update usage tracking information via UsageUpdater.
 *
 * @param ParserOutput $parserOutput
-* @param $title $title
+* @param Title $title
 */
public function doParserCacheSaveComplete( ParserOutput $parserOutput, 
Title $title ) {
$usageAcc = new ParserOutputUsageAccumulator( $parserOutput );
@@ -186,7 +185,9 @@
//TODO: Before posting a job, check slave database. If no 
changes are needed, skip update.
 
$addUsagesForPageJob = AddUsagesForPageJob::newSpec( $title, 
$usageAcc-getUsages(), $touched );
-   $this-jobScheduler-push( $addUsagesForPageJob );
+   $enqueueJob = EnqueueJob::newFromLocalJobs( 
$addUsagesForPageJob );
+
+   $this-jobScheduler-lazyPush( $enqueueJob );
}
 
/**
diff --git a/client/includes/Usage/EntityUsage.php 
b/client/includes/Usage/EntityUsage.php
index ba6938e..864efce 100644
--- a/client/includes/Usage/EntityUsage.php
+++ b/client/includes/Usage/EntityUsage.php
@@ -4,7 +4,6 @@
 
 use InvalidArgumentException;
 use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\DataModel\Entity\EntityIdParsingException;
 
 /**
  * Value object representing the usage of an entity. This includes information 
about
diff --git a/client/includes/store/AddUsagesForPageJob.php 
b/client/includes/store/AddUsagesForPageJob.php
index 90f2e16..335fd3e 100644
--- a/client/includes/store/AddUsagesForPageJob.php
+++ b/client/includes/store/AddUsagesForPageJob.php
@@ -64,7 +64,12 @@
'touched' = $touched
);
 
-   return new JobSpecification( 'wikibase-addUsagesForPage', 
$jobParams, array(), $title );
+   return new JobSpecification(
+   'wikibase-addUsagesForPage',
+   $jobParams,
+   array( 'removeDuplicates' = true ),
+   $title
+   );
}
 
/**
diff --git a/client/includes/store/sql/DirectSqlStore.php 
b/client/includes/store/sql/DirectSqlStore.php
index 40df459..80d42cf 100644
--- a/client/includes/store/sql/DirectSqlStore.php
+++ b/client/includes/store/sql/DirectSqlStore.php
@@ -476,4 +476,5 @@
$this-getSubscriptionManager()
);
}
+
 }
diff --git a/client/tests/phpunit/MockClientStore.php 
b/client/tests/phpunit/MockClientStore.php
index 80d015a..edf4f11 100644
--- a/client/tests/phpunit/MockClientStore.php
+++ b/client/tests/phpunit/MockClientStore.php
@@ -198,4 +198,5 @@
$this-getSubscriptionManager()
);
}
+
 }
diff --git a/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php 
b/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
index d0777ea..ac761a8 100644
--- a/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
+++ b/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
@@ -2,7 +2,6 @@
 
 namespace Wikibase\Client\Tests\Hooks;
 
-use 

[MediaWiki-commits] [Gerrit] WIP: Run PageTriage browser tests - change (mediawiki/vagrant)

2015-07-28 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: WIP: Run PageTriage browser tests
..

WIP: Run PageTriage browser tests

Bug: T90477
Change-Id: I6706f0ee4b481fdf32e37dc47dec7c221618e475
---
M puppet/modules/role/manifests/pagetriage.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/37/227637/1

diff --git a/puppet/modules/role/manifests/pagetriage.pp 
b/puppet/modules/role/manifests/pagetriage.pp
index e30fe10..62cf62e 100644
--- a/puppet/modules/role/manifests/pagetriage.pp
+++ b/puppet/modules/role/manifests/pagetriage.pp
@@ -3,5 +3,6 @@
 class role::pagetriage {
 mediawiki::extension { 'PageTriage':
 needs_update = true,
+browser_tests = true,
 }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/227637
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6706f0ee4b481fdf32e37dc47dec7c221618e475
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Follow up to Ied1db3f, use lazyPush, remove unused imports, ... - change (mediawiki...Wikibase)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Follow up to Ied1db3f, use lazyPush, remove unused imports, etc.
..


Follow up to Ied1db3f, use lazyPush, remove unused imports, etc.

* moved AddUsagesForPageJobTest to includes/store test subdirectory
to be consistent with location of AddUsagesForPageJob.
* removed unused imports.
* use JobQueueGroup::lazyPush and EnqueueJob. (see how this is
done in WikiPage to add refreshLinks)
* add removeDuplicates to job specification.

Change-Id: If209bbeb8871a3ac9e6c45b3258006a6b45bbad5
(cherry picked from commit 70f58af9e315e96a228a376f5ac72cac1089f1e3)
---
M client/includes/Hooks/DataUpdateHookHandlers.php
M client/includes/Usage/EntityUsage.php
M client/includes/store/AddUsagesForPageJob.php
M client/includes/store/sql/DirectSqlStore.php
M client/tests/phpunit/MockClientStore.php
M client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
R client/tests/phpunit/includes/store/AddUsagesForPageJobTest.php
7 files changed, 57 insertions(+), 17 deletions(-)

Approvals:
  Aude: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/client/includes/Hooks/DataUpdateHookHandlers.php 
b/client/includes/Hooks/DataUpdateHookHandlers.php
index 42d9d78..6776f65 100644
--- a/client/includes/Hooks/DataUpdateHookHandlers.php
+++ b/client/includes/Hooks/DataUpdateHookHandlers.php
@@ -3,8 +3,8 @@
 namespace Wikibase\Client\Hooks;
 
 use Content;
+use EnqueueJob;
 use JobQueueGroup;
-use JobSpecification;
 use LinksUpdate;
 use ManualLogEntry;
 use ParserCache;
@@ -14,7 +14,6 @@
 use User;
 use Wikibase\Client\Store\AddUsagesForPageJob;
 use Wikibase\Client\Store\UsageUpdater;
-use Wikibase\Client\Usage\EntityUsage;
 use Wikibase\Client\Usage\ParserOutputUsageAccumulator;
 use Wikibase\Client\WikibaseClient;
 use WikiPage;
@@ -162,7 +161,7 @@
 * Implemented to update usage tracking information via UsageUpdater.
 *
 * @param ParserOutput $parserOutput
-* @param $title $title
+* @param Title $title
 */
public function doParserCacheSaveComplete( ParserOutput $parserOutput, 
Title $title ) {
$usageAcc = new ParserOutputUsageAccumulator( $parserOutput );
@@ -186,7 +185,9 @@
//TODO: Before posting a job, check slave database. If no 
changes are needed, skip update.
 
$addUsagesForPageJob = AddUsagesForPageJob::newSpec( $title, 
$usageAcc-getUsages(), $touched );
-   $this-jobScheduler-push( $addUsagesForPageJob );
+   $enqueueJob = EnqueueJob::newFromLocalJobs( 
$addUsagesForPageJob );
+
+   $this-jobScheduler-lazyPush( $enqueueJob );
}
 
/**
diff --git a/client/includes/Usage/EntityUsage.php 
b/client/includes/Usage/EntityUsage.php
index ba6938e..864efce 100644
--- a/client/includes/Usage/EntityUsage.php
+++ b/client/includes/Usage/EntityUsage.php
@@ -4,7 +4,6 @@
 
 use InvalidArgumentException;
 use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\DataModel\Entity\EntityIdParsingException;
 
 /**
  * Value object representing the usage of an entity. This includes information 
about
diff --git a/client/includes/store/AddUsagesForPageJob.php 
b/client/includes/store/AddUsagesForPageJob.php
index 90f2e16..335fd3e 100644
--- a/client/includes/store/AddUsagesForPageJob.php
+++ b/client/includes/store/AddUsagesForPageJob.php
@@ -64,7 +64,12 @@
'touched' = $touched
);
 
-   return new JobSpecification( 'wikibase-addUsagesForPage', 
$jobParams, array(), $title );
+   return new JobSpecification(
+   'wikibase-addUsagesForPage',
+   $jobParams,
+   array( 'removeDuplicates' = true ),
+   $title
+   );
}
 
/**
diff --git a/client/includes/store/sql/DirectSqlStore.php 
b/client/includes/store/sql/DirectSqlStore.php
index 40df459..80d42cf 100644
--- a/client/includes/store/sql/DirectSqlStore.php
+++ b/client/includes/store/sql/DirectSqlStore.php
@@ -476,4 +476,5 @@
$this-getSubscriptionManager()
);
}
+
 }
diff --git a/client/tests/phpunit/MockClientStore.php 
b/client/tests/phpunit/MockClientStore.php
index 80d015a..edf4f11 100644
--- a/client/tests/phpunit/MockClientStore.php
+++ b/client/tests/phpunit/MockClientStore.php
@@ -198,4 +198,5 @@
$this-getSubscriptionManager()
);
}
+
 }
diff --git a/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php 
b/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
index d0777ea..ac761a8 100644
--- a/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
+++ b/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
@@ -2,7 +2,6 @@
 
 namespace Wikibase\Client\Tests\Hooks;
 
-use 

[MediaWiki-commits] [Gerrit] admin: Add another key for myself - change (operations/puppet)

2015-07-28 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: admin: Add another key for myself
..


admin: Add another key for myself

New OIT laptop test drive

Change-Id: Icd95fd53e3c79f2abfaeb705c00c6a32c3323788
---
M modules/admin/data/data.yaml
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Yuvipanda: Verified; Looks good to me, approved



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index fa2910c..181faa8 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -1052,8 +1052,9 @@
 gid: 500
 name: yuvipanda
 realname: Yuvi Panda
-ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQDrR80D68OpttnWGCY49ImSHPvzdCah1NckZv2U/y3Trmjp2EEeIohL8IG3iSjEnB1JirkPe1/0mHkbm0bfxqp17fHWy1g94Teb118woWt69A6pDJvnzp20faFRxOIl7UJjZ+n/Q4HSg7YToYW4hIM/I5KRKnEzi102aFHgV0cGGbxONPn0MiiEXkovlQ59gcNPWO/Wqe7gAcMIjoMvAcaumemUC5nXz8CIiFJLEfVVJ251c4q6C8TUJsxfbxkeN69AT/YqOiAO10eCbXgh0BNDactXy9oVx6u38E271KshW+ScJ671VuBQdTvv2DhrdFj2GsdzqlVYHQI9ny2JgtMX
-ypanda@Yuvi-Panda.local]
+ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQDrR80D68OpttnWGCY49ImSHPvzdCah1NckZv2U/y3Trmjp2EEeIohL8IG3iSjEnB1JirkPe1/0mHkbm0bfxqp17fHWy1g94Teb118woWt69A6pDJvnzp20faFRxOIl7UJjZ+n/Q4HSg7YToYW4hIM/I5KRKnEzi102aFHgV0cGGbxONPn0MiiEXkovlQ59gcNPWO/Wqe7gAcMIjoMvAcaumemUC5nXz8CIiFJLEfVVJ251c4q6C8TUJsxfbxkeN69AT/YqOiAO10eCbXgh0BNDactXy9oVx6u38E271KshW+ScJ671VuBQdTvv2DhrdFj2GsdzqlVYHQI9ny2JgtMX
 ypanda@Yuvi-Panda.local,
+ssh-rsa 
B3NzaC1yc2EDAQABAAABAQDSbKkh+XRHzTRE0fzQnSv8ZsfWgIa9uEhZV5d8Eq9AhIQC3AUkamt9QVnVxXVx/cnUEXqxD8grUcbN9HVf4T9T19zw19JPi4s68eG9Zm6ZSKZNYugLaAjb9QrZa5WBWgBYxTa5ZBtIAn4kWsMqG+d86NJxqLu35FyiiOsD10sVsB2mWvK6flMf7Kuux2dTlI6lqWThHoF/4JPw2Odjn5DrASOhjLXzaLzEhkkwcT+zgWQW1PN/ndSlmL6eT/CRgiOxxL97DE2osmYUXXBqgaXyzBnQGgK/DL03e55Epn6yCEYJ2YcBdjbF8J6Ev82zzvMmNlebKJz44SRRsPuOX3r9
 yuvipanda@picard
+]
 uid: 2029
   haithams:
 ensure: present

-- 
To view, visit https://gerrit.wikimedia.org/r/227621
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icd95fd53e3c79f2abfaeb705c00c6a32c3323788
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix disable Images via Special:MobileOptions - change (mediawiki...MobileFrontend)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix disable Images via Special:MobileOptions
..


Fix disable Images via Special:MobileOptions

A check, if a checkbox was set, or not doesn't make sense, the browser
normally omit's the checkbox value if unchecked and no special value
given. That means, that an unchecked checkbox for disabled Images would
be interpreted as Nothing changed, go ahead! without changing the
value.

Remove this check to enable the disable image setting again and work
around T98187 by explicitly send the current state, if images are disabled
or not, in BetaOptin panel.

Follow up: Ifef83b8fa369f19f9a9d6eb4ab2164271104f8ea

Bug: T106749
Change-Id: I7988eb892397d7430c0f51181d2d6a3af06d804e
---
M includes/specials/SpecialMobileOptions.php
M resources/mobile.betaoptin/BetaOptinPanel.js
M resources/mobile.betaoptin/Panel.hogan
3 files changed, 6 insertions(+), 6 deletions(-)

Approvals:
  Jdlrobson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialMobileOptions.php 
b/includes/specials/SpecialMobileOptions.php
index 9c5ccce..a6077db 100644
--- a/includes/specials/SpecialMobileOptions.php
+++ b/includes/specials/SpecialMobileOptions.php
@@ -270,13 +270,11 @@
}
$context-setMobileMode( $group );
$imagesDisabled = !$request-getBool( 'enableImages' );
-   if ( $request-getVal( 'enableImages' ) !== null ) {
-   if ( $context-imagesDisabled() !== $imagesDisabled ) {
-   // Only record when the state has changed
-   $schemaData['images'] = $imagesDisabled ? off 
: on;
-   }
-   $context-setDisableImagesCookie( $imagesDisabled );
+   if ( $context-imagesDisabled() !== $imagesDisabled ) {
+   // Only record when the state has changed
+   $schemaData['images'] = $imagesDisabled ? off : on;
}
+   $context-setDisableImagesCookie( $imagesDisabled );
 
$returnToTitle = Title::newFromText( $request-getText( 
'returnto' ) );
if ( $returnToTitle ) {
diff --git a/resources/mobile.betaoptin/BetaOptinPanel.js 
b/resources/mobile.betaoptin/BetaOptinPanel.js
index a73c73a..22cf691 100644
--- a/resources/mobile.betaoptin/BetaOptinPanel.js
+++ b/resources/mobile.betaoptin/BetaOptinPanel.js
@@ -17,6 +17,7 @@
defaults: {
postUrl: undefined,
editToken: mw.user.tokens.get( 'editToken' ),
+   enableImages: mw.config.get( 'wgImagesDisabled' ) ? 0 : 
1,
text: mw.msg( 'mobile-frontend-panel-betaoptin-msg' ),
buttons: [
new Button( {
diff --git a/resources/mobile.betaoptin/Panel.hogan 
b/resources/mobile.betaoptin/Panel.hogan
index 00589a3..7e9d7de 100644
--- a/resources/mobile.betaoptin/Panel.hogan
+++ b/resources/mobile.betaoptin/Panel.hogan
@@ -1,6 +1,7 @@
 form class=message content action={{postUrl}} method=POST
p{{text}}/p
input type=hidden name=enableBeta value=true
+   input type=hidden name=enableImages value={{enableImages}}
input type=hidden name=token value={{editToken}}
{{#buttons}}{{button}}{{/buttons}}
 /form

-- 
To view, visit https://gerrit.wikimedia.org/r/226737
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7988eb892397d7430c0f51181d2d6a3af06d804e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow florian.schmidt.stargatewis...@gmail.com
Gerrit-Reviewer: BarryTheBrowserTestBot jdlrobson+ba...@gmail.com
Gerrit-Reviewer: Florianschmidtwelzow florian.schmidt.stargatewis...@gmail.com
Gerrit-Reviewer: Frankiebot jdlrobson+fran...@gmail.com
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] enable ipsec for half eqiad text caches - change (operations/puppet)

2015-07-28 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: enable ipsec for half eqiad text caches
..


enable ipsec for half eqiad text caches

Bug: T81543
Change-Id: Idc5efae06f885135f5336752b9d8715b3622c57f
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  BBlack: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/site.pp b/manifests/site.pp
index 7a95614..eb6708a 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -403,7 +403,7 @@
 node /^cp10(5[2-5]|6[5-8])\.eqiad\.wmnet$/ {
 
 interface::add_ip6_mapped { 'main': }
-if $::hostname == 'cp1065' {
+if $::hostname =~ /^cp10(5[345]|65)$/ {
 role cache::text, ipsec
 } else {
 role cache::text

-- 
To view, visit https://gerrit.wikimedia.org/r/219816
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idc5efae06f885135f5336752b9d8715b3622c57f
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Gage jger...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Stop running composer twice - change (integration/config)

2015-07-28 Thread JanZerebecki (Code Review)
JanZerebecki has uploaded a new change for review.

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

Change subject: Stop running composer twice
..

Stop running composer twice

Since composer-merge-plugin v1.2.1 is used in core
eba9321b2b75823f8e9797398f44944e8a05389a the bug which we worked around with
this should not happen anymore.

Change-Id: Ic8b37c0fb8c5afbbe9b115f49b016141e779b356
---
M jjb/wikidata.yaml
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/31/227631/1

diff --git a/jjb/wikidata.yaml b/jjb/wikidata.yaml
index 8ad0b49..3f3d8a9 100644
--- a/jjb/wikidata.yaml
+++ b/jjb/wikidata.yaml
@@ -6,8 +6,6 @@
 cd $WORKSPACE/src/
 
/srv/deployment/integration/slave-scripts/bin/mw-create-composer-local.py 
../deps.txt composer.local.json
 timeout 300 composer update --prefer-source -vvv
-# FIXME BUG the first run just exits without error without 
finishing especially in a clean working copy
-timeout 300 composer update --prefer-source -vvv
 
 - builder:
 name: wd-wikibase-apply-settings

-- 
To view, visit https://gerrit.wikimedia.org/r/227631
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8b37c0fb8c5afbbe9b115f49b016141e779b356
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: JanZerebecki jan.wikime...@zerebecki.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Follow up to Ied1db3f, use lazyPush, remove unused imports, ... - change (mediawiki...Wikibase)

2015-07-28 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Follow up to Ied1db3f, use lazyPush, remove unused imports, etc.
..

Follow up to Ied1db3f, use lazyPush, remove unused imports, etc.

* moved AddUsagesForPageJobTest to includes/store test subdirectory
to be consistent with location of AddUsagesForPageJob.
* removed unused imports.
* use JobQueueGroup::lazyPush and EnqueueJob. (see how this is
done in WikiPage to add refreshLinks)
* add removeDuplicates to job specification.

Change-Id: If209bbeb8871a3ac9e6c45b3258006a6b45bbad5
(cherry picked from commit 70f58af9e315e96a228a376f5ac72cac1089f1e3)
---
M client/includes/Hooks/DataUpdateHookHandlers.php
M client/includes/Usage/EntityUsage.php
M client/includes/store/AddUsagesForPageJob.php
M client/includes/store/sql/DirectSqlStore.php
M client/tests/phpunit/MockClientStore.php
M client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
R client/tests/phpunit/includes/store/AddUsagesForPageJobTest.php
7 files changed, 57 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/36/227636/1

diff --git a/client/includes/Hooks/DataUpdateHookHandlers.php 
b/client/includes/Hooks/DataUpdateHookHandlers.php
index 42d9d78..6776f65 100644
--- a/client/includes/Hooks/DataUpdateHookHandlers.php
+++ b/client/includes/Hooks/DataUpdateHookHandlers.php
@@ -3,8 +3,8 @@
 namespace Wikibase\Client\Hooks;
 
 use Content;
+use EnqueueJob;
 use JobQueueGroup;
-use JobSpecification;
 use LinksUpdate;
 use ManualLogEntry;
 use ParserCache;
@@ -14,7 +14,6 @@
 use User;
 use Wikibase\Client\Store\AddUsagesForPageJob;
 use Wikibase\Client\Store\UsageUpdater;
-use Wikibase\Client\Usage\EntityUsage;
 use Wikibase\Client\Usage\ParserOutputUsageAccumulator;
 use Wikibase\Client\WikibaseClient;
 use WikiPage;
@@ -162,7 +161,7 @@
 * Implemented to update usage tracking information via UsageUpdater.
 *
 * @param ParserOutput $parserOutput
-* @param $title $title
+* @param Title $title
 */
public function doParserCacheSaveComplete( ParserOutput $parserOutput, 
Title $title ) {
$usageAcc = new ParserOutputUsageAccumulator( $parserOutput );
@@ -186,7 +185,9 @@
//TODO: Before posting a job, check slave database. If no 
changes are needed, skip update.
 
$addUsagesForPageJob = AddUsagesForPageJob::newSpec( $title, 
$usageAcc-getUsages(), $touched );
-   $this-jobScheduler-push( $addUsagesForPageJob );
+   $enqueueJob = EnqueueJob::newFromLocalJobs( 
$addUsagesForPageJob );
+
+   $this-jobScheduler-lazyPush( $enqueueJob );
}
 
/**
diff --git a/client/includes/Usage/EntityUsage.php 
b/client/includes/Usage/EntityUsage.php
index ba6938e..864efce 100644
--- a/client/includes/Usage/EntityUsage.php
+++ b/client/includes/Usage/EntityUsage.php
@@ -4,7 +4,6 @@
 
 use InvalidArgumentException;
 use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\DataModel\Entity\EntityIdParsingException;
 
 /**
  * Value object representing the usage of an entity. This includes information 
about
diff --git a/client/includes/store/AddUsagesForPageJob.php 
b/client/includes/store/AddUsagesForPageJob.php
index 90f2e16..335fd3e 100644
--- a/client/includes/store/AddUsagesForPageJob.php
+++ b/client/includes/store/AddUsagesForPageJob.php
@@ -64,7 +64,12 @@
'touched' = $touched
);
 
-   return new JobSpecification( 'wikibase-addUsagesForPage', 
$jobParams, array(), $title );
+   return new JobSpecification(
+   'wikibase-addUsagesForPage',
+   $jobParams,
+   array( 'removeDuplicates' = true ),
+   $title
+   );
}
 
/**
diff --git a/client/includes/store/sql/DirectSqlStore.php 
b/client/includes/store/sql/DirectSqlStore.php
index 40df459..80d42cf 100644
--- a/client/includes/store/sql/DirectSqlStore.php
+++ b/client/includes/store/sql/DirectSqlStore.php
@@ -476,4 +476,5 @@
$this-getSubscriptionManager()
);
}
+
 }
diff --git a/client/tests/phpunit/MockClientStore.php 
b/client/tests/phpunit/MockClientStore.php
index 80d015a..edf4f11 100644
--- a/client/tests/phpunit/MockClientStore.php
+++ b/client/tests/phpunit/MockClientStore.php
@@ -198,4 +198,5 @@
$this-getSubscriptionManager()
);
}
+
 }
diff --git a/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php 
b/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
index d0777ea..ac761a8 100644
--- a/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
+++ b/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
@@ -2,7 

[MediaWiki-commits] [Gerrit] reduce tendril memory footprint due to OOM, and switch to /srv - change (operations/puppet)

2015-07-28 Thread Springle (Code Review)
Springle has uploaded a new change for review.

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

Change subject: reduce tendril memory footprint due to OOM, and switch to /srv
..

reduce tendril memory footprint due to OOM, and switch to /srv

Change-Id: Ie69f900ae669c506ce4ebad481d96595936344e8
---
M manifests/role/mariadb.pp
M templates/mariadb/tendril.my.cnf.erb
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/41/227641/1

diff --git a/manifests/role/mariadb.pp b/manifests/role/mariadb.pp
index c0db98b..91e5928 100644
--- a/manifests/role/mariadb.pp
+++ b/manifests/role/mariadb.pp
@@ -243,8 +243,8 @@
 prompt   = 'TENDRIL',
 config   = 'mariadb/tendril.my.cnf.erb',
 password = $passwords::misc::scripts::mysql_root_pass,
-datadir  = '/a/sqldata',
-tmpdir   = '/a/tmp',
+datadir  = '/srv/sqldata',
+tmpdir   = '/srv/tmp',
 }
 }
 
diff --git a/templates/mariadb/tendril.my.cnf.erb 
b/templates/mariadb/tendril.my.cnf.erb
index b213884..3708e7c 100644
--- a/templates/mariadb/tendril.my.cnf.erb
+++ b/templates/mariadb/tendril.my.cnf.erb
@@ -41,7 +41,7 @@
 innodb_flush_log_at_trx_commit = 0
 innodb_flush_method= O_DIRECT
 aria_pagecache_buffer_size = 1G
-tokudb_cache_size  = 32G
+tokudb_cache_size  = 24G
 
 optimizer_switch='engine_condition_pushdown=on,optimize_join_buffer_size=on'
 join_cache_level = 8

-- 
To view, visit https://gerrit.wikimedia.org/r/227641
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie69f900ae669c506ce4ebad481d96595936344e8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Springle sprin...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add experimental 'mwext-mw-selenium' for Echo and Flow - change (integration/config)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add experimental 'mwext-mw-selenium' for Echo and Flow
..


Add experimental 'mwext-mw-selenium' for Echo and Flow

Change-Id: I152659717f7ee0a689d82e7f3e5d83cd49f0dbe2
---
M zuul/layout.yaml
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index e54272c..c6f0cb8 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3548,6 +3548,8 @@
   - name: npm
 check:
   - jsonlint
+experimental:
+  - mwext-mw-selenium
 
   - name: mediawiki/extensions/EditAccount
 template:
@@ -3663,6 +3665,7 @@
   - mwext-Flow-testextension-hhvm
   - mwext-testextension-hhvm
   - mwext-testextension-zend
+  - mwext-mw-selenium
 postmerge:
   - mwext-Flow-jsduck-publish
 

-- 
To view, visit https://gerrit.wikimedia.org/r/227640
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I152659717f7ee0a689d82e7f3e5d83cd49f0dbe2
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] reduce tendril memory footprint due to OOM, and switch to /srv - change (operations/puppet)

2015-07-28 Thread Springle (Code Review)
Springle has submitted this change and it was merged.

Change subject: reduce tendril memory footprint due to OOM, and switch to /srv
..


reduce tendril memory footprint due to OOM, and switch to /srv

Change-Id: Ie69f900ae669c506ce4ebad481d96595936344e8
---
M manifests/role/mariadb.pp
M templates/mariadb/tendril.my.cnf.erb
2 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Springle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/role/mariadb.pp b/manifests/role/mariadb.pp
index c0db98b..91e5928 100644
--- a/manifests/role/mariadb.pp
+++ b/manifests/role/mariadb.pp
@@ -243,8 +243,8 @@
 prompt   = 'TENDRIL',
 config   = 'mariadb/tendril.my.cnf.erb',
 password = $passwords::misc::scripts::mysql_root_pass,
-datadir  = '/a/sqldata',
-tmpdir   = '/a/tmp',
+datadir  = '/srv/sqldata',
+tmpdir   = '/srv/tmp',
 }
 }
 
diff --git a/templates/mariadb/tendril.my.cnf.erb 
b/templates/mariadb/tendril.my.cnf.erb
index b213884..3708e7c 100644
--- a/templates/mariadb/tendril.my.cnf.erb
+++ b/templates/mariadb/tendril.my.cnf.erb
@@ -41,7 +41,7 @@
 innodb_flush_log_at_trx_commit = 0
 innodb_flush_method= O_DIRECT
 aria_pagecache_buffer_size = 1G
-tokudb_cache_size  = 32G
+tokudb_cache_size  = 24G
 
 optimizer_switch='engine_condition_pushdown=on,optimize_join_buffer_size=on'
 join_cache_level = 8

-- 
To view, visit https://gerrit.wikimedia.org/r/227641
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie69f900ae669c506ce4ebad481d96595936344e8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Springle sprin...@wikimedia.org
Gerrit-Reviewer: Springle sprin...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Follow-up 8250c8ad54: unbreak ApiResponseCache - change (mediawiki...VisualEditor)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Follow-up 8250c8ad54: unbreak ApiResponseCache
..


Follow-up 8250c8ad54: unbreak ApiResponseCache

.set() should not overwrite existing deferreds; instead,
it should resolve the existing deferred if it's pending.
This is necessary because .set() is used by processResult().
Without this, passing .get() a title that no information
is known for results in a promise that is never resolved,
because the associated deferred is overwritten as soon
as the API response arrives.

Still make .set() a no-op if data has already been set,
by checking if the deferred is pending. For .resolve() this
doesn't matter, but for modifying this.cacheValues it does.

Bug: T107212
Change-Id: I70e8c5450f23062db214ccc5c585624d41de6509
---
M modules/ve-mw/init/ve.init.mw.ApiResponseCache.js
1 file changed, 8 insertions(+), 4 deletions(-)

Approvals:
  Alex Monk: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve-mw/init/ve.init.mw.ApiResponseCache.js 
b/modules/ve-mw/init/ve.init.mw.ApiResponseCache.js
index 9b9e8f7..5143aec 100644
--- a/modules/ve-mw/init/ve.init.mw.ApiResponseCache.js
+++ b/modules/ve-mw/init/ve.init.mw.ApiResponseCache.js
@@ -109,7 +109,7 @@
  */
 
 /**
- * Add entries to the cache.
+ * Add entries to the cache. Does not overwrite already-set entries.
  *
  * @param {Object} entries Object keyed by page title, with the values being 
data objects
  * @fires add
@@ -117,9 +117,13 @@
 ve.init.mw.ApiResponseCache.prototype.set = function ( entries ) {
var name;
for ( name in entries ) {
-   this.deferreds[name] = $.Deferred();
-   this.deferreds[name].resolve( entries[name] );
-   this.cacheValues[name] = entries[name];
+   if ( !Object.prototype.hasOwnProperty.call( this.deferreds, 
name ) ) {
+   this.deferreds[name] = $.Deferred();
+   }
+   if ( this.deferreds[name].state() === 'pending' ) {
+   this.deferreds[name].resolve( entries[name] );
+   this.cacheValues[name] = entries[name];
+   }
}
this.emit( 'add', Object.keys( entries ) );
 };

-- 
To view, visit https://gerrit.wikimedia.org/r/227589
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I70e8c5450f23062db214ccc5c585624d41de6509
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Alex Monk kren...@gmail.com
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Update liuggio/statsd-php-client: v1.0.12 - v1.0.16 - change (mediawiki/core)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update liuggio/statsd-php-client: v1.0.12 - v1.0.16
..


Update liuggio/statsd-php-client: v1.0.12 - v1.0.16

vendor patch: I307b58f4abe4d615ac9b2f86f50d0c5d6b906d83

Bug: T106457
Change-Id: I6e013485175c63a984d2de205dc45704483d149b
---
M composer.json
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  BryanDavis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/composer.json b/composer.json
index 5740921..88ebdd5 100644
--- a/composer.json
+++ b/composer.json
@@ -19,7 +19,7 @@
cssjanus/cssjanus: 1.1.1,
ext-iconv: *,
leafo/lessphp: 0.5.0,
-   liuggio/statsd-php-client: 1.0.12,
+   liuggio/statsd-php-client: 1.0.16,
mediawiki/at-ease: 1.0.0,
oojs/oojs-ui: 0.12.1,
php: =5.3.3,

-- 
To view, visit https://gerrit.wikimedia.org/r/226638
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6e013485175c63a984d2de205dc45704483d149b
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: BryanDavis bda...@wikimedia.org
Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Track key authentication metrics - change (mediawiki/core)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Track key authentication metrics
..


Track key authentication metrics

Logs a 'login' event for logins via Special:UserLogin
and API action=login. Does not log for implicit login after
account creation and for autologin (e.g. based on an active
CentralAuth global login).

Logs an 'accountcreation' event for account creation via
Special:UserLogin/signup and API action=createaccount. Does not
log for autocreation.

Both successful and unsuccessful attempts are logged, except for
failures that throw exceptions (internal errors + some permission
errors).

Bug: T91701
Change-Id: I101b11d05400b073065da10f1e537412309d9102
---
M includes/api/ApiCreateAccount.php
M includes/api/ApiLogin.php
M includes/specials/SpecialUserlogin.php
3 files changed, 30 insertions(+), 1 deletion(-)

Approvals:
  BryanDavis: Looks good to me, approved
  Anomie: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/api/ApiCreateAccount.php 
b/includes/api/ApiCreateAccount.php
index b3a543a..5443fac 100644
--- a/includes/api/ApiCreateAccount.php
+++ b/includes/api/ApiCreateAccount.php
@@ -21,6 +21,7 @@
  *
  * @file
  */
+use MediaWiki\Logger\LoggerFactory;
 
 /**
  * Unit to authenticate account registration attempts to the current wiki.
@@ -95,6 +96,10 @@
$loginForm-load();
 
$status = $loginForm-addNewaccountInternal();
+   LoggerFactory::getInstance( 'authmanager' )-info( 'Account 
creation attempt via API', array(
+   'event' = 'accountcreation',
+   'status' = $status,
+   ) );
$result = array();
if ( $status-isGood() ) {
// Success!
diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php
index c4e7022..e3d9295 100644
--- a/includes/api/ApiLogin.php
+++ b/includes/api/ApiLogin.php
@@ -24,6 +24,7 @@
  *
  * @file
  */
+use MediaWiki\Logger\LoggerFactory;
 
 /**
  * Unit to authenticate log-in attempts to the current wiki.
@@ -174,6 +175,12 @@
}
 
$this-getResult()-addValue( null, 'login', $result );
+
+   LoggerFactory::getInstance( 'authmanager' )-info( 'Login 
attempt', array(
+   'event' = 'login',
+   'successful' = $authRes === LoginForm::SUCCESS,
+   'status' = $authRes,
+   ) );
}
 
public function mustBePosted() {
diff --git a/includes/specials/SpecialUserlogin.php 
b/includes/specials/SpecialUserlogin.php
index 8491f89..f446a98 100644
--- a/includes/specials/SpecialUserlogin.php
+++ b/includes/specials/SpecialUserlogin.php
@@ -20,6 +20,7 @@
  * @file
  * @ingroup SpecialPage
  */
+use MediaWiki\Logger\LoggerFactory;
 
 /**
  * Implements Special:UserLogin
@@ -338,6 +339,10 @@
}
 
$status = $this-addNewAccountInternal();
+   LoggerFactory::getInstance( 'authmanager' )-info( 'Account 
creation attempt with mailed password', array(
+   'event' = 'accountcreation',
+   'status' = $status,
+   ) );
if ( !$status-isGood() ) {
$error = $status-getMessage();
$this-mainLoginForm( $error-toString() );
@@ -375,6 +380,11 @@
 
# Create the account and abort if there's a problem doing so
$status = $this-addNewAccountInternal();
+   LoggerFactory::getInstance( 'authmanager' )-info( 'Account 
creation attempt', array(
+   'event' = 'accountcreation',
+   'status' = $status,
+   ) );
+
if ( !$status-isGood() ) {
$error = $status-getMessage();
$this-mainLoginForm( $error-toString() );
@@ -911,7 +921,8 @@
global $wgMemc, $wgLang, $wgSecureLogin, 
$wgPasswordAttemptThrottle,
$wgInvalidPasswordReset;
 
-   switch ( $this-authenticateUserData() ) {
+   $status = $this-authenticateUserData();
+   switch ( $status ) {
case self::SUCCESS:
# We've verified now, update the real record
$user = $this-getUser();
@@ -1034,6 +1045,12 @@
default:
throw new MWException( 'Unhandled case value' );
}
+
+   LoggerFactory::getInstance( 'authmanager' )-info( 'Login 
attempt', array(
+   'event' = 'login',
+   'successful' = $status === self::SUCCESS,
+   'status' = $status,
+   ) );
}
 
/**

-- 
To view, visit https://gerrit.wikimedia.org/r/226955

[MediaWiki-commits] [Gerrit] HTMLForm: Move section formatting OOUI-specific code to OOUI... - change (mediawiki/core)

2015-07-28 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: HTMLForm: Move section formatting OOUI-specific code to 
OOUIHTMLForm
..

HTMLForm: Move section formatting OOUI-specific code to OOUIHTMLForm

* Introduce a new helper function formatSection() and override it
  in OOUIHTMLForm.
  * Bonus: Properly construct the form's FieldsetLayout,
thanks to I860a96858c4fcac62d63b46e35a9153f22c0a9c9.
  * Bonus: Don't pass silly HTMLForm's classes which don't make
sense in OOUI mode.

Change-Id: I91af6efa8762e9676efea532381292e221255862
---
M includes/htmlform/HTMLForm.php
M includes/htmlform/OOUIHTMLForm.php
2 files changed, 63 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/04/227604/1

diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php
index ac064bc..0678bdd 100644
--- a/includes/htmlform/HTMLForm.php
+++ b/includes/htmlform/HTMLForm.php
@@ -1335,7 +1335,7 @@
$hasUserVisibleFields = false ) {
$displayFormat = $this-getDisplayFormat();
 
-   $html = '';
+   $html = array();
$subsectionHtml = '';
$hasLabel = false;
 
@@ -1347,7 +1347,7 @@
$v = empty( $value-mParams['nodata'] )
? $this-mFieldData[$key]
: $value-getDefault();
-   $html .= $value-$getFieldHtmlMethod( $v );
+   $html[] = $value-$getFieldHtmlMethod( $v );
 
$labelValue = trim( $value-getLabel() );
if ( $labelValue != '#160;'  $labelValue !== 
'' ) {
@@ -1393,45 +1393,7 @@
}
}
 
-   if ( $displayFormat !== 'raw' ) {
-   $classes = array();
-
-   if ( !$hasLabel ) { // Avoid strange spacing when no 
labels exist
-   $classes[] = 'mw-htmlform-nolabel';
-   }
-
-   $attribs = array(
-   'class' = implode( ' ', $classes ),
-   );
-
-   if ( $sectionName ) {
-   $attribs['id'] = Sanitizer::escapeId( 
$sectionName );
-   }
-
-   if ( $displayFormat === 'table' ) {
-   $html = Html::rawElement( 'table',
-   $attribs,
-   Html::rawElement( 'tbody', 
array(), \n$html\n ) ) . \n;
-   } elseif ( $displayFormat === 'inline' ) {
-   $html = Html::rawElement( 'span', $attribs, 
\n$html\n );
-   } elseif ( $displayFormat === 'ooui' ) {
-   $config = array(
-   'classes' = $classes,
-   );
-   if ( $sectionName ) {
-   $config['id'] = Sanitizer::escapeId( 
$sectionName );
-   }
-   if ( is_string( $this-mWrapperLegend ) ) {
-   $config['label'] = 
$this-mWrapperLegend;
-   }
-   $fieldset = new OOUI\FieldsetLayout( $config );
-   // Ewww. We should pass this as 
$config['items'], but there might be string snippets.
-   $fieldset-group-appendContent( new 
OOUI\HtmlSnippet( $html ) );
-   $html = $fieldset;
-   } else {
-   $html = Html::rawElement( 'div', $attribs, 
\n$html\n );
-   }
-   }
+   $html = $this-formatSection( $html, $sectionName, $hasLabel );
 
if ( $subsectionHtml ) {
if ( $this-mSubSectionBeforeFields ) {
@@ -1445,6 +1407,46 @@
}
 
/**
+* Put a form section together from the individual fields' HTML, 
merging it and wrapping.
+* @param array $fieldsHtml
+* @param string $sectionName
+* @param bool $anyFieldHasLabel
+* @return string HTML
+*/
+   protected function formatSection( array $fieldsHtml, $sectionName, 
$anyFieldHasLabel ) {
+   $displayFormat = $this-getDisplayFormat();
+   $html = implode( '', $fieldsHtml );
+
+   if ( $displayFormat === 'raw' ) {
+   return $html;
+   }
+
+   $classes = array();
+
+   if ( !$anyFieldHasLabel ) { // Avoid strange spacing when no 
labels exist
+  

[MediaWiki-commits] [Gerrit] Update OOjs UI to v0.12.2 - change (mediawiki/vendor)

2015-07-28 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Update OOjs UI to v0.12.2
..

Update OOjs UI to v0.12.2

Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.12.2/History.md

Change-Id: Ic7f4be9eee8c17e00270de8b731ec6206a35f9ad
---
M composer.json
M composer.lock
M composer/installed.json
M oojs/oojs-ui/History.md
M oojs/oojs-ui/build/modules.json
M oojs/oojs-ui/demos/demo.js
M oojs/oojs-ui/demos/pages/icons.js
M oojs/oojs-ui/i18n/vi.json
M oojs/oojs-ui/package.json
M oojs/oojs-ui/src/styles/Dialog.less
A oojs/oojs-ui/src/themes/mediawiki/icons-accessibility.json
M oojs/oojs-ui/src/themes/mediawiki/icons-layout.json
A oojs/oojs-ui/src/themes/mediawiki/images/icons/bright.svg
A oojs/oojs-ui/src/themes/mediawiki/images/icons/halfBright.svg
A oojs/oojs-ui/src/themes/mediawiki/images/icons/largerText-ltr.svg
A oojs/oojs-ui/src/themes/mediawiki/images/icons/largerText-rtl.svg
A oojs/oojs-ui/src/themes/mediawiki/images/icons/moon.svg
A oojs/oojs-ui/src/themes/mediawiki/images/icons/notBright.svg
A oojs/oojs-ui/src/themes/mediawiki/images/icons/smallerText-ltr.svg
A oojs/oojs-ui/src/themes/mediawiki/images/icons/smallerText-rtl.svg
M oojs/oojs-ui/src/widgets/SelectWidget.js
21 files changed, 142 insertions(+), 54 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor 
refs/changes/11/227611/1

diff --git a/composer.json b/composer.json
index f39dadc..5916280 100644
--- a/composer.json
+++ b/composer.json
@@ -9,7 +9,7 @@
mediawiki/at-ease: 1.0.0,
monolog/monolog: 1.14.0,
ruflin/elastica: 1.3.0.0,
-   oojs/oojs-ui: 0.12.1,
+   oojs/oojs-ui: 0.12.2,
wikimedia/cdb: 1.0.1,
wikimedia/ip-set: 1.0.0,
wikimedia/assert: 0.2.2,
diff --git a/composer.lock b/composer.lock
index fbb6606..2f77679 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
 Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 This file is @generated automatically
 ],
-hash: 88a5c97aa15fe4a052b5a37bb6bc12c1,
+hash: 09e6099a2d48fd0aa20ad2fb526eedcd,
 packages: [
 {
 name: cssjanus/cssjanus,
@@ -287,16 +287,16 @@
 },
 {
 name: oojs/oojs-ui,
-version: v0.12.1,
+version: v0.12.2,
 source: {
 type: git,
 url: https://github.com/wikimedia/oojs-ui.git;,
-reference: 2f9c991c693562044542ec28322498f1bb8a8cf1
+reference: fa8ac01f1f06a4be4f3fb3f838274eeb251c6981
 },
 dist: {
 type: zip,
-url: 
https://api.github.com/repos/wikimedia/oojs-ui/zipball/2f9c991c693562044542ec28322498f1bb8a8cf1;,
-reference: 2f9c991c693562044542ec28322498f1bb8a8cf1,
+url: 
https://api.github.com/repos/wikimedia/oojs-ui/zipball/fa8ac01f1f06a4be4f3fb3f838274eeb251c6981;,
+reference: fa8ac01f1f06a4be4f3fb3f838274eeb251c6981,
 shasum: 
 },
 require: {
@@ -320,7 +320,7 @@
 ],
 description: Provides library of common widgets, layouts, and 
windows.,
 homepage: https://www.mediawiki.org/wiki/OOjs_UI;,
-time: 2015-07-22 18:32:14
+time: 2015-07-28 22:38:50
 },
 {
 name: psr/log,
diff --git a/composer/installed.json b/composer/installed.json
index 2734067..af15ce8 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -672,45 +672,6 @@
 homepage: https://symfony.com;
 },
 {
-name: oojs/oojs-ui,
-version: v0.12.1,
-version_normalized: 0.12.1.0,
-source: {
-type: git,
-url: https://github.com/wikimedia/oojs-ui.git;,
-reference: 2f9c991c693562044542ec28322498f1bb8a8cf1
-},
-dist: {
-type: zip,
-url: 
https://api.github.com/repos/wikimedia/oojs-ui/zipball/2f9c991c693562044542ec28322498f1bb8a8cf1;,
-reference: 2f9c991c693562044542ec28322498f1bb8a8cf1,
-shasum: 
-},
-require: {
-mediawiki/at-ease: 1.0.0,
-php: =5.3.3
-},
-require-dev: {
-jakub-onderka/php-parallel-lint: 0.9,
-mediawiki/mediawiki-codesniffer: 0.3.0,
-phpunit/phpunit: ~4.5
-},
-time: 2015-07-22 18:32:14,
-type: library,
-installation-source: dist,
-autoload: {
-classmap: [
-php/
-]
-},
-notification-url: https://packagist.org/downloads/;,
-license: [
-MIT
-],
-description: Provides library of common widgets, layouts, and 

[MediaWiki-commits] [Gerrit] Bare bones helper for AB testing - change (mediawiki...CirrusSearch)

2015-07-28 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Bare bones helper for AB testing
..

Bare bones helper for AB testing

This is a simple bare bones class for determining if the current
request is a member of an A/B test.  It doesn't yet remember anything
across requests or fancy things like only including the user in one
test at a time, but as we need more features we shouldn't be able
to add them trivially.

Bug: T106888
Change-Id: Idd55b3e065fbb5e8248f406580f935545678ae37
---
M CirrusSearch.php
M autoload.php
A includes/UserTesting.php
3 files changed, 126 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/12/227612/1

diff --git a/CirrusSearch.php b/CirrusSearch.php
index bd69af8..0ded142 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -633,6 +633,11 @@
  */
 $wgCirrusSearchWriteBackoffExponent = 6;
 
+/**
+ * Configuration of individual a/b tests being running
+ */
+$wgCirrusSearchUserTesting = array();
+
 $includes = __DIR__ . /includes/;
 $apiDir = $includes . 'Api/';
 $buildDocument = $includes . 'BuildDocument/';
diff --git a/autoload.php b/autoload.php
index 87954b0..e307cbb 100644
--- a/autoload.php
+++ b/autoload.php
@@ -84,6 +84,7 @@
'CirrusSearch\\Search\\TitleResultsType' = __DIR__ . 
'/includes/Search/ResultsType.php',
'CirrusSearch\\Searcher' = __DIR__ . '/includes/Searcher.php',
'CirrusSearch\\Updater' = __DIR__ . '/includes/Updater.php',
+   'CirrusSearch\\UserTesting' = __DIR__ . '/includes/UserTesting.php',
'CirrusSearch\\Util' = __DIR__ . '/includes/Util.php',
'CirrusSearch\\UtilTest' = __DIR__ . '/tests/unit/UtilTest.php',
'CirrusSearch\\Version' = __DIR__ . '/includes/Version.php',
diff --git a/includes/UserTesting.php b/includes/UserTesting.php
new file mode 100644
index 000..40b2f88
--- /dev/null
+++ b/includes/UserTesting.php
@@ -0,0 +1,120 @@
+?php
+
+namespace CirrusSearch;
+
+/**
+ * Handles decisions arround if the current request is a member of any
+ * test currently being run. This initial implementation is per-request
+ * but could be extended to keep the same user in the same test/bucket
+ * over multiple requests.
+ *
+ * $wgCirrusSearchUserTesting = array(
+ * 'someTest' = array(
+ * 'sampleRate' = 100, // sample 1 in 100 occurances
+ * 'buckets' = array(
+ * 'a' = array(
+ * // control bucket, retain defaults
+ * ),
+ * 'b' = array(
+ * 'everything' = 42,
+ * ),
+ * ...
+ * ),
+ * ),
+ * ...
+ * );
+ */
+class UserTesting {
+   private static $instance;
+
+   /** @var array */
+   protected $config;
+
+   /** @var array */
+   protected $tests;
+
+   /** @var string[] */
+   protected $activeTests;
+
+   public static function getInstance() {
+   global $wgCirrusSearchUserTesting;
+   if ( self::$instance === null ) {
+   self::$instance = new self( $wgCirrusSearchUserTesting 
);
+   }
+   return self::$instance;
+   }
+
+   /**
+* @param array $config An associative array mapping from
+*  the name of a test to a set of properties about the test
+*  documented above.
+*/
+   public function __construct( array $config ) {
+   $this-config = $config;
+   }
+
+   /**
+* @param string $testName The name of the test being run
+* @return bool True when this instance is participating in the
+*  named test.
+*/
+   public function isParticipatingIn( $testName ) {
+   if ( !isset( $this-tests[$testName] ) ) {
+   $this-initTest( $testName );
+   }
+   return (bool)$this-tests[$testName];
+   }
+
+   /**
+* @param string $testName The name of the test being run
+* @return string The bucket the user belongs to. By default a user
+*  is in the 'a' bucket.
+*/
+   public function getBucketWithin( $testName ) {
+   if ( !isset( $this-tests[$testName] ) ) {
+   $this-initTest( $testName );
+   }
+   return $this-tests[$testName]['bucket'];
+   }
+
+   /**
+* @param string $testName The name of the test being run
+* @return array Variables specific to the current test/bucket
+*  combination
+*/
+   public function getTestSettings( $testName ) {
+   if ( !isset( $this-tests[$testName] ) ) {
+   $this-initTest( $testName );
+   }
+   return $this-tests[$testName];
+   }
+
+   

[MediaWiki-commits] [Gerrit] RedisBagOStuff: if no alternatives, skip master link status ... - change (mediawiki/core)

2015-07-28 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: RedisBagOStuff: if no alternatives, skip master link status 
check
..


RedisBagOStuff: if no alternatives, skip master link status check

If RedisBagOStuff::getConnection() is able to establish a connection, only
check the master link status if automatic failover is enabled and if there are
other viable servers left to consider. If there are no servers left to
consider, or if automatic failover is not configured, just return the
connection handle without subjecting it to further tests.

This will have the side-effect of making RedisBagOStuff compatible with
Nutcracker, which does not implement the INFO command. This is because when
MediaWiki is configured to use Nutcracker, the server pool will consist of a
single server (namely, Nutcracker itself), and thus there will be no other
server to consider, so INFO will never be executed.

Change-Id: I3812ec5a0b22df122bdf44350bc0496574c02ce8
---
M includes/objectcache/RedisBagOStuff.php
1 file changed, 29 insertions(+), 17 deletions(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/includes/objectcache/RedisBagOStuff.php 
b/includes/objectcache/RedisBagOStuff.php
index b8a0dd5..7e506f0 100644
--- a/includes/objectcache/RedisBagOStuff.php
+++ b/includes/objectcache/RedisBagOStuff.php
@@ -372,31 +372,30 @@
}
}
 
-   foreach ( $candidates as $tag ) {
+   while ( ( $tag = array_shift( $candidates ) ) !== false ) {
$server = $this-serverTagMap[$tag];
-
$conn = $this-redisPool-getConnection( $server );
if ( !$conn ) {
continue;
}
 
-   try {
-   $info = $conn-info();
-   // Check if this server has an unreachable 
redis master
-   if ( $info['role'] === 'slave'
-$info['master_link_status'] === 
'down'
-$this-automaticFailover
-   ) {
-   // If the master cannot be reached, 
fail-over to the next server.
-   // If masters are in data-center A, and 
slaves in data-center B,
-   // this helps avoid the case were 
fail-over happens in A but not
-   // to the corresponding server in B 
(e.g. read/write mismatch).
+   // If automatic failover is enabled, check that the 
server's link
+   // to its master (if any) is up -- but only if there 
are other
+   // viable candidates left to consider.
+   if ( $this-automaticFailover  $candidates ) {
+   try {
+   if ( $this-getMasterLinkStatus( $conn 
) === 'down' ) {
+   // If the master cannot be 
reached, fail-over to the next server.
+   // If masters are in 
data-center A, and slaves in data-center B,
+   // this helps avoid the case 
were fail-over happens in A but not
+   // to the corresponding server 
in B (e.g. read/write mismatch).
+   continue;
+   }
+   } catch ( RedisException $e ) {
+   // Server is not accepting commands
+   $this-handleException( $conn, $e );
continue;
}
-   } catch ( RedisException $e ) {
-   // Server is not accepting commands
-   $this-handleException( $conn, $e );
-   continue;
}
 
return array( $server, $conn );
@@ -408,6 +407,19 @@
}
 
/**
+* Check the master link status of a Redis server that is configured as 
a slave.
+* @param RedisConnRef $conn
+* @return string|null Master link status (either 'up' or 'down'), or 
null
+*  if the server is not a slave.
+*/
+   protected function getMasterLinkStatus( RedisConnRef $conn ) {
+   $info = $conn-info();
+   return isset( $info['master_link_status'] )
+   ? $info['master_link_status']
+   : null;
+   }
+
+   /**
 * Log a fatal error
 * @param string $msg
 */

-- 
To view, 

[MediaWiki-commits] [Gerrit] RedisBagOStuff: if no alternatives, skip master link status ... - change (mediawiki/core)

2015-07-28 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: RedisBagOStuff: if no alternatives, skip master link status 
check
..


RedisBagOStuff: if no alternatives, skip master link status check

If RedisBagOStuff::getConnection() is able to establish a connection, only
check the master link status if automatic failover is enabled and if there are
other viable servers left to consider. If there are no servers left to
consider, or if automatic failover is not configured, just return the
connection handle without subjecting it to further tests.

This will have the side-effect of making RedisBagOStuff compatible with
Nutcracker, which does not implement the INFO command. This is because when
MediaWiki is configured to use Nutcracker, the server pool will consist of a
single server (namely, Nutcracker itself), and thus there will be no other
server to consider, so INFO will never be executed.

Change-Id: I3812ec5a0b22df122bdf44350bc0496574c02ce8
---
M includes/objectcache/RedisBagOStuff.php
1 file changed, 29 insertions(+), 17 deletions(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/includes/objectcache/RedisBagOStuff.php 
b/includes/objectcache/RedisBagOStuff.php
index b8a0dd5..7e506f0 100644
--- a/includes/objectcache/RedisBagOStuff.php
+++ b/includes/objectcache/RedisBagOStuff.php
@@ -372,31 +372,30 @@
}
}
 
-   foreach ( $candidates as $tag ) {
+   while ( ( $tag = array_shift( $candidates ) ) !== false ) {
$server = $this-serverTagMap[$tag];
-
$conn = $this-redisPool-getConnection( $server );
if ( !$conn ) {
continue;
}
 
-   try {
-   $info = $conn-info();
-   // Check if this server has an unreachable 
redis master
-   if ( $info['role'] === 'slave'
-$info['master_link_status'] === 
'down'
-$this-automaticFailover
-   ) {
-   // If the master cannot be reached, 
fail-over to the next server.
-   // If masters are in data-center A, and 
slaves in data-center B,
-   // this helps avoid the case were 
fail-over happens in A but not
-   // to the corresponding server in B 
(e.g. read/write mismatch).
+   // If automatic failover is enabled, check that the 
server's link
+   // to its master (if any) is up -- but only if there 
are other
+   // viable candidates left to consider.
+   if ( $this-automaticFailover  $candidates ) {
+   try {
+   if ( $this-getMasterLinkStatus( $conn 
) === 'down' ) {
+   // If the master cannot be 
reached, fail-over to the next server.
+   // If masters are in 
data-center A, and slaves in data-center B,
+   // this helps avoid the case 
were fail-over happens in A but not
+   // to the corresponding server 
in B (e.g. read/write mismatch).
+   continue;
+   }
+   } catch ( RedisException $e ) {
+   // Server is not accepting commands
+   $this-handleException( $conn, $e );
continue;
}
-   } catch ( RedisException $e ) {
-   // Server is not accepting commands
-   $this-handleException( $conn, $e );
-   continue;
}
 
return array( $server, $conn );
@@ -408,6 +407,19 @@
}
 
/**
+* Check the master link status of a Redis server that is configured as 
a slave.
+* @param RedisConnRef $conn
+* @return string|null Master link status (either 'up' or 'down'), or 
null
+*  if the server is not a slave.
+*/
+   protected function getMasterLinkStatus( RedisConnRef $conn ) {
+   $info = $conn-info();
+   return isset( $info['master_link_status'] )
+   ? $info['master_link_status']
+   : null;
+   }
+
+   /**
 * Log a fatal error
 * @param string $msg
 */

-- 
To view, 

[MediaWiki-commits] [Gerrit] Switch over the 'sessions' ObjectCache to nutcracker - change (operations/mediawiki-config)

2015-07-28 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Switch over the 'sessions' ObjectCache to nutcracker
..

Switch over the 'sessions' ObjectCache to nutcracker

This will require any users that currently have an edit in progress to
re-login.

Bug: T106986
Change-Id: Iccd317c65a49c7b3378b778c52583d4c691c9967
---
M wmf-config/CommonSettings.php
1 file changed, 1 insertion(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/20/227620/1

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 26fd75b..519d950 100755
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -302,20 +302,12 @@
),
 );
 
-// Testing Redis-on-Nutcracker -- OL, 28-Jul-2015
-$wgObjectCaches['nutcracker-redis'] = array(
-   'class' = 'RedisBagOStuff',
-   'servers' = array( '127.0.0.1:6380' ),
-   'password' = $wmgRedisPassword,
-   'loggroup' = 'redis',
-);
-
 if ( $wmgUseClusterSession ) {
require( getRealmSpecificFilename( $wmfConfigDir/session.php ) );
 
$wgObjectCaches['sessions'] = array(
'class' = 'RedisBagOStuff',
-   'servers' = $sessionRedis[$wmfDatacenter],
+   'servers' = array( '127.0.0.1:6380' ),
'password' = $wmgRedisPassword,
'loggroup' = 'redis',
);

-- 
To view, visit https://gerrit.wikimedia.org/r/227620
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iccd317c65a49c7b3378b778c52583d4c691c9967
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Switch over the 'sessions' ObjectCache to nutcracker - change (operations/mediawiki-config)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Switch over the 'sessions' ObjectCache to nutcracker
..


Switch over the 'sessions' ObjectCache to nutcracker

This will require any users that currently have an edit in progress to
re-login.

Bug: T106986
Change-Id: Iccd317c65a49c7b3378b778c52583d4c691c9967
---
M wmf-config/CommonSettings.php
1 file changed, 1 insertion(+), 9 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 26fd75b..519d950 100755
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -302,20 +302,12 @@
),
 );
 
-// Testing Redis-on-Nutcracker -- OL, 28-Jul-2015
-$wgObjectCaches['nutcracker-redis'] = array(
-   'class' = 'RedisBagOStuff',
-   'servers' = array( '127.0.0.1:6380' ),
-   'password' = $wmgRedisPassword,
-   'loggroup' = 'redis',
-);
-
 if ( $wmgUseClusterSession ) {
require( getRealmSpecificFilename( $wmfConfigDir/session.php ) );
 
$wgObjectCaches['sessions'] = array(
'class' = 'RedisBagOStuff',
-   'servers' = $sessionRedis[$wmfDatacenter],
+   'servers' = array( '127.0.0.1:6380' ),
'password' = $wmgRedisPassword,
'loggroup' = 'redis',
);

-- 
To view, visit https://gerrit.wikimedia.org/r/227620
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iccd317c65a49c7b3378b778c52583d4c691c9967
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] admin: Add another key for myself - change (operations/puppet)

2015-07-28 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: admin: Add another key for myself
..

admin: Add another key for myself

New OIT laptop test drive

Change-Id: Icd95fd53e3c79f2abfaeb705c00c6a32c3323788
---
M modules/admin/data/data.yaml
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/21/227621/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index fa2910c..181faa8 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -1052,8 +1052,9 @@
 gid: 500
 name: yuvipanda
 realname: Yuvi Panda
-ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQDrR80D68OpttnWGCY49ImSHPvzdCah1NckZv2U/y3Trmjp2EEeIohL8IG3iSjEnB1JirkPe1/0mHkbm0bfxqp17fHWy1g94Teb118woWt69A6pDJvnzp20faFRxOIl7UJjZ+n/Q4HSg7YToYW4hIM/I5KRKnEzi102aFHgV0cGGbxONPn0MiiEXkovlQ59gcNPWO/Wqe7gAcMIjoMvAcaumemUC5nXz8CIiFJLEfVVJ251c4q6C8TUJsxfbxkeN69AT/YqOiAO10eCbXgh0BNDactXy9oVx6u38E271KshW+ScJ671VuBQdTvv2DhrdFj2GsdzqlVYHQI9ny2JgtMX
-ypanda@Yuvi-Panda.local]
+ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQDrR80D68OpttnWGCY49ImSHPvzdCah1NckZv2U/y3Trmjp2EEeIohL8IG3iSjEnB1JirkPe1/0mHkbm0bfxqp17fHWy1g94Teb118woWt69A6pDJvnzp20faFRxOIl7UJjZ+n/Q4HSg7YToYW4hIM/I5KRKnEzi102aFHgV0cGGbxONPn0MiiEXkovlQ59gcNPWO/Wqe7gAcMIjoMvAcaumemUC5nXz8CIiFJLEfVVJ251c4q6C8TUJsxfbxkeN69AT/YqOiAO10eCbXgh0BNDactXy9oVx6u38E271KshW+ScJ671VuBQdTvv2DhrdFj2GsdzqlVYHQI9ny2JgtMX
 ypanda@Yuvi-Panda.local,
+ssh-rsa 
B3NzaC1yc2EDAQABAAABAQDSbKkh+XRHzTRE0fzQnSv8ZsfWgIa9uEhZV5d8Eq9AhIQC3AUkamt9QVnVxXVx/cnUEXqxD8grUcbN9HVf4T9T19zw19JPi4s68eG9Zm6ZSKZNYugLaAjb9QrZa5WBWgBYxTa5ZBtIAn4kWsMqG+d86NJxqLu35FyiiOsD10sVsB2mWvK6flMf7Kuux2dTlI6lqWThHoF/4JPw2Odjn5DrASOhjLXzaLzEhkkwcT+zgWQW1PN/ndSlmL6eT/CRgiOxxL97DE2osmYUXXBqgaXyzBnQGgK/DL03e55Epn6yCEYJ2YcBdjbF8J6Ev82zzvMmNlebKJz44SRRsPuOX3r9
 yuvipanda@picard
+]
 uid: 2029
   haithams:
 ensure: present

-- 
To view, visit https://gerrit.wikimedia.org/r/227621
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd95fd53e3c79f2abfaeb705c00c6a32c3323788
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] enable ipsec for all codfw caches - change (operations/puppet)

2015-07-28 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: enable ipsec for all codfw caches
..


enable ipsec for all codfw caches

Bug: T81543
Change-Id: Ib3eaf06670600335dcaabfd67f7c0c5c7f42207c
---
M manifests/site.pp
1 file changed, 5 insertions(+), 5 deletions(-)

Approvals:
  BBlack: Verified; Looks good to me, approved



diff --git a/manifests/site.pp b/manifests/site.pp
index 4af2e0d..118d9cc 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -417,27 +417,27 @@
 
 node /^cp20(0[147]|1[0369]|23)\.codfw\.wmnet$/ {
 interface::add_ip6_mapped { 'main': }
-role cache::text
+role cache::text, ipsec
 }
 
 node /^cp20(0[258]|1[147]|2[04])\.codfw\.wmnet$/ {
 interface::add_ip6_mapped { 'main': }
-role cache::upload
+role cache::upload, ipsec
 }
 
 node /^cp20(0[39]|15|21)\.codfw\.wmnet$/ {
 interface::add_ip6_mapped { 'main': }
-role cache::mobile
+role cache::mobile, ipsec
 }
 
 node /^cp20(06|1[28]|25)\.codfw\.wmnet$/ {
 interface::add_ip6_mapped { 'main': }
-role cache::bits
+role cache::bits, ipsec
 }
 
 node /^cp202[26]\.codfw\.wmnet$/ {
 interface::add_ip6_mapped { 'main': }
-role cache::parsoid
+role cache::parsoid, ipsec
 }
 
 node /^cp30(0[3-9]|1[0-4])\.esams\.wmnet$/ {

-- 
To view, visit https://gerrit.wikimedia.org/r/219813
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3eaf06670600335dcaabfd67f7c0c5c7f42207c
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Gage jger...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix typo in reverse DNS for ms-fe2003.codfw.wmnet - change (operations/dns)

2015-07-28 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: Fix typo in reverse DNS for ms-fe2003.codfw.wmnet
..


Fix typo in reverse DNS for ms-fe2003.codfw.wmnet

wment - wmnet

Change-Id: I5ad09127c004281d4f9474d59e8dc3e0de494b52
---
M templates/10.in-addr.arpa
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  BBlack: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 74dee14..6bb1489 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -2649,7 +2649,7 @@
 22  1H IN PTR   ms-be2006.codfw.wmnet.
 23  1H IN PTR   ms-be2007.codfw.wmnet.
 24  1H IN PTR   ms-be2008.codfw.wmnet.
-25  1H IN PTR   ms-fe2003.codfw.wment.
+25  1H IN PTR   ms-fe2003.codfw.wmnet.
 26  1H IN PTR   ms-fe2004.codfw.wmnet.
 27  1H IN PTR   es2003.codfw.wmnet.
 28  1H IN PTR   es2004.codfw.wmnet.

-- 
To view, visit https://gerrit.wikimedia.org/r/227474
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ad09127c004281d4f9474d59e8dc3e0de494b52
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Alex Monk kren...@gmail.com
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Pin versions of serialization components - change (mediawiki...Wikibase)

2015-07-28 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Pin versions of serialization components
..

Pin versions of serialization components

Change-Id: Ief1eb1ccc475508c06a6d49b08e481898b09871f
---
M composer.json
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/39/227639/1

diff --git a/composer.json b/composer.json
index 87885c5..943f9fd 100644
--- a/composer.json
+++ b/composer.json
@@ -37,9 +37,9 @@
 
wikibase/data-model: ~3.0,
wikibase/data-model-javascript: ^1.0.2,
-   wikibase/data-model-serialization: ~1.4,
+   wikibase/data-model-serialization: ~1.4.0,
wikibase/javascript-api: ~1.0,
-   wikibase/internal-serialization: ~1.4,
+   wikibase/internal-serialization: ~1.4.0,
wikibase/serialization-javascript: ~2.0,
 
diff/diff: ~2.0|~1.0

-- 
To view, visit https://gerrit.wikimedia.org/r/227639
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief1eb1ccc475508c06a6d49b08e481898b09871f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: wmf/1.26wmf13
Gerrit-Owner: Aude aude.w...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Follow up to Ied1db3f, use lazyPush, remove unused imports, ... - change (mediawiki...Wikibase)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Follow up to Ied1db3f, use lazyPush, remove unused imports, etc.
..


Follow up to Ied1db3f, use lazyPush, remove unused imports, etc.

* moved AddUsagesForPageJobTest to includes/store test subdirectory
to be consistent with location of AddUsagesForPageJob.
* removed unused imports.
* use JobQueueGroup::lazyPush and EnqueueJob. (see how this is
done in WikiPage to add refreshLinks)
* add removeDuplicates to job specification.

Change-Id: If209bbeb8871a3ac9e6c45b3258006a6b45bbad5
---
M client/includes/Hooks/DataUpdateHookHandlers.php
M client/includes/Usage/EntityUsage.php
M client/includes/store/AddUsagesForPageJob.php
M client/includes/store/sql/DirectSqlStore.php
M client/tests/phpunit/MockClientStore.php
M client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
R client/tests/phpunit/includes/store/AddUsagesForPageJobTest.php
7 files changed, 57 insertions(+), 17 deletions(-)

Approvals:
  Aude: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/client/includes/Hooks/DataUpdateHookHandlers.php 
b/client/includes/Hooks/DataUpdateHookHandlers.php
index 42d9d78..6776f65 100644
--- a/client/includes/Hooks/DataUpdateHookHandlers.php
+++ b/client/includes/Hooks/DataUpdateHookHandlers.php
@@ -3,8 +3,8 @@
 namespace Wikibase\Client\Hooks;
 
 use Content;
+use EnqueueJob;
 use JobQueueGroup;
-use JobSpecification;
 use LinksUpdate;
 use ManualLogEntry;
 use ParserCache;
@@ -14,7 +14,6 @@
 use User;
 use Wikibase\Client\Store\AddUsagesForPageJob;
 use Wikibase\Client\Store\UsageUpdater;
-use Wikibase\Client\Usage\EntityUsage;
 use Wikibase\Client\Usage\ParserOutputUsageAccumulator;
 use Wikibase\Client\WikibaseClient;
 use WikiPage;
@@ -162,7 +161,7 @@
 * Implemented to update usage tracking information via UsageUpdater.
 *
 * @param ParserOutput $parserOutput
-* @param $title $title
+* @param Title $title
 */
public function doParserCacheSaveComplete( ParserOutput $parserOutput, 
Title $title ) {
$usageAcc = new ParserOutputUsageAccumulator( $parserOutput );
@@ -186,7 +185,9 @@
//TODO: Before posting a job, check slave database. If no 
changes are needed, skip update.
 
$addUsagesForPageJob = AddUsagesForPageJob::newSpec( $title, 
$usageAcc-getUsages(), $touched );
-   $this-jobScheduler-push( $addUsagesForPageJob );
+   $enqueueJob = EnqueueJob::newFromLocalJobs( 
$addUsagesForPageJob );
+
+   $this-jobScheduler-lazyPush( $enqueueJob );
}
 
/**
diff --git a/client/includes/Usage/EntityUsage.php 
b/client/includes/Usage/EntityUsage.php
index ba6938e..864efce 100644
--- a/client/includes/Usage/EntityUsage.php
+++ b/client/includes/Usage/EntityUsage.php
@@ -4,7 +4,6 @@
 
 use InvalidArgumentException;
 use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\DataModel\Entity\EntityIdParsingException;
 
 /**
  * Value object representing the usage of an entity. This includes information 
about
diff --git a/client/includes/store/AddUsagesForPageJob.php 
b/client/includes/store/AddUsagesForPageJob.php
index 90f2e16..335fd3e 100644
--- a/client/includes/store/AddUsagesForPageJob.php
+++ b/client/includes/store/AddUsagesForPageJob.php
@@ -64,7 +64,12 @@
'touched' = $touched
);
 
-   return new JobSpecification( 'wikibase-addUsagesForPage', 
$jobParams, array(), $title );
+   return new JobSpecification(
+   'wikibase-addUsagesForPage',
+   $jobParams,
+   array( 'removeDuplicates' = true ),
+   $title
+   );
}
 
/**
diff --git a/client/includes/store/sql/DirectSqlStore.php 
b/client/includes/store/sql/DirectSqlStore.php
index 40df459..80d42cf 100644
--- a/client/includes/store/sql/DirectSqlStore.php
+++ b/client/includes/store/sql/DirectSqlStore.php
@@ -476,4 +476,5 @@
$this-getSubscriptionManager()
);
}
+
 }
diff --git a/client/tests/phpunit/MockClientStore.php 
b/client/tests/phpunit/MockClientStore.php
index f09938e..5a78d04 100644
--- a/client/tests/phpunit/MockClientStore.php
+++ b/client/tests/phpunit/MockClientStore.php
@@ -202,4 +202,5 @@
$this-getSubscriptionManager()
);
}
+
 }
diff --git a/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php 
b/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
index 45b978a..f2b3976 100644
--- a/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
+++ b/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
@@ -2,7 +2,6 @@
 
 namespace Wikibase\Client\Tests\Hooks;
 
-use Job;
 use JobQueueGroup;
 use JobSpecification;
 use ParserOutput;
@@ 

[MediaWiki-commits] [Gerrit] Enable the Publish button for retrying after a publishing fa... - change (mediawiki...ContentTranslation)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Enable the Publish button for retrying after a publishing 
failure
..


Enable the Publish button for retrying after a publishing failure

When a publishing error happens, the Publish button is disabled.
This behavior is not correct since the error message says:
Publishing failed, please retry. To retry publishing, the button
must be enabled.

Change-Id: I54aa727872620ccc1774b981fc64503509efd171
---
M modules/publish/ext.cx.publish.js
1 file changed, 12 insertions(+), 2 deletions(-)

Approvals:
  Amire80: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/publish/ext.cx.publish.js 
b/modules/publish/ext.cx.publish.js
index e8305bd..2ff31eb 100644
--- a/modules/publish/ext.cx.publish.js
+++ b/modules/publish/ext.cx.publish.js
@@ -70,8 +70,6 @@
self.onFail( 'cxpublish', response.cxpublish );
} ).fail( function ( code, details ) {
self.onFail( code, details );
-   } ).always( function () {
-   self.$trigger.prop( 'disabled', true ).text( 
mw.msg( 'cx-publish-button' ) );
} );
} );
};
@@ -280,6 +278,12 @@
);
 
mw.cx.dirty = false;
+
+   // Disable the Publish button
+   // and change its label back from Publishing... to Publish
+   this.$trigger
+   .prop( 'disabled', true )
+   .text( mw.msg( 'cx-publish-button' ) );
};
 
/**
@@ -307,6 +311,12 @@
 
mw.hook( 'mw.cx.error' ).fire( mw.msg( 'cx-publish-page-error' 
) );
mw.log( '[CX] Error while publishing:', code, trace );
+
+   // Enable the Publish button to allow retrying,
+   // and set the label back to Publish
+   this.$trigger
+   .prop( 'disabled', false )
+   .text( mw.msg( 'cx-publish-button' ) );
};
 
/**

-- 
To view, visit https://gerrit.wikimedia.org/r/227405
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I54aa727872620ccc1774b981fc64503509efd171
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Log more details on MathIndexWrite - change (mediawiki...MathSearch)

2015-07-28 Thread Physikerwelt (Code Review)
Physikerwelt has uploaded a new change for review.

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

Change subject: Log more details on MathIndexWrite
..

Log more details on MathIndexWrite

Change-Id: Ie691f7ab9ca0888b2a8694bf14e349d752024d55
---
M MathSearch.hooks.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MathSearch 
refs/changes/43/227443/1

diff --git a/MathSearch.hooks.php b/MathSearch.hooks.php
index 3a4c6af..ced14cb 100644
--- a/MathSearch.hooks.php
+++ b/MathSearch.hooks.php
@@ -248,7 +248,8 @@
 * @param string $tex
 */
public static function writeMathIndex( $oldID, $eid, $inputHash, $tex ) 
{
-   LoggerFactory::getInstance( MathSearch )-warning( 'Store 
index for $' . $tex . '$ in database' );
+   LoggerFactory::getInstance( MathSearch )-warning(
+   Store index for \$$tex\$ in database with id $eid for 
revision $oldID. );
$dbw = wfGetDB( DB_MASTER );
$dbw-onTransactionIdle( function () use ( $oldID, $eid, 
$inputHash, $dbw ) {
$dbw-replace( 'mathindex', array( 
'mathindex_revision_id', 'mathindex_anchor' ), array(

-- 
To view, visit https://gerrit.wikimedia.org/r/227443
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie691f7ab9ca0888b2a8694bf14e349d752024d55
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt w...@physikerwelt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix the grammar of apihelp-options-param-option(name|value) - change (mediawiki/core)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix the grammar of apihelp-options-param-option(name|value)
..


Fix the grammar of apihelp-options-param-option(name|value)

Change-Id: I85d20f30b9c3e2d48323fc848d5bc5f59c6b704e
---
M includes/api/i18n/en.json
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Anomie: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json
index 46440e5..e9a48cf 100644
--- a/includes/api/i18n/en.json
+++ b/includes/api/i18n/en.json
@@ -258,8 +258,8 @@
apihelp-options-param-reset: Resets preferences to the site 
defaults.,
apihelp-options-param-resetkinds: List of types of options to reset 
when the var$1reset/var option is set.,
apihelp-options-param-change: List of changes, formatted name=value 
(e.g. skin=vector). Value cannot contain pipe characters. If no value is given 
(not even an equals sign), e.g., optionname|otheroption|..., the option will be 
reset to its default value.,
-   apihelp-options-param-optionname: A name of a option which should be 
set to the value given by var$1optionvalue/var.,
-   apihelp-options-param-optionvalue: A value of the option specified 
by var$1optionname/var, can contain pipe characters.,
+   apihelp-options-param-optionname: The name of the option that should 
be set to the value given by var$1optionvalue/var.,
+   apihelp-options-param-optionvalue: The value for the option 
specified by var$1optionname/var, can contain pipe characters.,
apihelp-options-example-reset: Reset all preferences.,
apihelp-options-example-change: Change kbdskin/kbd and 
kbdhideminor/kbd preferences.,
apihelp-options-example-complex: Reset all preferences, then set 
kbdskin/kbd and kbdnickname/kbd.,

-- 
To view, visit https://gerrit.wikimedia.org/r/227264
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I85d20f30b9c3e2d48323fc848d5bc5f59c6b704e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Improved addMissingMetadata() on POST failure - change (mediawiki/core)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Improved addMissingMetadata() on POST failure
..


Improved addMissingMetadata() on POST failure

* If the POST failed but the sha1 was computed, then use
  and cache that value rather than false.

Change-Id: I42b53c823013ecd9b281406e3d533a21e0de7cfb
---
M includes/filebackend/SwiftFileBackend.php
1 file changed, 2 insertions(+), 3 deletions(-)

Approvals:
  Gilles: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/filebackend/SwiftFileBackend.php 
b/includes/filebackend/SwiftFileBackend.php
index 2ccafe4..e9df205 100644
--- a/includes/filebackend/SwiftFileBackend.php
+++ b/includes/filebackend/SwiftFileBackend.php
@@ -670,10 +670,10 @@
$ps = Profiler::instance()-scopedProfileIn( __METHOD__ . 
-{$this-name} );
wfDebugLog( 'SwiftBackend', __METHOD__ . : $path was not 
stored with SHA-1 metadata. );
 
+   $objHdrs['x-object-meta-sha1base36'] = false;
+
$auth = $this-getAuthentication();
if ( !$auth ) {
-   $objHdrs['x-object-meta-sha1base36'] = false;
-
return $objHdrs; // failed
}
 
@@ -700,7 +700,6 @@
}
 
wfDebugLog( 'SwiftBackend', __METHOD__ . : unable to set SHA-1 
metadata for $path );
-   $objHdrs['x-object-meta-sha1base36'] = false;
 
return $objHdrs; // failed
}

-- 
To view, visit https://gerrit.wikimedia.org/r/226405
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I42b53c823013ecd9b281406e3d533a21e0de7cfb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Adjust build/artifact retention for mw-selenium job - change (integration/config)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Adjust build/artifact retention for mw-selenium job
..


Adjust build/artifact retention for mw-selenium job

In preparation for video recording, the mw-selenium job was modified to
only keep builds for 15 days and artifacts (including potentially larger
video files) for 3 days.

Bug: T104583
Change-Id: Idb9e4e1c14ed6e3e9239ce8f7dd843e267c818d1
---
M jjb/mediawiki-extensions.yaml
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Hashar: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 7ea3290..bcfe56b 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -204,6 +204,9 @@
  - localhost-cleanup
  - mw-teardown-mysql
  - archive-log-dir
+logrotate:
+  daysToKeep: 15
+  artifactDaysToKeep: 3
 
 - job-template:
 name: 'mwext-{name}-whitespaces'

-- 
To view, visit https://gerrit.wikimedia.org/r/226650
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb9e4e1c14ed6e3e9239ce8f7dd843e267c818d1
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Dduvall dduv...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] git deploy: don't fetch/checkout/restart on the deployment s... - change (operations/puppet)

2015-07-28 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: git deploy: don't fetch/checkout/restart on the deployment 
server
..


git deploy: don't fetch/checkout/restart on the deployment server

Bug: T67549
Change-Id: Ib206f3820e5aa11ff6d26e777609b5692f74dd4f
---
M modules/deployment/files/runners/deploy.py
1 file changed, 17 insertions(+), 7 deletions(-)

Approvals:
  Thcipriani: Looks good to me, but someone else must approve
  Filippo Giunchedi: Verified; Looks good to me, approved



diff --git a/modules/deployment/files/runners/deploy.py 
b/modules/deployment/files/runners/deploy.py
index 5bfde5c..22f579a 100755
--- a/modules/deployment/files/runners/deploy.py
+++ b/modules/deployment/files/runners/deploy.py
@@ -12,12 +12,15 @@
 '''
 Fetch from a master, for the specified repo
 '''
-grain = deployment_target: + repo
+deployment_target = deployment_target: + repo
+deployment_server = deployment_server:*
+targets = G@{0} and not G@{1}.format(deployment_target,
+   deployment_server)
 client = salt.client.LocalClient(__opts__['conf_file'])
 cmd = 'deploy.fetch'
 # comma in the tuple is a workaround for a bug in salt
 arg = (repo,)
-client.cmd(grain, cmd, expr_form='grain', arg=arg, timeout=1,
+client.cmd(targets, cmd, expr_form='compound', arg=arg, timeout=1,
ret='deploy_redis')
 print Fetch completed
 
@@ -26,11 +29,14 @@
 '''
 Checkout from a master, for the specified repo
 '''
-grain = deployment_target: + repo
+deployment_target = deployment_target: + repo
+deployment_server = deployment_server:*
+targets = G@{0} and not G@{1}.format(deployment_target,
+   deployment_server)
 client = salt.client.LocalClient(__opts__['conf_file'])
 cmd = 'deploy.checkout'
 arg = (repo, reset)
-client.cmd(grain, cmd, expr_form='grain', arg=arg, timeout=1,
+client.cmd(targets, cmd, expr_form='compound', arg=arg, timeout=1,
ret='deploy_redis')
 print Checkout completed
 
@@ -40,14 +46,18 @@
 Restart the service associated with this repo. If no service is associated
 this call will do nothing.
 '''
-grain = deployment_target: + repo
+deployment_target = deployment_target: + repo
+deployment_server = deployment_server:*
+targets = G@{0} and not G@{1}.format(deployment_target,
+   deployment_server)
 client = salt.client.LocalClient(__opts__['conf_file'])
 cmd = 'deploy.restart'
 # comma in the tuple is a workaround for a bug in salt
 arg = (repo,)
 ret = []
-for data in client.cmd_batch(grain, cmd, expr_form='grain', arg=arg,
- timeout=60, ret='deploy_redis', batch=batch):
+for data in client.cmd_batch(targets, cmd, expr_form='compound',
+ arg=arg, timeout=60,
+ ret='deploy_redis', batch=batch):
 ret.append(data)
 print Restart completed
 return ret

-- 
To view, visit https://gerrit.wikimedia.org/r/212291
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib206f3820e5aa11ff6d26e777609b5692f74dd4f
Gerrit-PatchSet: 7
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: 20after4 mmod...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: BryanDavis bda...@wikimedia.org
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Thcipriani tcipri...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix NPE in tabbed browsing - change (apps...wikipedia)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix NPE in tabbed browsing
..


Fix NPE in tabbed browsing

TabsProvider.enterTabMode(Runnable) was meant to handle a null parameter
as evidenced by the no parameter version which invokes it with null.
This patch adds null protection and specifies @Nullable on the
parameter.

No known repro steps at this time.

Change-Id: Ibdc58bf49cc5551fb00a9352a11486dd5390054f
---
M wikipedia/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Dbrant: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wikipedia/src/main/java/org/wikipedia/page/tabs/TabsProvider.java 
b/wikipedia/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
index a796992..80adf08 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
@@ -11,6 +11,7 @@
 import com.squareup.picasso.Picasso;
 
 import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
 import android.support.v7.view.ActionMode;
 import android.view.LayoutInflater;
 import android.view.Menu;
@@ -100,13 +101,15 @@
 providerListener.onEnterTabView();
 }
 
-private void enterTabMode(Runnable onTabModeEntered) {
+private void enterTabMode(@Nullable Runnable onTabModeEntered) {
 if (tabActionMode != null) {
 // already inside action mode...
 // but make sure to update the list of tabs.
 tabListAdapter.notifyDataSetInvalidated();
 tabListView.smoothScrollToPosition(tabList.size() - 1);
-onTabModeEntered.run();
+if (onTabModeEntered != null) {
+onTabModeEntered.run();
+}
 return;
 }
 parentActivity.startSupportActionMode(new 
TabActionModeCallback(onTabModeEntered));

-- 
To view, visit https://gerrit.wikimedia.org/r/227394
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibdc58bf49cc5551fb00a9352a11486dd5390054f
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski sniedziel...@wikimedia.org
Gerrit-Reviewer: BearND bsitzm...@wikimedia.org
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org
Gerrit-Reviewer: Dbrant dbr...@wikimedia.org
Gerrit-Reviewer: Mholloway mhollo...@wikimedia.org
Gerrit-Reviewer: Niedzielski sniedziel...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Enable base::firewall - change (operations/puppet)

2015-07-28 Thread Muehlenhoff (Code Review)
Muehlenhoff has uploaded a new change for review.

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

Change subject: Enable base::firewall
..

Enable base::firewall

Change-Id: I623c6d658ce5b598975045a73e92a19d2b42e40f
---
M manifests/site.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/16/227416/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 4af2e0d..715a768 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1691,6 +1691,7 @@
 interface = 'eth0',
 }
 include standard
+include base::firewall
 }
 
 # also see dataset1001

-- 
To view, visit https://gerrit.wikimedia.org/r/227416
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I623c6d658ce5b598975045a73e92a19d2b42e40f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Muehlenhoff mmuhlenh...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] labstore: Daemonize create-dbusers - change (operations/puppet)

2015-07-28 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: labstore: Daemonize create-dbusers
..


labstore: Daemonize create-dbusers

- Runs every 60s
- Runs only for toollabs users
- Does not recover from crashes automatically! Need monitoring
  to alert whenever it crashes, however - will be added in a
  followup patch

Bug: T104453
Change-Id: Ifb81756974d2cfc83520dcbf232e005b619d9eef
---
M modules/labstore/files/create-dbusers
1 file changed, 26 insertions(+), 19 deletions(-)

Approvals:
  Yuvipanda: Verified; Looks good to me, approved



diff --git a/modules/labstore/files/create-dbusers 
b/modules/labstore/files/create-dbusers
index 244deda..e54ca3a 100755
--- a/modules/labstore/files/create-dbusers
+++ b/modules/labstore/files/create-dbusers
@@ -22,6 +22,7 @@
 import random
 import configparser
 import io
+import time
 
 
 class User:
@@ -138,12 +139,14 @@
 
 
 if __name__ == '__main__':
-PROJECTS = ['tools']
-
 argparser = argparse.ArgumentParser()
 argparser.add_argument('--config', help='Path to YAML config file')
 argparser.add_argument('--debug', help='Turn on debug logging',
action='store_true')
+argparser.add_argument('--project', help='Project name to create db users 
for',
+   default='tools')
+argparser.add_argument('--delay', help='Number of seconds to wait between 
runs',
+   default=60)
 args = argparser.parse_args()
 
 logging.basicConfig(format='%(message)s',
@@ -159,26 +162,30 @@
 auto_bind=True,
 password=config['ldap']['password'])
 
-servicegroups = User.from_ldap_servicegroups(conn, 'tools')
 cgen = CredentialCreator(
 config['mysql']['hosts'],
 config['mysql']['username'],
 config['mysql']['password']
 )
 
-for sg in servicegroups:
-# FIXME: for non tools/maps projects this path is different
-replica_path = os.path.join(
-'/srv/project/', sg.project, 'project',
-re.sub(r'^%s\.' % sg.project, '', sg.name),
-'replica.my.cnf'
-)
-if not os.path.exists(replica_path):
-if not cgen.check_user_exists(sg):
-# No replica.my.cnf and no user in db
-# Generate new creds and put them in there!
-logging.info('Creating DB accounts for %s with db username 
%s', sg.name, sg.db_username)
-cgen.write_credentials_file(replica_path, sg)
-logging.info(Created replica.my.cnf for %s, with username 
%s, sg.name, sg.db_username)
-else:
-logging.info('Missing replica.my.cnf for user %s despite 
grants present in db', sg.name)
+while True:
+logging.info('Starting createdb-users run')
+servicegroups = User.from_ldap_servicegroups(conn, args.project)
+for sg in servicegroups:
+# FIXME: for non tools/maps projects this path is different
+replica_path = os.path.join(
+'/srv/project/', sg.project, 'project',
+re.sub(r'^%s\.' % sg.project, '', sg.name),
+'replica.my.cnf'
+)
+if not os.path.exists(replica_path):
+if not cgen.check_user_exists(sg):
+# No replica.my.cnf and no user in db
+# Generate new creds and put them in there!
+logging.info('Creating DB accounts for %s with db username 
%s', sg.name, sg.db_username)
+cgen.write_credentials_file(replica_path, sg)
+logging.info(Created replica.my.cnf for %s, with username 
%s, sg.name, sg.db_username)
+else:
+logging.info('Missing replica.my.cnf for user %s despite 
grants present in db', sg.name)
+logging.info('Completed createdb-users run')
+time.sleep(args.delay)

-- 
To view, visit https://gerrit.wikimedia.org/r/227420
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb81756974d2cfc83520dcbf232e005b619d9eef
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Bump grunt-banana-checker to 0.2.2 - change (mediawiki...WikidataPageBanner)

2015-07-28 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Bump grunt-banana-checker to 0.2.2
..

Bump grunt-banana-checker to 0.2.2

Change-Id: Ibba426fc1d16fa5fdeaf3dab8c29369c3d7e2761
---
A i18n/de.json
A i18n/es.json
M i18n/qqq.json
M package.json
4 files changed, 21 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataPageBanner 
refs/changes/29/227429/1

diff --git a/i18n/de.json b/i18n/de.json
new file mode 100644
index 000..e662c51
--- /dev/null
+++ b/i18n/de.json
@@ -0,0 +1,9 @@
+{
+   @metadata: {
+   authors: [
+   Metalhead64
+   ]
+   },
+   wikidatapagebanner-extname: WikidataPageBanner,
+   wikidatapagebanner-desc: Rendert Banner auf angegebenen Wikiseiten 
am Artikelanfang
+}
diff --git a/i18n/es.json b/i18n/es.json
new file mode 100644
index 000..0d3478a
--- /dev/null
+++ b/i18n/es.json
@@ -0,0 +1,9 @@
+{
+   @metadata: {
+   authors: [
+   Macofe
+   ]
+   },
+   wikidatapagebanner-extname: WikidataPageBanner,
+   wikidatapagebanner-desc: Despliega pancartas en páginas 
especificadas del wiki, al principio de los artículos
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index b3061d4..8f1f695 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -1,7 +1,5 @@
 {
-   @metadata: {
-   authors: []
-   },
+   @metadata: [],
wikidatapagebanner-extname: Used for the name of extension.,
wikidatapagebanner-desc: 
{{desc|name=WikidataPageBanner|url=https://www.mediawiki.org/wiki/Extension:WikidataPageBanner}};
-}
\ No newline at end of file
+}
diff --git a/package.json b/package.json
index c14a4cb..16d4081 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,7 @@
   devDependencies: {
 grunt: 0.4.5,
 grunt-cli: 0.1.13,
-grunt-banana-checker: 0.2.1,
+grunt-banana-checker: 0.2.2,
 grunt-contrib-jshint: 0.11.2
   }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/227429
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibba426fc1d16fa5fdeaf3dab8c29369c3d7e2761
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataPageBanner
Gerrit-Branch: master
Gerrit-Owner: Paladox thomasmulhall...@yahoo.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Update citoid to b6c099a - change (mediawiki...deploy)

2015-07-28 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review.

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

Change subject: Update citoid to b6c099a
..

Update citoid to b6c099a

List of changes:
a93ec5d Include 5 digit registrant codes in DOI regex
564501f Ensure the User-Agent header is set on every request
b6c099a Use the same cookie jar throughout a request's life
xxx Update node module dependencies

Change-Id: I2f96d6b45c5ce6a33ed40e5168205b93bb694786
---
M 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/package.json
M 
node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/package.json
M 
node_modules/body-parser/node_modules/type-is/node_modules/mime-types/package.json
M node_modules/body-parser/node_modules/type-is/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/common.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/glob.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/browser.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json
A 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js
A 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/sync.js
M node_modules/bunyan/node_modules/mv/node_modules/rimraf/package.json
M 
node_modules/compression/node_modules/accepts/node_modules/mime-types/package.json
M node_modules/compression/node_modules/accepts/package.json
M node_modules/express/node_modules/accepts/node_modules/mime-types/package.json
M node_modules/express/node_modules/accepts/package.json
M node_modules/express/node_modules/debug/node_modules/ms/package.json
M node_modules/express/node_modules/qs/package.json
M node_modules/express/node_modules/type-is/node_modules/mime-types/package.json
M node_modules/express/node_modules/type-is/package.json
M node_modules/request/lib/helpers.js
M node_modules/request/lib/oauth.js
M node_modules/request/lib/redirect.js
M node_modules/request/node_modules/bl/.travis.yml
A node_modules/request/node_modules/bl/node_modules/readable-stream/.travis.yml
A node_modules/request/node_modules/bl/node_modules/readable-stream/.zuul.yml
A 
node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown
M 
node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js
M 
node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js
M 
node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js
M 
node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js
M 
node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js
M 
node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/inherits/package.json
A 
node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml
A 
node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js
A 
node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json
A 
node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/test.js
A 
node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/LICENSE
A 
node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/browser.js
A 
node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/node.js
A 
node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json
M node_modules/request/node_modules/bl/node_modules/readable-stream/package.json
M node_modules/request/node_modules/bl/node_modules/readable-stream/readable.js
M node_modules/request/node_modules/bl/package.json
A node_modules/request/node_modules/caseless/LICENSE
M node_modules/request/node_modules/caseless/index.js
M node_modules/request/node_modules/caseless/package.json
A node_modules/request/node_modules/extend/.eslintrc
M node_modules/request/node_modules/extend/.jscs.json
M node_modules/request/node_modules/extend/.travis.yml
M node_modules/request/node_modules/extend/component.json
M node_modules/request/node_modules/extend/index.js
M node_modules/request/node_modules/extend/package.json
A 

[MediaWiki-commits] [Gerrit] Update citoid to b6c099a - change (mediawiki...deploy)

2015-07-28 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged.

Change subject: Update citoid to b6c099a
..


Update citoid to b6c099a

List of changes:
a93ec5d Include 5 digit registrant codes in DOI regex
564501f Ensure the User-Agent header is set on every request
b6c099a Use the same cookie jar throughout a request's life
xxx Update node module dependencies

Change-Id: I2f96d6b45c5ce6a33ed40e5168205b93bb694786
---
M 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/package.json
M 
node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/package.json
M 
node_modules/body-parser/node_modules/type-is/node_modules/mime-types/package.json
M node_modules/body-parser/node_modules/type-is/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/common.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/glob.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/browser.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json
A 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js
A 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/sync.js
M node_modules/bunyan/node_modules/mv/node_modules/rimraf/package.json
M 
node_modules/compression/node_modules/accepts/node_modules/mime-types/package.json
M node_modules/compression/node_modules/accepts/package.json
M node_modules/express/node_modules/accepts/node_modules/mime-types/package.json
M node_modules/express/node_modules/accepts/package.json
M node_modules/express/node_modules/debug/node_modules/ms/package.json
M node_modules/express/node_modules/qs/package.json
M node_modules/express/node_modules/type-is/node_modules/mime-types/package.json
M node_modules/express/node_modules/type-is/package.json
M node_modules/request/lib/helpers.js
M node_modules/request/lib/oauth.js
M node_modules/request/lib/redirect.js
M node_modules/request/node_modules/bl/.travis.yml
A node_modules/request/node_modules/bl/node_modules/readable-stream/.travis.yml
A node_modules/request/node_modules/bl/node_modules/readable-stream/.zuul.yml
A 
node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown
M 
node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js
M 
node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js
M 
node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js
M 
node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js
M 
node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js
M 
node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/inherits/package.json
A 
node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml
A 
node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js
A 
node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json
A 
node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/test.js
A 
node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/LICENSE
A 
node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/browser.js
A 
node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/node.js
A 
node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json
M node_modules/request/node_modules/bl/node_modules/readable-stream/package.json
M node_modules/request/node_modules/bl/node_modules/readable-stream/readable.js
M node_modules/request/node_modules/bl/package.json
A node_modules/request/node_modules/caseless/LICENSE
M node_modules/request/node_modules/caseless/index.js
M node_modules/request/node_modules/caseless/package.json
A node_modules/request/node_modules/extend/.eslintrc
M node_modules/request/node_modules/extend/.jscs.json
M node_modules/request/node_modules/extend/.travis.yml
M node_modules/request/node_modules/extend/component.json
M node_modules/request/node_modules/extend/index.js
M node_modules/request/node_modules/extend/package.json
A node_modules/request/node_modules/form-data/lib/browser.js
M 

[MediaWiki-commits] [Gerrit] SpecialStatistics: Implement statistics-articles-desc message - change (mediawiki/core)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: SpecialStatistics: Implement statistics-articles-desc message
..


SpecialStatistics: Implement statistics-articles-desc message

Similar to the statistics-pages-desc message that exists already.
This way mediawiki.org can stop using the hack currently employed
in the local override for the 'statistics-articles' message which
adds a line break inside the link label to emulate a caption. This
doesn't work well because it breaks after the first link.

Also:
* Change from exists() to !isDisabled() so that it can be optional.
* Fix wrong use of Xml::element and use Html::rawElement instead.
  The message in question is already escaped. This was causing
  escaped parser html to render as text on the page when the desc
  message contains e.g. a wiki link.

Change-Id: I547d1da16c8bdbabddad35525a5c9fa34b8318d4
---
M includes/specials/SpecialStatistics.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 8 insertions(+), 5 deletions(-)

Approvals:
  Gilles: Looks good to me, approved
  Umherirrender: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialStatistics.php 
b/includes/specials/SpecialStatistics.php
index 652ea82..8de6f8b 100644
--- a/includes/specials/SpecialStatistics.php
+++ b/includes/specials/SpecialStatistics.php
@@ -107,11 +107,11 @@
) {
if ( $descMsg ) {
$msg = $this-msg( $descMsg, $descMsgParam );
-   if ( $msg-exists() ) {
-   $descriptionText = $this-msg( 'parentheses' 
)-rawParams( $msg-parse() )
+   if ( !$msg-isDisabled() ) {
+   $descriptionHtml = $this-msg( 'parentheses' 
)-rawParams( $msg-parse() )
-escaped();
-   $text .= br / . Xml::element( 'small', 
array( 'class' = 'mw-statistic-desc' ),
-$descriptionText );
+   $text .= br / . Html::rawElement( 'small', 
array( 'class' = 'mw-statistic-desc' ),
+$descriptionHtml );
}
}
 
@@ -134,7 +134,8 @@
$this-formatRow( Linker::linkKnown( 
SpecialPage::getTitleFor( 'Allpages' ),
$this-msg( 'statistics-articles' 
)-parse() ),
$this-getLanguage()-formatNum( 
$this-good ),
-   array( 'class' = 
'mw-statistics-articles' ) ) .
+   array( 'class' = 
'mw-statistics-articles' ),
+   'statistics-articles-desc' ) .
$this-formatRow( $this-msg( 
'statistics-pages' )-parse(),
$this-getLanguage()-formatNum( 
$this-total ),
array( 'class' = 'mw-statistics-pages' 
),
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 1fdd75d..cb09a16 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1585,6 +1585,7 @@
statistics-header-users: User statistics,
statistics-header-hooks: Other statistics,
statistics-articles: Content pages,
+   statistics-articles-desc: ,
statistics-pages: Pages,
statistics-pages-desc: All pages in the wiki, including talk pages, 
redirects, etc.,
statistics-files: Uploaded files,
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index 872a89f..1c0b5b1 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -1756,6 +1756,7 @@
statistics-header-users: Used in 
[[Special:Statistics]].\n{{Identical|User statistics}},
statistics-header-hooks: Header of a section on 
[[Special:Statistics]] containing data provided by MediaWiki extensions,
statistics-articles: Used in [[Special:Statistics]].\n\nA 'content 
page' is a page that forms part of the purpose of the wiki. It includes the 
main page and pages in the main namespace and any other namespaces that are 
included when the wiki is customised. For example on Wikimedia Commons 'content 
pages' include pages in the file and category namespaces. On Wikinews 'content 
pages' include pages in the Portal namespace. For technical definition of 
'content namespaces' see 
[[mw:Manual:Using_custom_namespaces#Content_namespaces|MediaWiki]].\n\nPossible 
alternatives to the word 'content' are 'subject matter' or 'wiki subject' or 
'wiki purpose'.\n\n{{Identical|Content page}},
+   statistics-articles-desc: Caption shown below ''Content pages'' on 
[[Special:Statistics]],
statistics-pages: Used in 
[[Special:Statistics]]\n{{Identical|Page}},
statistics-pages-desc: 

[MediaWiki-commits] [Gerrit] Upgrade to jscs 2.0 - change (mediawiki...Wikibase)

2015-07-28 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Upgrade to jscs 2.0
..

Upgrade to jscs 2.0

Disable some rules that we don't yet follow.
Ignore extensions directory that may be there from composer.

Bug: T107124
Change-Id: I40763f23ad907bb5dbe496fad370d22df0d091be
---
M .jscsrc
M package.json
2 files changed, 18 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/47/227447/1

diff --git a/.jscsrc b/.jscsrc
index f66f6bd..312c030 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -3,12 +3,26 @@
preset: wikimedia,
 
// 
-   // Rules from wikimedia preset we don't follow
+   // Rules from wikimedia preset we don't yet? follow
 
validateIndentation: null,
requireMultipleVarDecl: null,
disallowDanglingUnderscores: null,
-   requireSpacesInsideArrayBrackets: null,
+   requireSpacesInsideBrackets: null,
+   requireVarDeclFirst: null,
+   jsDoc: {
+   // what we don't yet follow is commented out
+   //checkAnnotations: jsduck5,
+   //checkParamNames: true,
+   requireParamTypes: true,
+   checkRedundantParams: true,
+   //checkReturnTypes: true,
+   checkRedundantReturns: true,
+   //requireReturnTypes: true,
+   //checkTypes: capitalizedNativeCase,
+   checkRedundantAccess: true
+   //requireNewlineAfterDescription: true
+   },
 
// 
// Own rules
@@ -24,5 +38,5 @@
else
],
 
-   excludeFiles: [ node_modules/**, vendor/** ]
+   excludeFiles: [ node_modules/**, vendor/**, extensions/** ]
 }
diff --git a/package.json b/package.json
index 2e22208..43022cd 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,7 @@
author: The Wikidata team,
license: GPL-2.0+,
devDependencies: {
-   jscs: ,
+   jscs: =2.0,
jshint: 
}
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/227447
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I40763f23ad907bb5dbe496fad370d22df0d091be
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: wmf/1.26wmf16
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Don't assume ve exists - change (mediawiki...Flow)

2015-07-28 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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

Change subject: Don't assume ve exists
..

Don't assume ve exists

We properly check isSupported before actually using any ve code,
but we blindly pass variable 've' even though it may not exist,
causing a:
ReferenceError: ve is not defined
This is not actually breaking anything, just some console noise.

Change-Id: Ie04298960cad187d920e230c2c91f691936b405d
---
M modules/editor/editors/visualeditor/ext.flow.editors.visualeditor.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/48/227448/1

diff --git 
a/modules/editor/editors/visualeditor/ext.flow.editors.visualeditor.js 
b/modules/editor/editors/visualeditor/ext.flow.editors.visualeditor.js
index 4725051..e9e6071 100644
--- a/modules/editor/editors/visualeditor/ext.flow.editors.visualeditor.js
+++ b/modules/editor/editors/visualeditor/ext.flow.editors.visualeditor.js
@@ -215,4 +215,4 @@
);
};
 
-}( jQuery, mediaWiki, OO, ve ) );
+}( jQuery, mediaWiki, OO, ve ? ve : null ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/227448
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie04298960cad187d920e230c2c91f691936b405d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Consistent wording of tog-enotifwatchlistpages - change (mediawiki/core)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Consistent wording of tog-enotifwatchlistpages
..


Consistent wording of tog-enotifwatchlistpages

Improve the grammar of this message itself and refer to it using {{int:}}
from apihelp-setnotificationtimestamp-description,
instead of duplicating it.

Change-Id: Ie29c22607ff0176a602a1d695edda12baee18781
---
M includes/api/i18n/en.json
M languages/i18n/en.json
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Anomie: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json
index 46440e5..639611a 100644
--- a/includes/api/i18n/en.json
+++ b/includes/api/i18n/en.json
@@ -1059,7 +1059,7 @@
apihelp-rsd-description: Export an RSD (Really Simple Discovery) 
schema.,
apihelp-rsd-example-simple: Export the RSD schema.,
 
-   apihelp-setnotificationtimestamp-description: Update the 
notification timestamp for watched pages.\n\nThis affects the highlighting of 
changed pages in the watchlist and history, and the sending of email when the 
\Email me when a page on my watchlist is changed\ preference is enabled.,
+   apihelp-setnotificationtimestamp-description: Update the 
notification timestamp for watched pages.\n\nThis affects the highlighting of 
changed pages in the watchlist and history, and the sending of email when the 
\{{int:tog-enotifwatchlistpages}}\ preference is enabled.,
apihelp-setnotificationtimestamp-param-entirewatchlist: Work on all 
watched pages.,
apihelp-setnotificationtimestamp-param-timestamp: Timestamp to which 
to set the notification timestamp.,
apihelp-setnotificationtimestamp-param-torevid: Revision to set the 
notification timestamp to (one page only).,
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 97f1310..3a02068 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -21,7 +21,7 @@
tog-minordefault: Mark all edits minor by default,
tog-previewontop: Show preview before edit box,
tog-previewonfirst: Show preview on first edit,
-   tog-enotifwatchlistpages: Email me when a page or file on my 
watchlist is changed,
+   tog-enotifwatchlistpages: Email me when a page or a file on my 
watchlist is changed,
tog-enotifusertalkpages: Email me when my user talk page is changed,
tog-enotifminoredits: Email me also for minor edits of pages and 
files,
tog-enotifrevealaddr: Reveal my email address in notification 
emails,

-- 
To view, visit https://gerrit.wikimedia.org/r/227265
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie29c22607ff0176a602a1d695edda12baee18781
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Clear the stat cache in addMissingMetadata() to avoid more P... - change (mediawiki/core)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Clear the stat cache in addMissingMetadata() to avoid more POSTs
..


Clear the stat cache in addMissingMetadata() to avoid more POSTs

Change-Id: Icc075e424bdbed6868692ec734dff1e7d2003dd6
---
M includes/filebackend/SwiftFileBackend.php
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Gilles: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/filebackend/SwiftFileBackend.php 
b/includes/filebackend/SwiftFileBackend.php
index 2ccafe4..1aab033 100644
--- a/includes/filebackend/SwiftFileBackend.php
+++ b/includes/filebackend/SwiftFileBackend.php
@@ -693,6 +693,8 @@
'headers' = 
$this-authTokenHeaders( $auth ) + $objHdrs
) );
if ( $rcode = 200  $rcode = 299 ) {
+   $this-deleteFileCache( $path );
+
return $objHdrs; // success
}
}

-- 
To view, visit https://gerrit.wikimedia.org/r/226332
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icc075e424bdbed6868692ec734dff1e7d2003dd6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fixed various FileBackendDBRepoWrapper errors found in IDE - change (mediawiki/core)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fixed various FileBackendDBRepoWrapper errors found in IDE
..


Fixed various FileBackendDBRepoWrapper errors found in IDE

Change-Id: I8bf5a1a01ecaae24ffb53eb05896d3d5fc200abf
---
M includes/filerepo/FileBackendDBRepoWrapper.php
1 file changed, 7 insertions(+), 8 deletions(-)

Approvals:
  Gilles: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/filerepo/FileBackendDBRepoWrapper.php 
b/includes/filerepo/FileBackendDBRepoWrapper.php
index 0401d0c..c83e5b1 100644
--- a/includes/filerepo/FileBackendDBRepoWrapper.php
+++ b/includes/filerepo/FileBackendDBRepoWrapper.php
@@ -46,7 +46,7 @@
protected $dbHandleFunc;
/** @var ProcessCacheLRU */
protected $resolvedPathCache;
-   /** @var Array Map of (index = DBConnRef) */
+   /** @var DBConnRef[] */
protected $dbs;
 
public function __construct( array $config ) {
@@ -95,7 +95,6 @@
 */
public function getBackendPaths( array $paths, $latest = true ) {
$db = $this-getDB( $latest ? DB_MASTER : DB_SLAVE );
-   $origBasePath = $this-backend-getContainerStoragePath( 
{$this-repoName}-original );
 
// @TODO: batching
$resolved = array();
@@ -105,7 +104,7 @@
continue;
}
 
-   list( , $container, $rel ) = 
FileBackend::splitStoragePath( $path );
+   list( , $container ) = FileBackend::splitStoragePath( 
$path );
 
if ( $container === {$this-repoName}-public ) {
$name = basename( $path );
@@ -258,7 +257,7 @@
}
 
public function getScopedLocksForOps( array $ops, Status $status ) {
-   return $this-backend-getScopedFileLocks( $ops, $status );
+   return $this-backend-getScopedLocksForOps( $ops, $status );
}
 
/**
@@ -271,7 +270,7 @@
 */
public function getPathForSHA1( $sha1 ) {
if ( strlen( $sha1 )  3 ) {
-   throw new MWException( Invalid file SHA-1. );
+   throw new InvalidArgumentException( Invalid file 
SHA-1. );
}
return $this-backend-getContainerStoragePath( 
{$this-repoName}-original ) .
/{$sha1[0]}/{$sha1[1]}/{$sha1[2]}/{$sha1};
@@ -284,11 +283,11 @@
 * @return DBConnRef
 */
protected function getDB( $index ) {
-   if ( !isset( $this-db[$index] ) ) {
+   if ( !isset( $this-dbs[$index] ) ) {
$func = $this-dbHandleFunc;
-   $this-db[$index] = $func( $index );
+   $this-dbs[$index] = $func( $index );
}
-   return $this-db[$index];
+   return $this-dbs[$index];
}
 
/**

-- 
To view, visit https://gerrit.wikimedia.org/r/226121
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8bf5a1a01ecaae24ffb53eb05896d3d5fc200abf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [WIP] Link Previews: TNG - change (apps...wikipedia)

2015-07-28 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: [WIP] Link Previews: TNG
..

[WIP] Link Previews: TNG

For entertainment only! Please hold off on commenting/reviewing for now.

Change-Id: I8326dba91d76b821d5c58550e20544c55d432808
---
M wikipedia/build.gradle
A wikipedia/res/drawable-xxhdpi/checkerboard.png
M wikipedia/res/layout/dialog_link_preview.xml
D wikipedia/res/layout/dialog_link_preview_2.xml
A wikipedia/res/layout/dialog_link_preview_container.xml
A wikipedia/res/layout/item_gallery_thumbnail.xml
A wikipedia/res/menu/menu_link_preview.xml
M wikipedia/res/values/colors.xml
M wikipedia/res/values/strings.xml
M wikipedia/src/main/java/org/wikipedia/history/HistoryFragment.java
M wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
M wikipedia/src/main/java/org/wikipedia/page/gallery/GalleryActivity.java
A 
wikipedia/src/main/java/org/wikipedia/page/gallery/GalleryCollectionWithThumbFetchTask.java
M wikipedia/src/main/java/org/wikipedia/page/gallery/GalleryItem.java
A 
wikipedia/src/main/java/org/wikipedia/page/gallery/GalleryThumbnailScrollView.java
M wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
M 
wikipedia/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewContents.java
M wikipedia/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
M wikipedia/src/main/java/org/wikipedia/page/linkpreview/PreviewFetchTask.java
A 
wikipedia/src/main/java/org/wikipedia/page/linkpreview/SwipeableBottomDialog.java
M wikipedia/src/main/java/org/wikipedia/search/SearchResultsFragment.java
21 files changed, 596 insertions(+), 353 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/51/227451/1

diff --git a/wikipedia/build.gradle b/wikipedia/build.gradle
index d0dd470..a6bb1cd 100644
--- a/wikipedia/build.gradle
+++ b/wikipedia/build.gradle
@@ -115,6 +115,7 @@
 
 compile 'com.android.support:appcompat-v7:22.2.1' // includes support-v4
 compile 'com.android.support:design:22.2.1'
+compile 'com.android.support:recyclerview-v7:22.1.1'
 compile 'com.android.support:percent:22.2.0'
 compile 'com.squareup.okhttp:okhttp-urlconnection:2.4.0'
 compile 'com.squareup.okhttp:okhttp:2.4.0'
diff --git a/wikipedia/res/drawable-xxhdpi/checkerboard.png 
b/wikipedia/res/drawable-xxhdpi/checkerboard.png
new file mode 100644
index 000..e47fd46
--- /dev/null
+++ b/wikipedia/res/drawable-xxhdpi/checkerboard.png
Binary files differ
diff --git a/wikipedia/res/layout/dialog_link_preview.xml 
b/wikipedia/res/layout/dialog_link_preview.xml
index 37db72c..83c7c4f 100755
--- a/wikipedia/res/layout/dialog_link_preview.xml
+++ b/wikipedia/res/layout/dialog_link_preview.xml
@@ -3,36 +3,56 @@
 FrameLayout xmlns:android=http://schemas.android.com/apk/res/android;
 xmlns:tools=http://schemas.android.com/tools;
 android:layout_width=match_parent
-android:layout_height=256dp
-android:orientation=horizontal
+android:layout_height=wrap_content
 android:background=?attr/window_background_color
 
 LinearLayout
 android:layout_width=match_parent
 android:layout_height=match_parent
+android:background=@color/link_preview_background_light
 android:orientation=vertical
 
 LinearLayout
 android:layout_width=match_parent
 android:layout_height=wrap_content
+android:background=@color/link_preview_toolbar_light
 android:orientation=horizontal
+ImageView
+android:id=@+id/link_preview_image
+android:layout_width=72dp
+android:layout_height=72dp
+android:src=@drawable/ic_pageimage_placeholder
+android:contentDescription=@null
+android:scaleType=centerCrop/
 TextView
 android:id=@+id/link_preview_title
 android:layout_width=0dp
 android:layout_height=wrap_content
 android:layout_weight=1
+android:layout_gravity=center_vertical
 style=@style/RtlAwareTextView
-android:paddingTop=18dp
-android:paddingBottom=12dp
-android:paddingLeft=12dp
-android:paddingRight=12dp
+android:padding=12dp
 android:textSize=18sp
 android:fontFamily=serif
 android:lineSpacingMultiplier=0.8
 android:maxLines=2
 android:ellipsize=end
-android:textColor=?attr/link_color
+android:textColor=@android:color/white
 tools:text=Lorem ipsum/
+
+LinearLayout
+android:layout_width=wrap_content
+android:layout_height=wrap_content
+

[MediaWiki-commits] [Gerrit] cassandra: restrict data directory permissions - change (operations/puppet)

2015-07-28 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: cassandra: restrict data directory permissions
..


cassandra: restrict data directory permissions

Bug: T106133
Change-Id: I59d8552cf71890154b127b8f847b9e035fb80b69
---
M modules/cassandra/manifests/init.pp
1 file changed, 17 insertions(+), 0 deletions(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved
  Mobrovac: Looks good to me, but someone else must approve



diff --git a/modules/cassandra/manifests/init.pp 
b/modules/cassandra/manifests/init.pp
index f87d7bb..27ad74e 100644
--- a/modules/cassandra/manifests/init.pp
+++ b/modules/cassandra/manifests/init.pp
@@ -307,6 +307,23 @@
 ensure  = directory,
 owner   = 'cassandra',
 group   = 'cassandra',
+mode= '0750',
+require = Package['cassandra'],
+}
+
+file { $commitlog_directory:
+ensure  = directory,
+owner   = 'cassandra',
+group   = 'cassandra',
+mode= '0750',
+require = Package['cassandra'],
+}
+
+file { $saved_caches_directory:
+ensure  = directory,
+owner   = 'cassandra',
+group   = 'cassandra',
+mode= '0750',
 require = Package['cassandra'],
 }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/225300
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I59d8552cf71890154b127b8f847b9e035fb80b69
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Eevans eev...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: Mobrovac mobro...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Remove LibSerializers in EntityParserOutputGeneFactory - change (mediawiki...Wikibase)

2015-07-28 Thread Addshore (Code Review)
Addshore has uploaded a new change for review.

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

Change subject: Remove LibSerializers in EntityParserOutputGeneFactory
..

Remove LibSerializers in EntityParserOutputGeneFactory

Change-Id: I632833a6091ce0608cdb1240831756656400da03
---
M repo/includes/EntityParserOutputGeneratorFactory.php
M repo/includes/ParserOutputJsConfigBuilder.php
M repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php
3 files changed, 12 insertions(+), 55 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/52/227452/1

diff --git a/repo/includes/EntityParserOutputGeneratorFactory.php 
b/repo/includes/EntityParserOutputGeneratorFactory.php
index ce28add..79c13df 100644
--- a/repo/includes/EntityParserOutputGeneratorFactory.php
+++ b/repo/includes/EntityParserOutputGeneratorFactory.php
@@ -106,7 +106,7 @@
 * @return ParserOutputJsConfigBuilder
 */
private function newParserOutputJsConfigBuilder() {
-   return new ParserOutputJsConfigBuilder( new 
SerializationOptions() );
+   return new ParserOutputJsConfigBuilder();
}
 
/**
diff --git a/repo/includes/ParserOutputJsConfigBuilder.php 
b/repo/includes/ParserOutputJsConfigBuilder.php
index 3a161b6..92beb9e 100644
--- a/repo/includes/ParserOutputJsConfigBuilder.php
+++ b/repo/includes/ParserOutputJsConfigBuilder.php
@@ -2,10 +2,10 @@
 
 namespace Wikibase;
 
+use DataValues\Serializers\DataValueSerializer;
 use FormatJson;
 use Wikibase\DataModel\Entity\Entity;
-use Wikibase\Lib\Serializers\SerializationOptions;
-use Wikibase\Lib\Serializers\LibSerializerFactory;
+use Wikibase\DataModel\SerializerFactory;
 
 /**
  * @since 0.5
@@ -16,27 +16,17 @@
  * @author Daniel Werner
  * @author Daniel Kinzler
  * @author Katie Filbert  aude.w...@gmail.com 
+ * @author Adam Shorland
  */
 class ParserOutputJsConfigBuilder {
 
/**
-* @var SerializationOptions
-*/
-   private $serializationOptions;
-
-   /**
-* @var LibSerializerFactory
+* @var SerializerFactory
 */
private $serializerFactory;
 
-   /**
-* @param SerializationOptions $serializationOptions
-*/
-   public function __construct(
-   SerializationOptions $serializationOptions
-   ) {
-   $this-serializationOptions = $serializationOptions;
-   $this-serializerFactory = new LibSerializerFactory();
+   public function __construct() {
+   $this-serializerFactory = new SerializerFactory( new 
DataValueSerializer() );
}
 
/**
@@ -67,12 +57,9 @@
 * @return string
 */
private function getSerializedEntity( Entity $entity ) {
-   $serializer = $this-serializerFactory-newSerializerForEntity(
-   $entity-getType(),
-   $this-serializationOptions
-   );
+   $serializer = $this-serializerFactory-newEntitySerializer();
 
-   return $serializer-getSerialized( $entity );
+   return $serializer-serialize( $entity );
}
 
 }
diff --git a/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php 
b/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php
index 7808f3e..5cb79f2 100644
--- a/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php
+++ b/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php
@@ -2,7 +2,6 @@
 
 namespace Wikibase\Test;
 
-use Language;
 use MediaWikiTestCase;
 use Wikibase\DataModel\Entity\Entity;
 use Wikibase\DataModel\Entity\EntityIdValue;
@@ -10,8 +9,6 @@
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\DataModel\Snak\PropertyValueSnak;
-use Wikibase\LanguageFallbackChain;
-use Wikibase\LanguageFallbackChainFactory;
 use Wikibase\Lib\Serializers\SerializationOptions;
 use Wikibase\Lib\Serializers\LibSerializerFactory;
 use Wikibase\ParserOutputJsConfigBuilder;
@@ -33,7 +30,7 @@
 * @dataProvider buildProvider
 */
public function testBuild( Entity $entity ) {
-   $configBuilder = $this-getConfigBuilder( 'en', array( 'de', 
'en', 'es', 'fr' ) );
+   $configBuilder = $this-getConfigBuilder();
$configVars = $configBuilder-build( $entity );
 
$this-assertInternalType( 'array', $configVars );
@@ -62,37 +59,10 @@
);
}
 
-   private function getConfigBuilder( $languageCode, array $languageCodes 
) {
-   $configBuilder = new ParserOutputJsConfigBuilder(
-   $this-getSerializationOptions( $languageCode, 
$languageCodes )
-   );
+   private function getConfigBuilder() {
+   $configBuilder = new ParserOutputJsConfigBuilder();
 
return $configBuilder;
-   }
-
-  

[MediaWiki-commits] [Gerrit] Check for l10n cache before sync-wikiversions - change (mediawiki...scap)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Check for l10n cache before sync-wikiversions
..


Check for l10n cache before sync-wikiversions

Abort sync-wikiversions if critical files are missing.

This fixes T100573 by testing for the existence of:
* STAGE/php-$VERSION/cache/l10n/l10n_cache-en.cdb
* STAGE/wmf-config/ExtensionMessages-$VERSION.php

Bug: T100573
Change-Id: I50adefa19c0e3916d25703d78934b743a5f64da7
---
M scap/main.py
M scap/utils.py
2 files changed, 32 insertions(+), 0 deletions(-)

Approvals:
  20after4: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scap/main.py b/scap/main.py
index 70402b0..7861ca4 100644
--- a/scap/main.py
+++ b/scap/main.py
@@ -455,6 +455,20 @@
 def main(self, *extra_args):
 self._assert_auth_sock()
 
+# check for the presence of ExtensionMessages and l10n cache
+# for every branch of mediawiki that is referenced in wikiversions.json
+# to avoid syncing a branch that is lacking these critical files.
+for version, wikidb in self.active_wikiversions().items():
+ext_msg = os.path.join(self.config['stage_dir'],
+'wmf-config', 'ExtensionMessages-%s.php' % version)
+err_msg = 'ExtensionMessages not found in {}' % ext_msg
+utils.check_file_exists(ext_msg, err_msg)
+
+cache_file = os.path.join(self.config['stage_dir'],
+'php-%s' % version, 'cache', 'l10n', 'l10n_cache-en.cdb')
+err_msg = 'l10n cache missing for {}' % version
+utils.check_file_exists(cache_file, err_msg)
+
 mw_install_hosts = utils.read_dsh_hosts_file(
 self.config['dsh_targets'])
 tasks.sync_wikiversions(mw_install_hosts, self.config)
diff --git a/scap/utils.py b/scap/utils.py
index ff1a31d..d4ed209 100644
--- a/scap/utils.py
+++ b/scap/utils.py
@@ -323,6 +323,24 @@
 )
 
 
+def check_exists(path, message=False):
+if not os.path.isfile(path):
+raise IOError(
+errno.ENOENT,
+message or 'Error: %s is not a file.' % path,
+path
+)
+
+
+def check_dir_exists(path, message=False):
+if not os.path.isdir(path):
+raise IOError(
+errno.ENOTDIR,
+message or 'Error: %s is not a directory.' % path,
+path
+)
+
+
 def check_php_opening_tag(path):
 Checks a PHP file to make sure nothing is before the opening ?php
 except for shebangs.

-- 
To view, visit https://gerrit.wikimedia.org/r/226353
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I50adefa19c0e3916d25703d78934b743a5f64da7
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/tools/scap
Gerrit-Branch: master
Gerrit-Owner: 20after4 mmod...@wikimedia.org
Gerrit-Reviewer: 20after4 mmod...@wikimedia.org
Gerrit-Reviewer: BryanDavis bda...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add Joel Krauska to the bastiononly group - change (operations/puppet)

2015-07-28 Thread Muehlenhoff (Code Review)
Muehlenhoff has uploaded a new change for review.

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

Change subject: Add Joel Krauska to the bastiononly group
..

Add Joel Krauska to the bastiononly group

Make jkrauska a member of the bastiononly group to allow him to continue
to log into the MXes via the bastions:
The oit group (of which he is the sole member) has access to the MX
servers to debug connection problems (hieradata/role/common/mail/mx.yaml).

Since yesterday we've enabled base::firewall on the MX servers and the
SSH ferm rules only now permit logins through the bastion hosts.

Change-Id: Ic88dbaa19d3484766baa95288be8c35eb04eacfc
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/49/227449/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index f0d757c..bff1bb9 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -65,7 +65,7 @@
   bastiononly:
 gid: 707
 description: these folks are allowed bastion _only_ access
-members: [jforrester, jmorgan, msyed,
+members: [jforrester, jmorgan, msyed, jkrauska,
   haithams, mhurd, dbrant, kleduc, bsitzmann, deskana,
   jzerebecki, declerambaul, ellery, dduvall, nettrom, mforns, 
jkatz,
   bmansurov, west1, jhernandez, smalyshev, ananthrk, tbayer, 
zfilipin,

-- 
To view, visit https://gerrit.wikimedia.org/r/227449
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic88dbaa19d3484766baa95288be8c35eb04eacfc
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Muehlenhoff mmuhlenh...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add Joel Krauska to the bastiononly group - change (operations/puppet)

2015-07-28 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: Add Joel Krauska to the bastiononly group
..


Add Joel Krauska to the bastiononly group

Make jkrauska a member of the bastiononly group to allow him to continue
to log into the MXes via the bastions:
The oit group (of which he is the sole member) has access to the MX
servers to debug connection problems (hieradata/role/common/mail/mx.yaml).

Since yesterday we've enabled base::firewall on the MX servers and the
SSH ferm rules only now permit logins through the bastion hosts.

Change-Id: Ic88dbaa19d3484766baa95288be8c35eb04eacfc
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Faidon Liambotis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 83f4c33..d726f2e 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -65,7 +65,7 @@
   bastiononly:
 gid: 707
 description: these folks are allowed bastion _only_ access
-members: [jforrester, jmorgan, msyed,
+members: [jforrester, jmorgan, msyed, jkrauska,
   haithams, mhurd, dbrant, kleduc, bsitzmann, deskana,
   jzerebecki, declerambaul, ellery, dduvall, nettrom, mforns, 
jkatz,
   bmansurov, west1, jhernandez, smalyshev, ananthrk, tbayer, 
zfilipin,

-- 
To view, visit https://gerrit.wikimedia.org/r/227449
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic88dbaa19d3484766baa95288be8c35eb04eacfc
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Muehlenhoff mmuhlenh...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] adding user madhuvishy to analytics-admins - change (operations/puppet)

2015-07-28 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: adding user madhuvishy to analytics-admins
..


adding user madhuvishy to analytics-admins

user madhuvishy has been approved to have admin rights as the hdfs user,
this particular group also adds rights to sudo has the users oozie 
hive.

T104020

Change-Id: Id77043ea39d19f29abb7b20672226ba9d9f11f33
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Ottomata: Verified; Looks good to me, approved
  RobH: Looks good to me, but someone else must approve



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index f0d757c..83f4c33 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -223,7 +223,7 @@
 description: Admin access to analytics cluster.
  This will grant shell access on all Analytics Cluster nodes, 
as well
  as the ability to sudo to certain Analytics Cluster system 
users.
-members: [joal]
+members: [joal, madhuvishy]
 privileges: ['ALL = (hdfs)  NOPASSWD: ALL',
  'ALL = (oozie) NOPASSWD: ALL',
  'ALL = (hive)  NOPASSWD: ALL']

-- 
To view, visit https://gerrit.wikimedia.org/r/227357
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id77043ea39d19f29abb7b20672226ba9d9f11f33
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH r...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: RobH r...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Upgrade to jscs 2.0 - change (mediawiki...Wikibase)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Upgrade to jscs 2.0
..


Upgrade to jscs 2.0

Disable some rules that we don't yet follow.
Ignore extensions directory that may be there from composer.

Bug: T107124
Change-Id: I40763f23ad907bb5dbe496fad370d22df0d091be
---
M .jscsrc
M package.json
2 files changed, 18 insertions(+), 4 deletions(-)

Approvals:
  Aude: Looks good to me, approved
  Addshore: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/.jscsrc b/.jscsrc
index f66f6bd..312c030 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -3,12 +3,26 @@
preset: wikimedia,
 
// 
-   // Rules from wikimedia preset we don't follow
+   // Rules from wikimedia preset we don't yet? follow
 
validateIndentation: null,
requireMultipleVarDecl: null,
disallowDanglingUnderscores: null,
-   requireSpacesInsideArrayBrackets: null,
+   requireSpacesInsideBrackets: null,
+   requireVarDeclFirst: null,
+   jsDoc: {
+   // what we don't yet follow is commented out
+   //checkAnnotations: jsduck5,
+   //checkParamNames: true,
+   requireParamTypes: true,
+   checkRedundantParams: true,
+   //checkReturnTypes: true,
+   checkRedundantReturns: true,
+   //requireReturnTypes: true,
+   //checkTypes: capitalizedNativeCase,
+   checkRedundantAccess: true
+   //requireNewlineAfterDescription: true
+   },
 
// 
// Own rules
@@ -24,5 +38,5 @@
else
],
 
-   excludeFiles: [ node_modules/**, vendor/** ]
+   excludeFiles: [ node_modules/**, vendor/**, extensions/** ]
 }
diff --git a/package.json b/package.json
index 2e22208..43022cd 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,7 @@
author: The Wikidata team,
license: GPL-2.0+,
devDependencies: {
-   jscs: ,
+   jscs: =2.0,
jshint: 
}
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/227447
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I40763f23ad907bb5dbe496fad370d22df0d091be
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: wmf/1.26wmf16
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Revert Make label view multiline by default - change (mediawiki...Wikibase)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Revert Make label view multiline by default
..


Revert Make label view multiline by default

This reverts commit
8508d3bf812577920842cfe682739f9594cda478

Bug: T106327
Change-Id: Ic2008f5f0c68fd685aaacc1012732dfc85e9f786
---
M view/resources/jquery/wikibase/jquery.wikibase.labelview.js
M 
view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js
M view/tests/qunit/jquery/wikibase/jquery.wikibase.labelview.tests.js
3 files changed, 13 insertions(+), 23 deletions(-)

Approvals:
  Aude: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/view/resources/jquery/wikibase/jquery.wikibase.labelview.js 
b/view/resources/jquery/wikibase/jquery.wikibase.labelview.js
index 3564a36..0715d96 100644
--- a/view/resources/jquery/wikibase/jquery.wikibase.labelview.js
+++ b/view/resources/jquery/wikibase/jquery.wikibase.labelview.js
@@ -38,7 +38,6 @@
$entityId: '.wikibase-labelview-entityid'
},
value: null,
-   inputNodeName: 'TEXTAREA',
helpMessage: mw.msg( 'wikibase-label-input-help-message' ),
entityId: null,
showEntityId: false
@@ -55,7 +54,6 @@
!( this.options.value instanceof wb.datamodel.Term )
|| !this.options.entityId
|| !this.options.labelsChanger
-   || this.options.inputNodeName !== 'INPUT'  
this.options.inputNodeName !== 'TEXTAREA'
) {
throw new Error( 'Required option not specified 
properly' );
}
@@ -144,7 +142,7 @@
return deferred.resolve().promise();
}
 
-   var $input = $( document.createElement( 
this.options.inputNodeName ) );
+   var $input = $( 'input /' );
 
$input
.addClass( this.widgetFullName + '-input' )
@@ -156,11 +154,6 @@
)
.attr( 'lang', languageCode )
.attr( 'dir', $.util.getDirectionality( languageCode ) )
-   .on( 'keydown.' + this.widgetName, function( event ) {
-   if( event.keyCode === $.ui.keyCode.ENTER ) {
-   event.preventDefault();
-   }
-   } )
.on( 'eachchange.' + this.widgetName, function( event ) {
self._trigger( 'change' );
} );
@@ -170,10 +163,7 @@
}
 
if( $.fn.inputautoexpand ) {
-   $input.inputautoexpand( {
-   expandHeight: true,
-   suppressNewLine: true
-   } );
+   $input.inputautoexpand();
}
 
this.$text.empty().append( $input );
@@ -203,7 +193,7 @@
 */
_afterStopEditing: function( dropValue ) {
if( dropValue  this.options.value.getText() === '' ) {
-   this.$text.children( '.' + this.widgetFullName + 
'-input' ).val( '' );
+   this.$text.children( 'input' ).val( '' );
}
return PARENT.prototype._afterStopEditing.call( this, dropValue 
);
},
@@ -237,7 +227,7 @@
var response = PARENT.prototype._setOption.call( this, key, 
value );
 
if( key === 'disabled'  this.isInEditMode() ) {
-   this.$text.children( '.' + this.widgetFullName + 
'-input' ).prop( 'disabled', value );
+   this.$text.children( 'input' ).prop( 'disabled', value 
);
}
 
return response;
@@ -261,7 +251,7 @@
 
return new wb.datamodel.Term(
this.options.value.getLanguageCode(),
-   $.trim( this.$text.children( '.' + this.widgetFullName 
+ '-input' ).val() )
+   $.trim( this.$text.children( 'input' ).val() )
);
},
 
@@ -270,7 +260,7 @@
 */
focus: function() {
if( this.isInEditMode() ) {
-   this.$text.children( '.' + this.widgetFullName + 
'-input' ).focus();
+   this.$text.children( 'input' ).focus();
} else {
this.element.focus();
}
diff --git 
a/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js
 
b/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js
index 860f792..52be41b 100644
--- 
a/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js
+++ 
b/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js
@@ -196,7 +196,7 @@
} );
 

[MediaWiki-commits] [Gerrit] Provide useful error details when publishing fails - change (mediawiki...ContentTranslation)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Provide useful error details when publishing fails
..


Provide useful error details when publishing fails

From our logs, we see 4 main reasons for publishing failures.
1. Timeout. Related to network.
2. spamblacklist catching URLs in translation.
3. User blocked from editing.
   Now we don't allow these users to see Special:CX at all, see
   Ib6cdcc2e5f6e7fc631e5ff7d1d3a4f812f5fa6a6
4. Parsoid failed to convert the HTML to wikitext.

For all of these, provide a brief hint in the publishing error message.

Testplan:
Here is a way to trick CX and create a publishing error:
Translate any article.
Add a section without any reference to translation.
Clear the paragraph completely. The publish button will get disabled.
Now type a space in the empty paragraph.
The publish button will get enabled again.
Publish the page and get the error:
An error occurred while publishing the translation.
Please try to publish the page again. Error: html cannot be empty.

Bug: T100498
Change-Id: Ia96ec15a4d44c7c1403542bdd1e25660984fad8b
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M modules/publish/ext.cx.publish.js
4 files changed, 21 insertions(+), 5 deletions(-)

Approvals:
  Amire80: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extension.json b/extension.json
index c20fdb5..ea27279 100644
--- a/extension.json
+++ b/extension.json
@@ -631,7 +631,8 @@
cx-publish-page-success,
cx-publish-page-error,
cx-publish-button-publishing,
-   cx-publish-captcha-title
+   cx-publish-captcha-title,
+   unknown-error
]
},
ext.cx.wikibase.link: {
diff --git a/i18n/en.json b/i18n/en.json
index 2d3355b..5a571d8 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -28,7 +28,7 @@
cx-header-all-translations: All translations,
cx-source-view-page: view page,
cx-publish-page-success: Page published at $1,
-   cx-publish-page-error: An error occurred while saving the page. 
Please try to publish the page again.,
+   cx-publish-page-error: An error occurred while publishing the 
translation. Please try to publish the page again. Error: $1,
cx-publish-button: Publish translation,
cx-publish-button-publishing: Publishing...,
cx-publish-summary: Created by translating the page \$1\,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 39098d5..520a025 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -33,7 +33,7 @@
cx-header-all-translations: A link at the top of the translation 
interface to the main Special:ContentTranslation page that lists all 
translations by the user.\n{{Identical|All translations}},
cx-source-view-page: A link that points to the source page under the 
heading of the source column.\n{{Identical|View page}},
cx-publish-page-success: Message shown when page is published 
successfully. Parameters:\n* $1 - Link to the published page,
-   cx-publish-page-error: Error message to display when page saving 
fails.,
+   cx-publish-page-error: Error message to display when page saving 
fails.\n* $1 - Error details,
cx-publish-button: Publish button text in 
[[Special:ContentTranslation]].\n\nAlso used in 
{{msg-mw|Cx-tools-instructions-text6}}.,
cx-publish-button-publishing: Publish button text in 
[[Special:ContentTranslation]], shown while publishing is in progress. Replaces 
{{msg-mw|cx-publish-button}}.\n{{Identical|Publishing}},
cx-publish-summary: This is an automatic edit summary for pages that 
were created by [[Special:ContentTranslation]].\n\nParameters:\n* $1 - the 
source page name,
diff --git a/modules/publish/ext.cx.publish.js 
b/modules/publish/ext.cx.publish.js
index 2ff31eb..03a17e4 100644
--- a/modules/publish/ext.cx.publish.js
+++ b/modules/publish/ext.cx.publish.js
@@ -292,7 +292,9 @@
 * @param {object} details
 */
CXPublish.prototype.onFail = function ( code, details ) {
-   var trace = {
+   var trace, error;
+
+   trace = {
sourceLanguage: mw.cx.sourceLanguage,
targetLanguage: mw.cx.targetLanguage,
sourceTitle: mw.cx.sourceTitle,
@@ -309,7 +311,20 @@
JSON.stringify( details )
);
 
-   mw.hook( 'mw.cx.error' ).fire( mw.msg( 'cx-publish-page-error' 
) );
+   // Try providing useful error information. Unknown by default.
+   error = mw.msg( 'unknown-error' );
+   if ( details.error  details.error.info ) {
+   // 
{servedby:mw,error:{code:blocked,info:You have been blocked 
from 

[MediaWiki-commits] [Gerrit] imagescalers: convert one host to mpm worker - change (operations/puppet)

2015-07-28 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: imagescalers: convert one host to mpm worker
..

imagescalers: convert one host to mpm worker

Change-Id: I652f237ac3e09508214c70b265a04d45d07e90e5
---
A hieradata/hosts/mw1152.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/50/227450/1

diff --git a/hieradata/hosts/mw1152.yaml b/hieradata/hosts/mw1152.yaml
new file mode 100644
index 000..d99de5b
--- /dev/null
+++ b/hieradata/hosts/mw1152.yaml
@@ -0,0 +1,2 @@
+apache::mpm::mpm: worker
+mediawiki::web::mpm_config::mpm: worker

-- 
To view, visit https://gerrit.wikimedia.org/r/227450
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I652f237ac3e09508214c70b265a04d45d07e90e5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] imagescalers: convert one host to mpm worker - change (operations/puppet)

2015-07-28 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: imagescalers: convert one host to mpm worker
..


imagescalers: convert one host to mpm worker

Change-Id: I652f237ac3e09508214c70b265a04d45d07e90e5
---
A hieradata/hosts/mw1152.yaml
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/hieradata/hosts/mw1152.yaml b/hieradata/hosts/mw1152.yaml
new file mode 100644
index 000..d99de5b
--- /dev/null
+++ b/hieradata/hosts/mw1152.yaml
@@ -0,0 +1,2 @@
+apache::mpm::mpm: worker
+mediawiki::web::mpm_config::mpm: worker

-- 
To view, visit https://gerrit.wikimedia.org/r/227450
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I652f237ac3e09508214c70b265a04d45d07e90e5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add an option to disable email notification while defining a... - change (mediawiki...Echo)

2015-07-28 Thread 01tonythomas (Code Review)
01tonythomas has uploaded a new change for review.

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

Change subject: Add an option to disable email notification while defining an 
Echo $notification
..

Add an option to disable email notification while defining an Echo $notification

Bug: T97925
Change-Id: I1fc529c755d930d4657b7f286669483159756c7d
---
M Notifier.php
M includes/formatters/BasicFormatter.php
2 files changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/48/227648/1

diff --git a/Notifier.php b/Notifier.php
index fa4dcb1..4f09dde 100644
--- a/Notifier.php
+++ b/Notifier.php
@@ -31,7 +31,7 @@
 * @return bool
 */
public static function notifyWithEmail( $user, $event ) {
-   global $wgEnableEmail;
+   global $wgEnableEmail, $wgEchoNotifications;
 
if ( !$wgEnableEmail ) {
return false;
@@ -41,6 +41,11 @@
return false;
}
 
+   // The user might turn off email notification for this 
particular event
+   if( 
!$wgEchoNotifications[$event-getType()]['email-notification'] ) {
+   return false;
+   }
+
// Final check on whether to send email for this user  event
if ( !Hooks::run( 'EchoAbortEmailNotification', array( $user, 
$event ) ) ) {
return false;
diff --git a/includes/formatters/BasicFormatter.php 
b/includes/formatters/BasicFormatter.php
index d973acb..c8cc0d5 100644
--- a/includes/formatters/BasicFormatter.php
+++ b/includes/formatters/BasicFormatter.php
@@ -98,6 +98,7 @@
 
// Notification email subject and body
$this-email = array(
+   'notification' = $params['email-notification'],
'subject' = array(
'message' = $params['email-subject-message'],
'params' = $params['email-subject-params']
@@ -127,6 +128,7 @@
'bundle-message' = '',
'bundle-params' = array(),
'payload' = array(),
+   'email-notification' = true,
'email-subject-message' = 'echo-email-subject-default',
'email-subject-params' = array(),
'email-body-batch-message' = 
'echo-email-batch-body-default',

-- 
To view, visit https://gerrit.wikimedia.org/r/227648
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fc529c755d930d4657b7f286669483159756c7d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas 01tonytho...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix typo on the DMCA page - change (wikimedia/TransparencyReport)

2015-07-28 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review.

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

Change subject: Fix typo on the DMCA page
..

Fix typo on the DMCA page

Under the DMCA takedown section, in the Percentage of Requests Granted
box, it says Jul-Dec 2015 when it should be Jan-Jun 2015.

Change-Id: If44cb9693374c05d1b5bbb93782e4e792bd75fda
---
M source/localizable/content.html.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/TransparencyReport 
refs/changes/49/227649/1

diff --git a/source/localizable/content.html.erb 
b/source/localizable/content.html.erb
index 750ab39..459fc3c 100644
--- a/source/localizable/content.html.erb
+++ b/source/localizable/content.html.erb
@@ -215,7 +215,7 @@
   /section
 
   section class=scorecard scorecard_bottom
-h2%= t('dates.jul') % 2015 – %= t('dates.dec') % 2015/h2
+h2%= t('dates.jan') % – %= t('dates.jun') % 2015/h2
 dl
   dt%= t('content.percentage_of_requests_granted') %/dt
   dd14small%/small/dd

-- 
To view, visit https://gerrit.wikimedia.org/r/227649
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If44cb9693374c05d1b5bbb93782e4e792bd75fda
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/TransparencyReport
Gerrit-Branch: master
Gerrit-Owner: Prtksxna psax...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] T99795: Improve handling of calendar dates and introduce XSD... - change (mediawiki...Wikibase)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: T99795: Improve handling of calendar dates and introduce XSD 1.1
..


T99795: Improve handling of calendar dates and introduce XSD 1.1

NB: The default is set to XSD 1.1. I think that's what we want,
but that's a change from what we had before.

Change-Id: Ia8d40797f1731766557336498007c7c6ce24fd72
---
M repo/includes/rdf/DateTimeValueCleaner.php
M repo/includes/rdf/JulianDateTimeValueCleaner.php
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_all.nt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_minimal.nt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_statements.nt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_values.nt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q6_with_qualifiers.nt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q7_refs.nt
M repo/tests/phpunit/data/rdf/Q4_all_statements.nt
M repo/tests/phpunit/data/rdf/Q4_claims.nt
M repo/tests/phpunit/data/rdf/Q4_props.nt
M repo/tests/phpunit/data/rdf/Q4_resolved.nt
M repo/tests/phpunit/data/rdf/Q4_truthy_statements.nt
M repo/tests/phpunit/data/rdf/Q4_values.nt
M repo/tests/phpunit/data/rdf/Q6_qualifiers.nt
M repo/tests/phpunit/data/rdf/Q6_with_qualifiers.nt
M repo/tests/phpunit/data/rdf/Q7_Q9_dedup.nt
M repo/tests/phpunit/data/rdf/Q7_references.nt
M repo/tests/phpunit/data/rdf/Q7_refs.nt
M repo/tests/phpunit/data/rdf/Q8.json
M repo/tests/phpunit/data/rdf/Q8_baddates.nt
M repo/tests/phpunit/data/rdf/TruthyStatementRdfBuilder/Q4_statements.nt
M repo/tests/phpunit/data/rdf/dump_refs.nt
M repo/tests/phpunit/includes/rdf/ComplexValueRdfBuilderTest.php
M repo/tests/phpunit/includes/rdf/DateValueCleanerTest.php
M repo/tests/phpunit/includes/rdf/SimpleValueRdfBuilderTest.php
26 files changed, 275 insertions(+), 170 deletions(-)

Approvals:
  JanZerebecki: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/includes/rdf/DateTimeValueCleaner.php 
b/repo/includes/rdf/DateTimeValueCleaner.php
index c421a41..05ddd7e 100644
--- a/repo/includes/rdf/DateTimeValueCleaner.php
+++ b/repo/includes/rdf/DateTimeValueCleaner.php
@@ -3,6 +3,7 @@
 namespace Wikibase\Rdf;
 
 use DataValues\TimeValue;
+use DataValues\IllegalValueException;
 
 /**
  * Very basic cleaner that assumes the date is Gregorian and only
@@ -13,16 +14,32 @@
 class DateTimeValueCleaner {
 
/**
-* Clean up Wikidata date value in Gregorian calendar
-* - remove + from the start - not all data stores like that
-* - validate month and date value
-* @param string $dateValue
-* @return string Value compatible with xsd:dateTime type
+* Are we using XSD 1.1 standard or XSD 1.0?
+* XSD 1.1 has year 0 and it's 1 BCE
+* XSD 1.0 doesn't have year 0 and year -1 is 1 BCE
+* Internally, 1BCE is represented as -0001, same does PHP
+* @var bool
 */
-   protected function cleanupGregorianValue( $dateValue ) {
-   list( $date, $time ) = explode( 'T', $dateValue, 2 );
-   if ( $date[0] === '-' ) {
-   $minus = '-';
+   protected $xsd11 = true;
+
+   /**
+*
+* @param bool $xsd11 Should we use XSD 1.1 standard?
+*/
+   public function __construct( $xsd11 = true ) {
+   $this-xsd11 = $xsd11;
+   }
+
+   /**
+* Parse date value and fix weird numbers there.
+* @param string $dateValue
+* @throws IllegalValueException
+* @return array Parsed value in parts: $minus, $y, $m, $d, $time
+*/
+   protected function parseDateValue( $dateValue ) {
+   list( $date, $time ) = explode( T, $dateValue, 2 );
+   if ( $date[0] == - ) {
+   $minus = -;
} else {
$minus = '';
}
@@ -31,11 +48,6 @@
$m = (int)$m;
$d = (int)$d;
$y = ltrim( $y, '0' );
-
-   if ( $y === '' ) {
-   // Year 0 is invalid for now, see T94064 for discussion
-   return null;
-   }
 
if ( $m = 0 ) {
$m = 1;
@@ -47,6 +59,37 @@
if ( $d = 0 ) {
$d = 1;
}
+
+   if($y === ) {
+   // Year 0 is invalid for now, see T94064 for discussion
+   throw new IllegalValueException();
+   }
+   return array( $minus, $y, $m, $d, $time );
+   }
+
+   /**
+* Clean up Wikidata date value in Gregorian calendar
+* - remove + from the start - not all data stores like that
+* - validate month and date value
+* @param string $dateValue
+* @param int $precision Date precision constant (e.g. 
TimeValue::PRECISION_SECOND)
+ 

[MediaWiki-commits] [Gerrit] Fix inline-tex input format - change (mediawiki...mathoid)

2015-07-28 Thread Physikerwelt (Code Review)
Physikerwelt has uploaded a new change for review.

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

Change subject: Fix inline-tex input format
..

Fix inline-tex input format

* inline-tex input format was broken in previous commit
* handle input format (type) and output format in the
  same way
* throw an error if an unrecognized input format is used

Change-Id: I2e6758efb9d722d03caf8a6b361d3d04320a21a3
---
M routes/mathoid.js
1 file changed, 21 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mathoid 
refs/changes/57/227457/1

diff --git a/routes/mathoid.js b/routes/mathoid.js
index d14ab47..6c61bc2 100644
--- a/routes/mathoid.js
+++ b/routes/mathoid.js
@@ -39,8 +39,7 @@
 var png = false;
 var img = false;
 //Keep format variables constant
-if (type === tex) {
-type = TeX;
+if (type === TeX || type === inline-TeX ) {
 var sanitizationOutput = texvcjs.check(q);
 // XXX properly handle errors here!
 if (sanitizationOutput.status === '+') {
@@ -54,12 +53,8 @@
 png = app.conf.png  (outFormat === png || outFormat === json);
 svg = app.conf.svg  (outFormat === svg || outFormat === json);
 img = app.conf.img  outFormat === json;
-if (type === mml || type === MathML) {
-type = MathML;
+if ( type === MathML) {
 mml = false; // use the original MathML
-}
-if (type === ascii || type === asciimath) {
-type = AsciiMath;
 }
 if (speakText  outFormat === png) {
 speakText = false;
@@ -127,6 +122,25 @@
 }
 var q = req.body.q;
 var type = (req.body.type || 'tex').toLowerCase();
+switch ( type ) {
+case tex:
+type = TeX;
+break;
+case inline-tex:
+type = inline-TeX;
+break;
+case mml:
+case mathml:
+type = MathML;
+break;
+case ascii:
+case asciimathml:
+case asciimath:
+type = AsciiMath;
+break;
+default :
+emitError(Input format \+type+\ is not recognized!);
+}
 if (req.body.noSpeak){
 speakText = false;
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/227457
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e6758efb9d722d03caf8a6b361d3d04320a21a3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mathoid
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt w...@physikerwelt.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [Core] Add new message to ignore - change (translatewiki)

2015-07-28 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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

Change subject: [Core] Add new message to ignore
..

[Core] Add new message to ignore

https://gerrit.wikimedia.org/r/#/c/226916/

Change-Id: I0b64cc6b74fa778bb2099df488faee0cfc1cbe8b
---
M groups/MediaWiki/MediaWiki.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/58/227458/1

diff --git a/groups/MediaWiki/MediaWiki.yaml b/groups/MediaWiki/MediaWiki.yaml
index eb4f855..6f4b4d8 100644
--- a/groups/MediaWiki/MediaWiki.yaml
+++ b/groups/MediaWiki/MediaWiki.yaml
@@ -502,6 +502,7 @@
 - sp-contributions-footer-anon
 - sp-contributions-footer-newbies
 - specialpages-summary
+- statistics-articles-desc
 - statistics-footer
 - statistics-summary
 - suppressedarticle

-- 
To view, visit https://gerrit.wikimedia.org/r/227458
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b64cc6b74fa778bb2099df488faee0cfc1cbe8b
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [Core] Add new message to ignore - change (translatewiki)

2015-07-28 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: [Core] Add new message to ignore
..


[Core] Add new message to ignore

https://gerrit.wikimedia.org/r/#/c/226916/

Change-Id: I0b64cc6b74fa778bb2099df488faee0cfc1cbe8b
---
M groups/MediaWiki/MediaWiki.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved



diff --git a/groups/MediaWiki/MediaWiki.yaml b/groups/MediaWiki/MediaWiki.yaml
index eb4f855..6f4b4d8 100644
--- a/groups/MediaWiki/MediaWiki.yaml
+++ b/groups/MediaWiki/MediaWiki.yaml
@@ -502,6 +502,7 @@
 - sp-contributions-footer-anon
 - sp-contributions-footer-newbies
 - specialpages-summary
+- statistics-articles-desc
 - statistics-footer
 - statistics-summary
 - suppressedarticle

-- 
To view, visit https://gerrit.wikimedia.org/r/227458
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0b64cc6b74fa778bb2099df488faee0cfc1cbe8b
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Merge branch 'master' into deployment - change (mediawiki...DonationInterface)

2015-07-28 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

1afab3e Parse more of AstroPay's error descriptions
cb1e381 Add country-specific versions of fiscal_number
3b868b0 Check error['context'] to place error messages
ea35c3e Use old error forms for AstroPay fail page
8205cfb Generate new order IDs for each NewInvoice call
4ac357a Move deleteMessage out of legacy antimessage function
4a00d5e Localisation updates from https://translatewiki.net.
fc023c9 Localisation updates from https://translatewiki.net.
85821e3 Localisation updates from https://translatewiki.net.
f801889 Give Japan forms correct selection weight
d3d31c5 Localisation updates from https://translatewiki.net.
643abbe Undo last commit's fiscal number normalization
082a3f5 Validate fiscal number when exists, require for AstroPay
df64fe1 Localisation updates from https://translatewiki.net.

Conflicts:
tests/Adapter/Astropay/AstropayTest.php
tests/Adapter/GatewayAdapterTest.php
tests/Adapter/Worldpay/WorldpayTest.php
tests/DataValidatorTest.php
tests/includes/Responses/astropay/NewInvoice_1.testresponse

Change-Id: Id7f7faae0c5c64f218791c4ae713442642cd7426
---
D tests/Adapter/Astropay/AstropayTest.php
D tests/Adapter/GatewayAdapterTest.php
D tests/Adapter/Worldpay/WorldpayTest.php
D tests/DataValidatorTest.php
D tests/MessageTest.php
D tests/includes/Responses/astropay/NewInvoice_1.testresponse
D tests/includes/Responses/astropay/NewInvoice_collision.testresponse
D tests/includes/Responses/astropay/NewInvoice_could_not_register.testresponse
D tests/includes/Responses/astropay/NewInvoice_fiscal_number.testresponse
D tests/includes/Responses/astropay/NewInvoice_limit_exceeded.testresponse
D tests/includes/Responses/astropay/NewInvoice_user_unauthorized.testresponse
11 files changed, 0 insertions(+), 1,376 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/63/227463/1

diff --git a/tests/Adapter/Astropay/AstropayTest.php 
b/tests/Adapter/Astropay/AstropayTest.php
deleted file mode 100644
index 95d2884..000
--- a/tests/Adapter/Astropay/AstropayTest.php
+++ /dev/null
@@ -1,512 +0,0 @@
- HEAD   (012785 Merge branch 'master' into deployment)
-===
-?php
-/**
- * Wikimedia Foundation
- *
- * LICENSE
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-use \Psr\Log\LogLevel;
-
-/**
- *
- * @group Fundraising
- * @group DonationInterface
- * @group Astropay
- */
-class DonationInterface_Adapter_Astropay_AstropayTest extends 
DonationInterfaceTestCase {
-
-   /**
-* @param $name string The name of the test case
-* @param $data array Any parameters read from a dataProvider
-* @param $dataName string|int The name or index of the data set
-*/
-   function __construct( $name = null, array $data = array(), $dataName = 
'' ) {
-   parent::__construct( $name, $data, $dataName );
-   $this-testAdapterClass = 'TestingAstropayAdapter';
-   }
-
-   function setUp() {
-   parent::setUp();
-   $this-setMwGlobals( array(
-   'wgAstropayGatewayEnabled' = true,
-   ) );
-   }
-
-   function tearDown() {
-   TestingAstropayAdapter::clearGlobalsCache();
-   parent::tearDown();
-   }
-
-   /**
-* Ensure we're setting the right url for each transaction
-* @covers AstropayAdapter::getCurlBaseOpts
-*/
-   function testCurlUrl() {
-   $init = $this-getDonorTestData( 'BR' );
-   $gateway = $this-getFreshGatewayObject( $init );
-   $gateway-setCurrentTransaction( 'NewInvoice' );
-
-   $result = $gateway-getCurlBaseOpts();
-
-   $this-assertEquals(
-   
'https://sandbox.astropay.example.com/api_curl/streamline/NewInvoice',
-   $result[CURLOPT_URL],
-   'Not setting URL to transaction-specific value.'
-   );
-   }
-
-   /**
-* Test the NewInvoice transaction is making a sane request and signing
-* it correctly
-*/
-   function testNewInvoiceRequest() {
-   $init = $this-getDonorTestData( 'BR' );
-   $this-setLanguage( $init['language'] );
- 

[MediaWiki-commits] [Gerrit] Update DonationInterface for deploy - change (mediawiki/core)

2015-07-28 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Update DonationInterface for deploy
..

Update DonationInterface for deploy

Change-Id: I9e4fe7e7514f5a0656f9a86d03a1ae40132f95bb
---
M extensions/DonationInterface
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/65/227465/1

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 0127857..bdbbab5 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
-Subproject commit 0127857d07af386ae4cec9bbb84ad9bde15158b1
+Subproject commit bdbbab52920ca12a2643affa5168c664d0dd157f

-- 
To view, visit https://gerrit.wikimedia.org/r/227465
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e4fe7e7514f5a0656f9a86d03a1ae40132f95bb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_25
Gerrit-Owner: Ejegg eeggles...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] labstore: Do not follow symlinks in create-dbusers - change (operations/puppet)

2015-07-28 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: labstore: Do not follow symlinks in create-dbusers
..

labstore: Do not follow symlinks in create-dbusers

Change-Id: I033baeb6d1a2686e0b5c1de1607a6ee5801e03d0
---
M modules/labstore/files/create-dbusers
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/67/227467/1

diff --git a/modules/labstore/files/create-dbusers 
b/modules/labstore/files/create-dbusers
index 9acc4e6..43e3bb5 100755
--- a/modules/labstore/files/create-dbusers
+++ b/modules/labstore/files/create-dbusers
@@ -60,7 +60,7 @@
 return users
 
 def write_user_file(self, path, content):
-f = os.open(path, os.O_CREAT | os.O_WRONLY)
+f = os.open(path, os.O_CREAT | os.O_WRONLY | os.O_NOFOLLOW)
 try:
 os.write(f, content.encode('utf-8'))
 # uid == gid

-- 
To view, visit https://gerrit.wikimedia.org/r/227467
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I033baeb6d1a2686e0b5c1de1607a6ee5801e03d0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] labstore: Do not follow symlinks in create-dbusers - change (operations/puppet)

2015-07-28 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: labstore: Do not follow symlinks in create-dbusers
..


labstore: Do not follow symlinks in create-dbusers

Change-Id: I033baeb6d1a2686e0b5c1de1607a6ee5801e03d0
---
M modules/labstore/files/create-dbusers
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Yuvipanda: Verified; Looks good to me, approved



diff --git a/modules/labstore/files/create-dbusers 
b/modules/labstore/files/create-dbusers
index 9acc4e6..43e3bb5 100755
--- a/modules/labstore/files/create-dbusers
+++ b/modules/labstore/files/create-dbusers
@@ -60,7 +60,7 @@
 return users
 
 def write_user_file(self, path, content):
-f = os.open(path, os.O_CREAT | os.O_WRONLY)
+f = os.open(path, os.O_CREAT | os.O_WRONLY | os.O_NOFOLLOW)
 try:
 os.write(f, content.encode('utf-8'))
 # uid == gid

-- 
To view, visit https://gerrit.wikimedia.org/r/227467
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I033baeb6d1a2686e0b5c1de1607a6ee5801e03d0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Gather more information about pre rendering 500s - change (mediawiki/core)

2015-07-28 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Gather more information about pre rendering 500s
..

Gather more information about pre rendering 500s

Bug: T106740
Change-Id: I4a1436f1724fcc74d4c1076b21fcdb3b5d58b1de
---
M includes/jobqueue/jobs/ThumbnailRenderJob.php
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/53/227453/1

diff --git a/includes/jobqueue/jobs/ThumbnailRenderJob.php 
b/includes/jobqueue/jobs/ThumbnailRenderJob.php
index a58fa8b..d1d 100644
--- a/includes/jobqueue/jobs/ThumbnailRenderJob.php
+++ b/includes/jobqueue/jobs/ThumbnailRenderJob.php
@@ -50,7 +50,8 @@
return false;
}
} elseif ( $wgUploadThumbnailRenderMethod === 'http' ) {
-   $status = $this-hitThumbUrl( $file, 
$transformParams );
+   $thumbUrl = '';
+   $status = $this-hitThumbUrl( $file, 
$transformParams, $thumbUrl );
 
wfDebug( __METHOD__ . : received status 
{$status}\n );
 
@@ -59,7 +60,7 @@
} elseif ( $status ) {
// Note that this currently happens 
(500) when requesting sizes larger then or
// equal to the original, which is 
harmless.
-   $this-setLastError( __METHOD__ . ': 
incorrect HTTP status ' . $status );
+   $this-setLastError( __METHOD__ . ': 
incorrect HTTP status ' . $status . ' when hitting ' . $thumbUrl );
return false;
} else {
$this-setLastError( __METHOD__ . ': 
HTTP request failure' );
@@ -75,7 +76,7 @@
}
}
 
-   protected function hitThumbUrl( $file, $transformParams ) {
+   protected function hitThumbUrl( $file, $transformParams, $thumbUrl ) {
global $wgUploadThumbnailRenderHttpCustomHost, 
$wgUploadThumbnailRenderHttpCustomDomain;
 
$thumbName = $file-thumbName( $transformParams );

-- 
To view, visit https://gerrit.wikimedia.org/r/227453
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a1436f1724fcc74d4c1076b21fcdb3b5d58b1de
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gilles gdu...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Remove multi-level subdomains from wikipedia.org - change (operations/dns)

2015-07-28 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: Remove multi-level subdomains from wikipedia.org
..


Remove multi-level subdomains from wikipedia.org

Bug: T102814
Change-Id: I539c46cbdd0ade484ec4dd985052c66f0870aca9
---
M templates/wikipedia.org
1 file changed, 0 insertions(+), 8 deletions(-)

Approvals:
  BBlack: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/templates/wikipedia.org b/templates/wikipedia.org
index 4721bac..aba5f77 100644
--- a/templates/wikipedia.org
+++ b/templates/wikipedia.org
@@ -56,14 +56,6 @@
 www 600 IN DYNA geoip!text-addrs
 zh-tw   600 IN DYNA geoip!text-addrs
 
-; Old double-subdomain aliases (bug 31335)
-arbcom.de   600 IN DYNA geoip!text-addrs
-arbcom.en   600 IN DYNA geoip!text-addrs
-arbcom.fi   600 IN DYNA geoip!text-addrs
-arbcom.nl   600 IN DYNA geoip!text-addrs
-wg.en   600 IN DYNA geoip!text-addrs
-
-
 ; All languages will automatically be included here
 {{ geolanglist(zero=True) }}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/227214
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I539c46cbdd0ade484ec4dd985052c66f0870aca9
Gerrit-PatchSet: 2
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Enable VisualEditor for 5% of new accounts on enwiki - change (operations/mediawiki-config)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Enable VisualEditor for 5% of new accounts on enwiki
..


Enable VisualEditor for 5% of new accounts on enwiki

Change-Id: Ibf6b200cf6e9699581284535edbb212d15bf6782
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Thcipriani: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index b7e7a20..e9ce1f2 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12639,6 +12639,7 @@
 // 1 = 100% of new accounts; 2 = 50%; 10 = 10%; 20 = 5%; etc.
 'wmgVisualEditorNewAccountEnableProportion' = array(
'default' = false,
+   'enwiki' = 20,
 ),
 
 // Whether VisualEditor should be enabled for new auto-created accounts on a

-- 
To view, visit https://gerrit.wikimedia.org/r/226338
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf6b200cf6e9699581284535edbb212d15bf6782
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Thcipriani tcipri...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Hygiene: Add new preference for experimental json page load - change (apps...wikipedia)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hygiene: Add new preference for experimental json page load
..


Hygiene: Add new preference for experimental json page load

Renamed the methods for the old HTML preference.
Hide the HTML option in the dev settings to keep it simpler.

Bug: T104714
Change-Id: Ib166e24a63d2ceb7ce064bf7d1dfc683e2f22ef7
---
M wikipedia/res/values/preference_keys.xml
M wikipedia/res/xml/developer_preferences.xml
M wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
M wikipedia/src/main/java/org/wikipedia/settings/Prefs.java
4 files changed, 21 insertions(+), 9 deletions(-)

Approvals:
  Sniedzielski: Looks good to me, approved
  Mholloway: Looks good to me, but someone else must approve
  Niedzielski: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/wikipedia/res/values/preference_keys.xml 
b/wikipedia/res/values/preference_keys.xml
index 9eef114..2de5ee6 100644
--- a/wikipedia/res/values/preference_keys.xml
+++ b/wikipedia/res/values/preference_keys.xml
@@ -21,7 +21,8 @@
 string 
name=preference_key_feature_select_text_and_share_tutorials_enabledfeatureSelectTextAndShareTutorialsEnabled/string
 string 
name=preference_key_toc_tutorial_enabledtocTutorialEnabled/string
 string name=preference_key_show_imagesshowImages/string
-string name=preference_key_exp_page_loadexpPageLoad/string
+string name=preference_key_exp_html_page_loadexpHtmlPageLoad/string
+string name=preference_key_exp_json_page_loadexpJsonPageLoad/string
 string 
name=preference_key_daily_event_time_task_namedailyEventTask/string
 string name=preference_key_login_usernameusername/string
 string name=preference_key_login_passwordpassword/string
diff --git a/wikipedia/res/xml/developer_preferences.xml 
b/wikipedia/res/xml/developer_preferences.xml
index c82e108..5d91908 100644
--- a/wikipedia/res/xml/developer_preferences.xml
+++ b/wikipedia/res/xml/developer_preferences.xml
@@ -17,9 +17,13 @@
 android:key=@string/preference_key_link_preview_version
 android:title=@string/preference_key_link_preview_version /
 
+!--CheckBoxPreference--
+!--android:key=@string/preference_key_exp_html_page_load--
+!--android:title=@string/preference_key_exp_html_page_load /--
+
 CheckBoxPreference
-android:key=@string/preference_key_exp_page_load
-android:title=@string/preference_key_exp_page_load /
+android:key=@string/preference_key_exp_json_page_load
+android:title=@string/preference_key_exp_json_page_load /
 
 /PreferenceCategory
 
diff --git 
a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java 
b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
index 82341ea..ae8710b 100755
--- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
@@ -187,7 +187,7 @@
 super.onCreate(savedInstanceState);
 app = (WikipediaApp) getActivity().getApplicationContext();
 model = new PageViewModel();
-if (Prefs.isExperimentalPageLoadEnabled()) {
+if (Prefs.isExperimentalHtmlPageLoadEnabled()) {
 pageLoadStrategy = new HtmlPageLoadStrategy();
 } else {
 pageLoadStrategy = new JsonPageLoadStrategy();
@@ -310,7 +310,7 @@
 }
 };
 
-if (!Prefs.isExperimentalPageLoadEnabled()) {
+if (!Prefs.isExperimentalHtmlPageLoadEnabled()) {
 
bridge.injectStyleBundle(StyleBundle.getAvailableBundle(StyleBundle.BUNDLE_PAGEVIEW));
 }
 
diff --git a/wikipedia/src/main/java/org/wikipedia/settings/Prefs.java 
b/wikipedia/src/main/java/org/wikipedia/settings/Prefs.java
index 3f54322..7d38748 100644
--- a/wikipedia/src/main/java/org/wikipedia/settings/Prefs.java
+++ b/wikipedia/src/main/java/org/wikipedia/settings/Prefs.java
@@ -215,14 +215,21 @@
 return getBoolean(R.string.preference_key_eventlogging_opt_in, true);
 }
 
-public static boolean isExperimentalPageLoadEnabled() {
-return getBoolean(R.string.preference_key_exp_page_load, false);
+public static boolean isExperimentalHtmlPageLoadEnabled() {
+return getBoolean(R.string.preference_key_exp_html_page_load, false);
 }
 
-public static void setExperimentalPageLoadEnabled(boolean enabled) {
-setBoolean(R.string.preference_key_exp_page_load, enabled);
+public static void setExperimentalHtmlPageLoadEnabled(boolean enabled) {
+setBoolean(R.string.preference_key_exp_html_page_load, enabled);
 }
 
+public static boolean isExperimentalJsonPageLoadEnabled() {
+return getBoolean(R.string.preference_key_exp_json_page_load, false);
+}
+
+public static void 

[MediaWiki-commits] [Gerrit] Add manage-snapshots script - change (operations/puppet)

2015-07-28 Thread coren (Code Review)
coren has uploaded a new change for review.

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

Change subject: Add manage-snapshots script
..

Add manage-snapshots script

This script cleans up snapshots in the specified volume
group vg by discarding:

(a) snapshots that are over 80% full; and
(b) enough snapshots, oldest first, so that there
is at least space terabytes of allocatable space
in the volume group.

Bug: T106474
Change-Id: I098a9081b5c629a5fddcc268a1f6b98fcd08509f
---
A modules/labstore/files/manage-snapshots
1 file changed, 102 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/62/227462/1

diff --git a/modules/labstore/files/manage-snapshots 
b/modules/labstore/files/manage-snapshots
new file mode 100755
index 000..4f91f9c
--- /dev/null
+++ b/modules/labstore/files/manage-snapshots
@@ -0,0 +1,102 @@
+#! /usr/bin/python3
+# -*- coding: utf-8 -*-
+#
+#  Copyright © 2015 Marc-André Pelletier mpellet...@wikimedia.org
+#
+#  Permission to use, copy, modify, and/or distribute this software for any
+#  purpose with or without fee is hereby granted, provided that the above
+#  copyright notice and this permission notice appear in all copies.
+#
+#  THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+#  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+#  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+#  ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+#  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+#  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+#  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#
+#  THIS FILE IS MANAGED BY PUPPET
+#
+#  Source: modules/labstore/manage-snapshots
+#  From:   modules/labstore/manifests/fileserve.rpp
+#
+
+
+manage-snapshots
+
+usage: manage-snapshots vg space
+
+This script cleans up snapshots in the specified volume
+group vg by discarding:
+
+(a) snapshots that are over 80% full; and
+(b) enough snapshots, oldest first, so that there
+is at least space terabytes of allocatable space
+in the volume group.
+
+The script will cowardly refuse to touch any mounted
+snapshot.
+
+
+import argparse
+import subprocess
+import logging
+import re
+
+def parsed_run(*cmd):
+entries = []
+for entry in subprocess.check_output(list(cmd)).decode().splitlines():
+entries.append(list(col.strip() for col in entry.split(':')))
+return entries
+
+def terabytes(num):
+match = re.match(r'^([0-9.]+)t$', num)
+if match:
+return float(match.group(1))
+raise ValueError('Unexpected non-size value %s' % num)
+
+def discard(name):
+if subprocess.call(['/sbin/lvremove', '-f', name]) == 0:
+return True
+return False
+
+parser = argparse.ArgumentParser()
+parser.add_argument('vg', help='Volume group to clean snapshots from')
+parser.add_argument('space', help='Free space to leave in the volume group (in 
terabytes)')
+args = parser.parse_args()
+
+logging.basicConfig(level=logging.INFO, format='%(message)s')
+
+free = None
+for vg in parsed_run('/sbin/vgs', '--separator', ':', '--options', 
'name,size,free', '--units', 't'):
+if vg[0] == args.vg:
+free = terabytes(vg[2])
+if not free:
+raise ValueError('%s is not a volume group' % args.vg)
+
+snapshots = {}
+for lv in parsed_run('/sbin/lvs', '--separator', ':', '--options', 
'vg_name,name,origin,size,snap_percent', '--units', 't'):
+if lv[0] == args.vg:
+match = re.match(r'^(.*?)([0-9]+)$', lv[1])
+if match and match.group(1) == lv[2]:
+snapshots[%s/%s % (lv[0], lv[1])] = (lv[3], lv[4], 
match.group(2))
+
+# sort by timestamp (lexicographically, which works out)
+oldest = sorted(snapshots.items(), key=lambda x: x[1][2])
+
+overfull = []
+for lv, entry in snapshots.items():
+if float(entry[1])  80.0:
+overfull.append(lv)
+if discard(lv):
+free += terabytes(entry[0])
+
+while free  float(args.space):
+if len(oldest)  1:
+break
+if not oldest[0][0] in overfull:
+if discard(oldest[0][0]):
+free += terabytes(oldest[0][1][0])
+oldest.pop(0)
+

-- 
To view, visit https://gerrit.wikimedia.org/r/227462
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I098a9081b5c629a5fddcc268a1f6b98fcd08509f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Merge branch 'master' into deployment - change (mediawiki...DonationInterface)

2015-07-28 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged.

Change subject: Merge branch 'master' into deployment
..


Merge branch 'master' into deployment

1afab3e Parse more of AstroPay's error descriptions
cb1e381 Add country-specific versions of fiscal_number
3b868b0 Check error['context'] to place error messages
ea35c3e Use old error forms for AstroPay fail page
8205cfb Generate new order IDs for each NewInvoice call
4ac357a Move deleteMessage out of legacy antimessage function
4a00d5e Localisation updates from https://translatewiki.net.
fc023c9 Localisation updates from https://translatewiki.net.
85821e3 Localisation updates from https://translatewiki.net.
f801889 Give Japan forms correct selection weight
d3d31c5 Localisation updates from https://translatewiki.net.
643abbe Undo last commit's fiscal number normalization
082a3f5 Validate fiscal number when exists, require for AstroPay
df64fe1 Localisation updates from https://translatewiki.net.

Conflicts:
tests/Adapter/Astropay/AstropayTest.php
tests/Adapter/GatewayAdapterTest.php
tests/Adapter/Worldpay/WorldpayTest.php
tests/DataValidatorTest.php
tests/includes/Responses/astropay/NewInvoice_1.testresponse

Change-Id: Id7f7faae0c5c64f218791c4ae713442642cd7426
---
D tests/Adapter/Astropay/AstropayTest.php
D tests/Adapter/GatewayAdapterTest.php
D tests/Adapter/Worldpay/WorldpayTest.php
D tests/DataValidatorTest.php
D tests/MessageTest.php
D tests/includes/Responses/astropay/NewInvoice_1.testresponse
D tests/includes/Responses/astropay/NewInvoice_collision.testresponse
D tests/includes/Responses/astropay/NewInvoice_could_not_register.testresponse
D tests/includes/Responses/astropay/NewInvoice_fiscal_number.testresponse
D tests/includes/Responses/astropay/NewInvoice_limit_exceeded.testresponse
D tests/includes/Responses/astropay/NewInvoice_user_unauthorized.testresponse
11 files changed, 0 insertions(+), 1,376 deletions(-)

Approvals:
  Ejegg: Looks good to me, approved



diff --git a/tests/Adapter/Astropay/AstropayTest.php 
b/tests/Adapter/Astropay/AstropayTest.php
deleted file mode 100644
index 95d2884..000
--- a/tests/Adapter/Astropay/AstropayTest.php
+++ /dev/null
@@ -1,512 +0,0 @@
- HEAD   (012785 Merge branch 'master' into deployment)
-===
-?php
-/**
- * Wikimedia Foundation
- *
- * LICENSE
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-use \Psr\Log\LogLevel;
-
-/**
- *
- * @group Fundraising
- * @group DonationInterface
- * @group Astropay
- */
-class DonationInterface_Adapter_Astropay_AstropayTest extends 
DonationInterfaceTestCase {
-
-   /**
-* @param $name string The name of the test case
-* @param $data array Any parameters read from a dataProvider
-* @param $dataName string|int The name or index of the data set
-*/
-   function __construct( $name = null, array $data = array(), $dataName = 
'' ) {
-   parent::__construct( $name, $data, $dataName );
-   $this-testAdapterClass = 'TestingAstropayAdapter';
-   }
-
-   function setUp() {
-   parent::setUp();
-   $this-setMwGlobals( array(
-   'wgAstropayGatewayEnabled' = true,
-   ) );
-   }
-
-   function tearDown() {
-   TestingAstropayAdapter::clearGlobalsCache();
-   parent::tearDown();
-   }
-
-   /**
-* Ensure we're setting the right url for each transaction
-* @covers AstropayAdapter::getCurlBaseOpts
-*/
-   function testCurlUrl() {
-   $init = $this-getDonorTestData( 'BR' );
-   $gateway = $this-getFreshGatewayObject( $init );
-   $gateway-setCurrentTransaction( 'NewInvoice' );
-
-   $result = $gateway-getCurlBaseOpts();
-
-   $this-assertEquals(
-   
'https://sandbox.astropay.example.com/api_curl/streamline/NewInvoice',
-   $result[CURLOPT_URL],
-   'Not setting URL to transaction-specific value.'
-   );
-   }
-
-   /**
-* Test the NewInvoice transaction is making a sane request and signing
-* it correctly
-*/
-   function testNewInvoiceRequest() {
-   $init = $this-getDonorTestData( 'BR' );
-   $this-setLanguage( $init['language'] );
-   $_SESSION['Donor']['order_id'] = '123456789';
-   $gateway = 

[MediaWiki-commits] [Gerrit] Bump grunt-banana-checker to 0.2.2 - change (mediawiki...WikidataPageBanner)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Bump grunt-banana-checker to 0.2.2
..


Bump grunt-banana-checker to 0.2.2

Change-Id: Ibba426fc1d16fa5fdeaf3dab8c29369c3d7e2761
---
M package.json
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jdlrobson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/package.json b/package.json
index c14a4cb..16d4081 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,7 @@
   devDependencies: {
 grunt: 0.4.5,
 grunt-cli: 0.1.13,
-grunt-banana-checker: 0.2.1,
+grunt-banana-checker: 0.2.2,
 grunt-contrib-jshint: 0.11.2
   }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/227429
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibba426fc1d16fa5fdeaf3dab8c29369c3d7e2761
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikidataPageBanner
Gerrit-Branch: master
Gerrit-Owner: Paladox thomasmulhall...@yahoo.com
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [WIP] add scripts/interwikidata.py - change (pywikibot/core)

2015-07-28 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

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

Change subject: [WIP] add scripts/interwikidata.py
..

[WIP] add scripts/interwikidata.py

It's interwiki.py but for wikis which work with Wikibase.

Change-Id: Ibbb7047d7e6be7b997577b2ea5d662bd6a361af8
---
A scripts/interwikidata.py
1 file changed, 228 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/54/227454/1

diff --git a/scripts/interwikidata.py b/scripts/interwikidata.py
new file mode 100644
index 000..cfcc794
--- /dev/null
+++ b/scripts/interwikidata.py
@@ -0,0 +1,228 @@
+#!/usr/bin/python
+# -*- coding: UTF-8 -*-
+
+Script to handle interwiki based on Wikidata.
+
+These command line parameters can be used to specify which pages to work on:
+
+params;
+
+Furthermore, the following command line parameters are supported:
+
+-langs: Languages to work on.
+
+-cleanall:  Clean all old interwiki from pages in all languages
+-clean: Clean only determined languages (e.g. -clean:fa,en,de)
+
+-createall: Create item in Wikidata when no interwiki could be found.
+In all languages.
+-create:Create item only in languages determined
+(e.g. -create:en,de)
+
+
+# (C) Pywikibot team, 2015
+#
+# Distributed under the terms of the MIT license.
+#
+from __future__ import unicode_literals
+
+__version__ = '$Id$'
+#
+
+import sys
+
+import pywikibot
+from pywikibot import pagegenerators, CurrentPageBot
+
+# This is required for the text that is shown when you run this script
+# with the parameter -help.
+docuReplacements = {
+'params;': pagegenerators.parameterHelp,
+}
+
+tems = {
+'en': ['Db-meta', 'Article for deletion', 'Proposed deletion'],
+'nl': [u'Nuweg', u'Artikelweg'],
+'de': [u'Löschen'],
+'sv': [uSFFR],
+'fr': [uSuppression],
+'it': [uCancellazione],
+'ru': [uDb-meta],
+'fa': [uDb-meta],
+'es': [uCdb, uPropb],
+'ckb': [u'Db'],
+'ja': [uSakujo],
+'vi': [uDb-meta, uMời biểu quyết, uProposed deletion],
+'pt': [uApagar, uESR],
+'zh': [uAfd],
+'ca': [uSupressió diferida],
+'no': [],
+'sh': ['Db-meta'],
+'fi': [uPoistokeskustelu],
+'cs': [uAfD]}
+
+summaries = {
+'fa': u'ربات: حذف پیوندهای میان‌ویکی که در ویکی‌داده موجود است.',
+'en': u'Bot: Cleaning up interwiki',
+}
+
+langid = {
+'en': 'Q328',
+'sv': 'Q169514',
+'de': 'Q48183',
+'it': 'Q11920',
+'no': 'Q191769',
+'fa': 'Q48952',
+'es': 'Q8449',
+'pl': 'Q1551807',
+'ca': 'Q199693',
+'fr': 'Q8447',
+'nl': 'Q1',
+'pt': 'Q11921',
+'ru': 'Q206855',
+'vi': 'Q200180',
+'be': 'Q877583',
+'uk': 'Q199698',
+'tr': 'Q58255',
+'cs': 'Q191168',
+'sh': 'Q58679',
+}
+
+reg = {
+'en': [\[\[Category\:Living people, \[\[[Cc]ategory\:\d{1,4} births],
+'de': [DONTMATCHSDFSG, \[\[[Kk]ategorie\:Geboren \d{1,4}],
+'nl': [DONTMATCHSDFSG, DONTMATCHSDFSG],
+'sv': [u\[\[[Kk]ategori\:Levande personer, u\[\[[Kk]ategori\:Födda 
\d{1,4}],
+'fr': [u\[\[DONTMATCHSDFSG, u\[\[[Cc]atégorie\:Naissance en \d{1,4}],
+'it': [u\[\[[Cc]ategoria\:Persone viventi, u\[\[[Cc]ategoria\:Nati nel 
\d{1,4}],
+'ru': [u\[\[Категория\:Ныне живущие, u\[\[Категория\:Родившиеся в 
\d{1,4} году],
+'es': [u\[\[[Cc]ategoría\:Personas vivas, u\[\[[Cc]ategoría\:Nacidos en 
\d{1,4}],
+'pl': [u\[\[DONTMATCHSDFSG, u\[\[[Kk]ategoria\:Urodzeni w \d{1,4}],
+'ja': [u\[\[Category\:存命人物, u\[\[Category\:\d{1,4}年生],
+'vi': [u\[\[Thể loại\:Nhân vật còn sống, u\[\[Thể loại\:Sinh \d{1,4}],
+'pt': [u\[\[Categoria\:Pessoas vivas, u\[\[Categoria\:Nascidos em 
\d{1,4}],
+'zh': [u\[\[Category\:在世人物, u\[\[Category\:\d{1,4}年出生],
+'ca': [u\[\[Categoria\:Persones vives, u\[\[DONTMATCHSDFSG],
+'no': [u\[\[Kategori\:Biografier om levende personer, 
u\[\[Kategori\:Fødsler i \d{1,4}],
+'fi': [u\[\[Luokka\:Elävät henkilöt, u\[\[Luokka\:Vuonna \d{1,4} 
syntyneet],
+'cs': [u\[\[Kategorie\:Žijící lidé, u\[\[Kategorie\:Narození \d{1,4}],
+'sh': [u\[\[Kategorija\:Rođeni \d{1,4}\., u\[\[Kategorija\:Žive 
ličnosti, u\[\[Kategorija\:Umrli \d{1,4}\.],
+'fa': [u\[\[رده\:افراد زنده, u\[\[رده\: زادگان ],
+}
+
+
+class IWBot(CurrentPageBot):
+docstring for IWBot
+def __init__(self, gen, site, clean=False, create=False):
+super(IWBot, self).__init__(generator=gen)
+self.clean = clean
+self.create = create
+self.repo = site.data_repository()
+
+def treat_page(self):
+if not self.current_page.exists():
+pywikibot.output('%s does not exist, skipping...'
+ % self.current_page.title())
+return
+try:
+item = pywikibot.ItemPage.fromPage(self.current_page)
+except:
+item = 

[MediaWiki-commits] [Gerrit] imagescalers: fix mpm worker config - change (operations/puppet)

2015-07-28 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: imagescalers: fix mpm worker config
..


imagescalers: fix mpm worker config

Change-Id: Iff8c59bd26b36e49d718f1b4b64d823524474f4c
---
M hieradata/hosts/mw1152.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Giuseppe Lavagetto: Verified; Looks good to me, approved



diff --git a/hieradata/hosts/mw1152.yaml b/hieradata/hosts/mw1152.yaml
index d99de5b..c5adaef 100644
--- a/hieradata/hosts/mw1152.yaml
+++ b/hieradata/hosts/mw1152.yaml
@@ -1,2 +1,3 @@
 apache::mpm::mpm: worker
 mediawiki::web::mpm_config::mpm: worker
+mediawiki::web::mpm_config::threads_per_child: 15

-- 
To view, visit https://gerrit.wikimedia.org/r/227460
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff8c59bd26b36e49d718f1b4b64d823524474f4c
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] imagescalers: fix mpm worker config - change (operations/puppet)

2015-07-28 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: imagescalers: fix mpm worker config
..

imagescalers: fix mpm worker config

Change-Id: Iff8c59bd26b36e49d718f1b4b64d823524474f4c
---
M hieradata/hosts/mw1152.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/60/227460/1

diff --git a/hieradata/hosts/mw1152.yaml b/hieradata/hosts/mw1152.yaml
index d99de5b..c5adaef 100644
--- a/hieradata/hosts/mw1152.yaml
+++ b/hieradata/hosts/mw1152.yaml
@@ -1,2 +1,3 @@
 apache::mpm::mpm: worker
 mediawiki::web::mpm_config::mpm: worker
+mediawiki::web::mpm_config::threads_per_child: 15

-- 
To view, visit https://gerrit.wikimedia.org/r/227460
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff8c59bd26b36e49d718f1b4b64d823524474f4c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Hygiene: Extract calculating lead image width - change (apps...wikipedia)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hygiene: Extract calculating lead image width
..


Hygiene: Extract calculating lead image width

And make metadata (mobileview) JSON object key more generic
in preparation of a simpler switch between mobileview and mobile content 
service.

Bug: T104714
Change-Id: I5d71dee14f1e5fa4e15b3a1c1c03c3319523d33a
---
M wikipedia/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
1 file changed, 11 insertions(+), 8 deletions(-)

Approvals:
  Sniedzielski: Looks good to me, approved
  Niedzielski: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git 
a/wikipedia/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java 
b/wikipedia/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
index 7cda167..6daaa82 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
@@ -616,6 +616,7 @@
 private class LeadSectionFetchTask extends SectionsFetchTask {
 private final int startSequenceNum;
 private PageProperties pageProperties;
+private String pagePropsResponseName = mobileview;
 
 public LeadSectionFetchTask(int startSequenceNum) {
 super(app, model.getTitle(), 0);
@@ -628,10 +629,7 @@
 builder.param(prop, builder.getParams().get(prop)
 + |thumb|image|id|revision|description|
 + Page.API_REQUEST_PROPS);
-Resources res = app.getResources();
-builder.param(thumbsize,
-Integer.toString((int) 
(res.getDimension(R.dimen.leadImageWidth)
-/ res.getDisplayMetrics().density)));
+builder.param(thumbsize, 
Integer.toString(calculateLeadImageWidth()));
 return builder;
 }
 
@@ -640,10 +638,10 @@
 if (startSequenceNum != currentSequenceNum) {
 return super.processResult(result);
 }
-JSONObject mobileView = 
result.asObject().optJSONObject(mobileview);
-if (mobileView != null) {
-pageProperties = new PageProperties(mobileView);
-
model.setTitle(fragment.adjustPageTitleFromMobileview(model.getTitle(), 
mobileView));
+JSONObject metadata = 
result.asObject().optJSONObject(pagePropsResponseName);
+if (metadata != null) {
+pageProperties = new PageProperties(metadata);
+
model.setTitle(fragment.adjustPageTitleFromMobileview(model.getTitle(), 
metadata));
 }
 return super.processResult(result);
 }
@@ -705,6 +703,11 @@
 }
 }
 
+private int calculateLeadImageWidth() {
+Resources res = app.getResources();
+return (int) (res.getDimension(R.dimen.leadImageWidth) / 
res.getDisplayMetrics().density);
+}
+
 private class RestSectionsFetchTask extends SectionsFetchTask {
 private final int startSequenceNum;
 

-- 
To view, visit https://gerrit.wikimedia.org/r/226674
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d71dee14f1e5fa4e15b3a1c1c03c3319523d33a
Gerrit-PatchSet: 12
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: BearND bsitzm...@wikimedia.org
Gerrit-Reviewer: BearND bsitzm...@wikimedia.org
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org
Gerrit-Reviewer: Dbrant dbr...@wikimedia.org
Gerrit-Reviewer: Mholloway mhollo...@wikimedia.org
Gerrit-Reviewer: Niedzielski sniedziel...@wikimedia.org
Gerrit-Reviewer: Sniedzielski sniedziel...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add extra integration test for EntityAccessor - change (mediawiki...Wikibase)

2015-07-28 Thread Addshore (Code Review)
Addshore has uploaded a new change for review.

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

Change subject: Add extra integration test for EntityAccessor
..

Add extra integration test for EntityAccessor

I am abuot to touch this and would prefer
not to break it ... ;)

Change-Id: Ie9d42fcfce4502a945b353ec96b090f7d781386d
---
M client/tests/phpunit/includes/DataAccess/Scribunto/EntityAccessorTest.php
1 file changed, 153 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/64/227464/1

diff --git 
a/client/tests/phpunit/includes/DataAccess/Scribunto/EntityAccessorTest.php 
b/client/tests/phpunit/includes/DataAccess/Scribunto/EntityAccessorTest.php
index bde8949..466e901 100644
--- a/client/tests/phpunit/includes/DataAccess/Scribunto/EntityAccessorTest.php
+++ b/client/tests/phpunit/includes/DataAccess/Scribunto/EntityAccessorTest.php
@@ -2,6 +2,7 @@
 
 namespace Wikibase\Client\Tests\DataAccess\Scribunto;
 
+use DataValues\StringValue;
 use Language;
 use ReflectionMethod;
 use Wikibase\Client\DataAccess\Scribunto\EntityAccessor;
@@ -12,6 +13,13 @@
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\ItemId;
+use Wikibase\DataModel\Entity\PropertyId;
+use Wikibase\DataModel\Reference;
+use Wikibase\DataModel\ReferenceList;
+use Wikibase\DataModel\SiteLink;
+use Wikibase\DataModel\Snak\PropertySomeValueSnak;
+use Wikibase\DataModel\Snak\PropertyValueSnak;
+use Wikibase\DataModel\Snak\SnakList;
 use Wikibase\LanguageFallbackChainFactory;
 use Wikibase\Lib\Store\EntityLookup;
 use Wikibase\Test\MockRepository;
@@ -39,9 +47,10 @@
 
private function getEntityAccessor(
EntityLookup $entityLookup = null,
-   UsageAccumulator $usageAccumulator = null
+   UsageAccumulator $usageAccumulator = null,
+   $langCode = 'en'
) {
-   $language = new Language( 'en' );
+   $language = new Language( $langCode );
 
$propertyDataTypeLookup = $this-getMock( 
'Wikibase\DataModel\Entity\PropertyDataTypeLookup' );
$propertyDataTypeLookup-expects( $this-any() )
@@ -56,7 +65,7 @@
$termsLanguages = $this-getMock( 
'Wikibase\Lib\ContentLanguages' );
$termsLanguages-expects( $this-any() )
-method( 'getLanguages' )
-   -will( $this-returnValue( array( 'de', 'en', 'es', 
'ja' ) ) );
+   -will( $this-returnValue( array( 'de', $langCode, 
'es', 'ja' ) ) );
 
return new EntityAccessor(
new BasicEntityIdParser(),
@@ -166,4 +175,145 @@
);
}
 
+   public function testFullEntityGetEntityResponse() {
+   $item = new Item( new ItemId( 'Q123098' ) );
+
+   //Basic
+   $item-setLabel( 'de', 'foo-de' );
+   $item-setLabel( 'qu', 'foo-qu' );
+   $item-addAliases( 'en', array( 'bar', 'baz' ) );
+   $item-addAliases( 'de-formal', array( 'bar', 'baz' ) );
+   $item-setDescription( 'en', 'en-desc' );
+   $item-setDescription( 'pt', 'ptDesc' );
+   $item-addSiteLink( new SiteLink( 'enwiki', 'Berlin', array( 
new ItemId( 'Q333' ) ) ) );
+   $item-addSiteLink( new SiteLink( 'zh_classicalwiki', 
'User:Addshore', array() ) );
+
+   $snak = new PropertyValueSnak( new PropertyId( 'P65' ), new 
StringValue( 'snakStringValue' ) );
+
+   $qualifiers = new SnakList();
+   $qualifiers-addSnak( new PropertyValueSnak( new PropertyId( 
'P65' ), new StringValue( 'string!' ) ) );
+   $qualifiers-addSnak( new PropertySomeValueSnak( new 
PropertyId( 'P65' ) ) );
+
+   $references = new ReferenceList();
+   $referenceSnaks = new SnakList();
+   $referenceSnaks-addSnak( new PropertySomeValueSnak( new 
PropertyId( 'P65' ) ) );
+   $referenceSnaks-addSnak( new PropertySomeValueSnak( new 
PropertyId( 'P68' ) ) );
+   $references-addReference( new Reference( $referenceSnaks ) );
+
+   $guid = 'imaguid';
+   $item-getStatements()-addNewStatement( $snak, $qualifiers, 
$references, $guid );
+
+   $entityLookup = new MockRepository();
+   $entityLookup-putEntity( $item );
+
+   $entityAccessor = $this-getEntityAccessor( $entityLookup, 
null, 'qug' );
+
+   $expected = array(
+   'id' = 'Q123098',
+   'type' = 'item',
+   'labels' = array(
+   'de' = array(
+   'language' = 'de',
+   'value' = 'foo-de',
+   ),
+   ),
+  

[MediaWiki-commits] [Gerrit] Fix app picker on older devices - change (apps...wikipedia)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix app picker on older devices
..


Fix app picker on older devices

- Specify appropriate resource package name.
- Set intent package name.
- Specify some function invariant annotations.

This patch was derived from behavior on actual devices rather than
documentation.

Bug: T106332
Change-Id: Ibbcc0f669f196e8e27c3e828a8305af969429596
---
M wikipedia/src/main/java/org/wikipedia/Utils.java
M wikipedia/src/main/java/org/wikipedia/util/ShareUtils.java
2 files changed, 22 insertions(+), 22 deletions(-)

Approvals:
  Dbrant: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wikipedia/src/main/java/org/wikipedia/Utils.java 
b/wikipedia/src/main/java/org/wikipedia/Utils.java
index 2fce3d0..22e9ed4 100644
--- a/wikipedia/src/main/java/org/wikipedia/Utils.java
+++ b/wikipedia/src/main/java/org/wikipedia/Utils.java
@@ -361,11 +361,8 @@
  * @param uri URI to open in an external browser
  */
 public static void visitInExternalBrowser(final Context context, Uri uri) {
-Intent intent = new Intent();
-intent.setAction(Intent.ACTION_VIEW);
-intent.setData(uri);
-
-Intent chooserIntent = ShareUtils.createChooserIntent(intent, null, 
context);
+Intent chooserIntent = ShareUtils.createChooserIntent(new 
Intent(Intent.ACTION_VIEW, uri),
+null, context);
 if (chooserIntent == null) {
 // This means that there was no way to handle this link.
 // We will just show a toast now. FIXME: Make this more visible?
diff --git a/wikipedia/src/main/java/org/wikipedia/util/ShareUtils.java 
b/wikipedia/src/main/java/org/wikipedia/util/ShareUtils.java
index 3201dac..56a5781 100644
--- a/wikipedia/src/main/java/org/wikipedia/util/ShareUtils.java
+++ b/wikipedia/src/main/java/org/wikipedia/util/ShareUtils.java
@@ -8,6 +8,7 @@
 import android.net.Uri;
 import android.os.Environment;
 import android.os.Parcelable;
+import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
 import android.util.Log;
 import android.widget.Toast;
@@ -156,18 +157,18 @@
 }
 
 @Nullable
-public static Intent createChooserIntent(Intent targetIntent,
- CharSequence chooserTitle,
- Context context) {
+public static Intent createChooserIntent(@NonNull Intent targetIntent,
+ @Nullable CharSequence 
chooserTitle,
+ @NonNull Context context) {
 return createChooserIntent(targetIntent, chooserTitle, context, 
APP_PACKAGE_REGEX);
 }
 
 @Nullable
-public static Intent createChooserIntent(Intent targetIntent,
- CharSequence chooserTitle,
- Context context,
+public static Intent createChooserIntent(@NonNull Intent targetIntent,
+ @Nullable CharSequence 
chooserTitle,
+ @NonNull Context context,
  String packageNameBlacklistRegex) 
{
-ListLabeledIntent intents = queryIntents(context, targetIntent, 
packageNameBlacklistRegex);
+ListIntent intents = queryIntents(context, targetIntent, 
packageNameBlacklistRegex);
 
 if (intents.isEmpty()) {
 return null;
@@ -175,13 +176,13 @@
 
 Intent bestIntent = intents.remove(0);
 return Intent.createChooser(bestIntent, chooserTitle)
-.putExtra(Intent.EXTRA_INITIAL_INTENTS, intents.toArray(new 
Parcelable[0]));
+.putExtra(Intent.EXTRA_INITIAL_INTENTS, intents.toArray(new 
Parcelable[intents.size()]));
 }
 
-public static ListLabeledIntent queryIntents(Context context,
-   Intent targetIntent,
-   String 
packageNameBlacklistRegex) {
-ListLabeledIntent intents = new ArrayList();
+public static ListIntent queryIntents(@NonNull Context context,
+@NonNull Intent targetIntent,
+String packageNameBlacklistRegex) {
+ListIntent intents = new ArrayList();
 for (ResolveInfo intentActivity : queryIntentActivities(targetIntent, 
context)) {
 if (!isIntentActivityBlacklisted(intentActivity, 
packageNameBlacklistRegex)) {
 intents.add(buildLabeledIntent(targetIntent, intentActivity));
@@ -190,24 +191,26 @@
 return intents;
 }
 
-public static ListResolveInfo queryIntentActivities(Intent intent, 
Context context) {
+public static ListResolveInfo queryIntentActivities(Intent intent, 
@NonNull Context 

[MediaWiki-commits] [Gerrit] Add HSTS preload for wikipedia.org, refactor related regexes - change (operations/puppet)

2015-07-28 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: Add HSTS preload for wikipedia.org, refactor related regexes
..

Add HSTS preload for wikipedia.org, refactor related regexes

At this point, all but one of our unified cert domains are clean
in that they have no subdomains that don't match the certs to
worry about.  The odd man out is just wikimedia.org now, which
still needs a special match to only catch the exact hostnames
matching the cert.

This patch aligns the primary regexes for TLS redirects and HSTS
preload to be identical and match any hostname ending in any of
our unified-cert domains other than wikimedia.org.

wikimedia.org is moved to a separate clause for redirects, and
takes the default in the HSTS case (no preload/includesub).

Bug: T104244
Change-Id: If57e7110b6ec23abe26b2ecb3027017b073fa8a8
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 10 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/55/227455/1

diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index 2c626b5..a9f58b9 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -192,8 +192,14 @@
 sub https_recv_redirect {
if (req.request == GET || req.request == HEAD) {
if (req.http.X-Forwarded-Proto != https) {
-   // This filter should exactly match our set of SSL cert 
wildcards
-   if (req.http.Host ~ 
(?i)^([^.]+\.)?(zero\.wikipedia|(m\.)?(wikipedia|wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wikidata|wikimedia|wikimediafoundation|wiktionary|mediawiki))\.org$)
 {
+   // This is all of our unified cert wildcard domains 
which are TLS-clean (cert matches all extant hostnames within)
+   // The lone exception now is wikimedia.org, in the next 
block
+   if (req.http.Host ~ 
(?i)^(^|\.)(wikipedia|wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wikidata|wikimediafoundation|wiktionary|mediawiki)\.org$)
 {
+   set req.http.Location = https://; + 
req.http.Host + req.url;
+   error 751 TLS Redirect;
+   }
+   // wikimedia.org has multi-level subdomains used for 
HTTP for which we have no certs, so they must be avoided here:
+   else if(req.http.Host ~ 
(?i)^([^.]+\.)?(m\.)?wikimedia\.org$) {
// For now, avoid matching commons for MW UAs. 
Ref: T102566
if (!(req.http.Host ~ 
(?i)^commons\.wikimedia\.org$  req.http.User-Agent ~ ^MediaWiki/)) {
set req.http.Location = https://; + 
req.http.Host + req.url;
@@ -221,7 +227,8 @@
// HSTS to reach a client, the client implicitly has to have already
// successfully reached us over HTTPS for the given domainname.
if (req.http.X-Forwarded-Proto == https) {
-   if (req.http.Host ~ 
(?i)(^|\.)(wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wikidata|wikimediafoundation|wiktionary|mediawiki)\.org$)
 {
+   // This is the same regex as the first one in 
https_recv_redirect (all unified except wikimedia.org)
+   if (req.http.Host ~ 
(?i)(^|\.)(wikipedia|wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wikidata|wikimediafoundation|wiktionary|mediawiki)\.org$)
 {
set resp.http.Strict-Transport-Security = 
max-age=31536000; includeSubDomains; preload;
}
else {

-- 
To view, visit https://gerrit.wikimedia.org/r/227455
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If57e7110b6ec23abe26b2ecb3027017b073fa8a8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack bbl...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Don't retry invalid thumbnail requests due to impossible width - change (mediawiki/core)

2015-07-28 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Don't retry invalid thumbnail requests due to impossible width
..

Don't retry invalid thumbnail requests due to impossible width

At the moment this isn't going to work in production, because varnish
turns 400s into 500s. But I'll try to fix that separately.

Bug: T106740
Change-Id: Id156ee4ac986ad2a6d7e49dfe8aa7577764eca11
---
M includes/jobqueue/jobs/ThumbnailRenderJob.php
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/56/227456/1

diff --git a/includes/jobqueue/jobs/ThumbnailRenderJob.php 
b/includes/jobqueue/jobs/ThumbnailRenderJob.php
index d1d..f558c48 100644
--- a/includes/jobqueue/jobs/ThumbnailRenderJob.php
+++ b/includes/jobqueue/jobs/ThumbnailRenderJob.php
@@ -55,11 +55,10 @@
 
wfDebug( __METHOD__ . : received status 
{$status}\n );
 
-   if ( $status === 200 || $status === 301 || 
$status === 302 ) {
+   // 400 happens when requesting a size greater 
or equal than the original
+   if ( $status === 200 || $status === 301 || 
$status === 302 || $status === 400 ) {
return true;
} elseif ( $status ) {
-   // Note that this currently happens 
(500) when requesting sizes larger then or
-   // equal to the original, which is 
harmless.
$this-setLastError( __METHOD__ . ': 
incorrect HTTP status ' . $status . ' when hitting ' . $thumbUrl );
return false;
} else {

-- 
To view, visit https://gerrit.wikimedia.org/r/227456
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id156ee4ac986ad2a6d7e49dfe8aa7577764eca11
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gilles gdu...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Remove LibSerializer from ParserOutputJsConfigBuilderTest - change (mediawiki...Wikibase)

2015-07-28 Thread Addshore (Code Review)
Addshore has uploaded a new change for review.

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

Change subject: Remove LibSerializer from ParserOutputJsConfigBuilderTest
..

Remove LibSerializer from ParserOutputJsConfigBuilderTest

This might be the last usage :O

Change-Id: Icdcfc7352c5cf08b080afa95dbec2e6203ae9a1b
---
M repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php
1 file changed, 3 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/59/227459/1

diff --git a/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php 
b/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php
index 5cb79f2..5f56fa5 100644
--- a/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php
+++ b/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php
@@ -9,9 +9,8 @@
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\DataModel\Snak\PropertyValueSnak;
-use Wikibase\Lib\Serializers\SerializationOptions;
-use Wikibase\Lib\Serializers\LibSerializerFactory;
 use Wikibase\ParserOutputJsConfigBuilder;
+use Wikibase\Repo\WikibaseRepo;
 
 /**
  * @covers Wikibase\ParserOutputJsConfigBuilder
@@ -42,11 +41,8 @@
}
 
public function assertSerializationEqualsEntity( Entity $entity, 
$serialization ) {
-   $serializerFactory = new LibSerializerFactory();
-   $options = new SerializationOptions();
-
-   $unserializer = $serializerFactory-newUnserializerForEntity( 
$entity-getType(), $options );
-   $unserializedEntity = $unserializer-newFromSerialization( 
$serialization );
+   $deserializer = 
WikibaseRepo::getDefaultInstance()-getEntityDeserializer();
+   $unserializedEntity = $deserializer-deserialize( 
$serialization );
 
$this-assertTrue( $unserializedEntity-equals( $entity ), 
'unserialized entity equals entity' );
}

-- 
To view, visit https://gerrit.wikimedia.org/r/227459
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icdcfc7352c5cf08b080afa95dbec2e6203ae9a1b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore addshorew...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] nodepool: stop using diskimage - change (operations/puppet)

2015-07-28 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: nodepool: stop using diskimage
..

nodepool: stop using diskimage

Diskimage is yet another image creation tool and we probably have
enough. Moreover Nodepool would require root access on the machine to
rebuild image periodically.

Stop using diskimage-builder
Switch to `base-image` which instructs Nodepool to use the given image
name provided by the cloud provider (wmflabs)
Change image name from ci-dib-jessie-wikimedia to ci-jessie-wikimedia

RelEng will build and upload the image manually for now.

Change-Id: I27fb0bf5843bfad53ba610da948bc4935f0391df
---
M modules/nodepool/templates/nodepool.yaml.erb
1 file changed, 5 insertions(+), 31 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/61/227461/1

diff --git a/modules/nodepool/templates/nodepool.yaml.erb 
b/modules/nodepool/templates/nodepool.yaml.erb
index 6e0a80e..c6ee675 100644
--- a/modules/nodepool/templates/nodepool.yaml.erb
+++ b/modules/nodepool/templates/nodepool.yaml.erb
@@ -47,8 +47,8 @@
 
 # Jenkins labels
 labels:
-  - name: ci-dib-jessie-wikimedia
-image: ci-dib-jessie-wikimedia
+  - name: ci-jessie-wikimedia
+image: ci-jessie-wikimedia
 #ready-script: ready.sh
 min-ready: 1
 providers:
@@ -69,8 +69,9 @@
 # 'eqiad.wmflabs' is magically added by wmflabs
 template-hostname: '{image.name}-{timestamp}'
 images:
-  - name: ci-dib-jessie-wikimedia
-diskimage: ci-dib-jessie-wikimedia
+  - name: ci-jessie-wikimedia
+# RelEng manually build and upload the image to Glance
+base-image: ci-jessie-wikimedia
 meta:
 properties:
 # Let Horizon/Wikitech display the image (T105015)
@@ -80,30 +81,3 @@
 #setup: setup.sh
 username: jenkins
 private-key: /var/lib/nodepool/.ssh/dib_jenkins_id_rsa
-
-# See doc at http://docs.openstack.org/developer/diskimage-builder/
-diskimages:
-  - name: ci-dib-jessie-wikimedia
-elements:
-  - debian
-  - debian-systemd
-  - cloud-init-datasources
-  - vm
-  - devuser
-  - wikimedia-networking
-  - nodepool-base
-release: jessie
-env-vars:
-  DIB_IMAGE_CACHE: '%= @dib_cache_dir -%'
-  QEMU_IMG_OPTIONS: compat=0.10
-
-  # debian element
-  DIB_RELEASE: jessie
-  DIB_DISTRIBUTION_MIRROR: http://mirrors.wikimedia.org/debian/
-
-  # cloud-init-datasources
-  DIB_CLOUD_INIT_DATASOURCES: Ec2
-
-  # devuser element
-  DIB_DEV_USER_USERNAME: jenkins
-  DIB_DEV_USER_AUTHORIZED_KEYS: 
/var/lib/nodepool/.ssh/dib_jenkins_id_rsa.pub

-- 
To view, visit https://gerrit.wikimedia.org/r/227461
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I27fb0bf5843bfad53ba610da948bc4935f0391df
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar has...@free.fr

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Update DonationInterface for deploy - change (mediawiki/core)

2015-07-28 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged.

Change subject: Update DonationInterface for deploy
..


Update DonationInterface for deploy

Change-Id: I9e4fe7e7514f5a0656f9a86d03a1ae40132f95bb
---
M extensions/DonationInterface
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Ejegg: Verified; Looks good to me, approved



diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 0127857..bdbbab5 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
-Subproject commit 0127857d07af386ae4cec9bbb84ad9bde15158b1
+Subproject commit bdbbab52920ca12a2643affa5168c664d0dd157f

-- 
To view, visit https://gerrit.wikimedia.org/r/227465
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e4fe7e7514f5a0656f9a86d03a1ae40132f95bb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_25
Gerrit-Owner: Ejegg eeggles...@wikimedia.org
Gerrit-Reviewer: Ejegg eeggles...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] phragile: Add role class - change (operations/puppet)

2015-07-28 Thread WMDE-leszek (Code Review)
WMDE-leszek has uploaded a new change for review.

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

Change subject: phragile: Add role class
..

phragile: Add role class

Introduces role::phragile class that can be applied to instances.

Bug: T101235
Change-Id: Ia81a711c1a53f47bd7bbc10d16a4079ceb44b66b
---
A manifests/role/phragile.pp
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/66/227466/1

diff --git a/manifests/role/phragile.pp b/manifests/role/phragile.pp
new file mode 100644
index 000..27736fb
--- /dev/null
+++ b/manifests/role/phragile.pp
@@ -0,0 +1,3 @@
+class role::phragile {
+include ::phragile
+}
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/227466
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia81a711c1a53f47bd7bbc10d16a4079ceb44b66b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: WMDE-leszek leszek.mani...@wikimedia.de

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Cassandra logstash setup - change (operations/puppet)

2015-07-28 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: Cassandra logstash setup
..


Cassandra logstash setup

- Sets up a logstash udp input that uses the json codec on port 11514
- Deploys logstash-logback-encoder artifacts on Cassandra hosts
- Configures Cassandra to use UDP appender

Bug: T100970
Change-Id: Idc5cfc8c5b53e8dac88dbed9e506eee79568903e
---
A files/logstash/filter-logback.conf
M hieradata/common/role/deployment.yaml
M hieradata/labs/deployment-prep/common.yaml
M manifests/role/cassandra.pp
M manifests/role/logstash.pp
M modules/cassandra/manifests/init.pp
A modules/cassandra/manifests/logging.pp
M modules/cassandra/templates/logback.xml.erb
A modules/logstash/manifests/input/udp.pp
A modules/logstash/templates/input/udp.erb
10 files changed, 142 insertions(+), 8 deletions(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved



diff --git a/files/logstash/filter-logback.conf 
b/files/logstash/filter-logback.conf
new file mode 100644
index 000..8af363b
--- /dev/null
+++ b/files/logstash/filter-logback.conf
@@ -0,0 +1,18 @@
+# vim:set sw=2 ts=2 sts=2 et
+# Parse logback input
+filter {
+  if [type] == logback {
+# General message cleanup
+mutate {
+  replace = [ host, %{HOSTNAME} ]
+  add_tag = [ logback, es ]
+}
+
+if [program] == cassandra {
+  mutate {
+replace = [ type,  cassandra ]
+  }
+} # end [program] == cassandra
+
+  } # end [type] == logback
+}
diff --git a/hieradata/common/role/deployment.yaml 
b/hieradata/common/role/deployment.yaml
index e1f020b..9c07329 100644
--- a/hieradata/common/role/deployment.yaml
+++ b/hieradata/common/role/deployment.yaml
@@ -99,3 +99,6 @@
   kartotherian/deploy:
 upstream: https://gerrit.wikimedia.org/r/maps/kartotherian/deploy
 checkout_submodules: true
+  cassandra/logstash-logback-encoder:
+gitfat_enabled: true
+upstream: 
https://gerrit.wikimedia.org/r/operations/software/logstash-logback-encoder
diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index bb44777..7856648 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -60,6 +60,7 @@
 cassandra::seeds:
   - 10.68.17.227
   - 10.68.17.189
+cassandra::logging::logstash_host: 
deployment-logstash2.deployment-prep.eqiad.wmflabs
 restbase::seeds:
   - 10.68.17.227
   - 10.68.17.189
diff --git a/manifests/role/cassandra.pp b/manifests/role/cassandra.pp
index b739097..e23266b 100644
--- a/manifests/role/cassandra.pp
+++ b/manifests/role/cassandra.pp
@@ -4,6 +4,7 @@
 # Parameters to be set by Hiera
 class { '::cassandra': }
 class { '::cassandra::metrics': }
+class { '::cassandra::logging': }
 
 # temporary collector, T78514
 diamond::collector { 'CassandraCollector':
diff --git a/manifests/role/logstash.pp b/manifests/role/logstash.pp
index 00fc2e7..47449c1 100644
--- a/manifests/role/logstash.pp
+++ b/manifests/role/logstash.pp
@@ -31,6 +31,11 @@
 port = 12201,
 }
 
+logstash::input::udp { 'logback':
+port  = 11514,
+codec = 'json',
+}
+
 ## Global pre-processing (10)
 
 logstash::conf { 'filter_strip_ansi_color':
@@ -55,6 +60,11 @@
 priority = 20,
 }
 
+logstash::conf { 'filter_logback':
+source   = 'puppet:///files/logstash/filter-logback.conf',
+priority = 20,
+}
+
 ## Application specific processing (50)
 
 logstash::conf { 'filter_mediawiki':
diff --git a/modules/cassandra/manifests/init.pp 
b/modules/cassandra/manifests/init.pp
index 27ad74e..84e6d9e 100644
--- a/modules/cassandra/manifests/init.pp
+++ b/modules/cassandra/manifests/init.pp
@@ -350,14 +350,6 @@
 require = Package['cassandra'],
 }
 
-file { '/etc/cassandra/logback.xml':
-content = template(${module_name}/logback.xml.erb),
-owner   = 'cassandra',
-group   = 'cassandra',
-mode= '0444',
-require = Package['cassandra'],
-}
-
 # cassandra-rackdc.properties is used by the
 # GossipingPropertyFileSnitch.  Only render
 # it if we are using that endpoint_snitch.
diff --git a/modules/cassandra/manifests/logging.pp 
b/modules/cassandra/manifests/logging.pp
new file mode 100644
index 000..1b2f54a
--- /dev/null
+++ b/modules/cassandra/manifests/logging.pp
@@ -0,0 +1,62 @@
+# == Class: cassandra::logging
+#
+# Configure remote logging for Cassandra
+#
+# === Usage
+# class { '::cassandra::logging':
+# logstash_host = 'logstash1001.eqiad.wmnet',
+# logstash_port = 11514,
+# }
+#
+# === Parameters
+# [*logstash_host*]
+#   The logstash logging server to send to.
+#
+# [*logstash_port*]
+#   The logstash logging server port number.
+
+class cassandra::logging(
+$logstash_host  = 'logstash1003.eqiad.wmnet',
+$logstash_port  = 11514,
+) {
+require ::cassandra
+
+  

[MediaWiki-commits] [Gerrit] Fix inline-tex input format - change (mediawiki...mathoid)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix inline-tex input format
..


Fix inline-tex input format

* inline-tex input format was broken in previous commit
* handle input format (type) and output format in the
  same way
* throw an error if an unrecognized input format is used

Change-Id: I2e6758efb9d722d03caf8a6b361d3d04320a21a3
---
M routes/mathoid.js
M test/features/math/simple.js
2 files changed, 34 insertions(+), 7 deletions(-)

Approvals:
  Mobrovac: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/routes/mathoid.js b/routes/mathoid.js
index d14ab47..3c7ceeb 100644
--- a/routes/mathoid.js
+++ b/routes/mathoid.js
@@ -39,8 +39,7 @@
 var png = false;
 var img = false;
 //Keep format variables constant
-if (type === tex) {
-type = TeX;
+if (type === TeX || type === inline-TeX) {
 var sanitizationOutput = texvcjs.check(q);
 // XXX properly handle errors here!
 if (sanitizationOutput.status === '+') {
@@ -54,12 +53,8 @@
 png = app.conf.png  (outFormat === png || outFormat === json);
 svg = app.conf.svg  (outFormat === svg || outFormat === json);
 img = app.conf.img  outFormat === json;
-if (type === mml || type === MathML) {
-type = MathML;
+if (type === MathML) {
 mml = false; // use the original MathML
-}
-if (type === ascii || type === asciimath) {
-type = AsciiMath;
 }
 if (speakText  outFormat === png) {
 speakText = false;
@@ -127,6 +122,25 @@
 }
 var q = req.body.q;
 var type = (req.body.type || 'tex').toLowerCase();
+switch (type) {
+case tex:
+type = TeX;
+break;
+case inline-tex:
+type = inline-TeX;
+break;
+case mml:
+case mathml:
+type = MathML;
+break;
+case ascii:
+case asciimathml:
+case asciimath:
+type = AsciiMath;
+break;
+default :
+emitError(Input format \+type+\ is not recognized!);
+}
 if (req.body.noSpeak){
 speakText = false;
 }
diff --git a/test/features/math/simple.js b/test/features/math/simple.js
index dd0f172..50f7ed6 100644
--- a/test/features/math/simple.js
+++ b/test/features/math/simple.js
@@ -159,6 +159,19 @@
 assert.deepEqual(res.body.log, F: \\newcommand);
 });
 });
+it(reject invalid input type, function () {
+return preq.post({
+uri: baseURL,
+body: {q: E=mc^2}, type: invalid}
+}).then(function (res) {
+// if we are here, no error was thrown, not good
+throw new Error('Expected an error to be thrown, got status: ' 
+ res.status);
+}, function (res) {
+assert.status(res, 400);
+assert.deepEqual(res.body.success, false);
+assert.deepEqual(res.body.detail, Input format \invalid\ is 
not recognized!);
+});
+});
 });
 
 });

-- 
To view, visit https://gerrit.wikimedia.org/r/227457
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2e6758efb9d722d03caf8a6b361d3d04320a21a3
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/mathoid
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt w...@physikerwelt.de
Gerrit-Reviewer: Mobrovac mobro...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] beta: expand {datacenter} to 'eqiad' - change (integration/config)

2015-07-28 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: beta: expand {datacenter} to 'eqiad'
..

beta: expand {datacenter} to 'eqiad'

Preparation work to change the beta cluster jobs label.

Bug: T72597
Change-Id: I210b99bda5348072073f71d2cf24906070d74895
---
M jjb/beta.yaml
1 file changed, 23 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/40/227440/1

diff --git a/jjb/beta.yaml b/jjb/beta.yaml
index ecaa864..176edb0 100644
--- a/jjb/beta.yaml
+++ b/jjb/beta.yaml
@@ -37,9 +37,9 @@
 # Should be triggered on post merge.
 #
 - job-template:
-name: beta-recompile-math-texvc-{datacenter}
+name: beta-recompile-math-texvc-eqiad
 defaults: beta
-node: deployment-bastion-{datacenter}
+node: deployment-bastion-eqiad
 triggers:
  - zuul
 logrotate:
@@ -62,9 +62,9 @@
 #
 # Set TMPDIR to point to the tmpfs if it exists.
 - job-template:
-name: beta-update-databases-{datacenter}
+name: beta-update-databases-eqiad
 defaults: beta
-node: deployment-bastion-{datacenter}
+node: deployment-bastion-eqiad
 
 builders:
   - global-setup
@@ -99,9 +99,9 @@
 # We simply update the repository on the beta host and do a git reset hard.
 #
 - job-template:
-name: beta-mediawiki-config-update-{datacenter}
+name: beta-mediawiki-config-update-eqiad
 defaults: beta
-node: deployment-bastion-{datacenter}
+node: deployment-bastion-eqiad
 
 # Do not run concurrently with the downstream job
 block-downstream: true
@@ -125,16 +125,16 @@
   failure: false
   fixed: true
   - trigger:
-  project: beta-scap-{datacenter}
+  project: beta-scap-eqiad
 
 # Job updating MediaWiki core+extensions code and refreshing the message
 #
 # This is the poor man auto updating script. We should probably split the
 # script in different part and have the jobs trigger each other.
 - job-template:
-name: beta-code-update-{datacenter}
+name: beta-code-update-eqiad
 defaults: beta
-node: deployment-bastion-{datacenter}
+node: deployment-bastion-eqiad
 
 # Do not run concurrently with the downstream job
 block-downstream: true
@@ -163,12 +163,12 @@
   failure: false
   fixed: true
   - trigger:
-  project: beta-scap-{datacenter}
+  project: beta-scap-eqiad
 
 - job-template:
-name: beta-scap-{datacenter}
+name: beta-scap-eqiad
 defaults: beta
-node: deployment-bastion-{datacenter}
+node: deployment-bastion-eqiad
 
 # Do not run concurrently with upstream jobs
 block-upstream: true
@@ -197,9 +197,9 @@
   fixed: true
 
 - job-template:
-name: beta-parsoid-update-{datacenter}
+name: beta-parsoid-update-eqiad
 defaults: beta
-node: deployment-parsoid-{datacenter}
+node: deployment-parsoid-eqiad
 triggers:
  - zuul
 logrotate:
@@ -220,9 +220,9 @@
   - beta-irc
 
 - job-template:
-name: beta-cxserver-update-{datacenter}
+name: beta-cxserver-update-eqiad
 defaults: beta
-node: deployment-cxserver-{datacenter}
+node: deployment-cxserver-eqiad
 triggers:
  - zuul
 logrotate:
@@ -262,13 +262,11 @@
 
 - project:
 name: beta
-datacenter:
- - eqiad
 jobs:
- - beta-code-update-{datacenter}
- - beta-mediawiki-config-update-{datacenter}
- - beta-cxserver-update-{datacenter}
- - beta-parsoid-update-{datacenter}
- - beta-recompile-math-texvc-{datacenter}
- - beta-scap-{datacenter}
- - beta-update-databases-{datacenter}
+ - beta-code-update-eqiad
+ - beta-mediawiki-config-update-eqiad
+ - beta-cxserver-update-eqiad
+ - beta-parsoid-update-eqiad
+ - beta-recompile-math-texvc-eqiad
+ - beta-scap-eqiad
+ - beta-update-databases-eqiad

-- 
To view, visit https://gerrit.wikimedia.org/r/227440
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I210b99bda5348072073f71d2cf24906070d74895
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] beta: disambiguate Jenkins label from node name - change (integration/config)

2015-07-28 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: beta: disambiguate Jenkins label from node name
..

beta: disambiguate Jenkins label from node name

The bastion node is named deployment-bastion.eqiad with label
deployment-bastion-eqiad.

Disambiguate it by changing the label name to 'BetaClusterBastion'.

Bug: T72597
Change-Id: I46fd0bfc6e26f0a281aa11d08b7fa6da56a717d2
---
M jjb/beta.yaml
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/41/227441/1

diff --git a/jjb/beta.yaml b/jjb/beta.yaml
index 176edb0..bd9e9fc 100644
--- a/jjb/beta.yaml
+++ b/jjb/beta.yaml
@@ -39,7 +39,7 @@
 - job-template:
 name: beta-recompile-math-texvc-eqiad
 defaults: beta
-node: deployment-bastion-eqiad
+node: BetaClusterBastion
 triggers:
  - zuul
 logrotate:
@@ -64,7 +64,7 @@
 - job-template:
 name: beta-update-databases-eqiad
 defaults: beta
-node: deployment-bastion-eqiad
+node: BetaClusterBastion
 
 builders:
   - global-setup
@@ -101,7 +101,7 @@
 - job-template:
 name: beta-mediawiki-config-update-eqiad
 defaults: beta
-node: deployment-bastion-eqiad
+node: BetaClusterBastion
 
 # Do not run concurrently with the downstream job
 block-downstream: true
@@ -134,7 +134,7 @@
 - job-template:
 name: beta-code-update-eqiad
 defaults: beta
-node: deployment-bastion-eqiad
+node: BetaClusterBastion
 
 # Do not run concurrently with the downstream job
 block-downstream: true
@@ -168,7 +168,7 @@
 - job-template:
 name: beta-scap-eqiad
 defaults: beta
-node: deployment-bastion-eqiad
+node: BetaClusterBastion
 
 # Do not run concurrently with upstream jobs
 block-upstream: true

-- 
To view, visit https://gerrit.wikimedia.org/r/227441
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46fd0bfc6e26f0a281aa11d08b7fa6da56a717d2
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] beta: disambiguate Jenkins label from node name - change (integration/config)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: beta: disambiguate Jenkins label from node name
..


beta: disambiguate Jenkins label from node name

The bastion node is named deployment-bastion.eqiad with label
deployment-bastion-eqiad.

Disambiguate it by changing the label name to 'BetaClusterBastion'.

Bug: T72597
Change-Id: I46fd0bfc6e26f0a281aa11d08b7fa6da56a717d2
---
M jjb/beta.yaml
1 file changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Hashar: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/jjb/beta.yaml b/jjb/beta.yaml
index 176edb0..bd9e9fc 100644
--- a/jjb/beta.yaml
+++ b/jjb/beta.yaml
@@ -39,7 +39,7 @@
 - job-template:
 name: beta-recompile-math-texvc-eqiad
 defaults: beta
-node: deployment-bastion-eqiad
+node: BetaClusterBastion
 triggers:
  - zuul
 logrotate:
@@ -64,7 +64,7 @@
 - job-template:
 name: beta-update-databases-eqiad
 defaults: beta
-node: deployment-bastion-eqiad
+node: BetaClusterBastion
 
 builders:
   - global-setup
@@ -101,7 +101,7 @@
 - job-template:
 name: beta-mediawiki-config-update-eqiad
 defaults: beta
-node: deployment-bastion-eqiad
+node: BetaClusterBastion
 
 # Do not run concurrently with the downstream job
 block-downstream: true
@@ -134,7 +134,7 @@
 - job-template:
 name: beta-code-update-eqiad
 defaults: beta
-node: deployment-bastion-eqiad
+node: BetaClusterBastion
 
 # Do not run concurrently with the downstream job
 block-downstream: true
@@ -168,7 +168,7 @@
 - job-template:
 name: beta-scap-eqiad
 defaults: beta
-node: deployment-bastion-eqiad
+node: BetaClusterBastion
 
 # Do not run concurrently with upstream jobs
 block-upstream: true

-- 
To view, visit https://gerrit.wikimedia.org/r/227441
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I46fd0bfc6e26f0a281aa11d08b7fa6da56a717d2
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Avoid exceptions on encodeTitle() INSERT races - change (mediawiki...ShortUrl)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Avoid exceptions on encodeTitle() INSERT races
..


Avoid exceptions on encodeTitle() INSERT races

Bug: T106849
Change-Id: I2a4adb3c0b1a77e0de39c731110289815e87c98a
---
M ShortUrl.utils.php
1 file changed, 36 insertions(+), 14 deletions(-)

Approvals:
  Gilles: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ShortUrl.utils.php b/ShortUrl.utils.php
old mode 100644
new mode 100755
index 5045b77..19db0b9
--- a/ShortUrl.utils.php
+++ b/ShortUrl.utils.php
@@ -22,36 +22,57 @@
 * @param $title Title
 * @return mixed|string
 */
-   public static function encodeTitle( $title ) {
+   public static function encodeTitle( Title $title ) {
global $wgMemc;
 
$memcKey = wfMemcKey( 'shorturls', 'title', md5( 
$title-getPrefixedText() ) );
+
$id = $wgMemc-get( $memcKey );
if ( !$id ) {
-   $dbr = wfGetDB( DB_SLAVE );
-   $entry = $dbr-selectRow(
+   $id = wfGetDB( DB_SLAVE )-selectField(
'shorturls',
-   array( 'su_id' ),
+   'su_id',
array(
'su_namespace' = 
$title-getNamespace(),
'su_title' = $title-getDBkey()
),
__METHOD__
);
-   if ( $entry !== false ) {
-   $id = $entry-su_id;
-   } else {
+
+   // Automatically create an ID for this title if 
missing...
+   if ( !$id ) {
$dbw = wfGetDB( DB_MASTER );
-   $rowData = array(
-   'su_id' = $dbw-nextSequenceValue( 
'shorturls_id_seq' ),
-   'su_namespace' = 
$title-getNamespace(),
-   'su_title' = $title-getDBkey()
+   $dbw-insert(
+   'shorturls',
+   array(
+   'su_id' = 
$dbw-nextSequenceValue( 'shorturls_id_seq' ),
+   'su_namespace' = 
$title-getNamespace(),
+   'su_title' = $title-getDBkey()
+   ),
+   __METHOD__,
+   array( 'IGNORE' )
);
-   $dbw-insert( 'shorturls', $rowData, __METHOD__ 
);
-   $id = $dbw-insertId();
+
+   if ( $dbw-affectedRows() ) {
+   $id = $dbw-insertId();
+   } else {
+   // Raced out; get the winning ID
+   $id = $dbw-selectField(
+   'shorturls',
+   'su_id',
+   array(
+   'su_namespace' = 
$title-getNamespace(),
+   'su_title' = 
$title-getDBkey()
+   ),
+   __METHOD__,
+   array( 'LOCK IN SHARE MODE' ) 
// ignore snapshot
+   );
+   }
}
-   $wgMemc-set( $memcKey, $id, 0 );
+
+   $wgMemc-set( $memcKey, $id );
}
+
return base_convert( $id, 10, 36 );
}
 
@@ -79,6 +100,7 @@
}
$wgMemc-set( $memcKey, $entry, 0 );
}
+
return Title::makeTitle( $entry-su_namespace, $entry-su_title 
);
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/226918
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a4adb3c0b1a77e0de39c731110289815e87c98a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ShortUrl
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org

[MediaWiki-commits] [Gerrit] Revert Make label view multiline by default - change (mediawiki...Wikibase)

2015-07-28 Thread Addshore (Code Review)
Addshore has uploaded a new change for review.

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

Change subject: Revert Make label view multiline by default
..

Revert Make label view multiline by default

This reverts commit 8508d3bf812577920842cfe682739f9594cda478.

Change-Id: Ic2008f5f0c68fd685aaacc1012732dfc85e9f786
---
M view/resources/jquery/wikibase/jquery.wikibase.labelview.js
M 
view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js
M view/tests/qunit/jquery/wikibase/jquery.wikibase.labelview.tests.js
3 files changed, 13 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/42/227442/1

diff --git a/view/resources/jquery/wikibase/jquery.wikibase.labelview.js 
b/view/resources/jquery/wikibase/jquery.wikibase.labelview.js
index 3564a36..0715d96 100644
--- a/view/resources/jquery/wikibase/jquery.wikibase.labelview.js
+++ b/view/resources/jquery/wikibase/jquery.wikibase.labelview.js
@@ -38,7 +38,6 @@
$entityId: '.wikibase-labelview-entityid'
},
value: null,
-   inputNodeName: 'TEXTAREA',
helpMessage: mw.msg( 'wikibase-label-input-help-message' ),
entityId: null,
showEntityId: false
@@ -55,7 +54,6 @@
!( this.options.value instanceof wb.datamodel.Term )
|| !this.options.entityId
|| !this.options.labelsChanger
-   || this.options.inputNodeName !== 'INPUT'  
this.options.inputNodeName !== 'TEXTAREA'
) {
throw new Error( 'Required option not specified 
properly' );
}
@@ -144,7 +142,7 @@
return deferred.resolve().promise();
}
 
-   var $input = $( document.createElement( 
this.options.inputNodeName ) );
+   var $input = $( 'input /' );
 
$input
.addClass( this.widgetFullName + '-input' )
@@ -156,11 +154,6 @@
)
.attr( 'lang', languageCode )
.attr( 'dir', $.util.getDirectionality( languageCode ) )
-   .on( 'keydown.' + this.widgetName, function( event ) {
-   if( event.keyCode === $.ui.keyCode.ENTER ) {
-   event.preventDefault();
-   }
-   } )
.on( 'eachchange.' + this.widgetName, function( event ) {
self._trigger( 'change' );
} );
@@ -170,10 +163,7 @@
}
 
if( $.fn.inputautoexpand ) {
-   $input.inputautoexpand( {
-   expandHeight: true,
-   suppressNewLine: true
-   } );
+   $input.inputautoexpand();
}
 
this.$text.empty().append( $input );
@@ -203,7 +193,7 @@
 */
_afterStopEditing: function( dropValue ) {
if( dropValue  this.options.value.getText() === '' ) {
-   this.$text.children( '.' + this.widgetFullName + 
'-input' ).val( '' );
+   this.$text.children( 'input' ).val( '' );
}
return PARENT.prototype._afterStopEditing.call( this, dropValue 
);
},
@@ -237,7 +227,7 @@
var response = PARENT.prototype._setOption.call( this, key, 
value );
 
if( key === 'disabled'  this.isInEditMode() ) {
-   this.$text.children( '.' + this.widgetFullName + 
'-input' ).prop( 'disabled', value );
+   this.$text.children( 'input' ).prop( 'disabled', value 
);
}
 
return response;
@@ -261,7 +251,7 @@
 
return new wb.datamodel.Term(
this.options.value.getLanguageCode(),
-   $.trim( this.$text.children( '.' + this.widgetFullName 
+ '-input' ).val() )
+   $.trim( this.$text.children( 'input' ).val() )
);
},
 
@@ -270,7 +260,7 @@
 */
focus: function() {
if( this.isInEditMode() ) {
-   this.$text.children( '.' + this.widgetFullName + 
'-input' ).focus();
+   this.$text.children( 'input' ).focus();
} else {
this.element.focus();
}
diff --git 
a/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js
 
b/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js
index 4f7980e..6991629 100644
--- 
a/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js
+++ 

[MediaWiki-commits] [Gerrit] exim: split mailman config into a separate config erb - change (operations/puppet)

2015-07-28 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: exim: split mailman config into a separate config erb
..


exim: split mailman config into a separate config erb

Copy the exim4.conf.SMTP_IMAP_MM.erb  system_filter.conf.erb templates
into separate ones for Mailman/Lists and remove most of the conditionals
in there that do not match the combination of options supplied by
role::mail::lists.

Note that in contrast with the other similar efforts, this does not
remove all the conditionals yet: @enable_mail_relay ones are kept, since
the a) lists is not a mail relay anymore, but b) the config does not
work without this setting right now. This will be cleaned up in a
follow-up commit.

Finally, cleanup the main system_filter.conf.erb from a single
enable_mailman conditionals.

This change is a non-functional change; it has been tested and results
into a zero-diff, excluding whitespace changes and the removal of a
couple of unused/unreferenced domain lists.

Change-Id: Ib10ed4784585a00a940271244fc65823a20a21c9
---
M manifests/mail.pp
A templates/exim/exim4.conf.mailman.erb
M templates/exim/system_filter.conf.erb
A templates/exim/system_filter.conf.mailman.erb
4 files changed, 374 insertions(+), 9 deletions(-)

Approvals:
  Faidon Liambotis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/mail.pp b/manifests/mail.pp
index 3290047..7186ad7 100644
--- a/manifests/mail.pp
+++ b/manifests/mail.pp
@@ -70,6 +70,9 @@
 } elsif $enable_otrs_server {
 $config_template = template('exim/exim4.conf.otrs.erb')
 $filter_template = template('exim/system_filter.conf.otrs.erb')
+} elsif $enable_mailman {
+$config_template = template('exim/exim4.conf.mailman.erb')
+$filter_template = template('exim/system_filter.conf.mailman.erb')
 } else {
 $config_template = template('exim/exim4.conf.SMTP_IMAP_MM.erb')
 $filter_template = template('exim/system_filter.conf.erb')
diff --git a/templates/exim/exim4.conf.mailman.erb 
b/templates/exim/exim4.conf.mailman.erb
new file mode 100644
index 000..2abd5ca
--- /dev/null
+++ b/templates/exim/exim4.conf.mailman.erb
@@ -0,0 +1,352 @@
+# This file is managed by puppet
+
+##
+# Macros #
+##
+
+CONFDIR=/etc/exim4
+
+# Mailman
+MAILMAN_HOME = /usr/lib/mailman
+MAILMAN_LISTS_HOME = /var/lib/mailman
+MAILMAN_WRAP = MAILMAN_HOME/mail/mailman
+MAILMAN_UID = list
+MAILMAN_GID = list
+
+VERP_BOUNCE_LOCALPART_REGEXP = \N^wiki-\w+-\w+-\w+-[+/\w]+$\N
+
+###
+# Main configuration settings #
+###
+
+domainlist system_domains = @
+domainlist local_domains = %= @local_domains.join( : ) %
+domainlist wikimedia_domains = lsearch;CONFDIR/wikimedia_domains
+domainlist verp_domains = %= @verp_domains.join( : ) %
+% if @enable_mail_relay != false %
+domainlist relay_domains = +wikimedia_domains
+% end -%
+
+# a list of domains to always respond defer; used for emergencies or planned 
downtimes
+domainlist defer_domains = lsearch;CONFDIR/defer_domains
+
+# Standard lists
+domainlist legacy_mailman_domains = wikimedia.org : wikipedia.org
+domainlist mailman_domains = lists.wikimedia.org
+domainlist donate_domains = donate.wikimedia.org
+
+hostlist wikimedia_nets = ; %= 
scope.lookupvar('network::constants::all_networks').join( ; ) %
+hostlist relay_from_hosts = ; @[] ; 127.0.0.1 ; ::1 ; % if 
@enable_mail_relay != false -%%= 
scope.lookupvar('network::constants::external_networks').join( ; ) %; 
10.0.0.0/8% end %
+
+# Administration
+log_selector = +address_rewrite +all_parents +delivery_size +deliver_time 
+incoming_interface +incoming_port +smtp_confirmation +smtp_protocol_error 
+smtp_syntax_error +tls_cipher +tls_peerdn
+message_logs = false
+
+# Policy control
+acl_smtp_connect = acl_check_connect
+acl_smtp_rcpt = acl_check_rcpt
+acl_smtp_data = acl_check_data
+
+% if @enable_mail_relay != false then -%
+helo_try_verify_hosts = *
+% end -%
+
+system_filter = CONFDIR/system_filter
+
+# Resource control
+check_spool_space = 50M
+smtp_reserve_hosts = ; 127.0.0.1 ; ::1 ; +wikimedia_nets
+smtp_accept_queue_per_connection = 500
+
+deliver_queue_load_max = 800.0
+queue_only_load = 100.0
+remote_max_parallel = 500
+
+smtp_connect_backlog = 128
+smtp_receive_timeout = 1m
+smtp_accept_max = 4000
+smtp_accept_max_per_host = ${if 
match_ip{$sender_host_address}{+wikimedia_nets}{50}{5}}
+smtp_accept_reserve = 100
+
+# Lookups
+host_lookup = *
+rfc1413_hosts =
+
+# Content filtering
+spamd_address = 127.0.0.1 783
+
+# Other
+never_users = root : daemon : bin
+ignore_bounce_errors_after = 0h
+
+# force Gmail over IPv4 due to reports of bad spam reputation over IPv6
+dns_ipv4_lookup = gmail-smtp-in.l.google.com : aspmx.l.google.com
+
+###
+# Access Control Lists (ACLs) #
+###
+
+begin 

[MediaWiki-commits] [Gerrit] exim: split main MX config into a separate config erb - change (operations/puppet)

2015-07-28 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: exim: split main MX config into a separate config erb
..


exim: split main MX config into a separate config erb

Copy the exim4.conf.SMTP_IMAP_MM.erb template into a separate one for
our primary MXes (incoming/outgoing/wikimail) and remove all the
conditionals in there that do not match the combination of options
supplied by role::mail::mx.

This change is a non-functional change; it has been tested and results
into a zero-diff, excluding whitespace changes and the removal of a
couple of unused/unreferenced domain lists.

Change-Id: I75db34129f693df4e0e8c476e1c78c98684264f9
---
M manifests/mail.pp
A templates/exim/exim4.conf.mx.erb
2 files changed, 388 insertions(+), 0 deletions(-)

Approvals:
  Faidon Liambotis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/mail.pp b/manifests/mail.pp
index 7186ad7..8d6691f 100644
--- a/manifests/mail.pp
+++ b/manifests/mail.pp
@@ -73,6 +73,9 @@
 } elsif $enable_mailman {
 $config_template = template('exim/exim4.conf.mailman.erb')
 $filter_template = template('exim/system_filter.conf.mailman.erb')
+} elsif $enable_mail_relay == 'primary' {
+$config_template = template('exim/exim4.conf.mx.erb')
+$filter_template = template('exim/system_filter.conf.erb')
 } else {
 $config_template = template('exim/exim4.conf.SMTP_IMAP_MM.erb')
 $filter_template = template('exim/system_filter.conf.erb')
diff --git a/templates/exim/exim4.conf.mx.erb b/templates/exim/exim4.conf.mx.erb
new file mode 100644
index 000..79f1efa
--- /dev/null
+++ b/templates/exim/exim4.conf.mx.erb
@@ -0,0 +1,385 @@
+# This file is managed by puppet
+
+##
+# Macros #
+##
+
+CONFDIR=/etc/exim4
+WIKI_INTERFACE=; 208.80.154.91 ; 2620:0:861:3:208:80:154:91
+
+OTRSQUERY=SELECT value0 FROM system_address WHERE 
value0='${quote_mysql:$local_part@$domain}' AND valid_id=1;
+
+VERP_BOUNCE_LOCALPART_REGEXP = \N^wiki-\w+-\w+-\w+-[+/\w]+$\N
+
+###
+# Main configuration settings #
+###
+
+# MySQL lookups (OTRS)
+hide mysql_servers =  m2-master.eqiad.wmnet/otrs/exim/%= 
scope.lookupvar('exim::smtp::otrs_mysql_password') % : 
m2-slave.eqiad.wmnet/otrs/exim/%= 
scope.lookupvar('exim::smtp::otrs_mysql_password') %
+
+# LDAP lookups (Office)
+ldap_default_servers = ldap-mirror.wikimedia.org
+LDAPPASSWORD=%= scope.lookupvar('exim::smtp::smtp_ldap_password') %
+
+domainlist system_domains = @
+domainlist local_domains = %= @local_domains.join( : ) %
+domainlist wikimedia_domains = lsearch;CONFDIR/wikimedia_domains
+domainlist verp_domains = %= @verp_domains.join( : ) %
+domainlist relay_domains = +wikimedia_domains
+
+# a list of domains to always respond defer; used for emergencies or planned 
downtimes
+domainlist defer_domains = lsearch;CONFDIR/defer_domains
+
+# Standard lists
+domainlist legacy_mailman_domains = wikimedia.org : wikipedia.org
+domainlist rt_domains = rt.wikimedia.org
+domainlist phab_domains = phabricator.wikimedia.org
+domainlist donate_domains = donate.wikimedia.org
+
+hostlist wikimedia_nets = ; %= 
scope.lookupvar('network::constants::all_networks').join( ; ) %
+hostlist relay_from_hosts = ; @[] ; 127.0.0.1 ; ::1 ; %= 
scope.lookupvar('network::constants::external_networks').join( ; ) %; 
10.0.0.0/8
+
+# Administration
+log_selector = +address_rewrite +all_parents +delivery_size +deliver_time 
+incoming_interface +incoming_port +smtp_confirmation +smtp_protocol_error 
+smtp_syntax_error +tls_cipher +tls_peerdn
+message_logs = false
+
+# Policy control
+acl_smtp_connect = acl_check_connect
+acl_smtp_rcpt = acl_check_rcpt
+acl_smtp_data = acl_check_data
+
+helo_try_verify_hosts = *
+
+system_filter = CONFDIR/system_filter
+
+# Resource control
+check_spool_space = 50M
+smtp_reserve_hosts = ; 127.0.0.1 ; ::1 ; +wikimedia_nets
+smtp_accept_queue_per_connection = 500
+
+deliver_queue_load_max = 800.0
+queue_only_load = 100.0
+remote_max_parallel = 500
+
+smtp_connect_backlog = 128
+smtp_receive_timeout = 1m
+smtp_accept_max = 4000
+smtp_accept_max_per_host = ${if 
match_ip{$sender_host_address}{+wikimedia_nets}{50}{5}}
+smtp_accept_reserve = 100
+
+# Lookups
+host_lookup = *
+rfc1413_hosts =
+
+# Content filtering
+spamd_address = 127.0.0.1 783
+
+# Other
+never_users = root : daemon : bin
+ignore_bounce_errors_after = 0h
+
+# force Gmail over IPv4 due to reports of bad spam reputation over IPv6
+dns_ipv4_lookup = gmail-smtp-in.l.google.com : aspmx.l.google.com
+
+###
+# Access Control Lists (ACLs) #
+###
+
+begin acl
+
+acl_check_rcpt:
+
+   # If there have been ~4 times as many previous RCPT rejects than
+   # accepts, drop the connection
+   drop message = Too many ($rcpt_fail_count) rejected 

[MediaWiki-commits] [Gerrit] Update HitCounters tests - change (integration/config)

2015-07-28 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Update HitCounters tests
..

Update HitCounters tests

Add jsonlint test.

Add npm test.

Adds extension-unittests-generic test

Adds jshint test. ( there is no js file in this repo but when someone adds
a js file this test will run. )

Change-Id: Ia58bf3d500e334d27a54e922099794063ea0568a
---
M zuul/layout.yaml
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/38/227438/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index cdc2fae..22dfa63 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -5946,7 +5946,7 @@
 
   - name: mediawiki/extensions/UrlShortener
 template:
-  - name: extension-jslint
+  - name: npm
   - name: extension-unittests-generic
 
   - name: mediawiki/extensions/URNames
@@ -6247,7 +6247,12 @@
 
   - name: mediawiki/extensions/HitCounters
 template:
- - name: mw-checks
+  - name: composer-test
+  - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
+ - jshint
 
   - name: mediawiki/extensions/Html2Wiki
 template:

-- 
To view, visit https://gerrit.wikimedia.org/r/227438
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia58bf3d500e334d27a54e922099794063ea0568a
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox thomasmulhall...@yahoo.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Update HitCounters extension tests - change (mediawiki...HitCounters)

2015-07-28 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Update HitCounters extension tests
..

Update HitCounters extension tests

Add jsonlint test

Add banana check

Add composer.json. ( I will do a follow up with php code sniffer ).

Adds package.json

Requires https://gerrit.wikimedia.org/r/#/c/227438/

Change-Id: I395203bfdaeb7b286cd5666cbb9e82d993a16aec
---
A Gruntfile.js
A composer.json
A i18n/fr.json
M i18n/zh-hant.json
A package.json
5 files changed, 62 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/HitCounters 
refs/changes/39/227439/1

diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..6e443b1
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,19 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+   var conf = grunt.file.readJSON( 'extension.json' );
+
+   grunt.initConfig( {
+   banana: conf.MessagesDirs,
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..7e86f90
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,11 @@
+{
+   require-dev: {
+   jakub-onderka/php-parallel-lint: 0.9.*
+   },
+   scripts: {
+   test: [
+   parallel-lint . --exclude vendor
+   ]
+   }
+
+}
diff --git a/i18n/fr.json b/i18n/fr.json
new file mode 100644
index 000..a1d4df1
--- /dev/null
+++ b/i18n/fr.json
@@ -0,0 +1,16 @@
+{
+   @metadata: {
+   authors: [
+   Wladek92
+   ]
+   },
+   hitcounters-desc: Fournit les statistiques de consultation par page,
+   hitcounters-nviews: $1 {{PLURAL:$1|consultation|consultations}},
+   popularpages: Pages les plus populaires,
+   hitcounters-pageinfo-views: Nombre de consultations,
+   hitcounters-statistics-header-views: Statistiques des consultations,
+   hitcounters-statistics-views-total: Total des consultations,
+   hitcounters-statistics-views-total-desc: L'accès aux pages non 
existantes et aux pages spéciales ne sont pas inclus,
+   hitcounters-statistics-views-peredit: Nombre de consultations par 
édition,
+   hitcounters-statistics-mostpopular: Pages les plus consultées
+}
diff --git a/i18n/zh-hant.json b/i18n/zh-hant.json
index 766938b..b3779eb 100644
--- a/i18n/zh-hant.json
+++ b/i18n/zh-hant.json
@@ -4,8 +4,13 @@
Cwlin0416
]
},
+   hitcounters-desc: 提供面個頁面的檢視統計資訊,
+   hitcounters-nviews: $1 次{{PLURAL:$1|檢視|檢視}},
popularpages: 熱門頁面,
hitcounters-pageinfo-views: 檢視次數,
+   hitcounters-statistics-header-views: 檢視統計資訊,
hitcounters-statistics-views-total: 檢視總計,
+   hitcounters-statistics-views-total-desc: 檢視次數不包含不存在頁面與特殊頁面,
+   hitcounters-statistics-views-peredit: 每次編輯檢視次數,
hitcounters-statistics-mostpopular: 被最多人檢查的頁面
 }
diff --git a/package.json b/package.json
new file mode 100644
index 000..e74f430
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  scripts: {
+test: grunt test
+  },
+  devDependencies: {
+grunt: 0.4.5,
+grunt-cli: 0.1.13,
+grunt-banana-checker: 0.2.2,
+grunt-jsonlint: 1.0.4
+  }
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/227439
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I395203bfdaeb7b286cd5666cbb9e82d993a16aec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/HitCounters
Gerrit-Branch: master
Gerrit-Owner: Paladox thomasmulhall...@yahoo.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add apihelp for the progress parameter in the cxpublish module - change (mediawiki...ContentTranslation)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add apihelp for the progress parameter in the cxpublish module
..


Add apihelp for the progress parameter in the cxpublish module

Change-Id: I73a83380613c0708eff7fee7126a1913dab32456
---
M i18n/en.json
M i18n/qqq.json
2 files changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Santhosh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/i18n/en.json b/i18n/en.json
index a965998..2d3355b 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -117,6 +117,7 @@
apihelp-cxpublish-param-sourcetitle: The title of the source page.,
apihelp-cxpublish-param-sourcerevision: The revision of the source 
page.,
apihelp-cxpublish-param-status: If \draft\, translation will be 
saved as draft. If \published\, translation will be published.,
+   apihelp-cxpublish-param-progress: Information about translation 
completion (progress). JSON with the keys 'any', 'human', 'mt' and 
'mtSectionsCount'. The keys' values are percentages.,
apihelp-cxpublish-param-categories: The categories to put the 
published page in.,
apihelp-cxpublish-param-wpCaptchaId: Captcha ID (when saving with a 
captcha response).,
apihelp-cxpublish-param-wpCaptchaWord: Answer to the captcha (when 
saving with a captcha response).,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 2a2ded0..39098d5 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -122,6 +122,7 @@
apihelp-cxpublish-param-sourcetitle: 
{{doc-apihelp-param|cxpublish|sourcetitle}},
apihelp-cxpublish-param-sourcerevision: 
{{doc-apihelp-param|cxpublish|sourcerevision}},
apihelp-cxpublish-param-status: {{doc-important|DO NOT translate 
\draft\ and \published\ which are enclosed in quotation 
marks.}}\n\n{{doc-apihelp-param|cxpublish|status}},
+   apihelp-cxpublish-param-progress: {{doc-important|DO NOT translate 
\any\, \human\, \mt\, and 
\mtSectionsCount\.}}\n\n{{doc-apihelp-param|cxpublish|progress}},
apihelp-cxpublish-param-categories: 
{{doc-apihelp-param|cxpublish|categories}},
apihelp-cxpublish-param-wpCaptchaId: 
{{doc-apihelp-param|cxpublish|wpCaptchaId}},
apihelp-cxpublish-param-wpCaptchaWord: 
{{doc-apihelp-param|cxpublish|wpCaptchaWord}},

-- 
To view, visit https://gerrit.wikimedia.org/r/227437
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I73a83380613c0708eff7fee7126a1913dab32456
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] beta: expand {datacenter} to 'eqiad' - change (integration/config)

2015-07-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: beta: expand {datacenter} to 'eqiad'
..


beta: expand {datacenter} to 'eqiad'

Preparation work to change the beta cluster jobs label.

Bug: T72597
Change-Id: I210b99bda5348072073f71d2cf24906070d74895
---
M jjb/beta.yaml
1 file changed, 23 insertions(+), 25 deletions(-)

Approvals:
  Hashar: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/jjb/beta.yaml b/jjb/beta.yaml
index ecaa864..176edb0 100644
--- a/jjb/beta.yaml
+++ b/jjb/beta.yaml
@@ -37,9 +37,9 @@
 # Should be triggered on post merge.
 #
 - job-template:
-name: beta-recompile-math-texvc-{datacenter}
+name: beta-recompile-math-texvc-eqiad
 defaults: beta
-node: deployment-bastion-{datacenter}
+node: deployment-bastion-eqiad
 triggers:
  - zuul
 logrotate:
@@ -62,9 +62,9 @@
 #
 # Set TMPDIR to point to the tmpfs if it exists.
 - job-template:
-name: beta-update-databases-{datacenter}
+name: beta-update-databases-eqiad
 defaults: beta
-node: deployment-bastion-{datacenter}
+node: deployment-bastion-eqiad
 
 builders:
   - global-setup
@@ -99,9 +99,9 @@
 # We simply update the repository on the beta host and do a git reset hard.
 #
 - job-template:
-name: beta-mediawiki-config-update-{datacenter}
+name: beta-mediawiki-config-update-eqiad
 defaults: beta
-node: deployment-bastion-{datacenter}
+node: deployment-bastion-eqiad
 
 # Do not run concurrently with the downstream job
 block-downstream: true
@@ -125,16 +125,16 @@
   failure: false
   fixed: true
   - trigger:
-  project: beta-scap-{datacenter}
+  project: beta-scap-eqiad
 
 # Job updating MediaWiki core+extensions code and refreshing the message
 #
 # This is the poor man auto updating script. We should probably split the
 # script in different part and have the jobs trigger each other.
 - job-template:
-name: beta-code-update-{datacenter}
+name: beta-code-update-eqiad
 defaults: beta
-node: deployment-bastion-{datacenter}
+node: deployment-bastion-eqiad
 
 # Do not run concurrently with the downstream job
 block-downstream: true
@@ -163,12 +163,12 @@
   failure: false
   fixed: true
   - trigger:
-  project: beta-scap-{datacenter}
+  project: beta-scap-eqiad
 
 - job-template:
-name: beta-scap-{datacenter}
+name: beta-scap-eqiad
 defaults: beta
-node: deployment-bastion-{datacenter}
+node: deployment-bastion-eqiad
 
 # Do not run concurrently with upstream jobs
 block-upstream: true
@@ -197,9 +197,9 @@
   fixed: true
 
 - job-template:
-name: beta-parsoid-update-{datacenter}
+name: beta-parsoid-update-eqiad
 defaults: beta
-node: deployment-parsoid-{datacenter}
+node: deployment-parsoid-eqiad
 triggers:
  - zuul
 logrotate:
@@ -220,9 +220,9 @@
   - beta-irc
 
 - job-template:
-name: beta-cxserver-update-{datacenter}
+name: beta-cxserver-update-eqiad
 defaults: beta
-node: deployment-cxserver-{datacenter}
+node: deployment-cxserver-eqiad
 triggers:
  - zuul
 logrotate:
@@ -262,13 +262,11 @@
 
 - project:
 name: beta
-datacenter:
- - eqiad
 jobs:
- - beta-code-update-{datacenter}
- - beta-mediawiki-config-update-{datacenter}
- - beta-cxserver-update-{datacenter}
- - beta-parsoid-update-{datacenter}
- - beta-recompile-math-texvc-{datacenter}
- - beta-scap-{datacenter}
- - beta-update-databases-{datacenter}
+ - beta-code-update-eqiad
+ - beta-mediawiki-config-update-eqiad
+ - beta-cxserver-update-eqiad
+ - beta-parsoid-update-eqiad
+ - beta-recompile-math-texvc-eqiad
+ - beta-scap-eqiad
+ - beta-update-databases-eqiad

-- 
To view, visit https://gerrit.wikimedia.org/r/227440
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I210b99bda5348072073f71d2cf24906070d74895
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


<    1   2   3   4   >