[MediaWiki-commits] [Gerrit] operations/puppet[production]: Abolish labtest realm.

2016-11-29 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Abolish labtest realm.
..


Abolish labtest realm.

Most of these labtest settings were just duplicates of production
to make case statements happy.  Those that differ are wrong.

Special labtest settings still exist, mainly based on hostname
prefix checks in hiera and host-specific lookups.

Bug: T148717
Change-Id: Iab3de7cee4839d5dabbe71c02b222700af7ac608
---
M manifests/realm.pp
M modules/ldap/manifests/role/config/labs.pp
M modules/network/manifests/constants.pp
3 files changed, 0 insertions(+), 45 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  Rush: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/manifests/realm.pp b/manifests/realm.pp
index cc2a483..6a6bbac 100644
--- a/manifests/realm.pp
+++ b/manifests/realm.pp
@@ -36,11 +36,6 @@
 default   => '(undefined)'
 }
 
-# Lab testing cluster all prefix labtest
-if $::hostname =~ /^labtest/ {
-$realm = 'labtest'
-}
-
 if $realm == undef {
 $realm = hiera('realm', 'production')
 }
@@ -238,7 +233,6 @@
 'deployment-prep' => [ 'deployment-mx.eqiad.wmflabs' ],
 default   => [ 'mx1001.wikimedia.org', 'mx2001.wikimedia.org' 
],
 },
-'labtest' => [ 'wiki-mail-codfw.wikimedia.org', 
'wiki-mail-eqiad.wikimedia.org' ],
 }
 # Generic, default servers (order matters!)
 $mail_smarthost = $realm ? {
@@ -249,5 +243,4 @@
 },
 # FIXME: find some SMTP servers for labs
 'labs'   => [ 'mx1001.wikimedia.org', 'mx2001.wikimedia.org' ],
-'labtest'=> [ 'mx2001.wikimedia.org', 'mx1001.wikimedia.org' ],
 }
diff --git a/modules/ldap/manifests/role/config/labs.pp 
b/modules/ldap/manifests/role/config/labs.pp
index c4babb2..770fcbd 100644
--- a/modules/ldap/manifests/role/config/labs.pp
+++ b/modules/ldap/manifests/role/config/labs.pp
@@ -4,7 +4,6 @@
 $basedn = 'dc=wikimedia,dc=org'
 $servernames = [ $hieraldapconfig['hostname'], 
$hieraldapconfig['secondary_hostname'] ]
 $sudobasedn = $::realm ? {
-'labtest'   => 
"ou=sudoers,cn=${::labsproject},ou=projects,${basedn}",
 'labs'   => "ou=sudoers,cn=${::labsproject},ou=projects,${basedn}",
 'production' => "ou=sudoers,${basedn}"
 }
diff --git a/modules/network/manifests/constants.pp 
b/modules/network/manifests/constants.pp
index 3f68c0b..d8779be 100644
--- a/modules/network/manifests/constants.pp
+++ b/modules/network/manifests/constants.pp
@@ -69,40 +69,6 @@
 '2620:0:860:101:10:192:0:27', # 
puppetmaster2001.codfw.wmnet
 ],
 },
-'labtest' => {
-'bastion_hosts' => [
-'208.80.154.149',   # 
bast1001.wikimedia.org
-'2620:0:861:2:208:80:154:149',  # 
bast1001.wikimedia.org
-'208.80.153.5', # 
bast2001.wikimedia.org
-'2620:0:860:1:208:80:153:5',# 
bast2001.wikimedia.org
-'91.198.174.112',   # 
bast3001.wikimedia.org
-'2620:0:862:1:91:198:174:112',  # 
bast3001.wikimedia.org
-'198.35.26.5',  # 
bast4001.wikimedia.org
-'2620:0:863:1:198:35:26:5', # 
bast4001.wikimedia.org
-'208.80.154.151',   # iron.wikimedia.org
-'2620:0:861:2:208:80:154:151',  # iron.wikimedia.org
-],
-'monitoring_hosts' => [
-'208.80.153.74',# tegmen.wikimedia.org
-'2620:0:860:3:208:80:153:74',   # tegmen.wikimedia.org
-'208.80.155.119',   # 
einsteinium.wikimedia.org
-'2620:0:860:3:208:80:155:119',  # 
einsteinium.wikimedia.org
-'208.80.154.53',# 
uranium.wikimedia.org (ganglia, gmetad needs it)
-'2620:0:861:1:208:80:154:53',   # uranium.wikimedia.org
-],
-'deployment_hosts' => [
-'10.64.0.196',  # tin.eqiad.wmnet
-'2620:0:861:101:10:64:0:196',   # tin.eqiad.wmnet
-'10.192.16.132',# mira.codfw.wmnet
-'2620:0:860:102:10:192:16:132', # mira.codfw.wmnet
-],
-'maintenance_hosts' => [
-'10.64.32.13',  # terbium.eqiad.wmnet
-'2620:0:861:103:10:64:32:13',   # terbium.eqiad.wmnet
-'10.192.48.45', # wasat.codfw.wmnet
-'2620:0:860:104:10:192:48:45',  # wasat.codfw.wmnet
-],
-},
 'labs' => {

[MediaWiki-commits] [Gerrit] operations/puppet[production]: nodepool: lower max-server from 20 to 19

2016-11-29 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: nodepool: lower max-server from 20 to 19
..


nodepool: lower max-server from 20 to 19

Nodepool leaks instances and does not manage to delete them. Previously
we had a max of 12 instances and a quota of 15 with a large quota of
CPU. That allowed for up to 3 leaked instances.

We have then raised max-server to 20 and the vCPU quota to 44, which
allow up to 2 leaked instances.

Hence the side effect is that Nodepool fails to spawn instance more
often due to quota error.

Lower max-server from 20 to 19 to get 1 more leaked instance allowance.

Patches are available upstream to solve the issue. But have to be
packaged.

Change-Id: Ida522c727b8dff83de5a824d5525909025c66947
---
M modules/nodepool/templates/nodepool.yaml.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/nodepool/templates/nodepool.yaml.erb 
b/modules/nodepool/templates/nodepool.yaml.erb
index 2deed70..a572b61 100644
--- a/modules/nodepool/templates/nodepool.yaml.erb
+++ b/modules/nodepool/templates/nodepool.yaml.erb
@@ -83,7 +83,7 @@
 auth-url: '<%= @openstack_auth_url -%>'
 api-timeout: 60  # seconds
 boot-timeout: 300  # seconds
-max-servers: 20
+max-servers: 19
 rate: 6  # seconds
 # 'eqiad.wmflabs' is magically added by wmflabs
 template-hostname: '{image.name}-{timestamp}'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida522c727b8dff83de5a824d5525909025c66947
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Chasemp 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...PollNY[master]: Fix E_WARNING after moving a page under MW 1.28

2016-11-29 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Fix E_WARNING after moving a page under MW 1.28
..


Fix E_WARNING after moving a page under MW 1.28

Warning: Parameter 3 to PollNYHooks::updatePollQuestion() expected to be a
reference, value given in ..\includes\Hooks.php on line 195

I'm not sure why this fixes it, but it does...

Change-Id: If81f74ac09632d84e9b93a0041600cd41538bebd
---
M PollNYHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/PollNYHooks.php b/PollNYHooks.php
index e997d78..fe8d704 100644
--- a/PollNYHooks.php
+++ b/PollNYHooks.php
@@ -20,7 +20,7 @@
 * @param $newid Integer: new ID of the page [unused]
 * @return Boolean: true
 */
-   public static function updatePollQuestion( &$title, &$newTitle, &$user, 
$oldid, $newid ) {
+   public static function updatePollQuestion( &$title, &$newTitle, $user, 
$oldid, $newid ) {
if( $title->getNamespace() == NS_POLL ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->update(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If81f74ac09632d84e9b93a0041600cd41538bebd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PollNY
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] mediawiki...LinkFilter[master]: Fix E_WARNING after moving a page under MW 1.28

2016-11-29 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Fix E_WARNING after moving a page under MW 1.28
..


Fix E_WARNING after moving a page under MW 1.28

Warning: Parameter 3 to LinkFilterHooks::updateLinkFilter() expected to be
a reference, value given in ..\includes\Hooks.php on line 195

I'm not sure why this fixes it, but it does...

Change-Id: Ide975a042880d5d71e4f8dd4ad7d3420f74d676d
---
M LinkFilterHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/LinkFilterHooks.php b/LinkFilterHooks.php
index 2f4cd11..96bea5b 100644
--- a/LinkFilterHooks.php
+++ b/LinkFilterHooks.php
@@ -18,7 +18,7 @@
 * @param $newId Integer
 * @return Boolean: true
 */
-   public static function updateLinkFilter( &$title, &$newTitle, &$user, 
$oldId, $newId ) {
+   public static function updateLinkFilter( &$title, &$newTitle, $user, 
$oldId, $newId ) {
if ( $title->getNamespace() == NS_LINK ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->update(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ide975a042880d5d71e4f8dd4ad7d3420f74d676d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LinkFilter
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] mediawiki...FanBoxes[master]: Fix E_WARNING after moving a page under MW 1.28

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix E_WARNING after moving a page under MW 1.28
..


Fix E_WARNING after moving a page under MW 1.28

Warning: Parameter 3 to FanBoxHooks::updateFanBoxTitle() expected to be a 
reference, value given in ..\includes\Hooks.php on line 195

I'm not sure why this fixes it, but it does...

Change-Id: Iec061853045b92896145edfb8cdf1014b53e6fdf
---
M FanBoxHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/FanBoxHooks.php b/FanBoxHooks.php
index 2408b12..33dad33 100644
--- a/FanBoxHooks.php
+++ b/FanBoxHooks.php
@@ -18,7 +18,7 @@
 * @param $newid Integer:
 * @return Boolean: true
 */
-   public static function updateFanBoxTitle( &$title, &$newtitle, &$user, 
$oldid, $newid ) {
+   public static function updateFanBoxTitle( &$title, &$newtitle, $user, 
$oldid, $newid ) {
if ( $title->getNamespace() == NS_FANTAG ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->update(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec061853045b92896145edfb8cdf1014b53e6fdf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FanBoxes
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...PollNY[master]: Fix E_WARNING after moving a page under MW 1.28

2016-11-29 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Fix E_WARNING after moving a page under MW 1.28
..

Fix E_WARNING after moving a page under MW 1.28

Warning: Parameter 3 to PollNYHooks::updatePollQuestion() expected to be a
reference, value given in ..\includes\Hooks.php on line 195

I'm not sure why this fixes it, but it does...

Change-Id: If81f74ac09632d84e9b93a0041600cd41538bebd
---
M PollNYHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PollNY 
refs/changes/31/324331/1

diff --git a/PollNYHooks.php b/PollNYHooks.php
index e997d78..fe8d704 100644
--- a/PollNYHooks.php
+++ b/PollNYHooks.php
@@ -20,7 +20,7 @@
 * @param $newid Integer: new ID of the page [unused]
 * @return Boolean: true
 */
-   public static function updatePollQuestion( &$title, &$newTitle, &$user, 
$oldid, $newid ) {
+   public static function updatePollQuestion( &$title, &$newTitle, $user, 
$oldid, $newid ) {
if( $title->getNamespace() == NS_POLL ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->update(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If81f74ac09632d84e9b93a0041600cd41538bebd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PollNY
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] mediawiki...LinkFilter[master]: Fix E_WARNING after moving a page under MW 1.28

2016-11-29 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Fix E_WARNING after moving a page under MW 1.28
..

Fix E_WARNING after moving a page under MW 1.28

Warning: Parameter 3 to LinkFilterHooks::updateLinkFilter() expected to be
a reference, value given in ..\includes\Hooks.php on line 195

I'm not sure why this fixes it, but it does...

Change-Id: Ide975a042880d5d71e4f8dd4ad7d3420f74d676d
---
M LinkFilterHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LinkFilter 
refs/changes/30/324330/1

diff --git a/LinkFilterHooks.php b/LinkFilterHooks.php
index 2f4cd11..96bea5b 100644
--- a/LinkFilterHooks.php
+++ b/LinkFilterHooks.php
@@ -18,7 +18,7 @@
 * @param $newId Integer
 * @return Boolean: true
 */
-   public static function updateLinkFilter( &$title, &$newTitle, &$user, 
$oldId, $newId ) {
+   public static function updateLinkFilter( &$title, &$newTitle, $user, 
$oldId, $newId ) {
if ( $title->getNamespace() == NS_LINK ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->update(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide975a042880d5d71e4f8dd4ad7d3420f74d676d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LinkFilter
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] mediawiki...FanBoxes[master]: Fix E_WARNING after moving a page under MW 1.28

2016-11-29 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Fix E_WARNING after moving a page under MW 1.28
..

Fix E_WARNING after moving a page under MW 1.28

Warning: Parameter 3 to FanBoxHooks::updateFanBoxTitle() expected to be a 
reference, value given in ..\includes\Hooks.php on line 195

I'm not sure why this fixes it, but it does...

Change-Id: Iec061853045b92896145edfb8cdf1014b53e6fdf
---
M FanBoxHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/FanBoxHooks.php b/FanBoxHooks.php
index 2408b12..33dad33 100644
--- a/FanBoxHooks.php
+++ b/FanBoxHooks.php
@@ -18,7 +18,7 @@
 * @param $newid Integer:
 * @return Boolean: true
 */
-   public static function updateFanBoxTitle( &$title, &$newtitle, &$user, 
$oldid, $newid ) {
+   public static function updateFanBoxTitle( &$title, &$newtitle, $user, 
$oldid, $newid ) {
if ( $title->getNamespace() == NS_FANTAG ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->update(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec061853045b92896145edfb8cdf1014b53e6fdf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FanBoxes
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] node-rdkafka-statsd[master]: Expand rdkafka stats whitelist

2016-11-29 Thread Nuria (Code Review)
Nuria has submitted this change and it was merged.

Change subject: Expand rdkafka stats whitelist
..


Expand rdkafka stats whitelist

Bug: T145099
Change-Id: Id5e01a6b285b577238ce27980e40f168029554ce
---
M lib/rdkafka-statsd.js
M test/test.js
2 files changed, 36 insertions(+), 6 deletions(-)

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



diff --git a/lib/rdkafka-statsd.js b/lib/rdkafka-statsd.js
index c29a3ed..28ab7ae 100644
--- a/lib/rdkafka-statsd.js
+++ b/lib/rdkafka-statsd.js
@@ -39,15 +39,45 @@
  * Default filter function, can be overriden when instantiating module
  **/
 function defaultFilterFn(key) {
-const defaultWhitelist = ['hi_offset',
-'lo_offset',
-'eof_offset',
-'committed_offset',
+const defaultWhitelist = [
+// Broker stats
+'outbuf_cnt',
+'outbuf_msg_cnt',
+'waitresp_cnt',
+'waitresp_msg_cnt',
+'tx',
+'txbytes',
+'txerrs',
+'txretries',
+'req_timeouts',
+'rx',
+'rxbytes',
+'rxerrs',
+'rxcorriderrs',
+'rxpartial',
+'rtt',
+'throttle',
+
+// Topic partition stats
+'msgq_cnt',
+'msgq_bytes',
+'xmit_msgq_cnt',
+'xmit_msgq_bytes',
+'fetchq_cnt',
+'fetchq_size',
 'query_offset',
 'next_offset',
 'app_offset',
 'stored_offset',
-
+'committed_offset',
+'eof_offset',
+'lo_offset',
+'hi_offset',
+'consumer_lag',
+'txmsgs',
+'txbytes',
+'msgs',
+'rx_ver_drops'
 ];
 
 
diff --git a/test/test.js b/test/test.js
index f180e76..359f0ae 100644
--- a/test/test.js
+++ b/test/test.js
@@ -455,7 +455,7 @@
 
 
 assert.deepEqual(flat_metrics['simple_cnt'], undefined);
-
assert.deepEqual(flat_metrics['topics.test4.partitions.0.rx_ver_drops'], 
undefined);
+assert.deepEqual(flat_metrics['topics.test4.partitions.0.leader'], 
undefined);
 assert.deepEqual(flat_metrics['topics.test4.partitions.-1.lo_offset'], 
undefined);
 
assert.deepEqual(flat_metrics['topics.test4.partitions.0.stored_offset'], 6143);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id5e01a6b285b577238ce27980e40f168029554ce
Gerrit-PatchSet: 2
Gerrit-Project: node-rdkafka-statsd
Gerrit-Branch: master
Gerrit-Owner: Ottomata 
Gerrit-Reviewer: Nuria 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Monolog: Add processor for XFF resolved IP

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Monolog: Add processor for XFF resolved IP
..


Monolog: Add processor for XFF resolved IP

Overwrite the 'ip' value associated with a log event by
Monolog\Processor\WebProcessor with an IP that follows the XFF headers.

Bug: T114700
Change-Id: Ibd020af2c83ca4140b4e190c8b2ab7d5c5ba8839
---
M wmf-config/logging.php
1 file changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/logging.php b/wmf-config/logging.php
index 45a8eb4..d56c9fa 100644
--- a/wmf-config/logging.php
+++ b/wmf-config/logging.php
@@ -58,6 +58,22 @@
'psr' => [
'class' => '\\Monolog\\Processor\\PsrLogMessageProcessor',
],
+   'xff-ip' => [
+   'factory' => function () {
+   /**
+* Overwrite the 'ip' key set by WebProcessor with a 
version that
+* honors XFF headers if we can. T114700
+*/
+   return function( array $record ) {
+   try {
+   $record['ip'] = 
RequestContext::getMain()->getRequest()->getIP();
+   } catch ( Exception $ignored ) {
+   // no-op
+   }
+   return $record;
+   };
+   },
+   ],
'web' => [
'class' => '\\Monolog\\Processor\\WebProcessor',
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd020af2c83ca4140b4e190c8b2ab7d5c5ba8839
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: nodepool: lower max-server from 20 to 19

2016-11-29 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: nodepool: lower max-server from 20 to 19
..

nodepool: lower max-server from 20 to 19

Nodepool leaks instances and does not manage to delete them. Previously
we had a max of 12 instances and a quota of 15 with a large quota of
CPU. That allowed for up to 3 leaked instances.

We have then raised max-server to 20 and the vCPU quota to 44, which
allow up to 2 leaked instances.

Hence the side effect is that Nodepool fails to spawn instance more
often due to quota error.

Lower max-server from 20 to 19 to get 1 more leaked instance allowance.

Patches are available upstream to solve the issue. But have to be
packaged.

Change-Id: Ida522c727b8dff83de5a824d5525909025c66947
---
M modules/nodepool/templates/nodepool.yaml.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/28/324328/1

diff --git a/modules/nodepool/templates/nodepool.yaml.erb 
b/modules/nodepool/templates/nodepool.yaml.erb
index 2deed70..a572b61 100644
--- a/modules/nodepool/templates/nodepool.yaml.erb
+++ b/modules/nodepool/templates/nodepool.yaml.erb
@@ -83,7 +83,7 @@
 auth-url: '<%= @openstack_auth_url -%>'
 api-timeout: 60  # seconds
 boot-timeout: 300  # seconds
-max-servers: 20
+max-servers: 19
 rate: 6  # seconds
 # 'eqiad.wmflabs' is magically added by wmflabs
 template-hostname: '{image.name}-{timestamp}'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida522c727b8dff83de5a824d5525909025c66947
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] node-rdkafka-statsd[master]: Expand rdkafka stats whitelist

2016-11-29 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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

Change subject: Expand rdkafka stats whitelist
..

Expand rdkafka stats whitelist

Bug: T145099
Change-Id: Id5e01a6b285b577238ce27980e40f168029554ce
---
M lib/rdkafka-statsd.js
1 file changed, 35 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/node-rdkafka-statsd 
refs/changes/27/324327/1

diff --git a/lib/rdkafka-statsd.js b/lib/rdkafka-statsd.js
index c29a3ed..28ab7ae 100644
--- a/lib/rdkafka-statsd.js
+++ b/lib/rdkafka-statsd.js
@@ -39,15 +39,45 @@
  * Default filter function, can be overriden when instantiating module
  **/
 function defaultFilterFn(key) {
-const defaultWhitelist = ['hi_offset',
-'lo_offset',
-'eof_offset',
-'committed_offset',
+const defaultWhitelist = [
+// Broker stats
+'outbuf_cnt',
+'outbuf_msg_cnt',
+'waitresp_cnt',
+'waitresp_msg_cnt',
+'tx',
+'txbytes',
+'txerrs',
+'txretries',
+'req_timeouts',
+'rx',
+'rxbytes',
+'rxerrs',
+'rxcorriderrs',
+'rxpartial',
+'rtt',
+'throttle',
+
+// Topic partition stats
+'msgq_cnt',
+'msgq_bytes',
+'xmit_msgq_cnt',
+'xmit_msgq_bytes',
+'fetchq_cnt',
+'fetchq_size',
 'query_offset',
 'next_offset',
 'app_offset',
 'stored_offset',
-
+'committed_offset',
+'eof_offset',
+'lo_offset',
+'hi_offset',
+'consumer_lag',
+'txmsgs',
+'txbytes',
+'msgs',
+'rx_ver_drops'
 ];
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id5e01a6b285b577238ce27980e40f168029554ce
Gerrit-PatchSet: 1
Gerrit-Project: node-rdkafka-statsd
Gerrit-Branch: master
Gerrit-Owner: Ottomata 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labstore: configure etytree to mount public dumps

2016-11-29 Thread Rush (Code Review)
Rush has uploaded a new change for review.

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

Change subject: labstore: configure etytree to mount public dumps
..

labstore: configure etytree to mount public dumps

Change-Id: Ib71fe79a161171356b910a27ed041c13fecdd711
Bugs: T151933
---
M modules/labstore/files/nfs-mounts.yaml
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/26/324326/1

diff --git a/modules/labstore/files/nfs-mounts.yaml 
b/modules/labstore/files/nfs-mounts.yaml
index aa7bbc2..b96669f 100644
--- a/modules/labstore/files/nfs-mounts.yaml
+++ b/modules/labstore/files/nfs-mounts.yaml
@@ -54,6 +54,10 @@
 gid: 50068
 mounts:
   project: true
+  etytree:
+gid: 53231
+mounts:
+  dumps: true
   fastcci:
 gid: 50983
 mounts:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib71fe79a161171356b910a27ed041c13fecdd711
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Rush 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Link to the correct configuration form

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Link to the correct configuration form
..


Link to the correct configuration form

Bug: T151941
Change-Id: Id8acaa4cb113f2c0b7661df1e8e3c14034a900ed
---
M sites/all/modules/thank_you/thank_you.info
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/sites/all/modules/thank_you/thank_you.info 
b/sites/all/modules/thank_you/thank_you.info
index 1ed382e..282c82d 100644
--- a/sites/all/modules/thank_you/thank_you.info
+++ b/sites/all/modules/thank_you/thank_you.info
@@ -5,7 +5,7 @@
 dependencies[] = wmf_civicrm
 dependencies[] = wmf_communication
 package = Wikimedia
-configure = admin/config/thank_you
+configure = admin/config/thank_you/configure
 files[] = Html2Text.php
 files[] = generators/FindUnconsumedTokens.php
 files[] = generators/RenderTranslatedPage.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id8acaa4cb113f2c0b7661df1e8e3c14034a900ed
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] node-rdkafka-statsd[master]: Consolidate docs on README

2016-11-29 Thread Nuria (Code Review)
Nuria has uploaded a new change for review.

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

Change subject: Consolidate docs on README
..

Consolidate docs on README

Bug: T145099
Change-Id: I6d7b7e31ae9c2b66fa6f16208dc43f0a194044d7
---
M README.md
M lib/rdkafka-statsd.js
2 files changed, 68 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/node-rdkafka-statsd 
refs/changes/77/324277/1

diff --git a/README.md b/README.md
index a016d69..04c594e 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,69 @@
+# Documentation #
+
 Utility module to flatten an object, filter keys and send wanted metrics to 
statsd.
-By default metrics that include '-1' or 'toppars' are not sent.
+
+This package has an implicit dependency on an statsd client that implements 
the function gauge.
+
+Callers can specify the keys they are interested on sending to statsd or use
+the filtered defaults which are these ones:
+
+```
+['hi_offset',
+'lo_offset',
+'eof_offset',
+'committed_offset',
+'query_offset',
+'next_offset',
+'app_offset',
+'stored_offset',
+
+];
+```
+
+If using a filter function metrics that include '-1' or 'toppars' are not sent.
+
+
+## Usage ##
+
+
+### Example: Filter function 
+
+
+```javascript
+
+var StatsD  require('node-statsd'),
+client  new StatsD({ host: 'statsd.eqiad.wmnet'});  // or metrics-reporter
+
+function myFilter(key) = {...}
+
+var rdkafkaStatsdCb = require('node-rdkafka-statsd')(client,{'filterFn': 
myFilter});
+
+var kafka = require('node-rdkafka');
+
+var consumer = new kafka.KafkaConsumer({
+...
+'statistics.interval.ms': 3,
+});
+
+ // Flowing mode
+consumer.connect();
+consumer
+.on('ready', function() {
+consumer.consume('some-topic');
+})
+.on('event.stats', rdkafka_statsd_cb);
+
+```
+
+ Example: No filter function 
+
+When no filter function is used all metrics are sent to statsd
+
+```javascript
+
+var StatsD  require('node-statsd'),
+client  new StatsD({ host: 'statsd.eqiad.wmnet'});  // or metrics-reporter
+
+var rdkafkaStatsdCb = require('node-rdkafka-statsd')(client,{'filterFn': 
false});
+
+```
diff --git a/lib/rdkafka-statsd.js b/lib/rdkafka-statsd.js
index c29a3ed..3d430c8 100644
--- a/lib/rdkafka-statsd.js
+++ b/lib/rdkafka-statsd.js
@@ -2,36 +2,9 @@
  * Parses an object structure, flattens it
  * and sends the whitelisted metrics to statsd
  * Depends implicitily on statsd client
- * Use like:
-
-var StatsD  require('node-statsd'),
-client  new StatsD({ host: 'statsd.eqiad.wmnet'});  // or metrics-reporter
-
-function myFilter(key) = {...}
-
-var rdkafkaStatsdCb = require('node-rdkafka-statsd')(client,{'filterFn': 
myFilter});
-
-var kafka = require('node-rdkafka');
-var consumer = new kafka.KafkaConsumer({
-...
-'statistics.interval.ms': 3,
-});
-// Flowing mode
-consumer.connect();
-consumer
-.on('ready', function() {
-consumer.consume('some-topic');
-})
-.on('event.stats', rdkafka_statsd_cb);
- *
- *
- * If filterFn is set to false no whitelist is applied
- * metrics that include 'toppars' or '-1' are filtered by default
  **/
 
 'use strict';
-
-
 
 const DOT = '.';
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d7b7e31ae9c2b66fa6f16208dc43f0a194044d7
Gerrit-PatchSet: 1
Gerrit-Project: node-rdkafka-statsd
Gerrit-Branch: master
Gerrit-Owner: Nuria 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Fix wikidata.beta.wmflabs.org after c507329e

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix wikidata.beta.wmflabs.org after c507329e
..


Fix wikidata.beta.wmflabs.org after c507329e

 * Although it redirects, the host that's parsed isn't what's expected.

Change-Id: I5c139531fe45d4f9e0eaef79d8f1bfe8cabf6917
---
M conf/wmf/betalabs.localsettings.js
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/conf/wmf/betalabs.localsettings.js 
b/conf/wmf/betalabs.localsettings.js
index 98317ea..60ef935 100644
--- a/conf/wmf/betalabs.localsettings.js
+++ b/conf/wmf/betalabs.localsettings.js
@@ -10,6 +10,10 @@
});
});
 
+   // Wikidata in labs doesn't have the www. subdomain
+   parsoidConfig.removeMwApi({ domain: 'www.wikidata.beta.wmflabs.org' });
+   parsoidConfig.setMwApi({ prefix: 'wikidatawiki', uri: 
'https://wikidata.beta.wmflabs.org/w/api.php' });
+
// Some wikis not found in the sitematrix
parsoidConfig.setMwApi({ prefix: 'labs', uri: 
'https://deployment.wikimedia.beta.wmflabs.org/w/api.php' });
parsoidConfig.setMwApi({ prefix: 'en_rtlwiki', uri: 
'https://en-rtl.wikipedia.beta.wmflabs.org/w/api.php' });

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5c139531fe45d4f9e0eaef79d8f1bfe8cabf6917
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ContributionScores[master]: ContributionScores.alias.php translations for bengali.

2016-11-29 Thread Aftab (Code Review)
Aftab has uploaded a new change for review.

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

Change subject: ContributionScores.alias.php translations for bengali.
..

ContributionScores.alias.php translations for bengali.

Bug: T151927
Change-Id: Ia68b24daf80a86e1be493141bafb2ac1a86267e3
---
M ContributionScores.alias.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContributionScores 
refs/changes/76/324276/2

diff --git a/ContributionScores.alias.php b/ContributionScores.alias.php
index a1ee392..369573d 100644
--- a/ContributionScores.alias.php
+++ b/ContributionScores.alias.php
@@ -54,6 +54,11 @@
'ContributionScores' => array( 'Skor_sumbangan' ),
 );
 
+/** Bengali (বাংলা) */
+$specialPageAliases['bn'] = array(
+   'ContributionScores' => array( 'অবদানের_স্কোর' ),
+);
+
 /** Breton (brezhoneg) */
 $specialPageAliases['br'] = array(
'ContributionScores' => array( 'Skor_Degasadennoù' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia68b24daf80a86e1be493141bafb2ac1a86267e3
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContributionScores
Gerrit-Branch: master
Gerrit-Owner: Aftab 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Link to the correct configuration form

2016-11-29 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: Link to the correct configuration form
..

Link to the correct configuration form

Bug: T151941
Change-Id: Id8acaa4cb113f2c0b7661df1e8e3c14034a900ed
---
M sites/all/modules/thank_you/thank_you.info
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/72/324272/1

diff --git a/sites/all/modules/thank_you/thank_you.info 
b/sites/all/modules/thank_you/thank_you.info
index 1ed382e..282c82d 100644
--- a/sites/all/modules/thank_you/thank_you.info
+++ b/sites/all/modules/thank_you/thank_you.info
@@ -5,7 +5,7 @@
 dependencies[] = wmf_civicrm
 dependencies[] = wmf_communication
 package = Wikimedia
-configure = admin/config/thank_you
+configure = admin/config/thank_you/configure
 files[] = Html2Text.php
 files[] = generators/FindUnconsumedTokens.php
 files[] = generators/RenderTranslatedPage.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8acaa4cb113f2c0b7661df1e8e3c14034a900ed
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Awight 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: varnish: make PURGE more efficient

2016-11-29 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: varnish: make PURGE more efficient
..

varnish: make PURGE more efficient

This gets rid of all kinds of output mangling (e.g. analytics
headers, set-cookies, etc) and cluster-specific error-handling
conditionals for the PURGE case.  Should make PURGE a little more
efficient for both varnish and vhtcpd, and possibly avoids
accidentally matching PURGE responses in various stats daemons by
avoiding the relevant output headers.

Change-Id: I05e812dfae3beb3df0297ab5be6a68a060e72c6d
---
M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
1 file changed, 8 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/70/324270/1

diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
index da37a0f..d733b89 100644
--- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
@@ -404,12 +404,14 @@
 // Varnish4 vcl_synth+vcl_backend_error
 
 sub vcl_synth {
-   set resp.http.X-CDIS = "int";
-   call deliver_synth_;
-   call https_error_redirect;
-   call cluster_fe_err_synth;
-   if (resp.status >= 400) {
-   call synth_errorpage;
+   if (req.method != "PURGE") {
+   set resp.http.X-CDIS = "int";
+   call deliver_synth_;
+   call https_error_redirect;
+   call cluster_fe_err_synth;
+   if (resp.status >= 400) {
+   call synth_errorpage;
+   }
}
return (deliver);
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05e812dfae3beb3df0297ab5be6a68a060e72c6d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Fix wikidata.beta.wmflabs.org after c507329e

2016-11-29 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Fix wikidata.beta.wmflabs.org after c507329e
..

Fix wikidata.beta.wmflabs.org after c507329e

 * Although it redirects, the host that's parsed isn't what's expected.

Change-Id: I5c139531fe45d4f9e0eaef79d8f1bfe8cabf6917
---
M conf/wmf/betalabs.localsettings.js
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy 
refs/changes/69/324269/1

diff --git a/conf/wmf/betalabs.localsettings.js 
b/conf/wmf/betalabs.localsettings.js
index 98317ea..60ef935 100644
--- a/conf/wmf/betalabs.localsettings.js
+++ b/conf/wmf/betalabs.localsettings.js
@@ -10,6 +10,10 @@
});
});
 
+   // Wikidata in labs doesn't have the www. subdomain
+   parsoidConfig.removeMwApi({ domain: 'www.wikidata.beta.wmflabs.org' });
+   parsoidConfig.setMwApi({ prefix: 'wikidatawiki', uri: 
'https://wikidata.beta.wmflabs.org/w/api.php' });
+
// Some wikis not found in the sitematrix
parsoidConfig.setMwApi({ prefix: 'labs', uri: 
'https://deployment.wikimedia.beta.wmflabs.org/w/api.php' });
parsoidConfig.setMwApi({ prefix: 'en_rtlwiki', uri: 
'https://en-rtl.wikipedia.beta.wmflabs.org/w/api.php' });

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c139531fe45d4f9e0eaef79d8f1bfe8cabf6917
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] mediawiki...TwoColConflict[master]: [WIP] Add logic to show and hide unchanged text

2016-11-29 Thread WMDE-Fisch (Code Review)
WMDE-Fisch has uploaded a new change for review.

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

Change subject: [WIP] Add logic to show and hide unchanged text
..

[WIP] Add logic to show and hide unchanged text

- word based trimming of text depending on a max length
- option buttons to hide/show unchanged text

ToDo:
- design refinements
- no-js solution
- more test

Bug: T149721
Change-Id: I9741e0e21c6fe1ec8fd1003cbff3c6c0e9ffe368
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/TwoColConflictPage.php
M modules/ext.TwoColConflict.css
A modules/ext.TwoColConflict.filter.js
D modules/ext.TwoColConflict.init.js
D modules/ext.TwoColConflict.js
A tests/phpunit/includes/TwoColConflictPageTest.php
9 files changed, 285 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwoColConflict 
refs/changes/68/324268/1

diff --git a/extension.json b/extension.json
index 4af7921..c29039c 100644
--- a/extension.json
+++ b/extension.json
@@ -31,6 +31,13 @@
],
"messages": [],
"dependencies": []
+   },
+   "ext.TwoColConflict.filter": {
+   "scripts": [
+   "modules/ext.TwoColConflict.filter.js"
+   ],
+   "messages": [],
+   "dependencies": []
}
},
"ResourceFileModulePaths": {
diff --git a/i18n/en.json b/i18n/en.json
index ac923b8..fe83965 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -12,5 +12,8 @@
"twoColConflict-editor-col-title": "Editor with version to be 
published",
"twoColConflict-editor-col-desc": "The version in the editor will be 
published. Initially, its content is the currently published version (by $1 on 
$2)",
"twoColConflict-diffchange-own-title": "in your version",
-   "twoColConflict-diffchange-foreign-title": "in $1's version"
+   "twoColConflict-diffchange-foreign-title": "in $1's version",
+   "twoColConflict-label-show": "show",
+   "twoColConflict-label-hide": "hide",
+   "twoColConflict-label-unchanged": "unchanged text"
 }
\ No newline at end of file
diff --git a/i18n/qqq.json b/i18n/qqq.json
index ad0a7ff..66314d5 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -12,5 +12,8 @@
"twoColConflict-editor-col-title": "Header for the editor column.",
"twoColConflict-editor-col-desc": "Description text for the editor 
column.\n\nParameters:\n$1 - Username of user that edited the last valid 
version.\n$2 - User-formatted time and date when the current revision was 
changed.",
"twoColConflict-diffchange-own-title": "The title text in the unified 
diff view for changes by the user.",
-   "twoColConflict-diffchange-foreign-title": "The title text in the 
unified diff view for conflicting changes.\n\nParameters:\n$1 - Username of the 
user that edited the current revision of the page."
+   "twoColConflict-diffchange-foreign-title": "The title text in the 
unified diff view for conflicting changes.\n\nParameters:\n$1 - Username of the 
user that edited the current revision of the page.",
+   "twoColConflict-label-show": "Label for the option showing elements in 
the diff view.",
+   "twoColConflict-label-hide": "Label for the option hiding elements in 
the diff view.",
+   "twoColConflict-label-unchanged": "Label for the options showing and 
hiding unchanged text in the diff view."
 }
diff --git a/includes/TwoColConflictPage.php b/includes/TwoColConflictPage.php
index 90fec12..7a3e75c 100644
--- a/includes/TwoColConflictPage.php
+++ b/includes/TwoColConflictPage.php
@@ -6,6 +6,9 @@
  */
 class TwoColConflictPage extends EditPage {
 
+   const WHITESPACES =
+   
'\s\xA0\x{1680}\x{180E}\x{2000}-\x{200A}\x{2028}\x{2029}\x{202F}\x{205F}\x{3000}';
+
/**
 * TwoColConflictPage constructor.
 *
@@ -43,6 +46,7 @@
public function showEditForm( $formCallback = null ) {
if ( $this->isConflict ) {
$this->addCSS();
+   $this->addJS();
$this->editFormTextTop = '';
$this->editFormTextBottom = '';
$this->editFormTextBeforeContent = 
$this->addEditFormBeforeContent();
@@ -102,7 +106,42 @@
$out.= '' . 
$this->getContext()->msg(
'twoColConflict-changes-col-desc', $lastUser, 
$lastChangeTime, $yourChangeTime
) . '';
+   $out.= $this->buildFilterOptionsMenu();
$out.= $this->buildChangesTextbox();
+   $out.= '';
+
+   return $out;
+   }
+
+   /**
+* Build HTML for the filter options for the unified diff view.
+*
+* @return string
+*/
+   private function 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: template.py: fix failed substitution in tag

2016-11-29 Thread Mpaa (Code Review)
Mpaa has uploaded a new change for review.

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

Change subject: template.py: fix failed substitution in  tag
..

template.py: fix failed substitution in  tag

Bug: T151931
Change-Id: If8daaecb3ce343a0369c6f0ed60432126ed9abe0
---
M scripts/template.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/67/324267/1

diff --git a/scripts/template.py b/scripts/template.py
index c4bbc6c..470dc69 100755
--- a/scripts/template.py
+++ b/scripts/template.py
@@ -221,11 +221,11 @@
 if self.getOption('subst') and self.getOption('remove'):
 replacements.append((templateRegex,
  r'{{subst:%s\g}}' % new))
-exceptions['inside-tags'] = ['ref', 'gallery']
+exceptions['inside-tags'] = ['ref', 'gallery', 'poem']
 elif self.getOption('subst'):
 replacements.append((templateRegex,
  r'{{subst:%s\g}}' % old))
-exceptions['inside-tags'] = ['ref', 'gallery']
+exceptions['inside-tags'] = ['ref', 'gallery', 'poem']
 elif self.getOption('remove'):
 replacements.append((templateRegex, ''))
 else:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8daaecb3ce343a0369c6f0ed60432126ed9abe0
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa 

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


[MediaWiki-commits] [Gerrit] mediawiki...PageImages[master]: Update for API error i18n

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update for API error i18n
..


Update for API error i18n

See Iae0e2ce3.

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

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



diff --git a/includes/ApiQueryPageImages.php b/includes/ApiQueryPageImages.php
index 4a207d8..5de31a4 100644
--- a/includes/ApiQueryPageImages.php
+++ b/includes/ApiQueryPageImages.php
@@ -74,7 +74,13 @@
$params = $this->extractRequestParams();
$prop = array_flip( $params['prop'] );
if ( !count( $prop ) ) {
-   $this->dieUsage( 'No properties selected', '_noprop' );
+   if ( is_callable( array( $this, 'dieWithError' ) ) ) {
+   $this->dieWithError(
+   array( 'apierror-paramempty', 
$this->encodeParamName( 'prop' ) ), 'noprop'
+   );
+   } else {
+   $this->dieUsage( 'No properties selected', 
'_noprop' );
+   }
}
 
$allTitles = $this->getTitles();
@@ -91,12 +97,7 @@
$pageIds = array_keys( $allTitles );
$offset = array_search( intval( $params['continue'] ), 
$pageIds );
// If the 'continue' page wasn't found, die with error
-   if ( !$offset ) {
-   $this->dieUsage(
-   'Invalid continue param. You should 
pass the original value returned by the previous query',
-   '_badcontinue'
-   );
-   }
+   $this->dieContinueUsageIf( !$offset );
}
 
$limit = $params['limit'];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib87f051a50f3073d5d4e60094036a307bfe198cb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PageImages
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Use darker shade of yellow

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use darker shade of yellow
..


Use darker shade of yellow

The yellow is a shade between YELLOW90 and YELLOW50 colors in the palette
We decided to do this in this weekly meeting of ORES

Change-Id: Ia957fe8652c649f0ed64badcf18e07605f8011b6
---
M modules/ext.ores.styles.css
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/ext.ores.styles.css b/modules/ext.ores.styles.css
index 149f69b..358357f 100644
--- a/modules/ext.ores.styles.css
+++ b/modules/ext.ores.styles.css
@@ -20,9 +20,9 @@
 }
 
 .damaging[data-ores-damaging='soft'] {
-   background-color: #fef6e7;
+   background-color: #ffe18d;
 }
 
 .damaging[data-ores-damaging='hard'] {
-   background-color: #eaf3ff;
+   background-color: #fef6e7;
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia957fe8652c649f0ed64badcf18e07605f8011b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Halfak 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Cite[master]: Re-use target widgets

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Re-use target widgets
..


Re-use target widgets

Depends-On: I5ed0591048a17e84077bde5490e05c0467d0394a
Depends-On: I5decb918f398704d4b6c108a16fbc1cc073ef077
Change-Id: Icba13d84e10cf18a6c68e26448b2efe93b8c42b8
---
M modules/ve-cite/ve.ui.MWReferenceDialog.js
1 file changed, 23 insertions(+), 32 deletions(-)

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



diff --git a/modules/ve-cite/ve.ui.MWReferenceDialog.js 
b/modules/ve-cite/ve.ui.MWReferenceDialog.js
index 6504471..4bf6c10 100644
--- a/modules/ve-cite/ve.ui.MWReferenceDialog.js
+++ b/modules/ve-cite/ve.ui.MWReferenceDialog.js
@@ -151,14 +151,14 @@
  */
 ve.ui.MWReferenceDialog.prototype.canApply = function () {
return this.documentHasContent() &&
-   ( 
this.referenceTarget.getSurface().getModel().hasBeenModified() ||
+   ( this.referenceTarget.hasBeenModified() ||
this.referenceGroupInput.getValue() !== this.originalGroup );
 };
 
 /**
- * Handle reference surface change events
+ * Handle reference target widget change events
  */
-ve.ui.MWReferenceDialog.prototype.onSurfaceHistory = function () {
+ve.ui.MWReferenceDialog.prototype.onTargetChange = function () {
var hasContent = this.documentHasContent();
 
this.actions.setAbilities( {
@@ -229,7 +229,7 @@
  * @chainable
  */
 ve.ui.MWReferenceDialog.prototype.useReference = function ( ref ) {
-   var group, citeCommands;
+   var group;
 
// Properties
if ( ref instanceof ve.dm.MWReferenceModel ) {
@@ -240,31 +240,7 @@
this.referenceModel = new ve.dm.MWReferenceModel( 
this.getFragment().getDocument() );
}
 
-   // Cleanup
-   if ( this.referenceTarget ) {
-   this.referenceTarget.destroy();
-   }
-
-   citeCommands = Object.keys( 
ve.init.target.getSurface().commandRegistry.registry ).filter( function ( 
command ) {
-   return command.indexOf( 'cite-' ) !== -1;
-   } );
-
-   // Properties
-   this.referenceTarget = ve.init.target.createTargetWidget(
-   this.referenceModel.getDocument(),
-   {
-   tools: ve.copy( 
ve.init.target.constructor.static.toolbarGroups ),
-   includeCommands: 
this.constructor.static.includeCommands,
-   excludeCommands: 
this.constructor.static.excludeCommands.concat( citeCommands ),
-   importRules: this.constructor.static.getImportRules(),
-   inDialog: this.constructor.static.name
-   }
-   );
-
-   // Events
-   this.referenceTarget.getSurface().getModel().connect( this, {
-   history: this.onSurfaceHistory.bind( this )
-   } );
+   this.referenceTarget.setDocument( this.referenceModel.getDocument() );
 
// Initialization
this.originalGroup = this.referenceModel.getGroup();
@@ -272,7 +248,6 @@
this.referenceGroupInput.setDisabled( true );
this.referenceGroupInput.setValue( this.originalGroup );
this.referenceGroupInput.setDisabled( false );
-   this.contentFieldset.$element.append( this.referenceTarget.$element );
this.referenceTarget.initialize();
 
group = this.getFragment().getDocument().getInternalList()
@@ -294,6 +269,10 @@
  * @inheritdoc
  */
 ve.ui.MWReferenceDialog.prototype.initialize = function () {
+   var citeCommands = Object.keys( 
ve.init.target.getSurface().commandRegistry.registry ).filter( function ( 
command ) {
+   return command.indexOf( 'cite-' ) !== -1;
+   } );
+
// Parent method
ve.ui.MWReferenceDialog.super.prototype.initialize.call( this );
 
@@ -308,11 +287,23 @@
this.$reuseWarningText = $( '' );
this.$reuseWarning = $( '' ).append( 
this.reuseWarningIcon.$element, this.$reuseWarningText );
 
+   this.referenceTarget = ve.init.target.createTargetWidget(
+   {
+   tools: ve.copy( 
ve.init.target.constructor.static.toolbarGroups ),
+   includeCommands: 
this.constructor.static.includeCommands,
+   excludeCommands: 
this.constructor.static.excludeCommands.concat( citeCommands ),
+   importRules: this.constructor.static.getImportRules(),
+   inDialog: this.constructor.static.name
+   }
+   );
+
this.contentFieldset = new OO.ui.FieldsetLayout();
this.optionsFieldset = new OO.ui.FieldsetLayout( {
label: ve.msg( 'cite-ve-dialog-reference-options-section' ),
icon: 'settings'
} );
+   this.contentFieldset.$element.append( this.referenceTarget.$element );
+
this.referenceGroupInput = new ve.ui.MWReferenceGroupInputWidget( {

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update VE core submodule to master (9625e8f)

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update VE core submodule to master (9625e8f)
..


Update VE core submodule to master (9625e8f)

New changes:
f1297b8 [BREAKING CHANGE] Allow target widgets to be re-used

Local changes:
Re-use target widgets

Change-Id: I5decb918f398704d4b6c108a16fbc1cc073ef077
---
M lib/ve
M modules/ve-mw/init/ve.init.mw.Target.js
M modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
M modules/ve-mw/ui/widgets/ve.ui.MWTargetWidget.js
4 files changed, 36 insertions(+), 48 deletions(-)

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



diff --git a/lib/ve b/lib/ve
index 0879bb2..9625e8f 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit 0879bb255f3cf75b9c8303841549c033e028f4fa
+Subproject commit 9625e8fdc3726e187e7ed9b9927a1e478de31902
diff --git a/modules/ve-mw/init/ve.init.mw.Target.js 
b/modules/ve-mw/init/ve.init.mw.Target.js
index 4f6518b..149e54f 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -255,16 +255,16 @@
 /**
  * @inheritdoc
  */
-ve.init.mw.Target.prototype.createTargetWidget = function ( dmDoc, config ) {
+ve.init.mw.Target.prototype.createTargetWidget = function ( config ) {
if ( this.mode === 'source' ) {
// Reset to visual mode for target widgets
-   return new ve.ui.MWTargetWidget( dmDoc, ve.extendObject( {
+   return new ve.ui.MWTargetWidget( ve.extendObject( {
commandRegistry: ve.ui.commandRegistry,
sequenceRegistry: ve.ui.sequenceRegistry,
dataTransferHandlerFactory: 
ve.ui.dataTransferHandlerFactory
}, config ) );
} else {
-   return new ve.ui.MWTargetWidget( dmDoc, config );
+   return new ve.ui.MWTargetWidget( config );
}
 };
 
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
index 23272f5..79225d4 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
@@ -20,7 +20,6 @@
 
// Properties
this.imageModel = null;
-   this.store = null;
this.fileRepoPromise = null;
this.pageTitle = '';
this.isSettingUpModel = false;
@@ -238,12 +237,20 @@
} );
 
// Caption
+   // Set up the caption target
+   this.captionTarget = ve.init.target.createTargetWidget( {
+   tools: ve.init.target.constructor.static.toolbarGroups,
+   includeCommands: this.constructor.static.includeCommands,
+   excludeCommands: this.constructor.static.excludeCommands,
+   importRules: this.constructor.static.getImportRules()
+   } );
this.captionFieldset = new OO.ui.FieldsetLayout( {
label: ve.msg( 'visualeditor-dialog-media-content-section' ),
help: ve.msg( 'visualeditor-dialog-media-content-section-help' 
),
icon: 'parameter',
classes: [ 've-ui-mwMediaDialog-caption-fieldset' ]
} );
+   this.captionFieldset.$element.append( this.captionTarget.$element );
 
// Alt text
altTextFieldset = new OO.ui.FieldsetLayout( {
@@ -356,6 +363,7 @@
this.positionSelect.connect( this, { choose: 'onPositionSelectChoose' } 
);
this.typeSelect.connect( this, { choose: 'onTypeSelectChoose' } );
this.search.getResults().connect( this, { choose: 
'onSearchResultsChoose' } );
+   this.captionTarget.connect( this, { change: 'checkChanged' } );
this.altTextInput.connect( this, { change: 'onAlternateTextChange' } );
this.searchTabs.connect( this, {
set: 'onSearchTabsSet'
@@ -1041,9 +1049,7 @@
// Only check 'changed' status after the model has finished
// building itself
if ( !this.isSettingUpModel ) {
-   if ( this.captionTarget && this.captionTarget.getSurface() ) {
-   captionChanged = 
this.captionTarget.getSurface().getModel().hasBeenModified();
-   }
+   captionChanged = !!this.captionTarget && 
this.captionTarget.hasBeenModified();
 
if (
// Activate or deactivate the apply/insert buttons
@@ -1246,18 +1252,12 @@
  * Reset the caption surface
  */
 ve.ui.MWMediaDialog.prototype.resetCaption = function () {
-   var captionDocument,
+   var captionNode, captionDocument,
doc = this.getFragment().getDocument();
 
-   if ( this.captionTarget ) {
-   // Reset the caption surface if it already exists
-   this.captionTarget.destroy();
-   this.captionTarget = null;
-   this.captionNode = null;
-   }
// Get existing caption. We only do this in setup, because the caption

[MediaWiki-commits] [Gerrit] integration/config[master]: node-rdkafka-statsd add npm job

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: node-rdkafka-statsd add npm job
..


node-rdkafka-statsd add npm job

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

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 871dd4e..b626e0b 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2112,6 +2112,9 @@
   - mediawiki-vagrant-puppet-doc-publish
   - mediawiki-vagrant-bundle-yard-publish
 
+  - name: node-rdkafka-statsd
+template:
+  - name: npm
 
   # TIP:
   # gerrit ls-projects -p operations/debs/

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9332b9c1ee222beb30e26507618ff4b70c104ffe
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Remove jscs in preparation for node template update

2016-11-29 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Remove jscs in preparation for node template update
..

Remove jscs in preparation for node template update

The new node template update enforces code styling conventions
with eslint. When that happens we no longer need to rely
on jscs for code styling.

Change-Id: I1df9549668dc1056c8affdbbc976d58f6dc40fbb
---
D .jscsrc
D Gruntfile.js
M package.json
3 files changed, 0 insertions(+), 57 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/66/324266/1

diff --git a/.jscsrc b/.jscsrc
deleted file mode 100644
index 27a0ed2..000
--- a/.jscsrc
+++ /dev/null
@@ -1,36 +0,0 @@
-{
-  "preset": "wikimedia",
-
-  "requireSpaceAfterLineComment": null,
-  "requireSpacesInsideParentheses": false,
-  "requireSpacesInsideBrackets": false,
-  "requireSpaceAfterKeywords": false,
-  "requireMultipleVarDecl": null,
-  "requireLineBreakAfterVariableAssignment": null,
-  "requireSpaceAfterBinaryOperators": null,
-  "validateQuoteMarks": null,
-  "disallowTrailingComma": null,
-  "disallowQuotedKeysInObjects": null,
-  "requireSpaceBeforeObjectValues": null,
-  "disallowDanglingUnderscores": null,
-  "disallowImplicitTypeConversion": null,
-  "requireCamelCaseOrUpperCaseIdentifiers": null,
-  "disallowSpaceAfterObjectKeys": null,
-  "requireSpaceBeforeBinaryOperators": null,
-  "disallowMultipleLineBreaks": null,
-  "requireDotNotation": null,
-  "disallowSpacesInsideParentheses": null,
-  "validateIndentation": 4,
-  "requireSpaceBeforeKeywords": null,
-  "disallowMixedSpacesAndTabs": null,
-  "requireLineFeedAtFileEnd": null,
-  "requireSpacesInsideObjectBrackets": null,
-  "requireSpaceBetweenArguments": null,
-  "disallowUnusedVariables": true,
-  "disallowVar": true,
-  "requireVarDeclFirst": null,
-  "jsDoc": null,
-  "excludeFiles": [
-"node_modules/**"
-  ]
-}
diff --git a/Gruntfile.js b/Gruntfile.js
deleted file mode 100644
index 7f369b8..000
--- a/Gruntfile.js
+++ /dev/null
@@ -1,19 +0,0 @@
-"use strict";
-
-module.exports = function ( grunt ) {
-  grunt.loadNpmTasks("grunt-jscs");
-
-  grunt.initConfig( {
-jscs: {
-src: ['lib/**/*.js', 'routes/*.js', 'test/**/*.js' ],
-options: {
-config: ".jscsrc",
-requireCurlyBraces: [ "if" ]
-}
-}
-  } );
-
-  grunt.registerTask( 'test', [ 'jscs' ] );
-
-  grunt.registerTask( 'default', [ 'test' ] );
-};
diff --git a/package.json b/package.json
index 6fb5551..ab45f71 100644
--- a/package.json
+++ b/package.json
@@ -59,8 +59,6 @@
 "ajv": "^4.7.7",
 "csv-parse": "^1.1.7",
 "extend": "^3.0.0",
-"grunt": "^1.0.1",
-"grunt-jscs": "^3.0.1",
 "istanbul": "^0.4.5",
 "mocha": "^3.1.2",
 "mocha-jshint": "^2.3.1",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1df9549668dc1056c8affdbbc976d58f6dc40fbb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: Oppia: use develop branch

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Oppia: use develop branch
..


Oppia: use develop branch

Change-Id: Ice0207bb548ac21dbae3eb569af51a10ecf73f2e
---
M repoconfig.commit.json
M repoconfig.json
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/repoconfig.commit.json b/repoconfig.commit.json
index 0f6c8d7..31f9f86 100644
--- a/repoconfig.commit.json
+++ b/repoconfig.commit.json
@@ -201,6 +201,7 @@
"repos": {
"oppia": {
"type": "git",
+   "branch": "develop",
"url": "g...@github.com:oppia/oppia.git"
}
}
diff --git a/repoconfig.json b/repoconfig.json
index 5d27933..81a796e 100644
--- a/repoconfig.json
+++ b/repoconfig.json
@@ -197,6 +197,7 @@
"repos": {
"oppia": {
"type": "git",
+   "branch": "develop",
"url": "https://github.com/oppia/oppia.git;
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice0207bb548ac21dbae3eb569af51a10ecf73f2e
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: node-rdkafka-statsd add npm job

2016-11-29 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: node-rdkafka-statsd add npm job
..

node-rdkafka-statsd add npm job

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/65/324265/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 871dd4e..3805ae4 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2112,6 +2112,9 @@
   - mediawiki-vagrant-puppet-doc-publish
   - mediawiki-vagrant-bundle-yard-publish
 
+  - name: node-rdkafka-statsd
+template:
+  - npm
 
   # TIP:
   # gerrit ls-projects -p operations/debs/

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9332b9c1ee222beb30e26507618ff4b70c104ffe
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: Oppia: use develop branch

2016-11-29 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Oppia: use develop branch
..

Oppia: use develop branch

Change-Id: Ice0207bb548ac21dbae3eb569af51a10ecf73f2e
---
M repoconfig.commit.json
M repoconfig.json
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/64/324264/1

diff --git a/repoconfig.commit.json b/repoconfig.commit.json
index 0f6c8d7..31f9f86 100644
--- a/repoconfig.commit.json
+++ b/repoconfig.commit.json
@@ -201,6 +201,7 @@
"repos": {
"oppia": {
"type": "git",
+   "branch": "develop",
"url": "g...@github.com:oppia/oppia.git"
}
}
diff --git a/repoconfig.json b/repoconfig.json
index 5d27933..81a796e 100644
--- a/repoconfig.json
+++ b/repoconfig.json
@@ -197,6 +197,7 @@
"repos": {
"oppia": {
"type": "git",
+   "branch": "develop",
"url": "https://github.com/oppia/oppia.git;
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice0207bb548ac21dbae3eb569af51a10ecf73f2e
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 

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


[MediaWiki-commits] [Gerrit] mediawiki...Vector[master]: build: Introduce stylelint and make pass

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: build: Introduce stylelint and make pass
..


build: Introduce stylelint and make pass

Change-Id: I48d542580d767df2d17ce4c6668e9e233a0f7904
---
A .stylelintrc
M Gruntfile.js
M package.json
M responsive.less
M screen-hd.less
M screen.less
M skinStyles/mediawiki.notification.less
M skinStyles/mediawiki.special.preferences.styles.less
M variables.less
9 files changed, 40 insertions(+), 25 deletions(-)

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



diff --git a/.stylelintrc b/.stylelintrc
new file mode 100644
index 000..449f45b
--- /dev/null
+++ b/.stylelintrc
@@ -0,0 +1,7 @@
+{
+   "extends": "stylelint-config-wikimedia",
+   "rules": {
+   "selector-no-id": null,
+   "no-descending-specificity": null
+   }
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index 94cb4bf..fe329c6 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -4,6 +4,7 @@
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-stylelint' );
 
grunt.initConfig( {
eslint: {
@@ -20,9 +21,15 @@
'!node_modules/**'
]
},
-   banana: conf.MessagesDirs
+   banana: conf.MessagesDirs,
+   stylelint: {
+   all: [
+   '*.{le,c}ss',
+   'skinStyles/*.{le,c}ss'
+   ]
+   }
} );
 
-   grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana', 
'stylelint' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/package.json b/package.json
index 2ee7733..6218adf 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,8 @@
 "grunt-eslint": "19.0.0",
 "eslint-config-wikimedia": "0.3.0",
 "grunt-banana-checker": "0.5.0",
-"grunt-jsonlint": "1.0.7"
+"grunt-jsonlint": "1.0.7",
+"grunt-stylelint": "0.6.0",
+"stylelint-config-wikimedia": "0.3.0"
   }
 }
diff --git a/responsive.less b/responsive.less
index ac483d3..700bdc1 100644
--- a/responsive.less
+++ b/responsive.less
@@ -5,7 +5,7 @@
 */
 
 div#mw-head {
-   position: static !important;
+   position: static !important; /* stylelint-disable-line 
declaration-no-important */
margin-top: 0.5em;
 }
 
diff --git a/screen-hd.less b/screen-hd.less
index 7c1d48b..96c96cc 100644
--- a/screen-hd.less
+++ b/screen-hd.less
@@ -1,6 +1,6 @@
 /* Vector screen styles for high definition displays */
 
-@import "variables.less";
+@import 'variables.less';
 
 .mw-body {
margin-left: 11em;
diff --git a/screen.less b/screen.less
index 353f35f..4a5e3b8 100644
--- a/screen.less
+++ b/screen.less
@@ -1,8 +1,7 @@
 /* Vector screen styles */
 
-@import "variables.less";
-
-@import "components/common.less";
-@import "components/navigation.less";
-@import "components/footer.less";
-@import "components/externalLinks.less";
+@import 'variables.less';
+@import 'components/common.less';
+@import 'components/navigation.less';
+@import 'components/footer.less';
+@import 'components/externalLinks.less';
diff --git a/skinStyles/mediawiki.notification.less 
b/skinStyles/mediawiki.notification.less
index 783d189..239bd92 100644
--- a/skinStyles/mediawiki.notification.less
+++ b/skinStyles/mediawiki.notification.less
@@ -1,4 +1,4 @@
-@import "../variables";
+@import '../variables';
 
 /* mediawiki.notification */
 
@@ -15,20 +15,20 @@
 
.mw-notification {
background-color: #fff;
-   background-color: rgba(255, 255, 255, 0.93);
+   background-color: rgba( 255, 255, 255, 0.93 );
padding: 0.75em 1.5em;
border: solid 1px @content-border-color;
border-radius: 0.75em;
-   box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.125);
+   box-shadow: 0 2px 10px 0 rgba( 0, 0, 0, 0.125 );
}
 
.mw-notification-type-warn {
border-color: #f5be00; /* yellow */
-   box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.125), 0 0 0.75em 
rgba(245, 190, 0, 0.25) inset;
+   box-shadow: 0 2px 10px 0 rgba( 0, 0, 0, 0.125 ), 0 0 0.75em 
rgba( 245, 190, 0, 0.25 ) inset;
}
 
.mw-notification-type-error {
-   border-color: red;
-   box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.125), 0 0 0.75em 
rgba(255, 0, 0, 0.25) inset;
+   border-color: #f00; /* red */
+   box-shadow: 0 2px 10px 0 rgba( 0, 0, 0, 0.125 ), 0 0 0.75em 
rgba( 255, 0, 0, 0.25 ) inset;
}
 }
diff --git 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.UI: Tweak destructive reds for background-independ...

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: mediawiki.UI: Tweak destructive reds for background-independent 
contrast
..


mediawiki.UI: Tweak destructive reds for background-independent contrast

Reds of color palette have been changed by WMF designers to provide more
contrast on dark and light backgrounds (WCAG 2.0 level AA on black and 
white). Among other things this will help with error messages of 
coming patches. Following-up I73d336900.

Change-Id: I62a1d1c6bbd52973883789e1fcb9927cccd3f6a6
---
M resources/src/mediawiki.less/mediawiki.ui/variables.less
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/resources/src/mediawiki.less/mediawiki.ui/variables.less 
b/resources/src/mediawiki.less/mediawiki.ui/variables.less
index 676ecca..9688f1f 100644
--- a/resources/src/mediawiki.less/mediawiki.ui/variables.less
+++ b/resources/src/mediawiki.less/mediawiki.ui/variables.less
@@ -26,9 +26,9 @@
 // Orange; for contextual use of returning to a past action
 @colorRegressive: #ff5d00;
 // Red; for contextual use of a negative action of high severity
-@colorDestructive: #c33;
-@colorDestructiveHighlight: #e53939;
-@colorDestructiveActive: #873636;
+@colorDestructive: #d33;
+@colorDestructiveHighlight: #ff4242;
+@colorDestructiveActive: #b32424;
 // Orange; for contextual use of a potentially negative action of medium 
severity
 @colorMediumSevere: #ff5d00;
 // Yellow; for contextual use of a potentially negative action of low severity

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62a1d1c6bbd52973883789e1fcb9927cccd3f6a6
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Can't use undefined annotations from 3fdc1a37

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Can't use undefined annotations from 3fdc1a37
..


Can't use undefined annotations from 3fdc1a37

 * Let's revert some of c507329e instead.

 * scap is complaining,

   20:08:51 deploy failed:  could not determine a
   constructor for the tag 'tag:yaml.org,2002:js/undefined'
   in "", line 3, column 12:
   api_proxy: !!js/undefined ''

   it doesn't know about that syntax.

Change-Id: Iea9658f76ff26bfd227e73d1a7c52f40ee846b85
---
M conf/wmf/localsettings.js
M scap/environments/beta/vars.yaml
M scap/templates/config.yaml.j2
M scap/vars.yaml
4 files changed, 4 insertions(+), 6 deletions(-)

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



diff --git a/conf/wmf/localsettings.js b/conf/wmf/localsettings.js
index efb4cb2..1ea012d 100644
--- a/conf/wmf/localsettings.js
+++ b/conf/wmf/localsettings.js
@@ -1,5 +1,9 @@
 "use strict";
 exports.setup = function(parsoidConfig) {
+   // Use the API backends directly without hitting the text varnishes.
+   // API requests are not cacheable anyway.
+   parsoidConfig.defaultAPIProxyURI = 'http://api.svc.eqiad.wmnet';
+
// Sample these verbose logs to prevent overwhelm
// 1% and 2% for empty/tr and empty/li is based on
// seeing the volume in rt-testing.
diff --git a/scap/environments/beta/vars.yaml b/scap/environments/beta/vars.yaml
index d8df203..33a5a26 100644
--- a/scap/environments/beta/vars.yaml
+++ b/scap/environments/beta/vars.yaml
@@ -1,3 +1,2 @@
 localsettings: conf/wmf/betalabs.localsettings.js
 load_wmf: false
-api_proxy: !!js/undefined ''
diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 0801609..5e36d4c 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -44,10 +44,6 @@
   useBatchAPI: true
   usePHPPreProcessor: true
 
-  # Use the API backends directly without hitting the text varnishes.
-  # API requests are not cacheable anyway.
-  defaultAPIProxyURI: <%= api_proxy %>
-
   # RESTBase uses 2 minutes timeouts for the first request
   # and a higher value subsequently.
   #
diff --git a/scap/vars.yaml b/scap/vars.yaml
index 10cfdaf..bb8bb0a 100644
--- a/scap/vars.yaml
+++ b/scap/vars.yaml
@@ -12,4 +12,3 @@
 port: 8000
 localsettings: conf/wmf/localsettings.js
 load_wmf: true
-api_proxy: "http://api.svc.eqiad.wmnet;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iea9658f76ff26bfd227e73d1a7c52f40ee846b85
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: fix check that file we have fcntl lock is empty

2016-11-29 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: fix check that file we have fcntl lock is empty
..


fix check that file we have fcntl lock is empty

don't read contents by path, check size of filehandle via stat

Change-Id: Ia530f00b800ae2d187b85b0eac6f949cba6ab8d4
---
M xmldumps-backup/miscdumplib.py
1 file changed, 11 insertions(+), 10 deletions(-)

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



diff --git a/xmldumps-backup/miscdumplib.py b/xmldumps-backup/miscdumplib.py
index 64ce6a8..5f92108 100644
--- a/xmldumps-backup/miscdumplib.py
+++ b/xmldumps-backup/miscdumplib.py
@@ -306,32 +306,33 @@
 '''
 given number of seconds, see if file is older than this many seconds
 and remove file if so.  we do this by opening the file exclusively 
first,
-stat on the open fdesc, then remove path if it checks out.
+stat on the open file handle, then remove path if it checks out.
 return True on removal, False for anything else including errors.
 '''
 removed = False
 try:
 # we're not going to write anything but have to open for write
 # in order to get LOCK_EX
-fdesc = open(self.lockfile.get_path(), "a+")
+fhandle = open(self.lockfile.get_path(), "a+")
 # try to get the lock. if we can't then we give up
 try:
-fcntl.lockf(fdesc, fcntl.LOCK_EX | fcntl.LOCK_NB)
+fcntl.lockf(fhandle, fcntl.LOCK_EX | fcntl.LOCK_NB)
 except Exception:
 # fail to get lock or some other error
-fdesc.close()
+fhandle.close()
 return removed
-if self._is_stale(cutoff, fdesc.fileno()):
+if self._is_stale(cutoff, fhandle.fileno()):
 removed = self._unlock()
 else:
 # if the file did not exist, our open call would have created
-# it, and then we would have an empty file.  See if that's the
-# case and if so, clean it up
-contents = 
FileUtils.read_file(self.lockfile.get_path(self.date))
-if not contents:
+# it, and then we would have an empty file.  No one else would
+# have written to it because we have the LOCK_EX here.
+# See if that's the case and if so, clean up
+filesize = os.fstat(fhandle.fileno()).st_size
+if not filesize:
 removed = self._unlock()
 # lock removed now
-fdesc.close()
+fhandle.close()
 return removed
 except Exception:
 pass

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia530f00b800ae2d187b85b0eac6f949cba6ab8d4
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge master into deployment

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Merge master into deployment
..


Merge master into deployment

fcf3c1bc929419c1e90fa1cd9b9e2664c2624bc3 New thank-you letter

Change-Id: I385fff939e31178325af386653749c895aeae9fc
---
0 files changed, 0 insertions(+), 0 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I385fff939e31178325af386653749c895aeae9fc
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Awight 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Serve 400 instead of 500 when invalid thumbnail parameters a...

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Serve 400 instead of 500 when invalid thumbnail parameters are 
requested
..


Serve 400 instead of 500 when invalid thumbnail parameters are requested

This was requested because of 0px thumbnail requests, but there are
other cases where parameters are detected as invalid and 400 is
semantically more correct than 500 in that situation.

Bug: T147784
Change-Id: I4d24a93e655f04d8119e77798d5df5a45caaafcf
---
M includes/media/MediaTransformOutput.php
M thumb.php
2 files changed, 14 insertions(+), 0 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  Filippo Giunchedi: Looks good to me, but someone else must approve
  Gergő Tisza: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/media/MediaTransformOutput.php 
b/includes/media/MediaTransformOutput.php
index b3a555a..46b9674 100644
--- a/includes/media/MediaTransformOutput.php
+++ b/includes/media/MediaTransformOutput.php
@@ -476,6 +476,10 @@
function isError() {
return true;
}
+
+   function getHttpStatusCode() {
+   return 500;
+   }
 }
 
 /**
@@ -489,6 +493,10 @@
max( isset( $params['width'] ) ? $params['width'] : 0, 
120 ),
max( isset( $params['height'] ) ? $params['height'] : 
0, 120 ),
wfMessage( 'thumbnail_invalid_params' )->text() );
+   }
+
+   function getHttpStatusCode() {
+   return 400;
}
 }
 
@@ -511,4 +519,8 @@
)->text()
);
}
+
+   function getHttpStatusCode() {
+   return 400;
+   }
 }
diff --git a/thumb.php b/thumb.php
index fca25c5..c38b89c 100644
--- a/thumb.php
+++ b/thumb.php
@@ -341,6 +341,7 @@
// Check for thumbnail generation errors...
$msg = wfMessage( 'thumbnail_error' );
$errorCode = 500;
+
if ( !$thumb ) {
$errorMsg = $errorMsg ?: $msg->rawParams( 'File::transform() 
returned false' )->escaped();
if ( $errorMsg instanceof MessageSpecifier &&
@@ -350,6 +351,7 @@
}
} elseif ( $thumb->isError() ) {
$errorMsg = $thumb->getHtmlMsg();
+   $errorCode = $thumb->getHttpStatusCode();
} elseif ( !$thumb->hasFile() ) {
$errorMsg = $msg->rawParams( 'No path supplied in thumbnail 
object' )->escaped();
} elseif ( $thumb->fileIsSource() ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4d24a93e655f04d8119e77798d5df5a45caaafcf
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gilles 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Gilles 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: Revert "Enable syslog on OSX"

2016-11-29 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Revert "Enable syslog on OSX"
..

Revert "Enable syslog on OSX"

This reverts commit 13337423c90a45a3bb5dfb3ead74b86d6f673d30.

Change-Id: Ic60dcde9054e7f059efc4ccade1b1ad226dd0a20
---
M logger.js
1 file changed, 15 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/62/324262/1

diff --git a/logger.js b/logger.js
index b0ec072..00e8a89 100644
--- a/logger.js
+++ b/logger.js
@@ -1,18 +1,24 @@
-var LOG_DEBUG = 0,
+var hasSyslog = !!process.platform.match(/linux/),
+   LOG_DEBUG = 0,
LOG_INFO = 1,   
LOG_ERR = 2,
-   syslog = require( 'modern-syslog' ),
+   syslog,
constMap = [];
 
-/*jslint bitwise: true*/
-syslog.init( 'dash', syslog.LOG_PID | syslog.LOG_ODELAY, syslog.LOG_LOCAL0 );
-/*jslint bitwise: false*/
-constMap[LOG_DEBUG] = syslog.LOG_DEBUG;
-constMap[LOG_INFO] = syslog.LOG_INFO;
-constMap[LOG_ERR] = syslog.LOG_ERR;
+if ( hasSyslog ) {
+   syslog = require( 'modern-syslog' );
+   /*jslint bitwise: true*/
+   syslog.init( 'dash', syslog.LOG_PID | syslog.LOG_ODELAY, 
syslog.LOG_LOCAL0 );
+   /*jslint bitwise: false*/
+   constMap[LOG_DEBUG] = syslog.LOG_DEBUG;
+   constMap[LOG_INFO] = syslog.LOG_INFO;
+   constMap[LOG_ERR] = syslog.LOG_ERR;
+}
 
 function log( level, message ) {
-   syslog.log( constMap[level], message );
+   if ( hasSyslog ) {
+   syslog.log( constMap[level], message );
+   }
if ( level === LOG_ERR ) {
console.error( message );
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic60dcde9054e7f059efc4ccade1b1ad226dd0a20
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: Revert "Change package node-syslog to modern-syslog"

2016-11-29 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Revert "Change package node-syslog to modern-syslog"
..

Revert "Change package node-syslog to modern-syslog"

Needs more modern node version than we have on the dash box :(

This reverts commit 856ee2fda074c8e8d056a04d094c1afc3c785602.

Change-Id: I11d646da1a4f31537275905c14f3356c2fd230f8
---
M logger.js
M package.json
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/63/324263/1

diff --git a/logger.js b/logger.js
index 00e8a89..745c6d1 100644
--- a/logger.js
+++ b/logger.js
@@ -6,7 +6,7 @@
constMap = [];
 
 if ( hasSyslog ) {
-   syslog = require( 'modern-syslog' );
+   syslog = require( 'node-syslog' );
/*jslint bitwise: true*/
syslog.init( 'dash', syslog.LOG_PID | syslog.LOG_ODELAY, 
syslog.LOG_LOCAL0 );
/*jslint bitwise: false*/
diff --git a/package.json b/package.json
index 0cd9e7f..b7c186f 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
"memory-cache": "0.0.5",
"mysql": "^2.4.3",
"mysql-promise": "^1.3.0",
-   "modern-syslog": "~1.1.2",
+   "node-syslog": "~1.1.7",
"odata-parser": "~1.0.0",
"passport": "^0.2.1",
"passport-drupal": "0.3.3",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I11d646da1a4f31537275905c14f3356c2fd230f8
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: WIP bandaid for big english board

2016-11-29 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: WIP bandaid for big english board
..

WIP bandaid for big english board

Really need to allow a generic campaign with configurable start and
end dates. This fix is only good through Dec 29th, and still needs
labels fixed.

Bug: T151820
Change-Id: Id41536ca0613d698305dbfc2cac2540cf9f3514c
---
M widgets/big-english.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/61/324261/1

diff --git a/widgets/big-english.js b/widgets/big-english.js
index aac55d6..45600c2 100644
--- a/widgets/big-english.js
+++ b/widgets/big-english.js
@@ -3,7 +3,7 @@
 
 module.exports = {
name: 'big-english',
-   query: 'select count(*) as donations, sum(total_amount) as usd_total,\n 
IF( day(receive_date) = day(utc_timestamp()) and hour(receive_date) = 
hour(utc_timestamp()), CEILING(TIMESTAMPDIFF(SECOND, MIN(receive_date), 
MAX(receive_date))/60), 60) as minutes, sum(total_amount)/IF( day(receive_date) 
= day(utc_timestamp()) and hour(receive_date) = hour(utc_timestamp()), 
CEILING(TIMESTAMPDIFF(SECOND, MIN(receive_date), MAX(receive_date))/60), 60)/60 
as usd_per_second, DAY(receive_date) as day, HOUR(receive_date) as hour from ' 
+ config.civicrmDb + '.civicrm_contribution cc [[WHERE]] GROUP BY 
DAY(receive_date), HOUR(receive_date) ORDER BY day ASC, hour ASC;',
+   query: 'select count(*) as donations, sum(total_amount) as usd_total,\n 
IF( day(receive_date) = day(utc_timestamp()) and hour(receive_date) = 
hour(utc_timestamp()), CEILING(TIMESTAMPDIFF(SECOND, MIN(receive_date), 
MAX(receive_date))/60), 60) as minutes, sum(total_amount)/IF( day(receive_date) 
= day(utc_timestamp()) and hour(receive_date) = hour(utc_timestamp()), 
CEILING(TIMESTAMPDIFF(SECOND, MIN(receive_date), MAX(receive_date))/60), 60)/60 
as usd_per_second, DAYOFYEAR(receive_date) - 333 as day, HOUR(receive_date) as 
hour from ' + config.civicrmDb + '.civicrm_contribution cc WHERE receive_date 
BETWEEN \'2016-11-29\' AND \'2017-01-01\' GROUP BY DAYOFYEAR(receive_date) - 
333, HOUR(receive_date) ORDER BY day ASC, hour ASC;',
mainTableAlias: 'cc',
optionalJoins: {},
filters: commonFilters.civicrmContribution,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id41536ca0613d698305dbfc2cac2540cf9f3514c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] node-rdkafka-statsd[master]: node-rdkafka event.stats callback that reports stats to statsd

2016-11-29 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: node-rdkafka event.stats callback that reports stats to statsd
..


node-rdkafka event.stats callback that reports stats to statsd

Node module that parses an object structure, flattens it
and sends the whitelisted metrics to statsd

Depends implicitily on statsd client

Bug: T145099

Change-Id: I15d8a2f93b34bfafa5c80b191b416e780f33c515
---
A .gitignore
A .jshintignore
A .jshintrc
A .travis.yml
A LICENSE
A README.md
A lib/rdkafka-statsd.js
A package.json
A test/index.js
A test/test.js
10 files changed, 1,137 insertions(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..392ef11
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,22 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+
+# Dependency directories
+node_modules
+
+# Optional npm cache directory
+.npm
+
+# Optional REPL history
+.node_repl_history
+
+# IntelliJ IDEA
+.idea/*
+
+# Sublime
+*.sublime*
+
+# JSDoc results
+out/
diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..1c69eee
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1,3 @@
+coverage
+node_modules
+test
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..283025c
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,33 @@
+{
+  "predef": [
+"setImmediate",
+"Map",
+"Set",
+"describe",
+"it"
+  ],
+
+  "bitwise": true,
+  "laxbreak": true,
+  "curly": true,
+  "eqeqeq": true,
+  "immed": true,
+  "latedef": "nofunc",
+  "newcap": true,
+  "noarg": true,
+  "noempty": true,
+  "nonew": true,
+  "regexp": false,
+  "undef": true,
+  "strict": true,
+  "trailing": true,
+
+  "smarttabs": true,
+  "multistr": true,
+
+  "node": true,
+
+  "nomen": false,
+  "loopfunc": true,
+  "esnext": true
+}
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000..7ee6233
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,18 @@
+language: node_js
+node_js:
+- "0.10"
+- "0.12"
+- "4.2"
+- "5"
+
+sudo: false
+
+notifications:
+  irc:
+channels:
+  - "irc.freenode.org#wikimedia-analytics"
+on_success: change
+on_failure: always
+
+script: npm test
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000..e06d208
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+Apache License
+   Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+  "License" shall mean the terms and conditions for use, reproduction,
+  and distribution as defined by Sections 1 through 9 of this document.
+
+  "Licensor" shall mean the copyright owner or entity authorized by
+  the copyright owner that is granting the License.
+
+  "Legal Entity" shall mean the union of the acting entity and all
+  other entities that control, are controlled by, or are under common
+  control with that entity. For the purposes of this definition,
+  "control" means (i) the power, direct or indirect, to cause the
+  direction or management of such entity, whether by contract or
+  otherwise, or (ii) ownership of fifty percent (50%) or more of the
+  outstanding shares, or (iii) beneficial ownership of such entity.
+
+  "You" (or "Your") shall mean an individual or Legal Entity
+  exercising permissions granted by this License.
+
+  "Source" form shall mean the preferred form for making modifications,
+  including but not limited to software source code, documentation
+  source, and configuration files.
+
+  "Object" form shall mean any form resulting from mechanical
+  transformation or translation of a Source form, including but
+  not limited to compiled object code, generated documentation,
+  and conversions to other media types.
+
+  "Work" shall mean the work of authorship, whether in Source or
+  Object form, made available under the License, as indicated by a
+  copyright notice that is included in or attached to the work
+  (an example is provided in the Appendix below).
+
+  "Derivative Works" shall mean any work, whether in Source or Object
+  form, that is based on (or derived from) the Work and for which the
+  editorial revisions, annotations, elaborations, or other modifications
+  represent, as a whole, an original work of authorship. For the purposes
+  of this License, Derivative Works shall not include works that remain
+  separable from, or merely link (or bind by name) to the interfaces of,
+  the Work and Derivative Works thereof.
+
+  "Contribution" shall mean any work of authorship, including
+  the original version of the Work and any modifications or additions
+  to that Work or Derivative Works thereof, that is intentionally
+  

[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge master into deployment

2016-11-29 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: Merge master into deployment
..

Merge master into deployment

fcf3c1bc929419c1e90fa1cd9b9e2664c2624bc3 New thank-you letter

Change-Id: I385fff939e31178325af386653749c895aeae9fc
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/59/324259/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I385fff939e31178325af386653749c895aeae9fc
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Awight 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Can't use undefined annotations from 3fdc1a37

2016-11-29 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Can't use undefined annotations from 3fdc1a37
..

Can't use undefined annotations from 3fdc1a37

 * Let's revert some of c507329e instead.

 * scap is complaining,

   20:08:51 deploy failed:  could not determine a
   constructor for the tag 'tag:yaml.org,2002:js/undefined'
   in "", line 3, column 12:
   api_proxy: !!js/undefined ''

   it doesn't know about that syntax.

Change-Id: Iea9658f76ff26bfd227e73d1a7c52f40ee846b85
---
M conf/wmf/localsettings.js
M scap/environments/beta/vars.yaml
M scap/templates/config.yaml.j2
M scap/vars.yaml
4 files changed, 4 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy 
refs/changes/60/324260/1

diff --git a/conf/wmf/localsettings.js b/conf/wmf/localsettings.js
index efb4cb2..5ab7c78 100644
--- a/conf/wmf/localsettings.js
+++ b/conf/wmf/localsettings.js
@@ -1,5 +1,9 @@
 "use strict";
 exports.setup = function(parsoidConfig) {
+   // Use the API backends directly without hitting the text varnishes.
+   // API requests are not cacheable anyway.
+   defaultAPIProxyURI = 'http://api.svc.eqiad.wmnet';
+
// Sample these verbose logs to prevent overwhelm
// 1% and 2% for empty/tr and empty/li is based on
// seeing the volume in rt-testing.
diff --git a/scap/environments/beta/vars.yaml b/scap/environments/beta/vars.yaml
index d8df203..33a5a26 100644
--- a/scap/environments/beta/vars.yaml
+++ b/scap/environments/beta/vars.yaml
@@ -1,3 +1,2 @@
 localsettings: conf/wmf/betalabs.localsettings.js
 load_wmf: false
-api_proxy: !!js/undefined ''
diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 0801609..5e36d4c 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -44,10 +44,6 @@
   useBatchAPI: true
   usePHPPreProcessor: true
 
-  # Use the API backends directly without hitting the text varnishes.
-  # API requests are not cacheable anyway.
-  defaultAPIProxyURI: <%= api_proxy %>
-
   # RESTBase uses 2 minutes timeouts for the first request
   # and a higher value subsequently.
   #
diff --git a/scap/vars.yaml b/scap/vars.yaml
index 10cfdaf..bb8bb0a 100644
--- a/scap/vars.yaml
+++ b/scap/vars.yaml
@@ -12,4 +12,3 @@
 port: 8000
 localsettings: conf/wmf/localsettings.js
 load_wmf: true
-api_proxy: "http://api.svc.eqiad.wmnet;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea9658f76ff26bfd227e73d1a7c52f40ee846b85
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: New thank-you letter

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: New thank-you letter
..


New thank-you letter

Had to edit the output by hand a bit...

To fix later:
* Strip leading  and random  coming from MediaWiki.
* Find a more robust way to deal with the paragraph tags in the salutation line.
* Track down endif failure in FindUnconsumedTokens.

Change-Id: I23b6e311ea3a6d85869e538e0cf23317129ebec4
---
M sites/all/modules/thank_you/Html2Text.php
M sites/all/modules/thank_you/generators/FindUnconsumedTokens.php
M sites/all/modules/thank_you/generators/RenderTranslatedPage.php
M sites/all/modules/thank_you/generators/ThankYou.php
M sites/all/modules/thank_you/templates/html/thank_you.en.html
M sites/all/modules/wmf_communication/Templating.php
6 files changed, 49 insertions(+), 40 deletions(-)

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



diff --git a/sites/all/modules/thank_you/Html2Text.php 
b/sites/all/modules/thank_you/Html2Text.php
index 88c86f1..a91f869 100644
--- a/sites/all/modules/thank_you/Html2Text.php
+++ b/sites/all/modules/thank_you/Html2Text.php
@@ -135,7 +135,7 @@
'/&(copy|#169);/i',  // Copyright
'/&(trade|#8482|#153);/i',   // Trademark
'/&(reg|#174);/i',   // Registered
-   '/&(mdash|#151|#8212);/i',   // mdash
+   '/&(mdash|#151|#8212);|—/i', // mdash
'/&(ndash|minus|#8211|#8722);/i',// ndash
'/&(bull|#149|#8226);/i',// Bullet
'/&(pound|#163);/i', // Pound sign
@@ -617,7 +617,10 @@
switch (strtolower($matches[1])) {
case 'b':
case 'strong':
-   return $this->_toupper($matches[3]);
+/** Temporarily hacked out per 
https://phabricator.wikimedia.org/T151784#2829667
+ * return $this->_toupper($matches[3]);
+ */
+   return $matches[3];
case 'th':
return $this->_toupper("\t\t". $matches[3] 
."\n");
case 'h':
diff --git a/sites/all/modules/thank_you/generators/FindUnconsumedTokens.php 
b/sites/all/modules/thank_you/generators/FindUnconsumedTokens.php
index d309534..ead9583 100644
--- a/sites/all/modules/thank_you/generators/FindUnconsumedTokens.php
+++ b/sites/all/modules/thank_you/generators/FindUnconsumedTokens.php
@@ -26,15 +26,24 @@
 }
 }
 
+/**
+ * Pass template parameters which will light up as many conditional
+ * branches as possible, as a cheap and dirty way to get good coverage of
+ * the template contents for finding unconsumed tokens.
+ */
 static protected function getRandomTemplateParams( $locale ) {
-// Turn on all the lights
 $params = array(
-// FIXME: name should be run through both branches
+// FIXME: name should be run through both nameful and anonymous
+// branches.
 'first_name' => 'fix',
 'last_name' => 'me',
+'contact_id' => 234,
 'recurring' => true,
 
+'currency' => 'EUR',
+'amount' => '1.23',
 'receive_date' => time(),
+'transaction_id' => '12345',
 
 'locale' => $locale,
 'contribution_tags' => array(
diff --git a/sites/all/modules/thank_you/generators/RenderTranslatedPage.php 
b/sites/all/modules/thank_you/generators/RenderTranslatedPage.php
index 76dfc40..0d2669e 100644
--- a/sites/all/modules/thank_you/generators/RenderTranslatedPage.php
+++ b/sites/all/modules/thank_you/generators/RenderTranslatedPage.php
@@ -51,9 +51,11 @@
// Make it nicer to read
$page_content = str_replace( '||', 
"\n", $page_content );
 
-// WTF: We're suddenly getting strange errors about the unknown 'endif ' tag.
-// So, strip spaces
-$page_content = preg_replace( '/{%[^%]*endif[^%]*%}/sm', '{%endif%}', 
$page_content );
+   // WTF: We're suddenly getting strange errors 
about the unknown 'endif ' tag.
+   // So, strip spaces
+   // Update: This might only be a problem for the 
FindUnconsumedTokens twig
+   // rendering, not the rendering for mailing.
+   $page_content = preg_replace( 
'/{%[^%]*endif[^%]*%}/sm', '{%endif%}', $page_content );
 
// Assert no garbage
FindUnconsumedTokens::renderAndFindTokens( 
$page_content, $lang );
diff --git a/sites/all/modules/thank_you/generators/ThankYou.php 
b/sites/all/modules/thank_you/generators/ThankYou.php

[MediaWiki-commits] [Gerrit] labs/private[master]: Add new dummy file for the puppet compiler

2016-11-29 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Add new dummy file for the puppet compiler
..


Add new dummy file for the puppet compiler

Change-Id: Iacd44dc3964c93e4bc96f621fbe8476efb9c230f
---
A modules/secret/secrets/ssl/labvirt-star.codfw.wmnet.key
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Andrew Bogott: Verified; Looks good to me, approved



diff --git a/modules/secret/secrets/ssl/labvirt-star.codfw.wmnet.key 
b/modules/secret/secrets/ssl/labvirt-star.codfw.wmnet.key
new file mode 100644
index 000..c2c5c6f
--- /dev/null
+++ b/modules/secret/secrets/ssl/labvirt-star.codfw.wmnet.key
@@ -0,0 +1 @@
+FAKE

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iacd44dc3964c93e4bc96f621fbe8476efb9c230f
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: en.json: display newsletter title on confimation page

2016-11-29 Thread Phantom42 (Code Review)
Phantom42 has uploaded a new change for review.

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

Change subject: en.json: display newsletter title on confimation page
..

en.json: display newsletter title on confimation page

Now link on the newsletter creation confirmation page shows newsletter title.
Related to T149645

Bug: T149645
Change-Id: Ia8aefbed6ba54b9d2ad245125dfe44cceaff71b3
---
M i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter 
refs/changes/57/324257/1

diff --git a/i18n/en.json b/i18n/en.json
index 1c348bd..8d98749 100755
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -17,7 +17,7 @@
"newslettercreate": "Create newsletter",
"newslettercreate-text": "This page allows you to create a new 
newsletter. You will be added as a publisher and subscribed to the newsletter 
on its creation. All fields are required.",
"newsletter-create-submit": "Create newsletter",
-   "newsletter-create-confirmation": "A [[Newsletter:$1|new newsletter]] 
has been created.",
+   "newsletter-create-confirmation": "A new newsletter: 
[[Newsletter:$1|$1]] has been created.",
"newsletter-create-mainpage-error": "Invalid newsletter main page 
entered. Please try again.",
"newsletter-mainpage-non-existent": "The newsletter main page does not 
exist. Please enter a valid existing page.",
"newsletter-mainpage-in-use": "An existing newsletter has the same main 
page. Please enter another title.",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia8aefbed6ba54b9d2ad245125dfe44cceaff71b3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Phantom42 

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


[MediaWiki-commits] [Gerrit] labs/private[master]: Add new dummy file for the puppet compiler

2016-11-29 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Add new dummy file for the puppet compiler
..

Add new dummy file for the puppet compiler

Change-Id: Iacd44dc3964c93e4bc96f621fbe8476efb9c230f
---
A modules/secret/secrets/ssl/labvirt-star.codfw.wmnet.key
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/private 
refs/changes/58/324258/1

diff --git a/modules/secret/secrets/ssl/labvirt-star.codfw.wmnet.key 
b/modules/secret/secrets/ssl/labvirt-star.codfw.wmnet.key
new file mode 100644
index 000..c2c5c6f
--- /dev/null
+++ b/modules/secret/secrets/ssl/labvirt-star.codfw.wmnet.key
@@ -0,0 +1 @@
+FAKE

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iacd44dc3964c93e4bc96f621fbe8476efb9c230f
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] mediawiki...PageTriage[master]: Use ParserOutput instead of DB to check for categories

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use ParserOutput instead of DB to check for categories
..


Use ParserOutput instead of DB to check for categories

Using the DB is unreliable because LinksUpdate tends to happen
so late that we end up looking at the previous revision's categories,
making the category information always lag behind by one edit.

Also use the LinksUpdateComplete hook instead of ArticleSaveComplete
for updating the PageTriage information; this allows us to access
a precomputed ParserOutput object.

Bug: T147721
Change-Id: Ibfb42fed1b2d27d4dddc15845356b95c5f3e0dd2
---
M PageTriage.hooks.php
M PageTriage.php
M includes/ArticleMetadata.php
3 files changed, 91 insertions(+), 53 deletions(-)

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



diff --git a/PageTriage.hooks.php b/PageTriage.hooks.php
index e205de7..9275685 100644
--- a/PageTriage.hooks.php
+++ b/PageTriage.hooks.php
@@ -116,7 +116,7 @@
}
 
/**
-* Compile the metadata on successful save, this is only for page in 
PageTriage Queue already
+* Flush user status cache on a successful save.
 *
 * @see 
http://www.mediawiki.org/wiki/Manual:Hooks/PageContentSaveComplete
 * @param $article WikiPage
@@ -136,27 +136,32 @@
$article, $user, $content, $summary, $minoredit, $watchthis, 
$sectionanchor, $flags, $revision,
$status, $baseRevId
) {
-   global $wgPageTriageNamespaces;
-
self::flushUserStatusCache( $article->getTitle() );
+   return true;
+   }
 
-   if ( !in_array( $article->getTitle()->getNamespace(), 
$wgPageTriageNamespaces ) ) {
+   /**
+* Update metadata when link information is updated. This is also run 
after every page save.
+* @param LinksUpdate $linksUpdate
+* @return bool
+*/
+
+   public static function onLinksUpdateComplete( LinksUpdate $linksUpdate 
) {
+   global $wgPageTriageNamespaces;
+   if ( !in_array( $linksUpdate->getTitle()->getNamespace(), 
$wgPageTriageNamespaces ) ) {
return true;
}
 
-   DeferredUpdates::addCallableUpdate( function() use ( $article ) 
{
+   DeferredUpdates::addCallableUpdate( function () use ( 
$linksUpdate ) {
// false will enforce a validation against 
pagetriage_page table
$acp = ArticleCompileProcessor::newFromPageId(
-   [ $article->getId() ], false, DB_MASTER );
+   [ $linksUpdate->getTitle()->getArticleId() ], 
false, DB_MASTER );
 
if ( $acp ) {
-   // Register the article object so we can get 
the content and other useful information
-   // this is primarily for replication delay from 
slave
-   $acp->registerArticle( $article );
+   $acp->registerLinksUpdate( $linksUpdate );
$acp->compileMetadata();
}
} );
-
return true;
}
 
diff --git a/PageTriage.php b/PageTriage.php
index a9acaf1..c372936 100644
--- a/PageTriage.php
+++ b/PageTriage.php
@@ -174,6 +174,7 @@
 $wgHooks['NewRevisionFromEditComplete'][] = 
'PageTriageHooks::onNewRevisionFromEditComplete';
 $wgHooks['PageContentInsertComplete'][] = 
'PageTriageHooks::onPageContentInsertComplete';
 $wgHooks['PageContentSaveComplete'][] = 
'PageTriageHooks::onPageContentSaveComplete';
+$wgHooks['LinksUpdateComplete'][] = 'PageTriageHooks::onLinksUpdateComplete';
 $wgHooks['UnitTestsList'][] = 'efPageTriageUnitTests'; // unit tests
 $wgHooks['GetPreferences'][] = 'PageTriageHooks::onGetPreferences';
 $wgHooks['ArticleViewFooter'][] = 'PageTriageHooks::onArticleViewFooter';
diff --git a/includes/ArticleMetadata.php b/includes/ArticleMetadata.php
index a009a66..4dde1ca 100755
--- a/includes/ArticleMetadata.php
+++ b/includes/ArticleMetadata.php
@@ -4,7 +4,7 @@
  * Handles article metadata retrieval and saving to cache
  */
 class ArticleMetadata {
-
+   /** @var int[] List of page IDs */
protected $mPageId;
 
/**
@@ -290,13 +290,14 @@
  * Compiling metadata for articles
  */
 class ArticleCompileProcessor {
-
protected $component;
protected $componentDb;
+   /** @var int[] List of page IDs */
protected $mPageId;
protected $metadata;
protected $defaultMode;
protected $articles;
+   protected $linksUpdates;
 
/**
 * @param $pageId array - list of page id
@@ -347,6 +348,13 @@
public function registerArticle( WikiPage $article ) {
if ( in_array( $article->getId(), $this->mPageId ) ) {
  

[MediaWiki-commits] [Gerrit] operations/puppet[production]: labtest: smtp servers should be the same as in codfw

2016-11-29 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: labtest: smtp servers should be the same as in codfw
..


labtest: smtp servers should be the same as in codfw

This was a copy/paste error, long ignored because it's harmless.
Resolving this diff between labtest and codfw will make future
puppet compiler diffs easier to read.

Bug: T148717
Change-Id: I1c8c1ecc0453ae24ef47156fc3db0e3f8bee5b2c
---
M manifests/realm.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/realm.pp b/manifests/realm.pp
index 94aa355..cc2a483 100644
--- a/manifests/realm.pp
+++ b/manifests/realm.pp
@@ -249,5 +249,5 @@
 },
 # FIXME: find some SMTP servers for labs
 'labs'   => [ 'mx1001.wikimedia.org', 'mx2001.wikimedia.org' ],
-'labtest'=> [ 'mx1001.wikimedia.org', 'mx2001.wikimedia.org' ],
+'labtest'=> [ 'mx2001.wikimedia.org', 'mx1001.wikimedia.org' ],
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1c8c1ecc0453ae24ef47156fc3db0e3f8bee5b2c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: i18n: Kill last two uses of 'parameter' in lieu of 'field'

2016-11-29 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: i18n: Kill last two uses of 'parameter' in lieu of 'field'
..

i18n: Kill last two uses of 'parameter' in lieu of 'field'

Change-Id: I94fa70b17a210391b0444aca22c577b2e5e549e3
---
M modules/ve-mw/i18n/en.json
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/56/324256/1

diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index c2204f5..14b9701 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -207,8 +207,8 @@
"visualeditor-dialog-transclusion-required-parameter-description": 
"Field is required.",
"visualeditor-dialog-transclusion-required-parameter-dialog-cancel": 
"Go back",
"visualeditor-dialog-transclusion-required-parameter-dialog-ok": 
"Continue anyway",
-   "visualeditor-dialog-transclusion-required-parameter-dialog-title": 
"Required {{PLURAL:$1|parameter|parameters}} missing",
-   "visualeditor-dialog-transclusion-required-parameter-is-blank": "Are 
you sure you want to continue without filling the $1 
{{PLURAL:$2|parameter|parameters}}?",
+   "visualeditor-dialog-transclusion-required-parameter-dialog-title": 
"Required {{PLURAL:$1|field|fields}} missing",
+   "visualeditor-dialog-transclusion-required-parameter-is-blank": "Are 
you sure you want to continue without filling the $1 
{{PLURAL:$2|field|fields}}?",
"visualeditor-dialog-transclusion-single-mode": "Hide options",
"visualeditor-dialog-transclusion-title": "Transclusion",
"visualeditor-dialogbutton-media-tooltip": "Media",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I94fa70b17a210391b0444aca22c577b2e5e549e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: group0 to wmf.4

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: group0 to wmf.4
..


group0 to wmf.4

Change-Id: I3a31e3bc48f910c51a4d5620e7841a22ca1ff571
---
M wikiversions.json
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/wikiversions.json b/wikiversions.json
index 5abc2fc..68af40b 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -479,7 +479,7 @@
 "maiwiki": "php-1.29.0-wmf.3",
 "map_bmswiki": "php-1.29.0-wmf.3",
 "mdfwiki": "php-1.29.0-wmf.3",
-"mediawikiwiki": "php-1.29.0-wmf.3",
+"mediawikiwiki": "php-1.29.0-wmf.4",
 "metawiki": "php-1.29.0-wmf.3",
 "mgwiki": "php-1.29.0-wmf.3",
 "mgwikibooks": "php-1.29.0-wmf.3",
@@ -749,9 +749,9 @@
 "tawiktionary": "php-1.29.0-wmf.3",
 "tcywiki": "php-1.29.0-wmf.3",
 "tenwiki": "php-1.29.0-wmf.3",
-"test2wiki": "php-1.29.0-wmf.3",
-"testwiki": "php-1.29.0-wmf.3",
-"testwikidatawiki": "php-1.29.0-wmf.3",
+"test2wiki": "php-1.29.0-wmf.4",
+"testwiki": "php-1.29.0-wmf.4",
+"testwikidatawiki": "php-1.29.0-wmf.4",
 "tetwiki": "php-1.29.0-wmf.3",
 "tewiki": "php-1.29.0-wmf.3",
 "tewikibooks": "php-1.29.0-wmf.3",
@@ -881,7 +881,7 @@
 "zawikiquote": "php-1.29.0-wmf.3",
 "zawiktionary": "php-1.29.0-wmf.3",
 "zeawiki": "php-1.29.0-wmf.3",
-"zerowiki": "php-1.29.0-wmf.3",
+"zerowiki": "php-1.29.0-wmf.4",
 "zh_classicalwiki": "php-1.29.0-wmf.3",
 "zh_min_nanwiki": "php-1.29.0-wmf.3",
 "zh_min_nanwikibooks": "php-1.29.0-wmf.3",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a31e3bc48f910c51a4d5620e7841a22ca1ff571
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Annotate the undefined so js-yaml doesn't interpret it as a ...

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Annotate the undefined so js-yaml doesn't interpret it as a 
string
..


Annotate the undefined so js-yaml doesn't interpret it as a string

Change-Id: If4b5fdbafd348c854320e80ca45c36d706155115
---
M scap/environments/beta/vars.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/scap/environments/beta/vars.yaml b/scap/environments/beta/vars.yaml
index df35050..d8df203 100644
--- a/scap/environments/beta/vars.yaml
+++ b/scap/environments/beta/vars.yaml
@@ -1,3 +1,3 @@
 localsettings: conf/wmf/betalabs.localsettings.js
 load_wmf: false
-api_proxy: undefined
+api_proxy: !!js/undefined ''

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If4b5fdbafd348c854320e80ca45c36d706155115
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: wikitech cloudadmin: remove right that no longer exists

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: wikitech cloudadmin: remove right that no longer exists
..


wikitech cloudadmin: remove right that no longer exists

Change-Id: I2ba14c913f9958e0468edc4b0eff7ecde6bbf844
---
M wmf-config/InitialiseSettings.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index fe0acb3..80162c2 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -8349,7 +8349,6 @@
'manageproject' => true,
'userrights' => true,
'managednsdomain' => true,
-   'manageglobalpuppet' => true,
'accessrestrictedregions' => true,
'editallhiera' => true,
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2ba14c913f9958e0468edc4b0eff7ecde6bbf844
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: MarcoAurelio 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Use upstream media search widget from core

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use upstream media search widget from core
..


Use upstream media search widget from core

Bug: T140166
Depends-On: If53ef7f4b62c7a5d4da565c14dd2a353778694e5
Change-Id: I28845e9c143e78d3a377f067606c62da212e3bf1
---
M .jsduck/categories.json
M .jsduck/external.js
M .jsduck/mw-categories.json
M extension.json
D modules/ve-mw/dm/models/ve.dm.MWMediaResourceProvider.js
D modules/ve-mw/dm/models/ve.dm.MWMediaResourceQueue.js
D modules/ve-mw/dm/models/ve.dm.MWMediaSearchProvider.js
D modules/ve-mw/dm/models/ve.dm.MWMediaSearchQueue.js
M modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
M modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
M modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
M modules/ve-mw/ui/styles/dialogs/ve.ui.MWMediaDialog.css
D modules/ve-mw/ui/styles/widgets/ve.ui.MWMediaResultWidget.css
D modules/ve-mw/ui/styles/widgets/ve.ui.MWMediaSearchWidget.css
D modules/ve-mw/ui/widgets/ve.ui.MWMediaResultWidget.js
D modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js
16 files changed, 23 insertions(+), 1,390 deletions(-)

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



diff --git a/.jsduck/categories.json b/.jsduck/categories.json
index 9655985..8e6d6a5 100644
--- a/.jsduck/categories.json
+++ b/.jsduck/categories.json
@@ -26,9 +26,7 @@
"name": "Data Model",
"classes": [
"ve.dm.MW*Surface",
-   "ve.dm.MW*SurfaceFragment",
-   "ve.dm.MW*Provider",
-   "ve.dm.MW*Queue"
+   "ve.dm.MW*SurfaceFragment"
]
},
{
@@ -60,7 +58,7 @@
"name": "MediaWiki",
"classes": [
"mw.Title",
-   "mw.widgets.TitleInputWidget"
+   "mw.widgets.*Widget"
]
}
]
diff --git a/.jsduck/external.js b/.jsduck/external.js
index e1286e2..a85d96b 100644
--- a/.jsduck/external.js
+++ b/.jsduck/external.js
@@ -7,3 +7,13 @@
  * @class mw.widgets.TitleInputWidget
  * @source 

  */
+
+/**
+ * @class mw.widgets.MediaSearchWidget
+ * @source 

+ */
+
+/**
+ * @class mw.widgets.MediaResultWidget
+ * @source 

+ */
diff --git a/.jsduck/mw-categories.json b/.jsduck/mw-categories.json
index 734d4da..c3a3d52 100644
--- a/.jsduck/mw-categories.json
+++ b/.jsduck/mw-categories.json
@@ -26,9 +26,7 @@
"name": "Data Model",
"classes": [
"ve.dm.MW*Surface",
-   "ve.dm.MW*SurfaceFragment",
-   "ve.dm.MW*Provider",
-   "ve.dm.MW*Queue"
+   "ve.dm.MW*SurfaceFragment"
]
},
{
@@ -64,7 +62,7 @@
"name": "MediaWiki",
"classes": [
"mw.Title",
-   "mw.widgets.TitleInputWidget"
+   "mw.widgets.*Widget"
]
}
]
diff --git a/extension.json b/extension.json
index 2b65295..4dca6fd 100644
--- a/extension.json
+++ b/extension.json
@@ -1328,32 +1328,6 @@
"mobile"
]
},
-   "ext.visualEditor.mwmediasearch": {
-   "scripts": [
-   
"modules/ve-mw/dm/models/ve.dm.MWMediaResourceProvider.js",
-   
"modules/ve-mw/dm/models/ve.dm.MWMediaSearchProvider.js",
-   
"modules/ve-mw/dm/models/ve.dm.MWMediaResourceQueue.js",
-   
"modules/ve-mw/dm/models/ve.dm.MWMediaSearchQueue.js",
-   
"modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js",
-   
"modules/ve-mw/ui/widgets/ve.ui.MWMediaResultWidget.js"
-   ],
-   "styles": [
-   

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Bring in MediaSearchWidget from VE

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Bring in MediaSearchWidget from VE
..


Bring in MediaSearchWidget from VE

Bug: T140166
Change-Id: If53ef7f4b62c7a5d4da565c14dd2a353778694e5
---
M languages/i18n/en.json
M languages/i18n/qqq.json
M resources/Resources.php
A resources/src/mediawiki.widgets/MediaSearch/broken-image.png
A resources/src/mediawiki.widgets/MediaSearch/mw.widgets.APIResultsProvider.js
A resources/src/mediawiki.widgets/MediaSearch/mw.widgets.APIResultsQueue.js
A 
resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResourceProvider.js
A resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResourceQueue.js
A resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResultWidget.css
A resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResultWidget.js
A resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchProvider.js
A resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchQueue.js
A resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchWidget.css
A resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchWidget.js
14 files changed, 1,859 insertions(+), 0 deletions(-)

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



diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 9aa0f46..3a8a7ae 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -4102,6 +4102,8 @@
"mw-widgets-dateinput-no-date": "No date selected",
"mw-widgets-dateinput-placeholder-day": "-MM-DD",
"mw-widgets-dateinput-placeholder-month": "-MM",
+   "mw-widgets-mediasearch-input-placeholder": "Search for media",
+   "mw-widgets-mediasearch-noresults": "No results found.",
"mw-widgets-titleinput-description-new-page": "page does not exist yet",
"mw-widgets-titleinput-description-redirect": "redirect to $1",
"mw-widgets-categoryselector-add-category-placeholder": "Add a 
category...",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index 7327012..d175c86 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -4286,6 +4286,8 @@
"mw-widgets-dateinput-no-date": "Label of a date input field when no 
date has been selected.",
"mw-widgets-dateinput-placeholder-day": "[[File:DateInputWidget active, 
empty.png|frame|Screenshot]]\nPlaceholder displayed in a date input field when 
it's empty, representing a date format with 4 digits for year, 2 digits for 
month, and 2 digits for day, separated with hyphens. This should be uppercase, 
if possible, and must not include any additional explanations. If there is no 
good way to translate it, make this message blank.",
"mw-widgets-dateinput-placeholder-month": "Placeholder displayed in a 
date input field when it's empty, representing a date format with 4 digits for 
year and 2 digits for month, separated with hyphens (without a day). This 
should be uppercase, if possible, and must not include any additional 
explanations. If there is no good way to translate it, make this message 
blank.",
+   "mw-widgets-mediasearch-input-placeholder": "Place holder text for 
media search input",
+   "mw-widgets-mediasearch-noresults": "Label notifying the user no 
results were found for the media search.",
"mw-widgets-titleinput-description-new-page": "Description label for a 
new page in the title input widget.",
"mw-widgets-titleinput-description-redirect": "Description label for a 
redirect in the title input widget.",
"mw-widgets-categoryselector-add-category-placeholder": "Placeholder 
displayed in the category selector widget after the capsules of already added 
categories.",
diff --git a/resources/Resources.php b/resources/Resources.php
index 587a84d..b37febd 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -2289,6 +2289,32 @@
],
'targets' => [ 'desktop', 'mobile' ],
],
+   'mediawiki.widgets.MediaSearch' => [
+   'scripts' => [
+   
'resources/src/mediawiki.widgets/MediaSearch/mw.widgets.APIResultsProvider.js',
+   
'resources/src/mediawiki.widgets/MediaSearch/mw.widgets.APIResultsQueue.js',
+   
'resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResourceProvider.js',
+   
'resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchProvider.js',
+   
'resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResourceQueue.js',
+   
'resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchQueue.js',
+   
'resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchWidget.js',
+   
'resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResultWidget.js',
+   

[MediaWiki-commits] [Gerrit] operations/puppet[production]: labtest: smtp servers should be the same as in codfw

2016-11-29 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: labtest: smtp servers should be the same as in codfw
..

labtest: smtp servers should be the same as in codfw

This was a copy/paste error, long ignored because it's harmless.
Resolving this diff between labtest and codfw will make future
puppet compiler diffs easier to read.

Bug: T148717
Change-Id: I1c8c1ecc0453ae24ef47156fc3db0e3f8bee5b2c
---
M manifests/realm.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/manifests/realm.pp b/manifests/realm.pp
index 94aa355..cc2a483 100644
--- a/manifests/realm.pp
+++ b/manifests/realm.pp
@@ -249,5 +249,5 @@
 },
 # FIXME: find some SMTP servers for labs
 'labs'   => [ 'mx1001.wikimedia.org', 'mx2001.wikimedia.org' ],
-'labtest'=> [ 'mx1001.wikimedia.org', 'mx2001.wikimedia.org' ],
+'labtest'=> [ 'mx2001.wikimedia.org', 'mx1001.wikimedia.org' ],
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c8c1ecc0453ae24ef47156fc3db0e3f8bee5b2c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: API: Make action=clearhasmsg require POST

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: API: Make action=clearhasmsg require POST
..


API: Make action=clearhasmsg require POST

Bug: T146526
Change-Id: I341b395e532e7bdc7816f0deae8c6e5e8c9e8f3b
---
M RELEASE-NOTES-1.29
M includes/api/ApiClearHasMsg.php
2 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index 386dee4..5b5640f 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -36,6 +36,7 @@
   in the query string is now an error. They should be submitted in the POST
   body instead.
 * The capture option for action=resetpassword has been removed
+* action=clearhasmsg now requires a POST.
 
 === Action API internal changes in 1.29 ===
 
diff --git a/includes/api/ApiClearHasMsg.php b/includes/api/ApiClearHasMsg.php
index 13b3577..99242a8 100644
--- a/includes/api/ApiClearHasMsg.php
+++ b/includes/api/ApiClearHasMsg.php
@@ -45,7 +45,7 @@
}
 
public function mustBePosted() {
-   return false;
+   return true;
}
 
protected function getExamplesMessages() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I341b395e532e7bdc7816f0deae8c6e5e8c9e8f3b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Allow __NOINDEX__ on all namespaces on meta.

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Allow __NOINDEX__ on all namespaces on meta.
..


Allow __NOINDEX__ on all namespaces on meta.

Meta contains several pages in (main) with content not to index
for privacy reasons, but not to hide either, for usefulness.

An example of such content are vandalism reports.

Currently, a robots.txt modification was required, we now allow
page per page configuration.

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 26a74a0..fe0acb3 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11316,6 +11316,7 @@
// If true, allows to use __NOINDEX__ and __INDEX__ everywhere,
// even in content namespaces (see $wgContentNamespaces).
'default' => false,
+   'metawiki' => true, // T150245
 ],
 
 'wmgExemptFromUserRobotsControlExtra' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3fa6c9c2c5e4028e79485268dd7a1ac921bf7eab
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: MarcoAurelio 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Annotate the undefined so js-yaml doesn't interpret it as a ...

2016-11-29 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Annotate the undefined so js-yaml doesn't interpret it as a 
string
..

Annotate the undefined so js-yaml doesn't interpret it as a string

Change-Id: If4b5fdbafd348c854320e80ca45c36d706155115
---
M scap/environments/beta/vars.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy 
refs/changes/54/324254/1

diff --git a/scap/environments/beta/vars.yaml b/scap/environments/beta/vars.yaml
index df35050..d8df203 100644
--- a/scap/environments/beta/vars.yaml
+++ b/scap/environments/beta/vars.yaml
@@ -1,3 +1,3 @@
 localsettings: conf/wmf/betalabs.localsettings.js
 load_wmf: false
-api_proxy: undefined
+api_proxy: !!js/undefined ''

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If4b5fdbafd348c854320e80ca45c36d706155115
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: Fix netmask of new AT resolver network

2016-11-29 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: Fix netmask of new AT resolver network
..


Fix netmask of new AT resolver network

gdnsd warns (but not errors) about it but it passed CI nevertheless. Oh
well.

Change-Id: Id90780bc3448181aa2b0a3eaed6ba807317e42e2
---
M config-geo
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Faidon Liambotis: Verified; Looks good to me, approved



diff --git a/config-geo b/config-geo
index 99d082c..35ae83a 100644
--- a/config-geo
+++ b/config-geo
@@ -223,7 +223,7 @@
 8.0.36.0/22   => [eqiad, codfw, ulsfo, esams], # 
Washington, DC
 # AT's DNS clusters (incomplete)
 151.164.0.0/16=> [ulsfo, codfw, eqiad, esams], # West 
Coast?
-12.121.113.0/22   => [ulsfo, codfw, eqiad, esams], # West 
Coast?
+12.121.112.0/22   => [ulsfo, codfw, eqiad, esams], # West 
Coast?
 },
 },
 },

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id90780bc3448181aa2b0a3eaed6ba807317e42e2
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Faidon Liambotis 
Gerrit-Reviewer: Faidon Liambotis 

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: Fix netmask of new AT resolver network

2016-11-29 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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

Change subject: Fix netmask of new AT resolver network
..

Fix netmask of new AT resolver network

gdnsd warns (but not errors) about it but it passed CI nevertheless. Oh
well.

Change-Id: Id90780bc3448181aa2b0a3eaed6ba807317e42e2
---
M config-geo
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/53/324253/1

diff --git a/config-geo b/config-geo
index 99d082c..35ae83a 100644
--- a/config-geo
+++ b/config-geo
@@ -223,7 +223,7 @@
 8.0.36.0/22   => [eqiad, codfw, ulsfo, esams], # 
Washington, DC
 # AT's DNS clusters (incomplete)
 151.164.0.0/16=> [ulsfo, codfw, eqiad, esams], # West 
Coast?
-12.121.113.0/22   => [ulsfo, codfw, eqiad, esams], # West 
Coast?
+12.121.112.0/22   => [ulsfo, codfw, eqiad, esams], # West 
Coast?
 },
 },
 },

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id90780bc3448181aa2b0a3eaed6ba807317e42e2
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Faidon Liambotis 

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: Add a couple of AT's west coast resolver ranges

2016-11-29 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: Add a couple of AT's west coast resolver ranges
..


Add a couple of AT's west coast resolver ranges

Based off https://paste.debian.net/899703/, with thanks to Stefano
Rivera.

Change-Id: I2eab88a1a30b030fc3fab0cf2aa50b868770d224
---
M config-geo
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/config-geo b/config-geo
index 268b67c..99d082c 100644
--- a/config-geo
+++ b/config-geo
@@ -221,6 +221,9 @@
 8.0.28.0/22   => [eqiad, codfw, ulsfo, esams], # New York
 8.0.32.0/22   => [ulsfo, codfw, eqiad, esams], # San Jose
 8.0.36.0/22   => [eqiad, codfw, ulsfo, esams], # 
Washington, DC
+# AT's DNS clusters (incomplete)
+151.164.0.0/16=> [ulsfo, codfw, eqiad, esams], # West 
Coast?
+12.121.113.0/22   => [ulsfo, codfw, eqiad, esams], # West 
Coast?
 },
 },
 },

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2eab88a1a30b030fc3fab0cf2aa50b868770d224
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Faidon Liambotis 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[wmf/1.29.0-wmf.4]: Import wmui-base.less and override leaflet style to match wi...

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Import wmui-base.less and override leaflet style to match 
wikimedia style.
..


Import wmui-base.less and override leaflet style to match wikimedia style.

Bug: T150497
Change-Id: I7277ebb21ad9e15cf5ca7367eecc51a6494c70f8
---
M bin/build.sh
M lib/mapbox-style-fixes.css
A lib/wmui-base.less
M modules/wikivoyage/ControlLayers.js
A modules/wikivoyage/images/icon-nearby-invert.png
A modules/wikivoyage/images/icon-nearby-invert.svg
M modules/wikivoyage/images/icon-nearby.png
M modules/wikivoyage/images/icon-nearby.svg
A modules/wikivoyage/images/wm-nearby.svg
M modules/wikivoyage/styles/control-layers.less
M modules/wikivoyage/styles/control-nearby.less
M package.json
M styles/leaflet-overrides.less
13 files changed, 293 insertions(+), 46 deletions(-)

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



diff --git a/bin/build.sh b/bin/build.sh
index 6301e9b..90ec62c 100644
--- a/bin/build.sh
+++ b/bin/build.sh
@@ -7,6 +7,7 @@
 rm lib/mapbox/images/render.sh
 
 cp -v node_modules/leaflet-sleep/Leaflet.Sleep.js lib/leaflet.sleep.js
+cp -v node_modules/wmui-base/wmui-base.less lib/wmui-base.less
 
 cp -v node_modules/prunecluster/dist/PruneCluster.js \
 node_modules/prunecluster/dist/LeafletStyleSheet.css \
diff --git a/lib/mapbox-style-fixes.css b/lib/mapbox-style-fixes.css
index 00994d6..19e3b78 100644
--- a/lib/mapbox-style-fixes.css
+++ b/lib/mapbox-style-fixes.css
@@ -1,29 +1,3 @@
-/* Apply a few colour fixes from MW theme */
-
-.leaflet-control-layers, .leaflet-bar {
-   border-color: #ccc;
-}
-
-.leaflet-bar a {
-   -webkit-transition: background-color 100ms, border-color 100ms;
-  -moz-transition: background-color 100ms, border-color 100ms;
-   transition: background-color 100ms, border-color 100ms;
-   border-bottom-color: #ccc;
-}
-
-.leaflet-bar a:last-child {
-   border-bottom: 0;
-}
-
-.leaflet-bar a:hover {
-   background-color: #ebebeb;
-}
-
-.leaflet-bar a:active {
-   background-color: #d9d9d9;
-   border-color: #d9d9d9;
-}
-
 /**
  * Fix unwanted flipping of styles by CSS Janus (T127137)
  */
diff --git a/lib/wmui-base.less b/lib/wmui-base.less
new file mode 100644
index 000..f0da64d
--- /dev/null
+++ b/lib/wmui-base.less
@@ -0,0 +1,142 @@
+/**
+ * WikimediaUI base v0.7.0
+ * Wikimedia Foundation user interface base variables
+ */
+
+/* Colors */
+// WikimediaUI (WMUI) color palette
+@wmui-color-base0:#000;// = HSB 0°, 0%, 0%
+@wmui-color-base10:   #222;// = HSB 0°, 0%, 13%
+@wmui-color-base20:   #54595d; // = HSB 207°, 10%, 36%; WCAG 2.0 level AAA 
7.09:1 contrast ratio on `#fff`
+@wmui-color-base30:   #72777d; // = HSB 210°, 9%, 49%; WCAG 2.0 level AA at 
4.52:1 contrast ratio on `#fff`
+@wmui-color-base50:   #a2a9b1; // = HSB 212°, 8%, 69%
+@wmui-color-base70:   #c8ccd1; // = HSB 213°, 4%, 82%
+@wmui-color-base80:   #eaecf0; // = HSB 220°, 3%, 94%
+@wmui-color-base90:   #f8f9fa; // = HSB 210°, 1%, 98%
+@wmui-color-base100:  #fff;// = HSB 0°, 0%, 100%
+
+@wmui-color-accent30: #2a4b8d; // = HSB 220°, 70%, 55%
+@wmui-color-accent50: #36c;// = HSB 220°, 75%, 80%
+@wmui-color-accent90: #eaf3ff; // = HSB 214°, 8%, 100%
+
+@wmui-color-red30:#b32424; // = HSB 360°, 80%, 70%
+@wmui-color-red50:#d33;// = HSB 360°, 77%, 87%
+@wmui-color-red90:#fee7e6; // = HSB 3°, 9%, 100%
+
+@wmui-color-yellow30: #ac6600; // = HSB 36°, 100%, 67%
+@wmui-color-yellow50: #fc3;// = HSB 45°, 80%, 100%
+@wmui-color-yellow90: #fef6e7; // = HSB 39°, 9%, 100%
+
+@wmui-color-green30:  #14866d; // = HSB 167°, 85%, 53%
+@wmui-color-green50:  #00af89; // = HSB 167°, 100%, 69%
+@wmui-color-green90:  #d5fdf4; // = HSB 166°, 16%, 99%
+
+// Background Colors
+@background-color-base:   @wmui-color-base100;
+@background-color-code:   @wmui-color-base90;
+// 'Framed' UI elements (Framed Buttons, Dropdowns, ToggleSwitches...)
+@background-color-framed: @wmui-color-base90;
+@background-color-framed--hover: @wmui-color-base100;
+@background-color-framed--active: @wmui-color-base70;
+// RGBA Colors include hex fallback on `#fff` for IE 6/7/8
+@background-color-highlight:  rgba( 255, 182, 13, 0.4 );
+@background-color-highlight--fallback: #ffe29e;
+
+// Foreground Colors
+@color-base:  @wmui-color-base10;
+@color-base--hover:   #444;
+@color-base--active:  @wmui-color-base0;
+@color-base--inverted:@wmui-color-base100;
+@color-base--emphasized:  @wmui-color-base0;
+@color-base--disabled:@wmui-color-base30;
+@color-filled--disabled:  @color-base--inverted;
+@color-placeholder:   @wmui-color-base30;
+// Primary 'Progressive' Color, Background Color and states
+@background-color-primary:@wmui-color-base90;
+@background-color-primary--hover: rgba( 41, 98, 204, 0.1 );
+@color-primary:   

[MediaWiki-commits] [Gerrit] operations/dns[master]: Add a couple of AT's west coast resolver ranges

2016-11-29 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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

Change subject: Add a couple of AT's west coast resolver ranges
..

Add a couple of AT's west coast resolver ranges

Based off https://paste.debian.net/899703/, with thanks to Stefano
Rivera.

Change-Id: I2eab88a1a30b030fc3fab0cf2aa50b868770d224
---
M config-geo
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/52/324252/1

diff --git a/config-geo b/config-geo
index 268b67c..99d082c 100644
--- a/config-geo
+++ b/config-geo
@@ -221,6 +221,9 @@
 8.0.28.0/22   => [eqiad, codfw, ulsfo, esams], # New York
 8.0.32.0/22   => [ulsfo, codfw, eqiad, esams], # San Jose
 8.0.36.0/22   => [eqiad, codfw, ulsfo, esams], # 
Washington, DC
+# AT's DNS clusters (incomplete)
+151.164.0.0/16=> [ulsfo, codfw, eqiad, esams], # West 
Coast?
+12.121.113.0/22   => [ulsfo, codfw, eqiad, esams], # West 
Coast?
 },
 },
 },

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2eab88a1a30b030fc3fab0cf2aa50b868770d224
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Faidon Liambotis 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update VE core submodule to master (0879bb2)

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update VE core submodule to master (0879bb2)
..


Update VE core submodule to master (0879bb2)

New changes:
00efc39 VisualDiffs: Improved styling for moves
009de03 VisualDiffs: Use semantic del/ins tags
4a90e12 Localisation updates from https://translatewiki.net.
c671cf8 Add diffing to mobile SA demo
c4ff29b Replace deprecated $.andSelf with $.addBack
b122328 Fix labels on diff dialog
41a700c ve.dm.Change class with rebase operations
2c336da Localisation updates from https://translatewiki.net.
4c7cb68 Hijack EventSequencer timeouts in unit testing
dea2883 Focusable cursor tests: place cursor in cursorHolders

Change-Id: Id6640e02999c079bcf3709f2d048394ec6719904
---
M .jsduck/categories.json
M .jsduck/eg-iframe.html
M extension.json
M lib/ve
4 files changed, 10 insertions(+), 1 deletion(-)

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



diff --git a/.jsduck/categories.json b/.jsduck/categories.json
index 9655985..2b9c57e 100644
--- a/.jsduck/categories.json
+++ b/.jsduck/categories.json
@@ -116,6 +116,7 @@
"ve.dm.*SurfaceFragment",
"ve.dm.*Selection",
"ve.dm.Transaction",
+   "ve.dm.Change",
"ve.dm.TransactionProcessor",
"ve.dm.TransactionProcessor.*",
"ve.dm.*Annotation",
diff --git a/.jsduck/eg-iframe.html b/.jsduck/eg-iframe.html
index 5c566ba..495c611 100644
--- a/.jsduck/eg-iframe.html
+++ b/.jsduck/eg-iframe.html
@@ -254,8 +254,10 @@



+   


+   



@@ -344,8 +346,10 @@



+   


+   



diff --git a/extension.json b/extension.json
index e032504..81aa0a1 100644
--- a/extension.json
+++ b/extension.json
@@ -648,8 +648,10 @@

"lib/ve/src/dm/annotations/ve.dm.CodeAnnotation.js",

"lib/ve/src/dm/annotations/ve.dm.DatetimeAnnotation.js",

"lib/ve/src/dm/annotations/ve.dm.DefinitionAnnotation.js",
+   
"lib/ve/src/dm/annotations/ve.dm.DeleteAnnotation.js",

"lib/ve/src/dm/annotations/ve.dm.FontAnnotation.js",

"lib/ve/src/dm/annotations/ve.dm.HighlightAnnotation.js",
+   
"lib/ve/src/dm/annotations/ve.dm.InsertAnnotation.js",

"lib/ve/src/dm/annotations/ve.dm.ItalicAnnotation.js",

"lib/ve/src/dm/annotations/ve.dm.QuotationAnnotation.js",

"lib/ve/src/dm/annotations/ve.dm.SmallAnnotation.js",
@@ -736,8 +738,10 @@

"lib/ve/src/ce/annotations/ve.ce.CodeSampleAnnotation.js",

"lib/ve/src/ce/annotations/ve.ce.DatetimeAnnotation.js",

"lib/ve/src/ce/annotations/ve.ce.DefinitionAnnotation.js",
+   
"lib/ve/src/ce/annotations/ve.ce.DeleteAnnotation.js",

"lib/ve/src/ce/annotations/ve.ce.FontAnnotation.js",

"lib/ve/src/ce/annotations/ve.ce.HighlightAnnotation.js",
+   
"lib/ve/src/ce/annotations/ve.ce.InsertAnnotation.js",

"lib/ve/src/ce/annotations/ve.ce.ItalicAnnotation.js",

"lib/ve/src/ce/annotations/ve.ce.QuotationAnnotation.js",

"lib/ve/src/ce/annotations/ve.ce.SmallAnnotation.js",
diff --git a/lib/ve b/lib/ve
index f4d2cd2..0879bb2 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit f4d2cd2465aca0f8f166454e797993e8b1331900
+Subproject commit 0879bb255f3cf75b9c8303841549c033e028f4fa

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id6640e02999c079bcf3709f2d048394ec6719904
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: Import wmui-base.less and override leaflet style to match wi...

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Import wmui-base.less and override leaflet style to match 
wikimedia style.
..


Import wmui-base.less and override leaflet style to match wikimedia style.

Bug: T150497
Change-Id: I7277ebb21ad9e15cf5ca7367eecc51a6494c70f8
---
M bin/build.sh
M lib/mapbox-style-fixes.css
A lib/wmui-base.less
M modules/wikivoyage/ControlLayers.js
A modules/wikivoyage/images/icon-nearby-invert.png
A modules/wikivoyage/images/icon-nearby-invert.svg
M modules/wikivoyage/images/icon-nearby.png
M modules/wikivoyage/images/icon-nearby.svg
A modules/wikivoyage/images/wm-nearby.svg
M modules/wikivoyage/styles/control-layers.less
M modules/wikivoyage/styles/control-nearby.less
M package.json
M styles/leaflet-overrides.less
13 files changed, 293 insertions(+), 46 deletions(-)

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



diff --git a/bin/build.sh b/bin/build.sh
index 6301e9b..90ec62c 100644
--- a/bin/build.sh
+++ b/bin/build.sh
@@ -7,6 +7,7 @@
 rm lib/mapbox/images/render.sh
 
 cp -v node_modules/leaflet-sleep/Leaflet.Sleep.js lib/leaflet.sleep.js
+cp -v node_modules/wmui-base/wmui-base.less lib/wmui-base.less
 
 cp -v node_modules/prunecluster/dist/PruneCluster.js \
 node_modules/prunecluster/dist/LeafletStyleSheet.css \
diff --git a/lib/mapbox-style-fixes.css b/lib/mapbox-style-fixes.css
index 00994d6..19e3b78 100644
--- a/lib/mapbox-style-fixes.css
+++ b/lib/mapbox-style-fixes.css
@@ -1,29 +1,3 @@
-/* Apply a few colour fixes from MW theme */
-
-.leaflet-control-layers, .leaflet-bar {
-   border-color: #ccc;
-}
-
-.leaflet-bar a {
-   -webkit-transition: background-color 100ms, border-color 100ms;
-  -moz-transition: background-color 100ms, border-color 100ms;
-   transition: background-color 100ms, border-color 100ms;
-   border-bottom-color: #ccc;
-}
-
-.leaflet-bar a:last-child {
-   border-bottom: 0;
-}
-
-.leaflet-bar a:hover {
-   background-color: #ebebeb;
-}
-
-.leaflet-bar a:active {
-   background-color: #d9d9d9;
-   border-color: #d9d9d9;
-}
-
 /**
  * Fix unwanted flipping of styles by CSS Janus (T127137)
  */
diff --git a/lib/wmui-base.less b/lib/wmui-base.less
new file mode 100644
index 000..f0da64d
--- /dev/null
+++ b/lib/wmui-base.less
@@ -0,0 +1,142 @@
+/**
+ * WikimediaUI base v0.7.0
+ * Wikimedia Foundation user interface base variables
+ */
+
+/* Colors */
+// WikimediaUI (WMUI) color palette
+@wmui-color-base0:#000;// = HSB 0°, 0%, 0%
+@wmui-color-base10:   #222;// = HSB 0°, 0%, 13%
+@wmui-color-base20:   #54595d; // = HSB 207°, 10%, 36%; WCAG 2.0 level AAA 
7.09:1 contrast ratio on `#fff`
+@wmui-color-base30:   #72777d; // = HSB 210°, 9%, 49%; WCAG 2.0 level AA at 
4.52:1 contrast ratio on `#fff`
+@wmui-color-base50:   #a2a9b1; // = HSB 212°, 8%, 69%
+@wmui-color-base70:   #c8ccd1; // = HSB 213°, 4%, 82%
+@wmui-color-base80:   #eaecf0; // = HSB 220°, 3%, 94%
+@wmui-color-base90:   #f8f9fa; // = HSB 210°, 1%, 98%
+@wmui-color-base100:  #fff;// = HSB 0°, 0%, 100%
+
+@wmui-color-accent30: #2a4b8d; // = HSB 220°, 70%, 55%
+@wmui-color-accent50: #36c;// = HSB 220°, 75%, 80%
+@wmui-color-accent90: #eaf3ff; // = HSB 214°, 8%, 100%
+
+@wmui-color-red30:#b32424; // = HSB 360°, 80%, 70%
+@wmui-color-red50:#d33;// = HSB 360°, 77%, 87%
+@wmui-color-red90:#fee7e6; // = HSB 3°, 9%, 100%
+
+@wmui-color-yellow30: #ac6600; // = HSB 36°, 100%, 67%
+@wmui-color-yellow50: #fc3;// = HSB 45°, 80%, 100%
+@wmui-color-yellow90: #fef6e7; // = HSB 39°, 9%, 100%
+
+@wmui-color-green30:  #14866d; // = HSB 167°, 85%, 53%
+@wmui-color-green50:  #00af89; // = HSB 167°, 100%, 69%
+@wmui-color-green90:  #d5fdf4; // = HSB 166°, 16%, 99%
+
+// Background Colors
+@background-color-base:   @wmui-color-base100;
+@background-color-code:   @wmui-color-base90;
+// 'Framed' UI elements (Framed Buttons, Dropdowns, ToggleSwitches...)
+@background-color-framed: @wmui-color-base90;
+@background-color-framed--hover: @wmui-color-base100;
+@background-color-framed--active: @wmui-color-base70;
+// RGBA Colors include hex fallback on `#fff` for IE 6/7/8
+@background-color-highlight:  rgba( 255, 182, 13, 0.4 );
+@background-color-highlight--fallback: #ffe29e;
+
+// Foreground Colors
+@color-base:  @wmui-color-base10;
+@color-base--hover:   #444;
+@color-base--active:  @wmui-color-base0;
+@color-base--inverted:@wmui-color-base100;
+@color-base--emphasized:  @wmui-color-base0;
+@color-base--disabled:@wmui-color-base30;
+@color-filled--disabled:  @color-base--inverted;
+@color-placeholder:   @wmui-color-base30;
+// Primary 'Progressive' Color, Background Color and states
+@background-color-primary:@wmui-color-base90;
+@background-color-primary--hover: rgba( 41, 98, 204, 0.1 );
+@color-primary:   

[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[wmf/1.29.0-wmf.4]: Implement second phase of event logging

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Implement second phase of event logging
..


Implement second phase of event logging

Bug: T149834
Depends-on: Ie741fc5f306e9ff14173e50339131b8faaf06120
Change-Id: I0cabd896576ae2a02aba4065a1edf72543745419
(cherry picked from commit 9728bf43ad79e52a5b4a279e644334eaa355babe)
---
M modules/box/Map.js
M modules/staticframe/staticframe.js
2 files changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/modules/box/Map.js b/modules/box/Map.js
index 90343a3..9de5370 100644
--- a/modules/box/Map.js
+++ b/modules/box/Map.js
@@ -286,6 +286,12 @@
 * Fired when the Kartographer Map 
object is ready.
 */
'kartographerisready' );
+
+   mw.track( 'mediawiki.kartographer', {
+   action: 'initialize',
+   isFullScreen: !!map.options.fullscreen,
+   feature: map
+   } );
}
 
if ( this.parentMap ) {
diff --git a/modules/staticframe/staticframe.js 
b/modules/staticframe/staticframe.js
index 78142e0..09e55dc 100644
--- a/modules/staticframe/staticframe.js
+++ b/modules/staticframe/staticframe.js
@@ -118,7 +118,7 @@
link.clicked = true;
 
mw.track( 'mediawiki.kartographer', {
-   action: 'open',
+   action: 'activate',
isFullScreen: true,
feature: link
} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0cabd896576ae2a02aba4065a1edf72543745419
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: wmf/1.29.0-wmf.4
Gerrit-Owner: Yurik 
Gerrit-Reviewer: JGirault 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Allow a wiki to use __NOINDEX__ and __INDEX__ in all namespaces

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Allow a wiki to use __NOINDEX__ and __INDEX__ in all namespaces
..


Allow a wiki to use __NOINDEX__ and __INDEX__ in all namespaces

Currently, __NOINDEX__ and __INDEX__ robot control keywords can be used
in all namespaces excepted:
  - the content ones (from $wgContentNamespaces)
  - the ones in $wmgExemptFromUserRobotsControlExtra

There is legitimate cases not to index pages from content namespaces
in specific cases, like non content wikis.

We so provide a mechanism to allow a wiki to use these keywords
everywhere to avoid direct robots.txt tweaking.

Change-Id: Iffb77a0401a8dda537c769b612613763d448a3cc
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 14 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 85dd884..d7054d9 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -3233,7 +3233,11 @@
return true;
 };
 
-$wgExemptFromUserRobotsControl = array_merge( $wgContentNamespaces, 
$wmgExemptFromUserRobotsControlExtra );
+if ( $wmgAllowRobotsControlInAllNamespaces ) {
+   $wgExemptFromUserRobotsControl = [];
+} else {
+   $wgExemptFromUserRobotsControl = array_merge( $wgContentNamespaces, 
$wmgExemptFromUserRobotsControlExtra );
+}
 
 // additional "language names", adding to Names.php data
 $wgExtraLanguageNames = $wmgExtraLanguageNames;
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 06e1430..26a74a0 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11312,7 +11312,16 @@
'+plwiki' => [ NS_USER, 100, 102 ], // T133978; 100 -> Portal, 102 -> 
Wikiproject
 ],
 
+'wmgAllowRobotsControlInAllNamespaces' => [
+   // If true, allows to use __NOINDEX__ and __INDEX__ everywhere,
+   // even in content namespaces (see $wgContentNamespaces).
+   'default' => false,
+],
+
 'wmgExemptFromUserRobotsControlExtra' => [
+   // When wmgAllowRobotsControlInAllNamespaces is false (the default),
+   // __NOINDEX__ and __INDEX__ will be ignored for these namepaces,
+   // as well as for namespaces in $wgContentNamespaces.
'default' => [],
'enwiki' => [ 118, 119 ], // draft and draft talk
'hewiki' => [ 118, 119 ], // draft and draft talk - T86329

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iffb77a0401a8dda537c769b612613763d448a3cc
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: MZMcBride 
Gerrit-Reviewer: MarcoAurelio 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: WMF staff local groups to $wmgPrivilegedGroups

2016-11-29 Thread MarcoAurelio (Code Review)
MarcoAurelio has uploaded a new change for review.

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

Change subject: WMF staff local groups to $wmgPrivilegedGroups
..

WMF staff local groups to $wmgPrivilegedGroups

Add two sensitive local groups only existant at Meta-Wiki to the list of 
privileged groups.

Bug: T150951
Change-Id: Ia08f3832cfebf349a71d0363e67c08bc03b404cd
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/50/324250/2

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 06e1430..e09d66c 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -9183,7 +9183,7 @@
'+fawiki' => [ 'templateeditor' ],
'+fishbowl' => [ 'user' ],
'+incubatorwiki' => [ 'translator' ],
-   '+metawiki' => [ 'centralnoticeadmin', 'global-renamer' ],
+   '+metawiki' => [ 'centralnoticeadmin', 'global-renamer', 
'wmf-officeit', 'wmf-supportsafety' ],
'+private' => [ 'user' ],
'+rowiki' => [ 'templateeditor' ],
'+ruwiki' => [ 'engineer' ],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia08f3832cfebf349a71d0363e67c08bc03b404cd
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: MarcoAurelio 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[wmf/1.29.0-wmf.4]: Import wmui-base.less and override leaflet style to match wi...

2016-11-29 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Import wmui-base.less and override leaflet style to match 
wikimedia style.
..

Import wmui-base.less and override leaflet style to match wikimedia style.

Bug: T150497
Change-Id: I7277ebb21ad9e15cf5ca7367eecc51a6494c70f8
---
M bin/build.sh
M lib/mapbox-style-fixes.css
A lib/wmui-base.less
M modules/wikivoyage/ControlLayers.js
A modules/wikivoyage/images/icon-nearby-invert.png
A modules/wikivoyage/images/icon-nearby-invert.svg
M modules/wikivoyage/images/icon-nearby.png
M modules/wikivoyage/images/icon-nearby.svg
A modules/wikivoyage/images/wm-nearby.svg
M modules/wikivoyage/styles/control-layers.less
M modules/wikivoyage/styles/control-nearby.less
M package.json
M styles/leaflet-overrides.less
13 files changed, 293 insertions(+), 46 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/51/324251/1

diff --git a/bin/build.sh b/bin/build.sh
index 6301e9b..90ec62c 100644
--- a/bin/build.sh
+++ b/bin/build.sh
@@ -7,6 +7,7 @@
 rm lib/mapbox/images/render.sh
 
 cp -v node_modules/leaflet-sleep/Leaflet.Sleep.js lib/leaflet.sleep.js
+cp -v node_modules/wmui-base/wmui-base.less lib/wmui-base.less
 
 cp -v node_modules/prunecluster/dist/PruneCluster.js \
 node_modules/prunecluster/dist/LeafletStyleSheet.css \
diff --git a/lib/mapbox-style-fixes.css b/lib/mapbox-style-fixes.css
index 00994d6..19e3b78 100644
--- a/lib/mapbox-style-fixes.css
+++ b/lib/mapbox-style-fixes.css
@@ -1,29 +1,3 @@
-/* Apply a few colour fixes from MW theme */
-
-.leaflet-control-layers, .leaflet-bar {
-   border-color: #ccc;
-}
-
-.leaflet-bar a {
-   -webkit-transition: background-color 100ms, border-color 100ms;
-  -moz-transition: background-color 100ms, border-color 100ms;
-   transition: background-color 100ms, border-color 100ms;
-   border-bottom-color: #ccc;
-}
-
-.leaflet-bar a:last-child {
-   border-bottom: 0;
-}
-
-.leaflet-bar a:hover {
-   background-color: #ebebeb;
-}
-
-.leaflet-bar a:active {
-   background-color: #d9d9d9;
-   border-color: #d9d9d9;
-}
-
 /**
  * Fix unwanted flipping of styles by CSS Janus (T127137)
  */
diff --git a/lib/wmui-base.less b/lib/wmui-base.less
new file mode 100644
index 000..f0da64d
--- /dev/null
+++ b/lib/wmui-base.less
@@ -0,0 +1,142 @@
+/**
+ * WikimediaUI base v0.7.0
+ * Wikimedia Foundation user interface base variables
+ */
+
+/* Colors */
+// WikimediaUI (WMUI) color palette
+@wmui-color-base0:#000;// = HSB 0°, 0%, 0%
+@wmui-color-base10:   #222;// = HSB 0°, 0%, 13%
+@wmui-color-base20:   #54595d; // = HSB 207°, 10%, 36%; WCAG 2.0 level AAA 
7.09:1 contrast ratio on `#fff`
+@wmui-color-base30:   #72777d; // = HSB 210°, 9%, 49%; WCAG 2.0 level AA at 
4.52:1 contrast ratio on `#fff`
+@wmui-color-base50:   #a2a9b1; // = HSB 212°, 8%, 69%
+@wmui-color-base70:   #c8ccd1; // = HSB 213°, 4%, 82%
+@wmui-color-base80:   #eaecf0; // = HSB 220°, 3%, 94%
+@wmui-color-base90:   #f8f9fa; // = HSB 210°, 1%, 98%
+@wmui-color-base100:  #fff;// = HSB 0°, 0%, 100%
+
+@wmui-color-accent30: #2a4b8d; // = HSB 220°, 70%, 55%
+@wmui-color-accent50: #36c;// = HSB 220°, 75%, 80%
+@wmui-color-accent90: #eaf3ff; // = HSB 214°, 8%, 100%
+
+@wmui-color-red30:#b32424; // = HSB 360°, 80%, 70%
+@wmui-color-red50:#d33;// = HSB 360°, 77%, 87%
+@wmui-color-red90:#fee7e6; // = HSB 3°, 9%, 100%
+
+@wmui-color-yellow30: #ac6600; // = HSB 36°, 100%, 67%
+@wmui-color-yellow50: #fc3;// = HSB 45°, 80%, 100%
+@wmui-color-yellow90: #fef6e7; // = HSB 39°, 9%, 100%
+
+@wmui-color-green30:  #14866d; // = HSB 167°, 85%, 53%
+@wmui-color-green50:  #00af89; // = HSB 167°, 100%, 69%
+@wmui-color-green90:  #d5fdf4; // = HSB 166°, 16%, 99%
+
+// Background Colors
+@background-color-base:   @wmui-color-base100;
+@background-color-code:   @wmui-color-base90;
+// 'Framed' UI elements (Framed Buttons, Dropdowns, ToggleSwitches...)
+@background-color-framed: @wmui-color-base90;
+@background-color-framed--hover: @wmui-color-base100;
+@background-color-framed--active: @wmui-color-base70;
+// RGBA Colors include hex fallback on `#fff` for IE 6/7/8
+@background-color-highlight:  rgba( 255, 182, 13, 0.4 );
+@background-color-highlight--fallback: #ffe29e;
+
+// Foreground Colors
+@color-base:  @wmui-color-base10;
+@color-base--hover:   #444;
+@color-base--active:  @wmui-color-base0;
+@color-base--inverted:@wmui-color-base100;
+@color-base--emphasized:  @wmui-color-base0;
+@color-base--disabled:@wmui-color-base30;
+@color-filled--disabled:  @color-base--inverted;
+@color-placeholder:   @wmui-color-base30;
+// Primary 'Progressive' Color, Background Color and states
+@background-color-primary:@wmui-color-base90;
+@background-color-primary--hover: rgba( 41, 98, 

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[wmf/1.29.0-wmf.4]: Implement second phase of event logging

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Implement second phase of event logging
..


Implement second phase of event logging

Bug: T149834
Change-Id: Ie741fc5f306e9ff14173e50339131b8faaf06120
(cherry picked from commit 9cb61685986012e2951c2a0c7871dd809b5a289b)
---
M modules/ext.wikimediaEvents.kartographer.js
1 file changed, 45 insertions(+), 11 deletions(-)

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



diff --git a/modules/ext.wikimediaEvents.kartographer.js 
b/modules/ext.wikimediaEvents.kartographer.js
index 1fc2ad7..d49789c 100644
--- a/modules/ext.wikimediaEvents.kartographer.js
+++ b/modules/ext.wikimediaEvents.kartographer.js
@@ -95,6 +95,10 @@
 
options = options || {};
 
+   if ( options.sampling && !randomOneIn( options.sampling ) ) {
+   return;
+   }
+
if ( options.extra ) {
event.extra = ( $.type( options.extra ) !== 'string' ) 
? JSON.stringify( options.extra ) : options.extra;
}
@@ -102,7 +106,13 @@
event.duration = options.duration;
}
event.sampling = ( options.sampling || 1 ) * userSampling;
-   mw.eventLog.logEvent( 'Kartographer', event );
+
+   mw.loader.using( [
+   'ext.eventLogging',
+   'schema.Kartographer'
+   ] ).then( function () {
+   mw.eventLog.logEvent( 'Kartographer', event );
+   } );
}
 
/**
@@ -140,6 +150,39 @@
};
 
switch ( data.action ) {
+   case 'initialize':
+   data.feature.on( 'click contextmenu', 
function () {
+   options = $.extend( {}, 
options, { sampling: 100 } );
+   logEvent( 
data.feature.featureType, 'map-click', data.isFullScreen, options );
+   } );
+   data.feature.on( 'zoomend', function () 
{
+   options = $.extend( {}, 
options, { sampling: 100 } );
+   logEvent( 
data.feature.featureType, 'zoom', data.isFullScreen, options );
+   } );
+   data.feature.on( 'dragend', function () 
{
+   options = $.extend( {}, 
options, { sampling: 100 } );
+   logEvent( 
data.feature.featureType, 'drag', data.isFullScreen, options );
+   } );
+   data.feature.on( 'popupopen', function 
() {
+   logEvent( 
data.feature.featureType, 'marker-click', data.isFullScreen, options );
+   } );
+   data.feature.$container.on( 'click', 
'.leaflet-popup-content a', function () {
+   var $link = $( this ),
+   destination;
+
+   if ( $link.hasClass( 'extiw' ) 
) {
+   destination = 
'interwiki';
+   } else if ( $link.hasClass( 
'external' ) ) {
+   destination = 
'external';
+   } else {
+   destination = 
'internal';
+   }
+   options = $.extend( {}, options 
);
+   options.extra.destination = 
destination;
+
+   logEvent( 
data.feature.featureType, 'discovery', data.isFullScreen, options );
+   } );
+   return;
case 'view':
options.sampling = 100;
break;
@@ -160,16 +203,7 @@
break;
}
 
-   if ( options.sampling && !randomOneIn( options.sampling 
) ) {
-   return;
-   }
-
-   mw.loader.using( [
-   'ext.eventLogging',
-   'schema.Kartographer'
-   ] ).then( function () {
-   

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add autopatrolled group for wikitech

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add autopatrolled group for wikitech
..


Add autopatrolled group for wikitech

* Add an autopatrolled group that only grants the autopatrol right.
* Grant the autopatrol right to the existing cloudadmin and
  shellmanagers groups.

The autopatrol right is already granted to the following groups by
existing configuration:
* sysop
* bot
* contentadmin
* oauthadmin

The new group is intended to be used to manually grant autopatrol to
frequent, trusted editors in order to make filtering their edits out of
recent changes feeds trivial for wikitech patrollers. Many other wikis
including wikimedia.org have similar configuration.

Change-Id: Ib9d2ae235f6f909ea1a633b216b91702d4516a13
---
M wmf-config/InitialiseSettings.php
1 file changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index ca38150..06e1430 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -8342,7 +8342,9 @@
'edit' => false,
'createaccount' => true,
],
+   'autopatrolled' => [ 'autopatrol' => true ],
'cloudadmin' => [
+   'autopatrol' => true,
'listall' => true,
'manageproject' => true,
'userrights' => true,
@@ -8353,7 +8355,10 @@
],
'oauthadmin' => [ 'autopatrol' => true ],
'shell' => [ 'loginviashell' => true ],
-   'shellmanagers' => [ 'userrights' => false ],
+   'shellmanagers' => [
+   'autopatrol' => true,
+   'userrights' => false,
+   ],
],
'+legalteamwiki' => [ // T63222
'accountcreator' => [ 'noratelimit' => false ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib9d2ae235f6f909ea1a633b216b91702d4516a13
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: MarcoAurelio 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[wmf/1.29.0-wmf.4]: Implement second phase of event logging

2016-11-29 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Implement second phase of event logging
..

Implement second phase of event logging

Bug: T149834
Depends-on: Ie741fc5f306e9ff14173e50339131b8faaf06120
Change-Id: I0cabd896576ae2a02aba4065a1edf72543745419
(cherry picked from commit 9728bf43ad79e52a5b4a279e644334eaa355babe)
---
M modules/box/Map.js
M modules/staticframe/staticframe.js
2 files changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/49/324249/1

diff --git a/modules/box/Map.js b/modules/box/Map.js
index 90343a3..9de5370 100644
--- a/modules/box/Map.js
+++ b/modules/box/Map.js
@@ -286,6 +286,12 @@
 * Fired when the Kartographer Map 
object is ready.
 */
'kartographerisready' );
+
+   mw.track( 'mediawiki.kartographer', {
+   action: 'initialize',
+   isFullScreen: !!map.options.fullscreen,
+   feature: map
+   } );
}
 
if ( this.parentMap ) {
diff --git a/modules/staticframe/staticframe.js 
b/modules/staticframe/staticframe.js
index 78142e0..09e55dc 100644
--- a/modules/staticframe/staticframe.js
+++ b/modules/staticframe/staticframe.js
@@ -118,7 +118,7 @@
link.clicked = true;
 
mw.track( 'mediawiki.kartographer', {
-   action: 'open',
+   action: 'activate',
isFullScreen: true,
feature: link
} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cabd896576ae2a02aba4065a1edf72543745419
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: wmf/1.29.0-wmf.4
Gerrit-Owner: Yurik 
Gerrit-Reviewer: JGirault 

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: Implement second phase of event logging

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Implement second phase of event logging
..


Implement second phase of event logging

Bug: T149834
Depends-on: Ie741fc5f306e9ff14173e50339131b8faaf06120
Change-Id: I0cabd896576ae2a02aba4065a1edf72543745419
---
M modules/box/Map.js
M modules/staticframe/staticframe.js
2 files changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/modules/box/Map.js b/modules/box/Map.js
index 90343a3..9de5370 100644
--- a/modules/box/Map.js
+++ b/modules/box/Map.js
@@ -286,6 +286,12 @@
 * Fired when the Kartographer Map 
object is ready.
 */
'kartographerisready' );
+
+   mw.track( 'mediawiki.kartographer', {
+   action: 'initialize',
+   isFullScreen: !!map.options.fullscreen,
+   feature: map
+   } );
}
 
if ( this.parentMap ) {
diff --git a/modules/staticframe/staticframe.js 
b/modules/staticframe/staticframe.js
index 78142e0..09e55dc 100644
--- a/modules/staticframe/staticframe.js
+++ b/modules/staticframe/staticframe.js
@@ -118,7 +118,7 @@
link.clicked = true;
 
mw.track( 'mediawiki.kartographer', {
-   action: 'open',
+   action: 'activate',
isFullScreen: true,
feature: link
} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0cabd896576ae2a02aba4065a1edf72543745419
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: JGirault 
Gerrit-Reviewer: JGirault 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[wmf/1.29.0-wmf.4]: Implement second phase of event logging

2016-11-29 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Implement second phase of event logging
..

Implement second phase of event logging

Bug: T149834
Change-Id: Ie741fc5f306e9ff14173e50339131b8faaf06120
(cherry picked from commit 9cb61685986012e2951c2a0c7871dd809b5a289b)
---
M modules/ext.wikimediaEvents.kartographer.js
1 file changed, 45 insertions(+), 11 deletions(-)


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

diff --git a/modules/ext.wikimediaEvents.kartographer.js 
b/modules/ext.wikimediaEvents.kartographer.js
index 1fc2ad7..d49789c 100644
--- a/modules/ext.wikimediaEvents.kartographer.js
+++ b/modules/ext.wikimediaEvents.kartographer.js
@@ -95,6 +95,10 @@
 
options = options || {};
 
+   if ( options.sampling && !randomOneIn( options.sampling ) ) {
+   return;
+   }
+
if ( options.extra ) {
event.extra = ( $.type( options.extra ) !== 'string' ) 
? JSON.stringify( options.extra ) : options.extra;
}
@@ -102,7 +106,13 @@
event.duration = options.duration;
}
event.sampling = ( options.sampling || 1 ) * userSampling;
-   mw.eventLog.logEvent( 'Kartographer', event );
+
+   mw.loader.using( [
+   'ext.eventLogging',
+   'schema.Kartographer'
+   ] ).then( function () {
+   mw.eventLog.logEvent( 'Kartographer', event );
+   } );
}
 
/**
@@ -140,6 +150,39 @@
};
 
switch ( data.action ) {
+   case 'initialize':
+   data.feature.on( 'click contextmenu', 
function () {
+   options = $.extend( {}, 
options, { sampling: 100 } );
+   logEvent( 
data.feature.featureType, 'map-click', data.isFullScreen, options );
+   } );
+   data.feature.on( 'zoomend', function () 
{
+   options = $.extend( {}, 
options, { sampling: 100 } );
+   logEvent( 
data.feature.featureType, 'zoom', data.isFullScreen, options );
+   } );
+   data.feature.on( 'dragend', function () 
{
+   options = $.extend( {}, 
options, { sampling: 100 } );
+   logEvent( 
data.feature.featureType, 'drag', data.isFullScreen, options );
+   } );
+   data.feature.on( 'popupopen', function 
() {
+   logEvent( 
data.feature.featureType, 'marker-click', data.isFullScreen, options );
+   } );
+   data.feature.$container.on( 'click', 
'.leaflet-popup-content a', function () {
+   var $link = $( this ),
+   destination;
+
+   if ( $link.hasClass( 'extiw' ) 
) {
+   destination = 
'interwiki';
+   } else if ( $link.hasClass( 
'external' ) ) {
+   destination = 
'external';
+   } else {
+   destination = 
'internal';
+   }
+   options = $.extend( {}, options 
);
+   options.extra.destination = 
destination;
+
+   logEvent( 
data.feature.featureType, 'discovery', data.isFullScreen, options );
+   } );
+   return;
case 'view':
options.sampling = 100;
break;
@@ -160,16 +203,7 @@
break;
}
 
-   if ( options.sampling && !randomOneIn( options.sampling 
) ) {
-   return;
-   }
-
-   mw.loader.using( [
-   'ext.eventLogging',
-   'schema.Kartographer'
-   

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Implement second phase of event logging

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Implement second phase of event logging
..


Implement second phase of event logging

Bug: T149834
Change-Id: Ie741fc5f306e9ff14173e50339131b8faaf06120
---
M modules/ext.wikimediaEvents.kartographer.js
1 file changed, 45 insertions(+), 11 deletions(-)

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



diff --git a/modules/ext.wikimediaEvents.kartographer.js 
b/modules/ext.wikimediaEvents.kartographer.js
index 1fc2ad7..d49789c 100644
--- a/modules/ext.wikimediaEvents.kartographer.js
+++ b/modules/ext.wikimediaEvents.kartographer.js
@@ -95,6 +95,10 @@
 
options = options || {};
 
+   if ( options.sampling && !randomOneIn( options.sampling ) ) {
+   return;
+   }
+
if ( options.extra ) {
event.extra = ( $.type( options.extra ) !== 'string' ) 
? JSON.stringify( options.extra ) : options.extra;
}
@@ -102,7 +106,13 @@
event.duration = options.duration;
}
event.sampling = ( options.sampling || 1 ) * userSampling;
-   mw.eventLog.logEvent( 'Kartographer', event );
+
+   mw.loader.using( [
+   'ext.eventLogging',
+   'schema.Kartographer'
+   ] ).then( function () {
+   mw.eventLog.logEvent( 'Kartographer', event );
+   } );
}
 
/**
@@ -140,6 +150,39 @@
};
 
switch ( data.action ) {
+   case 'initialize':
+   data.feature.on( 'click contextmenu', 
function () {
+   options = $.extend( {}, 
options, { sampling: 100 } );
+   logEvent( 
data.feature.featureType, 'map-click', data.isFullScreen, options );
+   } );
+   data.feature.on( 'zoomend', function () 
{
+   options = $.extend( {}, 
options, { sampling: 100 } );
+   logEvent( 
data.feature.featureType, 'zoom', data.isFullScreen, options );
+   } );
+   data.feature.on( 'dragend', function () 
{
+   options = $.extend( {}, 
options, { sampling: 100 } );
+   logEvent( 
data.feature.featureType, 'drag', data.isFullScreen, options );
+   } );
+   data.feature.on( 'popupopen', function 
() {
+   logEvent( 
data.feature.featureType, 'marker-click', data.isFullScreen, options );
+   } );
+   data.feature.$container.on( 'click', 
'.leaflet-popup-content a', function () {
+   var $link = $( this ),
+   destination;
+
+   if ( $link.hasClass( 'extiw' ) 
) {
+   destination = 
'interwiki';
+   } else if ( $link.hasClass( 
'external' ) ) {
+   destination = 
'external';
+   } else {
+   destination = 
'internal';
+   }
+   options = $.extend( {}, options 
);
+   options.extra.destination = 
destination;
+
+   logEvent( 
data.feature.featureType, 'discovery', data.isFullScreen, options );
+   } );
+   return;
case 'view':
options.sampling = 100;
break;
@@ -160,16 +203,7 @@
break;
}
 
-   if ( options.sampling && !randomOneIn( options.sampling 
) ) {
-   return;
-   }
-
-   mw.loader.using( [
-   'ext.eventLogging',
-   'schema.Kartographer'
-   ] ).then( function () {
-   logEvent( data.feature.featureType, 
data.action, data.isFullScreen, options 

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Handle missing pipes in Gallery syntax, and remove them when...

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Handle missing pipes in Gallery syntax, and remove them when 
caption is empty
..


Handle missing pipes in Gallery syntax, and remove them when caption is empty

Bug: T146190
Change-Id: I703bcdf68b9631a47d839baf3abb42ff98b36bf2
---
M modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
index 94fea51..bf13fe8 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
@@ -307,7 +307,7 @@

imageTitles.push( titleText );

dialog.initialImageData.push( {
title: 
titleText,
-   
caption: matches[ 3 ]
+   
caption: matches[ 3 ] || ''
} );
}
}
@@ -649,7 +649,7 @@
// Get titles and captions from gallery group
this.highlightedItem.setCaption( 
this.highlightedCaptionInput.getValue() );
for ( i = 0, ilen = items.length; i < ilen; i++ ) {
-   extsrc += '\n' + items[ i ].imageTitle + '|' + items[ i 
].caption;
+   extsrc += '\n' + items[ i ].imageTitle + ( items[ i ].caption ? 
'|' + items[ i ].caption : '' );
}
 
// Get data from options card

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I703bcdf68b9631a47d839baf3abb42ff98b36bf2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Tchanders 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] analytics/discovery-stats[production]: discovery-stats: use the discovery-stats specific credential...

2016-11-29 Thread MaxSem (Code Review)
MaxSem has submitted this change and it was merged.

Change subject: discovery-stats: use the discovery-stats specific credential 
file
..


discovery-stats: use the discovery-stats specific credential file

A new credential file is created in https://gerrit.wikimedia.org/r/#/c/324191/
this new file is now used instead of the analytics-research file.

Bug: T151063
Change-Id: I8e03fe2ca984fbebd96ca267506dc3a3db843bc1
(cherry picked from commit dedf33d0a50318b3194f251d7511c678385ef517)
---
M geo-tag-counts.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/geo-tag-counts.php b/geo-tag-counts.php
index 37495d3..926f705 100644
--- a/geo-tag-counts.php
+++ b/geo-tag-counts.php
@@ -11,7 +11,7 @@
 ];
 
 $matrix = new SiteMatrix();
-$db = Mysql::connect( '/etc/mysql/conf.d/analytics-research-client.cnf',
+$db = Mysql::connect( '/etc/mysql/conf.d/discovery-stats-client.cnf',
 'analytics-store.eqiad.wmnet'
 );
 $graphite = new Graphite( $config );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e03fe2ca984fbebd96ca267506dc3a3db843bc1
Gerrit-PatchSet: 1
Gerrit-Project: analytics/discovery-stats
Gerrit-Branch: production
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: MaxSem 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Move more confs to yaml

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Move more confs to yaml
..


Move more confs to yaml

 * In the site matrix, it's www.wikidata.org, but we had here,
   https://wikidata.beta.wmflabs.org/w/api.php
   which seems to be where www redirects.  But, should confirm this
   works in practice.

Change-Id: I7ea08d37a39f94caf35370a3a9f740f489874b4a
---
M conf/wmf/betalabs.localsettings.js
M conf/wmf/localsettings.js
M scap/environments/beta/vars.yaml
M scap/templates/config.yaml.j2
M scap/vars.yaml
5 files changed, 29 insertions(+), 47 deletions(-)

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



diff --git a/conf/wmf/betalabs.localsettings.js 
b/conf/wmf/betalabs.localsettings.js
index 1dcf010..98317ea 100644
--- a/conf/wmf/betalabs.localsettings.js
+++ b/conf/wmf/betalabs.localsettings.js
@@ -1,41 +1,20 @@
 "use strict";
 exports.setup = function(parsoidConfig) {
-   parsoidConfig.setMwApi({ prefix: 'aawiki', uri: 
'https://aa.wikipedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'arwiki', uri: 
'https://ar.wikipedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'cawiki', uri: 
'https://ca.wikipedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'commonswiki', uri: 
'https://commons.wikimedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'dewiki', uri: 
'https://de.wikipedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'dewiktionary', uri: 
'https://de.wiktionary.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'en_rtlwiki', uri: 
'https://en-rtl.wikipedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'enwiki', uri: 
'https://en.wikipedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'enwikibooks', uri: 
'https://en.wikibooks.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'enwikinews', uri: 
'https://en.wikinews.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'enwikiquote', uri: 
'https://en.wikiquote.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'enwikisource', uri: 
'https://en.wikisource.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'enwikiversity', uri: 
'https://en.wikiversity.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'enwikivoyage', uri: 
'https://en.wikivoyage.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'enwiktionary', uri: 
'https://en.wiktionary.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'eowiki', uri: 
'https://eo.wikipedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'eswiki', uri: 
'https://es.wikipedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'fawiki', uri: 
'https://fa.wikipedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'hewiki', uri: 
'https://he.wikipedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'hiwiki', uri: 
'https://hi.wikipedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'jawiki', uri: 
'https://ja.wikipedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'kowiki', uri: 
'https://ko.wikipedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'labs', uri: 
'https://deployment.wikimedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'loginwiki', uri: 
'https://login.wikimedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'metawiki', uri: 
'https://meta.wikimedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'nlwiki', uri: 
'https://nl.wikipedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'ruwiki', uri: 
'https://ru.wikipedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'simplewiki', uri: 
'https://simple.wikipedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'sqwiki', uri: 
'https://sq.wikipedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'testwiki', uri: 
'https://test.wikimedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'ukwiki', uri: 
'https://uk.wikipedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'wikidatawiki', uri: 
'https://wikidata.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'zerowiki', uri: 
'https://zero.wikimedia.beta.wmflabs.org/w/api.php' });
-   parsoidConfig.setMwApi({ prefix: 'zhwiki', uri: 
'https://zh.wikipedia.beta.wmflabs.org/w/api.php' });
+   parsoidConfig.initMwApiMap();
 
-   // the production enwiki: a work-around to be able to use 

[MediaWiki-commits] [Gerrit] analytics/discovery-stats[production]: discovery-stats: use the discovery-stats specific credential...

2016-11-29 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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

Change subject: discovery-stats: use the discovery-stats specific credential 
file
..

discovery-stats: use the discovery-stats specific credential file

A new credential file is created in https://gerrit.wikimedia.org/r/#/c/324191/
this new file is now used instead of the analytics-research file.

Bug: T151063
Change-Id: I8e03fe2ca984fbebd96ca267506dc3a3db843bc1
(cherry picked from commit dedf33d0a50318b3194f251d7511c678385ef517)
---
M geo-tag-counts.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/discovery-stats 
refs/changes/47/324247/1

diff --git a/geo-tag-counts.php b/geo-tag-counts.php
index 37495d3..926f705 100644
--- a/geo-tag-counts.php
+++ b/geo-tag-counts.php
@@ -11,7 +11,7 @@
 ];
 
 $matrix = new SiteMatrix();
-$db = Mysql::connect( '/etc/mysql/conf.d/analytics-research-client.cnf',
+$db = Mysql::connect( '/etc/mysql/conf.d/discovery-stats-client.cnf',
 'analytics-store.eqiad.wmnet'
 );
 $graphite = new Graphite( $config );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e03fe2ca984fbebd96ca267506dc3a3db843bc1
Gerrit-PatchSet: 1
Gerrit-Project: analytics/discovery-stats
Gerrit-Branch: production
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Gehel 

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


[MediaWiki-commits] [Gerrit] analytics/discovery-stats[master]: discovery-stats: use the discovery-stats specific credential...

2016-11-29 Thread MaxSem (Code Review)
MaxSem has submitted this change and it was merged.

Change subject: discovery-stats: use the discovery-stats specific credential 
file
..


discovery-stats: use the discovery-stats specific credential file

A new credential file is created in https://gerrit.wikimedia.org/r/#/c/324191/
this new file is now used instead of the analytics-research file.

Bug: T151063
Change-Id: I8e03fe2ca984fbebd96ca267506dc3a3db843bc1
---
M geo-tag-counts.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/geo-tag-counts.php b/geo-tag-counts.php
index 37495d3..926f705 100644
--- a/geo-tag-counts.php
+++ b/geo-tag-counts.php
@@ -11,7 +11,7 @@
 ];
 
 $matrix = new SiteMatrix();
-$db = Mysql::connect( '/etc/mysql/conf.d/analytics-research-client.cnf',
+$db = Mysql::connect( '/etc/mysql/conf.d/discovery-stats-client.cnf',
 'analytics-store.eqiad.wmnet'
 );
 $graphite = new Graphite( $config );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e03fe2ca984fbebd96ca267506dc3a3db843bc1
Gerrit-PatchSet: 1
Gerrit-Project: analytics/discovery-stats
Gerrit-Branch: master
Gerrit-Owner: Gehel 
Gerrit-Reviewer: MaxSem 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add 'global-renamer' to the list of privileged wiki groups

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add 'global-renamer' to the list of privileged wiki groups
..


Add 'global-renamer' to the list of privileged wiki groups

Bug: T150951
Change-Id: I2867eeb49a809c1527ddfa797f522439cf50e677
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Thcipriani: Looks good to me, approved
  Reedy: Looks good to me, but someone else must approve
  Jalexander: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a800cbe..ca38150 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -9178,7 +9178,7 @@
'+fawiki' => [ 'templateeditor' ],
'+fishbowl' => [ 'user' ],
'+incubatorwiki' => [ 'translator' ],
-   '+metawiki' => [ 'centralnoticeadmin' ],
+   '+metawiki' => [ 'centralnoticeadmin', 'global-renamer' ],
'+private' => [ 'user' ],
'+rowiki' => [ 'templateeditor' ],
'+ruwiki' => [ 'engineer' ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2867eeb49a809c1527ddfa797f522439cf50e677
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: MarcoAurelio 
Gerrit-Reviewer: Foks 
Gerrit-Reviewer: Jalexander 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Wait until search panel is shown before setting a search query

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Wait until search panel is shown before setting a search query
..


Wait until search panel is shown before setting a search query

Bug: T151659
Change-Id: I3eb3b903a8df1c7732da2a08e4b46b13b162617e
---
M modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
1 file changed, 17 insertions(+), 14 deletions(-)

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



diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
index 94fea51..93bc250 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
@@ -262,24 +262,11 @@
var titlesString, title, titleText, imageTitles, mode,
caption, widths, heights, perrow,
showFilename, classes, styles,
-   pageTitle, namespace, namespacesWithSubpages, 
namespaceIds,
+   namespaceIds = mw.config.get( 'wgNamespaceIds' 
),
dialog = this,
attributes = this.selectedNode && 
this.selectedNode.getAttribute( 'mw' ).attrs;
 
// Images card
-
-   // First set the search widget input value to the page 
title
-   pageTitle = mw.config.get( 'wgTitle' );
-   namespace = mw.config.get( 'wgNamespaceNumber' );
-   namespacesWithSubpages = mw.config.get( 
'wgVisualEditorConfig' ).namespacesWithSubpages;
-   namespaceIds = mw.config.get( 'wgNamespaceIds' );
-
-   if ( namespacesWithSubpages[ namespace ] ) {
-   pageTitle = pageTitle.slice( 
pageTitle.lastIndexOf( '/' ) + 1 );
-   }
-
-   this.searchWidget.getQuery().setValue( pageTitle );
-
// If editing an existing gallery, populate with the 
images...
if ( this.selectedNode ) {
imageTitles = [];
@@ -578,6 +565,8 @@
  * @param {boolean} visible The search panel is visible
  */
 ve.ui.MWGalleryDialog.prototype.toggleSearchPanel = function ( visible ) {
+   var pageTitle, namespace, namespacesWithSubpages;
+
visible = visible !== undefined ? visible : !this.searchPanelVisible;
 
// If currently visible panel is an edit panel, store the caption
@@ -598,6 +587,20 @@
if ( !visible ) {
this.highlightedCaptionInput.focus();
} else {
+   if ( !this.searchWidget.getQuery().getValue() ) {
+   // Wait until the search panel is visible before 
setting a default query
+   // as this triggers a request and render.
+   pageTitle = mw.config.get( 'wgTitle' );
+   namespace = mw.config.get( 'wgNamespaceNumber' );
+   namespacesWithSubpages = mw.config.get( 
'wgVisualEditorConfig' ).namespacesWithSubpages;
+
+   if ( namespacesWithSubpages[ namespace ] ) {
+   pageTitle = pageTitle.slice( 
pageTitle.lastIndexOf( '/' ) + 1 );
+   }
+
+   this.searchWidget.getQuery().setValue( pageTitle );
+   }
+
this.searchWidget.getQuery().focus().select();
}
this.updateDialogSize();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3eb3b903a8df1c7732da2a08e4b46b13b162617e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: fix check that file we have fcntl lock is empty

2016-11-29 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: fix check that file we have fcntl lock is empty
..

fix check that file we have fcntl lock is empty

don't read contents by path, check size of filehandle via stat

Change-Id: Ia530f00b800ae2d187b85b0eac6f949cba6ab8d4
---
M xmldumps-backup/miscdumplib.py
1 file changed, 11 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/46/324246/1

diff --git a/xmldumps-backup/miscdumplib.py b/xmldumps-backup/miscdumplib.py
index 64ce6a8..5f92108 100644
--- a/xmldumps-backup/miscdumplib.py
+++ b/xmldumps-backup/miscdumplib.py
@@ -306,32 +306,33 @@
 '''
 given number of seconds, see if file is older than this many seconds
 and remove file if so.  we do this by opening the file exclusively 
first,
-stat on the open fdesc, then remove path if it checks out.
+stat on the open file handle, then remove path if it checks out.
 return True on removal, False for anything else including errors.
 '''
 removed = False
 try:
 # we're not going to write anything but have to open for write
 # in order to get LOCK_EX
-fdesc = open(self.lockfile.get_path(), "a+")
+fhandle = open(self.lockfile.get_path(), "a+")
 # try to get the lock. if we can't then we give up
 try:
-fcntl.lockf(fdesc, fcntl.LOCK_EX | fcntl.LOCK_NB)
+fcntl.lockf(fhandle, fcntl.LOCK_EX | fcntl.LOCK_NB)
 except Exception:
 # fail to get lock or some other error
-fdesc.close()
+fhandle.close()
 return removed
-if self._is_stale(cutoff, fdesc.fileno()):
+if self._is_stale(cutoff, fhandle.fileno()):
 removed = self._unlock()
 else:
 # if the file did not exist, our open call would have created
-# it, and then we would have an empty file.  See if that's the
-# case and if so, clean it up
-contents = 
FileUtils.read_file(self.lockfile.get_path(self.date))
-if not contents:
+# it, and then we would have an empty file.  No one else would
+# have written to it because we have the LOCK_EX here.
+# See if that's the case and if so, clean up
+filesize = os.fstat(fhandle.fileno()).st_size
+if not filesize:
 removed = self._unlock()
 # lock removed now
-fdesc.close()
+fhandle.close()
 return removed
 except Exception:
 pass

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia530f00b800ae2d187b85b0eac6f949cba6ab8d4
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Set 'abusefilter-modify-global' to stewards locally at Meta-...

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Set 'abusefilter-modify-global' to stewards locally at Meta-Wiki
..


Set 'abusefilter-modify-global' to stewards locally at Meta-Wiki

Bug: T150752
Change-Id: I4ee674dd1779ccb54bf3dbc643a1ac29275cea36
---
M wmf-config/abusefilter.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wmf-config/abusefilter.php b/wmf-config/abusefilter.php
index 9069257..dc001b4 100644
--- a/wmf-config/abusefilter.php
+++ b/wmf-config/abusefilter.php
@@ -292,6 +292,7 @@
$wgGroupPermissions['*']['abusefilter-log-detail'] = true;
$wgGroupPermissions['sysop']['abusefilter-modify-restricted'] = 
true; // T76270
$wgGroupPermissions['sysop']['abusefilter-revert'] = true; // 
T76270
+   $wgGroupPermissions['steward']['abusefilter-modify-global'] = 
true; // T150752
$wgAbuseFilterActions['block'] = true; // T54681
$wgAbuseFilterAnonBlockDuration = '31 hours'; // T76270
$wgAbuseFilterProfile = true; // T149901

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4ee674dd1779ccb54bf3dbc643a1ac29275cea36
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: MarcoAurelio 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Jalexander 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MarcoAurelio 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: Implement second phase of event logging

2016-11-29 Thread JGirault (Code Review)
JGirault has uploaded a new change for review.

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

Change subject: Implement second phase of event logging
..

Implement second phase of event logging

Bug: T149834
Change-Id: I0cabd896576ae2a02aba4065a1edf72543745419
---
M modules/box/Map.js
M modules/staticframe/staticframe.js
2 files changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/45/324245/1

diff --git a/modules/box/Map.js b/modules/box/Map.js
index 90343a3..9de5370 100644
--- a/modules/box/Map.js
+++ b/modules/box/Map.js
@@ -286,6 +286,12 @@
 * Fired when the Kartographer Map 
object is ready.
 */
'kartographerisready' );
+
+   mw.track( 'mediawiki.kartographer', {
+   action: 'initialize',
+   isFullScreen: !!map.options.fullscreen,
+   feature: map
+   } );
}
 
if ( this.parentMap ) {
diff --git a/modules/staticframe/staticframe.js 
b/modules/staticframe/staticframe.js
index 78142e0..09e55dc 100644
--- a/modules/staticframe/staticframe.js
+++ b/modules/staticframe/staticframe.js
@@ -118,7 +118,7 @@
link.clicked = true;
 
mw.track( 'mediawiki.kartographer', {
-   action: 'open',
+   action: 'activate',
isFullScreen: true,
feature: link
} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cabd896576ae2a02aba4065a1edf72543745419
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: JGirault 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Implement second phase of event logging

2016-11-29 Thread JGirault (Code Review)
JGirault has uploaded a new change for review.

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

Change subject: Implement second phase of event logging
..

Implement second phase of event logging

Bug: T149834
Change-Id: Ie741fc5f306e9ff14173e50339131b8faaf06120
---
M modules/ext.wikimediaEvents.kartographer.js
1 file changed, 45 insertions(+), 11 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents 
refs/changes/44/324244/1

diff --git a/modules/ext.wikimediaEvents.kartographer.js 
b/modules/ext.wikimediaEvents.kartographer.js
index 1fc2ad7..d49789c 100644
--- a/modules/ext.wikimediaEvents.kartographer.js
+++ b/modules/ext.wikimediaEvents.kartographer.js
@@ -95,6 +95,10 @@
 
options = options || {};
 
+   if ( options.sampling && !randomOneIn( options.sampling ) ) {
+   return;
+   }
+
if ( options.extra ) {
event.extra = ( $.type( options.extra ) !== 'string' ) 
? JSON.stringify( options.extra ) : options.extra;
}
@@ -102,7 +106,13 @@
event.duration = options.duration;
}
event.sampling = ( options.sampling || 1 ) * userSampling;
-   mw.eventLog.logEvent( 'Kartographer', event );
+
+   mw.loader.using( [
+   'ext.eventLogging',
+   'schema.Kartographer'
+   ] ).then( function () {
+   mw.eventLog.logEvent( 'Kartographer', event );
+   } );
}
 
/**
@@ -140,6 +150,39 @@
};
 
switch ( data.action ) {
+   case 'initialize':
+   data.feature.on( 'click contextmenu', 
function () {
+   options = $.extend( {}, 
options, { sampling: 100 } );
+   logEvent( 
data.feature.featureType, 'map-click', data.isFullScreen, options );
+   } );
+   data.feature.on( 'zoomend', function () 
{
+   options = $.extend( {}, 
options, { sampling: 100 } );
+   logEvent( 
data.feature.featureType, 'zoom', data.isFullScreen, options );
+   } );
+   data.feature.on( 'dragend', function () 
{
+   options = $.extend( {}, 
options, { sampling: 100 } );
+   logEvent( 
data.feature.featureType, 'drag', data.isFullScreen, options );
+   } );
+   data.feature.on( 'popupopen', function 
() {
+   logEvent( 
data.feature.featureType, 'marker-click', data.isFullScreen, options );
+   } );
+   data.feature.$container.on( 'click', 
'.leaflet-popup-content a', function () {
+   var $link = $( this ),
+   destination;
+
+   if ( $link.hasClass( 'extiw' ) 
) {
+   destination = 
'interwiki';
+   } else if ( $link.hasClass( 
'external' ) ) {
+   destination = 
'external';
+   } else {
+   destination = 
'internal';
+   }
+   options = $.extend( {}, options 
);
+   options.extra.destination = 
destination;
+
+   logEvent( 
data.feature.featureType, 'discovery', data.isFullScreen, options );
+   } );
+   return;
case 'view':
options.sampling = 100;
break;
@@ -160,16 +203,7 @@
break;
}
 
-   if ( options.sampling && !randomOneIn( options.sampling 
) ) {
-   return;
-   }
-
-   mw.loader.using( [
-   'ext.eventLogging',
-   'schema.Kartographer'
-   ] ).then( function () {
-   logEvent( 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: group0 to wmf.4

2016-11-29 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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

Change subject: group0 to wmf.4
..

group0 to wmf.4

Change-Id: I3a31e3bc48f910c51a4d5620e7841a22ca1ff571
---
M wikiversions.json
1 file changed, 5 insertions(+), 5 deletions(-)


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

diff --git a/wikiversions.json b/wikiversions.json
index 5abc2fc..68af40b 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -479,7 +479,7 @@
 "maiwiki": "php-1.29.0-wmf.3",
 "map_bmswiki": "php-1.29.0-wmf.3",
 "mdfwiki": "php-1.29.0-wmf.3",
-"mediawikiwiki": "php-1.29.0-wmf.3",
+"mediawikiwiki": "php-1.29.0-wmf.4",
 "metawiki": "php-1.29.0-wmf.3",
 "mgwiki": "php-1.29.0-wmf.3",
 "mgwikibooks": "php-1.29.0-wmf.3",
@@ -749,9 +749,9 @@
 "tawiktionary": "php-1.29.0-wmf.3",
 "tcywiki": "php-1.29.0-wmf.3",
 "tenwiki": "php-1.29.0-wmf.3",
-"test2wiki": "php-1.29.0-wmf.3",
-"testwiki": "php-1.29.0-wmf.3",
-"testwikidatawiki": "php-1.29.0-wmf.3",
+"test2wiki": "php-1.29.0-wmf.4",
+"testwiki": "php-1.29.0-wmf.4",
+"testwikidatawiki": "php-1.29.0-wmf.4",
 "tetwiki": "php-1.29.0-wmf.3",
 "tewiki": "php-1.29.0-wmf.3",
 "tewikibooks": "php-1.29.0-wmf.3",
@@ -881,7 +881,7 @@
 "zawikiquote": "php-1.29.0-wmf.3",
 "zawiktionary": "php-1.29.0-wmf.3",
 "zeawiki": "php-1.29.0-wmf.3",
-"zerowiki": "php-1.29.0-wmf.3",
+"zerowiki": "php-1.29.0-wmf.4",
 "zh_classicalwiki": "php-1.29.0-wmf.3",
 "zh_min_nanwiki": "php-1.29.0-wmf.3",
 "zh_min_nanwikibooks": "php-1.29.0-wmf.3",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a31e3bc48f910c51a4d5620e7841a22ca1ff571
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T149209: Deal with newlines in and cells

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: T149209: Deal with newlines in  and  cells
..


T149209: Deal with newlines in  and  cells

* Ensures that both non-selser and selser code is functional.
* New tests added for both selser and non-selser modes.
* T151911 deals with a bad parse of table cells which
  has a bearing on the fix in this patch. When T151911
  is fixed, the code in this patch will need to be updated.

Change-Id: Ifc0b75b9ad6cb367afbd95ffa403d645b593deab
---
M HISTORY.md
M lib/html2wt/DOMHandlers.js
M lib/html2wt/WTSUtils.js
M tests/parserTests.txt
4 files changed, 118 insertions(+), 7 deletions(-)

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



diff --git a/HISTORY.md b/HISTORY.md
index 4f5bf8b..e9a9bac 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -4,6 +4,7 @@
 
   * T110910: Implement  extension natively inside Parsoid
   * T150213: Suppress logs for known unknown contentmodels
+  * T149209: Handle newlines in  and  cells
 
 0.6.1 / 2016-11-14
 ==
diff --git a/lib/html2wt/DOMHandlers.js b/lib/html2wt/DOMHandlers.js
index 68cb26a..12c251c 100644
--- a/lib/html2wt/DOMHandlers.js
+++ b/lib/html2wt/DOMHandlers.js
@@ -749,13 +749,25 @@
handle: Promise.method(function(node, state, wrapperUnmodified) 
{
var dp = DU.getDataParsoid(node);
var usableDP = stxInfoValidForTableCell(state, node);
+   var attrSepSrc = usableDP ? (dp.attrSepSrc || null) : 
null;
var startTagSrc = usableDP ? dp.startTagSrc : '';
-   var attrSepSrc = usableDP ? dp.attrSepSrc : null;
-   var src = (usableDP && dp.stx_v === 'row') ? '!!' : '!';
+   if (!startTagSrc) {
+   startTagSrc = (usableDP && dp.stx_v === 'row') 
? '!!' : '!';
+   }
+
+   // T149209: Special case to deal with scenarios
+   // where the previous sibling put us in a SOL state
+   // (or will put in a SOL state when the separator is 
emitted)
+   if (state.onSOL || state.sep.constraints.min > 0) {
+   // You can use both "!!" and "||" for same-row 
headings (ugh!)
+   startTagSrc = startTagSrc.replace(/!!/, '!')
+   .replace(/\|\|/, '!')
+   .replace(/{{!}}{{!}}/, '{{!}}');
+   }
 
// If the HTML for the first th is not enclosed in a 
tr-tag,
// we start a new line.  If not, tr will have taken 
care of it.
-   return serializeTableTag(startTagSrc || src, attrSepSrc 
|| null,
+   return serializeTableTag(startTagSrc, attrSepSrc,
state, node, 
wrapperUnmodified).then(function(tableTag) {
WTSUtils.emitStartTag(tableTag, node, state);
var thHandler = 
state.serializer.wteHandlers.thHandler
@@ -787,13 +799,23 @@
handle: Promise.method(function(node, state, wrapperUnmodified) 
{
var dp = DU.getDataParsoid(node);
var usableDP = stxInfoValidForTableCell(state, node);
+   var attrSepSrc = usableDP ? (dp.attrSepSrc || null) : 
null;
var startTagSrc = usableDP ? dp.startTagSrc : '';
-   var attrSepSrc = usableDP ? dp.attrSepSrc : null;
-   var src = (usableDP && dp.stx_v === 'row') ? '||' : '|';
+   if (!startTagSrc) {
+   startTagSrc = (usableDP && dp.stx_v === 'row') 
? '||' : '|';
+   }
+
+   // T149209: Special case to deal with scenarios
+   // where the previous sibling put us in a SOL state
+   // (or will put in a SOL state when the separator is 
emitted)
+   if (state.onSOL || state.sep.constraints.min > 0) {
+   startTagSrc = startTagSrc.replace(/\|\|/, '|')
+   .replace(/{{!}}{{!}}/, '{{!}}');
+   }
 
// If the HTML for the first td is not enclosed in a 
tr-tag,
// we start a new line.  If not, tr will have taken 
care of it.
-   return serializeTableTag(startTagSrc || src, attrSepSrc 
|| null,
+   return serializeTableTag(startTagSrc, attrSepSrc,
state, node, 
wrapperUnmodified).then(function(tableTag) {
var inWideTD = (tableTag.length > 1);
  

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Remove FlaggedRevs autopromotion function at eowiki

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove FlaggedRevs autopromotion function at eowiki
..


Remove FlaggedRevs autopromotion function at eowiki

Bug: T150591
Change-Id: I4739ce88a2d6788f704a2d98aeab200cd9dfd12d
---
M wmf-config/flaggedrevs.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/flaggedrevs.php b/wmf-config/flaggedrevs.php
index 1cb12e8..ad8f08c 100644
--- a/wmf-config/flaggedrevs.php
+++ b/wmf-config/flaggedrevs.php
@@ -336,7 +336,8 @@
 elseif ( $wgDBname == 'eowiki' ) {
$wgFlaggedRevsOverride = false;
$wgFlaggedRevsTags['accuracy']['levels'] = 1;
-   $wgFlaggedRevsAutopromote = $wmfStandardAutoPromote;
+   # Disable autopromotion of users - T150591
+   $wgFlaggedRevsAutopromote = false; // T150591
 }
 
 elseif ( $wgDBname == 'fawiki' ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4739ce88a2d6788f704a2d98aeab200cd9dfd12d
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: MarcoAurelio 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: MarcoAurelio 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: [BREAKING CHANGE] Allow target widgets to be re-used

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [BREAKING CHANGE] Allow target widgets to be re-used
..


[BREAKING CHANGE] Allow target widgets to be re-used

* Introduce #setDocument that re-creates the surface
  but keeps the toolbar.
* Make initial doc an optional config parameter.
* Re-emit history event so user doesn't have to re-bind
  when surface is changed.

This is a breaking change as it changes the constructor
signature.

Change-Id: I5ed0591048a17e84077bde5490e05c0467d0394a
---
M src/init/ve.init.Target.js
M src/ui/widgets/ve.ui.TargetWidget.js
2 files changed, 98 insertions(+), 31 deletions(-)

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



diff --git a/src/init/ve.init.Target.js b/src/init/ve.init.Target.js
index 4db6b00..ccd20cf 100644
--- a/src/init/ve.init.Target.js
+++ b/src/init/ve.init.Target.js
@@ -348,12 +348,11 @@
  * Create a target widget.
  *
  * @method
- * @param {ve.dm.Document} dmDoc Document model
  * @param {Object} [config] Configuration options
  * @return {ve.ui.TargetWidget}
  */
-ve.init.Target.prototype.createTargetWidget = function ( dmDoc, config ) {
-   return new ve.ui.TargetWidget( dmDoc, config );
+ve.init.Target.prototype.createTargetWidget = function ( config ) {
+   return new ve.ui.TargetWidget( config );
 };
 
 /**
diff --git a/src/ui/widgets/ve.ui.TargetWidget.js 
b/src/ui/widgets/ve.ui.TargetWidget.js
index e2cd95d..2d846a0 100644
--- a/src/ui/widgets/ve.ui.TargetWidget.js
+++ b/src/ui/widgets/ve.ui.TargetWidget.js
@@ -7,20 +7,23 @@
 /**
  * Creates an ve.ui.TargetWidget object.
  *
+ * User must call #initialize after the widget has been attached
+ * to the DOM, and also after the document is changed with #setDocument.
+ *
  * @class
  * @abstract
  * @extends OO.ui.Widget
  *
  * @constructor
- * @param {ve.dm.Document} doc Document model
  * @param {Object} [config] Configuration options
+ * @cfg {ve.dm.Document} [doc] Initial document model
  * @cfg {Object[]} [tools] Toolbar configuration
  * @cfg {string[]|null} [includeCommands] List of commands to include, null 
for all registered commands
  * @cfg {string[]} [excludeCommands] List of commands to exclude
  * @cfg {Object} [importRules] Import rules
  * @cfg {string} [inDialog] The name of the dialog this surface widget is in
  */
-ve.ui.TargetWidget = function VeUiTargetWidget( doc, config ) {
+ve.ui.TargetWidget = function VeUiTargetWidget( config ) {
// Config initialization
config = config || {};
 
@@ -32,30 +35,25 @@
this.sequenceRegistry = config.sequenceRegistry || 
ve.init.target.getSurface().sequenceRegistry;
this.dataTransferHandlerFactory = config.dataTransferHandlerFactory || 
ve.init.target.getSurface().dataTransferHandlerFactory;
// TODO: Override document/targetTriggerListener
+   this.tools = config.tools;
+   this.includeCommands = config.includeCommands;
+   this.excludeCommands = config.excludeCommands;
+   this.importRules = config.importRules;
+   this.inDialog = config.inDialog;
 
-   this.surface = ve.init.target.createSurface( doc, {
-   inTargetWidget: true,
-   commandRegistry: this.commandRegistry,
-   sequenceRegistry: this.sequenceRegistry,
-   dataTransferHandlerFactory: this.dataTransferHandlerFactory,
-   includeCommands: config.includeCommands,
-   excludeCommands: config.excludeCommands,
-   importRules: config.importRules,
-   inDialog: config.inDialog
-   } );
+   this.surface = null;
+   this.toolbar = null;
// TODO: Use a TargetToolbar when trigger listeners are set here
-   this.toolbar = new ve.ui.Toolbar();
+   this.$surfaceContainer = $( '' ).addClass( 
've-ui-targetWidget-surface' );
+   this.$toolbarContainer = $( '' ).addClass( 
've-ui-targetWidget-toolbar' );
+
+   if ( config.doc ) {
+   this.setDocument( config.doc );
+   }
 
// Initialization
-   this.surface.$element.addClass( 've-ui-targetWidget-surface' );
-   this.toolbar.$element.addClass( 've-ui-targetWidget-toolbar' );
-   this.toolbar.$bar.append( this.surface.getToolbarDialogs().$element );
-   this.$element
-   .addClass( 've-ui-targetWidget' )
-   .append( this.toolbar.$element, this.surface.$element );
-   if ( config.tools ) {
-   this.toolbar.setup( config.tools, this.surface );
-   }
+   this.$element.addClass( 've-ui-targetWidget' )
+   .append( this.$toolbarContainer, this.$surfaceContainer );
 };
 
 /* Inheritance */
@@ -65,10 +63,75 @@
 /* Methods */
 
 /**
+ * The target's surface has been changed.
+ *
+ * @event change
+ */
+
+/**
+ * Set the document to edit
+ *
+ * @param {ve.dm.Document} doc Document
+ */
+ve.ui.TargetWidget.prototype.setDocument = 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: enable instance restbase2012-b.codfw.wmnet

2016-11-29 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: enable instance restbase2012-b.codfw.wmnet
..


enable instance restbase2012-b.codfw.wmnet

Bug: T151086
Change-Id: I56a9c78d2a5646b9a5407071fba8a57a4cbab2c5
---
M hieradata/hosts/restbase2012.yaml
1 file changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Filippo Giunchedi: Looks good to me, approved
  Eevans: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/hieradata/hosts/restbase2012.yaml 
b/hieradata/hosts/restbase2012.yaml
index 42f9cdd..e727d38 100644
--- a/hieradata/hosts/restbase2012.yaml
+++ b/hieradata/hosts/restbase2012.yaml
@@ -5,11 +5,11 @@
 listen_address: 10.192.48.68
 rpc_address: 10.192.48.68
 rpc_interface: eth0
-#  b:
-#jmx_port: 7190
-#listen_address: 10.192.48.69
-#rpc_address: 10.192.48.69
-#rpc_interface: eth0
+  b:
+jmx_port: 7190
+listen_address: 10.192.48.69
+rpc_address: 10.192.48.69
+rpc_interface: eth0
 #  c:
 #jmx_port: 7191
 #listen_address: 10.192.48.70

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I56a9c78d2a5646b9a5407071fba8a57a4cbab2c5
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Eevans 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Eevans 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Vector[master]: build: Replace jshint and jscs with eslint

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: build: Replace jshint and jscs with eslint
..


build: Replace jshint and jscs with eslint

Change-Id: I48d542580d767df2d17ce4c6668e9e233a0f7903
---
A .eslintrc.json
D .jscsrc
D .jshintignore
D .jshintrc
M Gruntfile.js
M package.json
6 files changed, 18 insertions(+), 45 deletions(-)

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



diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000..9fad52a
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,7 @@
+{
+   "extends": "wikimedia",
+   "env": {
+   "browser": true,
+   "jquery": true
+   }
+}
diff --git a/.jscsrc b/.jscsrc
deleted file mode 100644
index 9d22e3f..000
--- a/.jscsrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-   "preset": "wikimedia"
-}
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index 3c3629e..000
--- a/.jshintignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index 66e3d48..000
--- a/.jshintrc
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-   // Enforcing
-   "bitwise": true,
-   "eqeqeq": true,
-   "freeze": true,
-   "latedef": true,
-   "noarg": true,
-   "nonew": true,
-   "undef": true,
-   "unused": true,
-   "strict": false,
-
-   // Relaxing
-   "es5": false,
-
-   // Environment
-   "browser": true,
-   "jquery": true,
-
-   "globals": {
-   "mediaWiki": false,
-   "OO": false
-   }
-}
diff --git a/Gruntfile.js b/Gruntfile.js
index 3065bf0..94cb4bf 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,34 +1,28 @@
-/*jshint node:true */
+/* eslint-env node */
 module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'skin.json' );
-   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+   grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
-   grunt.loadNpmTasks( 'grunt-jscs' );
 
grunt.initConfig( {
-   jshint: {
-   options: {
-   jshintrc: true
-   },
+   eslint: {
all: [
'*.js',
'**/*.js',
'!node_modules/**'
]
},
-   jscs: {
-   src: '<%= jshint.all %>'
-   },
-   banana: conf.MessagesDirs,
jsonlint: {
all: [
+   '*.json',
'**/*.json',
'!node_modules/**'
]
-   }
+   },
+   banana: conf.MessagesDirs
} );
 
-   grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] 
);
+   grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/package.json b/package.json
index c4778c2..2ee7733 100644
--- a/package.json
+++ b/package.json
@@ -7,10 +7,10 @@
   "devDependencies": {
 "grunt": "0.4.5",
 "grunt-cli": "0.1.13",
-"grunt-contrib-jshint": "1.0.0",
+
+"grunt-eslint": "19.0.0",
+"eslint-config-wikimedia": "0.3.0",
 "grunt-banana-checker": "0.5.0",
-"grunt-jscs": "2.8.0",
-"grunt-jsonlint": "1.0.7",
-"jscs-preset-wikimedia": "~1.0.0"
+"grunt-jsonlint": "1.0.7"
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I48d542580d767df2d17ce4c6668e9e233a0f7903
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Vector
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Vector[master]: collapsibleTabs: Clean up and simplify code

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: collapsibleTabs: Clean up and simplify code
..


collapsibleTabs: Clean up and simplify code

* Rename 'rtl' to 'isRTL' and use DOM to compute its value.
* Document code with JSDuck similar to other extensions.
* Remove unused 'prevElement' property. Not used in Vector
  nor anywhere else in Wikimedia Git.
* Make 'boundEvent' property private. Not used anywhere in
  Wikimedia Git outside this file.

* Simplify 'instances' tracking.
  The jQuery object stored in this property wasn't used beyond
  calling each(). Convert to a plain array.
  Preserve and re-use the jQuery object first created
  by collapsibleTabs().

* Simplify calculateTabDistance() by using getElementById() and
  getBoundingClientRect(). Its support includes IE 5.
  The "new" version (since Firefox 3.5 and IE 9) also includes
  'height' and 'width' properties and is supported in all
  browsers supported by the MediaWiki 1.28 startup feature test.

  This helps avoid code in offset() and width(), which is fairly
  expensive in jQuery 1.x.

* moveToCollapsed()
  - Remove redundant jQuery object creation (only caller passes a
jQuery object already).
  - Remove redundant re-receiving of expContainerSettings inside
the animate() callback. Already in the main scope.
Relates to a bunch of patches that work around a problem
caused by use of remove() instead of detach() in an earlier
version of the code. Which was only a problem because the
other settings object was also not used from the main scope.
(See pre-Gerrit commits 1f93310e and e7900807.)

Change-Id: I48d542580d767df2d17ce4c6668e9e233a0f7902
---
M .gitignore
M collapsibleTabs.js
A jsduck.json
M package.json
4 files changed, 74 insertions(+), 57 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  Jforrester: Looks good to me, but someone else must approve
  VolkerE: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/.gitignore b/.gitignore
index 53bbca6..7c9e72a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,11 +18,10 @@
 sftp-config.json
 
 # Building & testing
-node_modules/
-
-# Composer
-/vendor
 /composer.lock
+/docs
+/node_modules
+/vendor
 
 # Operating systems
 ## Mac OS X
diff --git a/collapsibleTabs.js b/collapsibleTabs.js
index 1c8891f..c37d76b 100644
--- a/collapsibleTabs.js
+++ b/collapsibleTabs.js
@@ -1,10 +1,31 @@
 /**
- * Collapsible tabs jQuery Plugin
+ * Collapsible Tabs for the Vector skin.
+ *
+ * @class jQuery.plugin.collapsibleTabs
  */
 ( function ( $ ) {
-   var rtl = $( 'html' ).attr( 'dir' ) === 'rtl',
+   var isRTL = document.documentElement.dir === 'rtl',
+   boundEvent = false,
rAF = window.requestAnimationFrame || setTimeout;
 
+   /**
+* @event beforeTabCollapse
+*/
+
+   /**
+* @event afterTabCollapse
+*/
+
+   /**
+* @param {Object} [options]
+* @param {string} [options.expandedContainer="#p-views ul"] List of 
tabs
+* @param {string} [options.collapsedContainer="#p-cactions ul"] List 
of menu items
+* @param {string} [options.collapsible="li.collapsible"] Match tabs 
that are collapsible
+* @param {Function} [options.expandCondition]
+* @param {Function} [options.collapseCondition]
+* @return {jQuery}
+* @chainable
+*/
$.fn.collapsibleTabs = function ( options ) {
// Merge options into the defaults
var settings = $.extend( {}, $.collapsibleTabs.defaults, 
options );
@@ -17,7 +38,7 @@
this.each( function () {
var $el = $( this );
// add the element to our array of collapsible managers
-   $.collapsibleTabs.instances = 
$.collapsibleTabs.instances.add( $el );
+   $.collapsibleTabs.instances.push( $el );
// attach the settings to the elements
$el.data( 'collapsibleTabsSettings', settings );
// attach data to our collapsible elements
@@ -27,11 +48,11 @@
} );
 
// if we haven't already bound our resize handler, bind it now
-   if ( !$.collapsibleTabs.boundEvent ) {
+   if ( !boundEvent ) {
+   boundEvent = true;
$( window ).on( 'resize', $.debounce( 100, function () {
rAF( $.collapsibleTabs.handleResize );
} ) );
-   $.collapsibleTabs.boundEvent = true;
}
 
// call our resize handler to setup the page
@@ -39,8 +60,7 @@
return this;
};
$.collapsibleTabs = {
-   instances: $( [] ),
-   boundEvent: null,
+   

[MediaWiki-commits] [Gerrit] operations/puppet[production]: hhvm: fix hhvm-needs-restart logic for memory

2016-11-29 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: hhvm: fix hhvm-needs-restart logic for memory
..


hhvm: fix hhvm-needs-restart logic for memory

Discovered during investigation for T151702, propagate exit status for
memory when restart needs to happen.

Bug: T151702
Change-Id: I8d60d04384f7719880b868e04b947b85dbf06f5d
---
M modules/hhvm/files/hhvm-needs-restart.sh
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/modules/hhvm/files/hhvm-needs-restart.sh 
b/modules/hhvm/files/hhvm-needs-restart.sh
index cc9f062..877e238 100755
--- a/modules/hhvm/files/hhvm-needs-restart.sh
+++ b/modules/hhvm/files/hhvm-needs-restart.sh
@@ -69,7 +69,9 @@
 print "HHVM needs restart: using " sum "% of available memory";
 exit 0;
   }
-}'
+  exit 1;
+}' && exit 0
+
 
 # Queue size
 # If not defined, just exit as if everything is fine

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8d60d04384f7719880b868e04b947b85dbf06f5d
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi 
Gerrit-Reviewer: Elukey 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Volans 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Skip all large wikis during the maintenance script run

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Skip all large wikis during the maintenance script run
..


Skip all large wikis during the maintenance script run

Change-Id: Ib28e1e7d50e580a2df8ea388ac1b44cdfd130837
---
M maintenance/populateLocalAndGlobalIds.php
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/maintenance/populateLocalAndGlobalIds.php 
b/maintenance/populateLocalAndGlobalIds.php
index 69a28be..3fba4ab 100644
--- a/maintenance/populateLocalAndGlobalIds.php
+++ b/maintenance/populateLocalAndGlobalIds.php
@@ -18,8 +18,9 @@
$dbr = CentralAuthUtils::getCentralSlaveDB();
$dbw = CentralAuthUtils::getCentralDB();
foreach( $wgLocalDatabases as $wiki ) {
-   // Temporarily skipping English Wikipedia
-   if ( $wiki == 'enwiki' ) {
+   // Temporarily skipping large wikis, 5 mil seems like a 
safe number (skips en, meta, mediawiki & login wikis)
+   $size = $dbr->estimateRowCount( 'localuser', '*', [ 
'lu_wiki' => $wiki ] );
+   if ( $size > 500 ) {
continue;
}
$lastGlobalId = -1;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib28e1e7d50e580a2df8ea388ac1b44cdfd130837
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Niharika29 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Check only standard watchlist flags

2016-11-29 Thread Magul (Code Review)
Magul has uploaded a new change for review.

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

Change subject: Check only standard watchlist flags
..

Check only standard watchlist flags

Remove ORES extension oresreview flag from test at all

Bug: T151156
Change-Id: I0c004bce83b2d09b7772da6029d3422959dac300
---
M tests/paraminfo_tests.py
1 file changed, 0 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/42/324242/1

diff --git a/tests/paraminfo_tests.py b/tests/paraminfo_tests.py
index b72a0ac..871b863 100644
--- a/tests/paraminfo_tests.py
+++ b/tests/paraminfo_tests.py
@@ -81,17 +81,6 @@
 if MediaWikiVersion(self.site.version()) >= MediaWikiVersion('1.24'):
 types.append('unread')
 
-ores_installed = {
-'wikipedia': ('en', 'fa', 'nl', 'pl', 'pt', 'ru', 'tr'),
-'wikidata': ('en',),
-}
-
-if (
-self.site.family in ores_installed and
-self.site.lang in ores_installed[self.site.family]
-):
-types.append('oresreview')
-
 known = types + ['!%s' % item for item in types]
 
 self._check_param_values(self.site, 'query+watchlist', 'show', known)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c004bce83b2d09b7772da6029d3422959dac300
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Magul 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: 2017 Wikitext Editor: Tweak Beta Feature i18n to be less exp...

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: 2017 Wikitext Editor: Tweak Beta Feature i18n to be less 
expansive
..


2017 Wikitext Editor: Tweak Beta Feature i18n to be less expansive

Change-Id: Id9afdf27707f246a6c2f0fd69b92d239df88924b
---
M modules/ve-mw/i18n/en.json
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index bbf3769..c2204f5 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -312,10 +312,10 @@
"visualeditor-preference-core-discussion-link": 
"\/\/mediawiki.org\/wiki\/Special:MyLanguage\/VisualEditor\/Feedback",
"visualeditor-preference-core-info-link": 
"\/\/mediawiki.org\/wiki\/Special:MyLanguage\/VisualEditor\/Beta_Features\/General",
"visualeditor-preference-core-label": "Visual editing",
-   "visualeditor-preference-newwikitexteditor-description": "Enable the 
new wikitext editor. It has a similar design and many of the tools present in 
the visual editor, and allows better switching between the two.",
+   "visualeditor-preference-newwikitexteditor-description": "Enable the 
new wikitext mode inside the visual editor. It has many of the tools present in 
the visual editor, a similar design, and allows better switching between the 
two.",
"visualeditor-preference-newwikitexteditor-discussion-link": 
"\/\/mediawiki.org\/wiki\/Special:MyLanguage\/Talk:2017 wikitext editor",
"visualeditor-preference-newwikitexteditor-info-link": 
"\/\/mediawiki.org\/wiki\/Special:MyLanguage\/2017 wikitext editor",
-   "visualeditor-preference-newwikitexteditor-label": "New wikitext 
editor",
+   "visualeditor-preference-newwikitexteditor-label": "New wikitext mode",
"visualeditor-preference-enable": "Enable the visual editor. It will be 
available in the following {{PLURAL:$2|namespace|namespaces}}: $1",
"visualeditor-preference-tabs": "Editing mode:",
"visualeditor-preference-tabs-multi-tab": "Show me both editor tabs",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id9afdf27707f246a6c2f0fd69b92d239df88924b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...PageAssessments[master]: Make sure project name is set and not an empty string

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make sure project name is set and not an empty string
..


Make sure project name is set and not an empty string

Change-Id: I9209e75e8486d32ea339aadbe0354fd93132e584
---
M PageAssessmentsBody.php
1 file changed, 7 insertions(+), 5 deletions(-)

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



diff --git a/PageAssessmentsBody.php b/PageAssessmentsBody.php
index cc19ce8..baba514 100644
--- a/PageAssessmentsBody.php
+++ b/PageAssessmentsBody.php
@@ -46,12 +46,14 @@
// Compile a list of projects to find out which ones to be 
deleted afterwards
$projects = array();
foreach ( $assessmentData as $parserData ) {
-   // For each project, get the corresponding ID from 
page_assessments_projects table
-   $projectId = self::getProjectId( $parserData[0] );
-   if ( $projectId === false ) {
-   $projectId = self::insertProject( 
$parserData[0] );
+   if ( isset( $parserData[0] ) && $parserData[0] !== '' ) 
{
+   // For each project, get the corresponding ID 
from page_assessments_projects table
+   $projectId = self::getProjectId( $parserData[0] 
);
+   if ( $projectId === false ) {
+   $projectId = self::insertProject( 
$parserData[0] );
+   }
+   $projects[$parserData[0]] = $projectId;
}
-   $projects[$parserData[0]] = $projectId;
}
$projectsInDb = self::getAllProjects( $pageId, 
self::READ_LATEST );
$toInsert = array_diff( $projects, $projectsInDb );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9209e75e8486d32ea339aadbe0354fd93132e584
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageAssessments
Gerrit-Branch: master
Gerrit-Owner: Kaldari 
Gerrit-Reviewer: Niharika29 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Fix empty watchlist views

2016-11-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix empty watchlist views
..


Fix empty watchlist views

Given it is array-like and there are currently instances of code which
attempt to count its contents, a MobileCollection should be Countable

Additional changes:
* Add browser tests
* Center watchlist empty illustration (looks bad on tablet)

Bug: T148599
Change-Id: Ief849fe0575407e407dd7363edef6eeec082b03b
---
M includes/models/MobileCollection.php
M resources/mobile.special.pagefeed.styles/pagefeed.less
A tests/browser/features/special_watchlist_newuser.feature
M tests/browser/features/step_definitions/common_steps.rb
M tests/browser/features/step_definitions/special_watchlist_steps.rb
M tests/browser/features/support/pages/watchlist_page.rb
6 files changed, 35 insertions(+), 4 deletions(-)

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

Objections:
  Florianschmidtwelzow: There's a problem with this change, please improve



diff --git a/includes/models/MobileCollection.php 
b/includes/models/MobileCollection.php
index 79931df..90f9551 100644
--- a/includes/models/MobileCollection.php
+++ b/includes/models/MobileCollection.php
@@ -7,7 +7,7 @@
 /**
  * A collection of pages, which are represented by the MobilePage class.
  */
-class MobileCollection implements IteratorAggregate {
+class MobileCollection implements IteratorAggregate, Countable {
 
/**
 * The internal collection of pages.
@@ -17,6 +17,13 @@
protected $pages = [];
 
/**
+* Return size of the collection
+*/
+   public function count() {
+   return count( $this->pages );
+   }
+
+   /**
 * Adds a page to the collection.
 *
 * @param MobilePage $page
diff --git a/resources/mobile.special.pagefeed.styles/pagefeed.less 
b/resources/mobile.special.pagefeed.styles/pagefeed.less
index 09968bf..ddb1c61 100644
--- a/resources/mobile.special.pagefeed.styles/pagefeed.less
+++ b/resources/mobile.special.pagefeed.styles/pagefeed.less
@@ -72,7 +72,7 @@
img {
width: 100%;
max-width: 378px;
-   margin: 1em 0 2em;
+   margin: 1em auto 2em;
display: block;
}
 }
diff --git a/tests/browser/features/special_watchlist_newuser.feature 
b/tests/browser/features/special_watchlist_newuser.feature
new file mode 100644
index 000..82aa870
--- /dev/null
+++ b/tests/browser/features/special_watchlist_newuser.feature
@@ -0,0 +1,15 @@
+@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @integration 
@test2.m.wikipedia.org @vagrant @login
+Feature: Manage Watchlist
+
+  Background:
+Given I am using the mobile site
+  And I am logged in as a new user
+  And I am on the "Special:EditWatchlist" page
+
+  Scenario: Empty Watchlist on list view
+Then I am informed on how to add pages to my watchlist
+
+  Scenario: Empty Watchlist on feed view
+And I switch to the modified view of the watchlist
+When I click the Pages tab
+Then I am told there are no new changes
diff --git a/tests/browser/features/step_definitions/common_steps.rb 
b/tests/browser/features/step_definitions/common_steps.rb
index 6710eac..e564342 100644
--- a/tests/browser/features/step_definitions/common_steps.rb
+++ b/tests/browser/features/step_definitions/common_steps.rb
@@ -13,8 +13,6 @@
 end
 
 Given /^I am logged in as a new user$/ do
-  step 'I am on the "Main Page" page'
-  step 'I click on "Log in" in the main navigation menu'
   log_in
 end
 
diff --git a/tests/browser/features/step_definitions/special_watchlist_steps.rb 
b/tests/browser/features/step_definitions/special_watchlist_steps.rb
index 7a10cd8..3530f9c 100644
--- a/tests/browser/features/step_definitions/special_watchlist_steps.rb
+++ b/tests/browser/features/step_definitions/special_watchlist_steps.rb
@@ -34,3 +34,12 @@
 Then(/^the modified button should be selected$/) do
   expect(on(WatchlistPage).feed_link_element.parent.element.class_name).to 
match 'is-on'
 end
+
+Then(/^I am informed on how to add pages to my watchlist$/) do
+  expect(on(WatchlistPage).empty_howto_element.when_present).to be_visible
+end
+
+Then(/^I am told there are no new changes$/) do
+  expect(on(WatchlistPage).empty_panel_element.when_present).to be_visible
+  expect(on(WatchlistPage).empty_howto_element).not_to be_visible
+end
diff --git a/tests/browser/features/support/pages/watchlist_page.rb 
b/tests/browser/features/support/pages/watchlist_page.rb
index a2ad11b..0432ca2 100644
--- a/tests/browser/features/support/pages/watchlist_page.rb
+++ b/tests/browser/features/support/pages/watchlist_page.rb
@@ -5,4 +5,6 @@
   ul(:page_list_a_to_z, css: '.page-summary-list')
   a(:pages_tab_link, text: 'Pages')
   li(:selected_pages_tab, css: '.mw-mf-watchlist-selector 

<    1   2   3   4   5   6   >