[MediaWiki-commits] [Gerrit] pybal: remove explicit monitoring_port - change (operations/puppet)

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

Change subject: pybal: remove explicit monitoring_port
..


pybal: remove explicit monitoring_port

This conflicts with a bug in pybal 1.12.

Change-Id: I00a28228070e733d1724505ec691765f1a0beb17
---
M modules/pybal/templates/pybal.conf.erb
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/modules/pybal/templates/pybal.conf.erb 
b/modules/pybal/templates/pybal.conf.erb
index 1e59785..17fba3c 100644
--- a/modules/pybal/templates/pybal.conf.erb
+++ b/modules/pybal/templates/pybal.conf.erb
@@ -9,7 +9,6 @@
 bgp-nexthop-ipv4 = <%= @global_options['bgp-nexthop-ipv4'] %>
 bgp-nexthop-ipv6 = <%= @global_options['bgp-nexthop-ipv6'] %>
 instrumentation = <%= @global_options.fetch('instrumentation', 'yes') %>
-instrumentation_port = <%= @global_options.fetch('instrumentation_port', 9090) 
%>
 
 #
 # LVS service definitions

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I00a28228070e733d1724505ec691765f1a0beb17
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pybal: remove explicit monitoring_port - change (operations/puppet)

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

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

Change subject: pybal: remove explicit monitoring_port
..

pybal: remove explicit monitoring_port

This conflicts with a bug in pybal 1.12.

Change-Id: I00a28228070e733d1724505ec691765f1a0beb17
---
M modules/pybal/templates/pybal.conf.erb
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/48/252648/1

diff --git a/modules/pybal/templates/pybal.conf.erb 
b/modules/pybal/templates/pybal.conf.erb
index 1e59785..17fba3c 100644
--- a/modules/pybal/templates/pybal.conf.erb
+++ b/modules/pybal/templates/pybal.conf.erb
@@ -9,7 +9,6 @@
 bgp-nexthop-ipv4 = <%= @global_options['bgp-nexthop-ipv4'] %>
 bgp-nexthop-ipv6 = <%= @global_options['bgp-nexthop-ipv6'] %>
 instrumentation = <%= @global_options.fetch('instrumentation', 'yes') %>
-instrumentation_port = <%= @global_options.fetch('instrumentation_port', 9090) 
%>
 
 #
 # LVS service definitions

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I00a28228070e733d1724505ec691765f1a0beb17
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto 

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


[MediaWiki-commits] [Gerrit] docker: Restart registry when config changes - change (operations/puppet)

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

Change subject: docker: Restart registry when config changes
..


docker: Restart registry when config changes

Also make config more strictly secure

Change-Id: I0b33842155b707c191fd52dc553bcacb15d1cb7d
---
M modules/docker/manifests/registry.pp
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/modules/docker/manifests/registry.pp 
b/modules/docker/manifests/registry.pp
index 443ac15..8fbbf81 100644
--- a/modules/docker/manifests/registry.pp
+++ b/modules/docker/manifests/registry.pp
@@ -51,7 +51,8 @@
 content => ordered_yaml($config),
 owner   => 'docker-registry',
 group   => 'docker-registry',
-mode=> '0444',
+mode=> '0440',
+notify  => Service['docker-registry'],
 }
 
 service { 'docker-registry':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0b33842155b707c191fd52dc553bcacb15d1cb7d
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] docker: Restart registry when config changes - change (operations/puppet)

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

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

Change subject: docker: Restart registry when config changes
..

docker: Restart registry when config changes

Also make config more strictly secure

Change-Id: I0b33842155b707c191fd52dc553bcacb15d1cb7d
---
M modules/docker/manifests/registry.pp
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/47/252647/1

diff --git a/modules/docker/manifests/registry.pp 
b/modules/docker/manifests/registry.pp
index 443ac15..8fbbf81 100644
--- a/modules/docker/manifests/registry.pp
+++ b/modules/docker/manifests/registry.pp
@@ -51,7 +51,8 @@
 content => ordered_yaml($config),
 owner   => 'docker-registry',
 group   => 'docker-registry',
-mode=> '0444',
+mode=> '0440',
+notify  => Service['docker-registry'],
 }
 
 service { 'docker-registry':

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

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

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


[MediaWiki-commits] [Gerrit] redis: add doc-block - change (operations/puppet)

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

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

Change subject: redis: add doc-block
..

redis: add doc-block

Change-Id: Ie4fc5c8e416792198d7b9e7db12e1fdfe37cfb37
---
M modules/redis/manifests/init.pp
1 file changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/46/252646/1

diff --git a/modules/redis/manifests/init.pp b/modules/redis/manifests/init.pp
index 1092312..c7f2049 100644
--- a/modules/redis/manifests/init.pp
+++ b/modules/redis/manifests/init.pp
@@ -1,9 +1,14 @@
+# == Class: redis
+#
+# Redis is an in-memory data store with support for rich data structures,
+# scripting, transactions, persistence, and high availability.
+#
 class redis {
 require_package('redis-server')
 
 file { '/srv/redis':
-owner   => 'redis',
-group   => 'redis',
-mode=> '0755',
+owner => 'redis',
+group => 'redis',
+mode  => '0755',
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4fc5c8e416792198d7b9e7db12e1fdfe37cfb37
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] docker: Use ssl for the registry - change (operations/puppet)

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

Change subject: docker: Use ssl for the registry
..


docker: Use ssl for the registry

Also hack k8s::ssl to be more generic

Change-Id: Iab6fe10bbbd153692d533d8ea3bfedfa6739a63a
---
M modules/docker/manifests/registry.pp
M modules/k8s/manifests/ssl.pp
2 files changed, 36 insertions(+), 15 deletions(-)

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



diff --git a/modules/docker/manifests/registry.pp 
b/modules/docker/manifests/registry.pp
index f449efc..443ac15 100644
--- a/modules/docker/manifests/registry.pp
+++ b/modules/docker/manifests/registry.pp
@@ -4,6 +4,14 @@
 
 require_package('docker-registry')
 
+## Pretty bad hack, should be using a more generic thing
+class { '::k8s::ssl':
+provide_private => true,
+user=> 'docker-registry',
+group   => 'docker-registry',
+target_basedir  => '/var/lib/docker-registry',
+}
+
 $config = {
 'version' => '0.1',
 'storage' => {
@@ -14,8 +22,14 @@
 'blobdescriptor' => 'inmemory',
 },
 },
-'http' => {
+'http' => {
 'addr' => ':5000',
+'host' => $::fqdn,
+'tls'  => {
+# FIXME: YOU SHOULD FEEL BAD ABOUT HARDCODING
+'certificate' => '/var/lib/docker-registry/ssl/certs/cert.pem',
+'key' => 
'/var/lib/docker-registry/ssl/private_keys/server.key'
+},
 },
 }
 
diff --git a/modules/k8s/manifests/ssl.pp b/modules/k8s/manifests/ssl.pp
index d3dc1d1..0f4ff46 100644
--- a/modules/k8s/manifests/ssl.pp
+++ b/modules/k8s/manifests/ssl.pp
@@ -7,49 +7,56 @@
 $user = 'root',
 $group = 'root',
 $ssldir = '/var/lib/puppet/client/ssl', # FIXME: This is different for 
self hosted puppet vs not. WHY?
+$target_basedir = '/var/lib/kubernetes'
 ) {
 $puppet_cert_name = $::fqdn
 
-
-file { [
-'/var/lib/kubernetes',
-'/var/lib/kubernetes/ssl',
-'/var/lib/kubernetes/ssl/certs',
-'/var/lib/kubernetes/ssl/private_keys',
-]:
+file { $target_basedir:
 ensure => directory,
 owner  => $user,
 group  => $group,
-mode   => '0555',
+mode   => '0755', # more permissive!
+}
+
+file { [
+"${target_basedir}/ssl",
+"${target_basedir}/ssl/certs",
+"${target_basedir}/ssl/private_keys",
+]:
+ensure  => directory,
+owner   => $user,
+group   => $group,
+mode=> '0555',
+require => File[$target_basedir], # less permissive
 }
 
 
-file { '/var/lib/kubernetes/ssl/certs/ca.pem':
+file { "${target_basedir}/ssl/certs/ca.pem":
 ensure  => present,
 owner   => $user,
 group   => $group,
 mode=> '0444',
 source  => "${ssldir}/certs/ca.pem",
-require => File['/var/lib/kubernetes/ssl/certs'],
+require => File["${target_basedir}/ssl/certs"],
 }
 
-file { '/var/lib/kubernetes/ssl/certs/cert.pem':
+file { "${target_basedir}/ssl/certs/cert.pem":
 ensure  => present,
 owner   => $user,
 group   => $group,
 mode=> '0400',
 source  => "${ssldir}/certs/${puppet_cert_name}.pem",
-require => File['/var/lib/kubernetes/ssl/certs/ca.pem'],
+require => File["${target_basedir}/ssl/certs/ca.pem"],
 }
 
 if $provide_private {
-file { '/var/lib/kubernetes/ssl/private_keys/server.key':
+file { "${target_basedir}/ssl/private_keys/server.key":
 ensure  => present,
 owner   => $user,
 group   => $group,
 mode=> '0400',
 source  => "${ssldir}/private_keys/${puppet_cert_name}.pem",
-require => File['/var/lib/kubernetes/ssl/private_keys'],
+require => File["${target_basedir}/ssl/private_keys"],
 }
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iab6fe10bbbd153692d533d8ea3bfedfa6739a63a
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pybal: add support for instrumentation - change (operations/puppet)

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

Change subject: pybal: add support for instrumentation
..


pybal: add support for instrumentation

Change-Id: If3e7e30773187ba2de676dffb228718097d6de13
---
M modules/lvs/manifests/configuration.pp
M modules/pybal/templates/pybal.conf.erb
2 files changed, 10 insertions(+), 7 deletions(-)

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



diff --git a/modules/lvs/manifests/configuration.pp 
b/modules/lvs/manifests/configuration.pp
index 150422c..7db9a89 100644
--- a/modules/lvs/manifests/configuration.pp
+++ b/modules/lvs/manifests/configuration.pp
@@ -60,15 +60,16 @@
 /^lvs101[012]$/ => "208.80.154.197", # cr2-eqiad
 /^lvs200[1-3]$/ => "208.80.153.192", # cr1-codfw
 /^lvs200[4-6]$/ => "208.80.153.193", # cr2-codfw
-/^lvs300[12]$/ => "91.198.174.245",  # cr1-esams
-/^lvs300[34]$/ => "91.198.174.246",  # cr2-knams
-/^lvs400[12]$/ => "198.35.26.192",   # cr1-ulsfo
-/^lvs400[34]$/ => "198.35.26.193",   # cr2-ulsfo
-default => "(unspecified)"
-},
+/^lvs300[12]$/  => "91.198.174.245",  # cr1-esams
+/^lvs300[34]$/  => "91.198.174.246",  # cr2-knams
+/^lvs400[12]$/  => "198.35.26.192",   # cr1-ulsfo
+/^lvs400[34]$/  => "198.35.26.193",   # cr2-ulsfo
+default => "(unspecified)"
+},
 'bgp-nexthop-ipv4' => $::ipaddress_eth0,
 # FIXME: make a Puppet function, or fix facter
-'bgp-nexthop-ipv6' => inline_template("<%= require 'ipaddr'; 
(IPAddr.new(@v6_ip).mask(64) | IPAddr.new(\"::\" + 
scope.lookupvar(\"::ipaddress\").gsub('.', ':'))).to_s() %>")
+'bgp-nexthop-ipv6' => inline_template("<%= require 'ipaddr'; 
(IPAddr.new(@v6_ip).mask(64) | IPAddr.new(\"::\" + 
scope.lookupvar(\"::ipaddress\").gsub('.', ':'))).to_s() %>"),
+'instrumentation' => 'yes',
 }
 
 # NOTE! This hash is referenced in many other manifests
diff --git a/modules/pybal/templates/pybal.conf.erb 
b/modules/pybal/templates/pybal.conf.erb
index 8902c1c..1e59785 100644
--- a/modules/pybal/templates/pybal.conf.erb
+++ b/modules/pybal/templates/pybal.conf.erb
@@ -8,6 +8,8 @@
 #bgp-as-path = 64600 64601
 bgp-nexthop-ipv4 = <%= @global_options['bgp-nexthop-ipv4'] %>
 bgp-nexthop-ipv6 = <%= @global_options['bgp-nexthop-ipv6'] %>
+instrumentation = <%= @global_options.fetch('instrumentation', 'yes') %>
+instrumentation_port = <%= @global_options.fetch('instrumentation_port', 9090) 
%>
 
 #
 # LVS service definitions

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If3e7e30773187ba2de676dffb228718097d6de13
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] docker: Use ssl for the registry - change (operations/puppet)

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

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

Change subject: docker: Use ssl for the registry
..

docker: Use ssl for the registry

Also hack k8s::ssl to be more generic

Change-Id: Iab6fe10bbbd153692d533d8ea3bfedfa6739a63a
---
M modules/docker/manifests/registry.pp
M modules/k8s/manifests/ssl.pp
2 files changed, 35 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/45/252645/1

diff --git a/modules/docker/manifests/registry.pp 
b/modules/docker/manifests/registry.pp
index f449efc..7887273 100644
--- a/modules/docker/manifests/registry.pp
+++ b/modules/docker/manifests/registry.pp
@@ -4,6 +4,14 @@
 
 require_package('docker-registry')
 
+## Pretty bad hack, should be using a more generic thing
+class { '::k8s::ssl':
+provide_private => true,
+user=> 'docker-registry',
+group   => 'docker-registry',
+target_basedir  => '/var/lib/docker-registry',
+}
+
 $config = {
 'version' => '0.1',
 'storage' => {
@@ -14,8 +22,12 @@
 'blobdescriptor' => 'inmemory',
 },
 },
-'http' => {
-'addr' => ':5000',
+'http'=> {
+'addr'=> ':5000',
+'host'=> $::fqdn,
+# FIXME: YOU SHOULD FEEL BAD ABOUT HARDCODING
+'certificate' => '/var/lib/docker-registry/ssl/certs/cert.pem',
+'key' => 
'/var/lib/docker-registry/ssl/private_keys/server.key'
 },
 }
 
diff --git a/modules/k8s/manifests/ssl.pp b/modules/k8s/manifests/ssl.pp
index d3dc1d1..0f4ff46 100644
--- a/modules/k8s/manifests/ssl.pp
+++ b/modules/k8s/manifests/ssl.pp
@@ -7,49 +7,56 @@
 $user = 'root',
 $group = 'root',
 $ssldir = '/var/lib/puppet/client/ssl', # FIXME: This is different for 
self hosted puppet vs not. WHY?
+$target_basedir = '/var/lib/kubernetes'
 ) {
 $puppet_cert_name = $::fqdn
 
-
-file { [
-'/var/lib/kubernetes',
-'/var/lib/kubernetes/ssl',
-'/var/lib/kubernetes/ssl/certs',
-'/var/lib/kubernetes/ssl/private_keys',
-]:
+file { $target_basedir:
 ensure => directory,
 owner  => $user,
 group  => $group,
-mode   => '0555',
+mode   => '0755', # more permissive!
+}
+
+file { [
+"${target_basedir}/ssl",
+"${target_basedir}/ssl/certs",
+"${target_basedir}/ssl/private_keys",
+]:
+ensure  => directory,
+owner   => $user,
+group   => $group,
+mode=> '0555',
+require => File[$target_basedir], # less permissive
 }
 
 
-file { '/var/lib/kubernetes/ssl/certs/ca.pem':
+file { "${target_basedir}/ssl/certs/ca.pem":
 ensure  => present,
 owner   => $user,
 group   => $group,
 mode=> '0444',
 source  => "${ssldir}/certs/ca.pem",
-require => File['/var/lib/kubernetes/ssl/certs'],
+require => File["${target_basedir}/ssl/certs"],
 }
 
-file { '/var/lib/kubernetes/ssl/certs/cert.pem':
+file { "${target_basedir}/ssl/certs/cert.pem":
 ensure  => present,
 owner   => $user,
 group   => $group,
 mode=> '0400',
 source  => "${ssldir}/certs/${puppet_cert_name}.pem",
-require => File['/var/lib/kubernetes/ssl/certs/ca.pem'],
+require => File["${target_basedir}/ssl/certs/ca.pem"],
 }
 
 if $provide_private {
-file { '/var/lib/kubernetes/ssl/private_keys/server.key':
+file { "${target_basedir}/ssl/private_keys/server.key":
 ensure  => present,
 owner   => $user,
 group   => $group,
 mode=> '0400',
 source  => "${ssldir}/private_keys/${puppet_cert_name}.pem",
-require => File['/var/lib/kubernetes/ssl/private_keys'],
+require => File["${target_basedir}/ssl/private_keys"],
 }
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] Add script to fix incorrect cl_type values - change (mediawiki/core)

2015-11-11 Thread PleaseStand (Code Review)
PleaseStand has uploaded a new change for review.

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

Change subject: Add script to fix incorrect cl_type values
..

Add script to fix incorrect cl_type values

This will allow cleaning up after T71740 (cl_type not being updated upon
cross-namespace page move) without having to run updateCollation.php. It
should take only about five minutes to run on English Wikipedia (based
on testing with a database dump from October 2015).

The reason I bothered to write this script despite the "low number of
affected pages" is that I am thinking of changing MediaWiki to base
category counts on cl_type rather than directly on page_namespace,
so an incorrect cl_type value would result in inaccurate counts.

Some bits (i.e. the chunking code) have been taken from refreshLinks.php.

Bug: T74661
Change-Id: I25724b4f330bc6201c8adc38d688e9d82fd69409
---
M autoload.php
A maintenance/fixClType.php
2 files changed, 184 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/44/252644/1

diff --git a/autoload.php b/autoload.php
index 15f1b10..7e958a3 100644
--- a/autoload.php
+++ b/autoload.php
@@ -448,6 +448,7 @@
'FindMissingFiles' => __DIR__ . '/maintenance/findMissingFiles.php',
'FindOrphanedFiles' => __DIR__ . '/maintenance/findOrphanedFiles.php',
'FixBug20757' => __DIR__ . '/maintenance/storage/fixBug20757.php',
+   'FixClType' => __DIR__ . '/maintenance/fixClType.php',
'FixDoubleRedirects' => __DIR__ . '/maintenance/fixDoubleRedirects.php',
'FixExtLinksProtocolRelative' => __DIR__ . 
'/maintenance/fixExtLinksProtocolRelative.php',
'FixTimestamps' => __DIR__ . '/maintenance/fixTimestamps.php',
diff --git a/maintenance/fixClType.php b/maintenance/fixClType.php
new file mode 100644
index 000..70f03c4
--- /dev/null
+++ b/maintenance/fixClType.php
@@ -0,0 +1,183 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Maintenance
+ */
+
+require_once __DIR__ . '/Maintenance.php';
+
+/**
+ * Maintenance script to fix incorrect cl_type values without having to run
+ * updateCollation.php.
+ *
+ * @since 1.27
+ * @ingroup Maintenance
+ */
+class FixClType extends Maintenance {
+   public function __construct() {
+   parent::__construct();
+   $this->mDescription = 'Fix incorrect cl_type values without 
having to run ' .
+   'updateCollation.php';
+   $this->addOption( 'start', 'First page ID to check', false, 
true );
+   $this->addOption( 'end', 'Last page ID to check', false, true );
+   $this->addOption( 'chunk-size', 'Maximum number of existent IDs 
to check per query, ' .
+   'default 10', false, true );
+   $this->setBatchSize( 100 );
+   }
+
+   public function execute() {
+   $dbr = $this->getDB( DB_SLAVE );
+   $start = (int)$this->getOption( 'start' ) ?: null;
+   $end = (int)$this->getOption( 'end' ) ?: null;
+   $chunkSize = (int)$this->getOption( 'chunk-size', 10 );
+   do {
+   // Find the start of the next chunk.
+   $nextStart = $dbr->selectField(
+   'page',
+   'page_id',
+   self::intervalCond( $dbr, 'page_id', $start, 
$end ),
+   __METHOD__,
+   array( 'ORDER BY' => 'page_id', 'OFFSET' => 
$chunkSize )
+   );
+
+   if ( $nextStart !== false ) {
+   // To find the end of the current chunk, 
subtract one.
+   $chunkEnd = $nextStart - 1;
+   } else {
+   // This is the last chunk. Check all page_ids 
up to $end.
+   $chunkEnd = $end;
+   }
+
+   $fmtStart = $start !== null ? "[$start" : '(-INF';
+   $fmtChunkEnd = $chunkEnd !== null ? "$chunkEnd]" : 
'INF)';
+   $this->output( "Checking interval $fmtStart, 
$fmtChunkEnd\n" );
+   $this->checkInterval( $start, $chunkEnd );
+
+   $start = $nextStart;
+
+   } while ( $nextStart !== false );
+   }
+
+   /**
+* Check a range of page IDs in the categorylinks table.
+*
+* @param string|int|null $start Page_id to start from
+* @param string|int|null $end Page_id to stop at
+*/
+   private function checkInterval( $start, $end ) {
+   $dbr = $this->getDB( DB_SLAVE );
+   do {
+   $res = $dbr->select(
+   array( 'page', 'categorylinks' ),
+   ar

[MediaWiki-commits] [Gerrit] docker: Make sure data directory exists - change (operations/puppet)

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

Change subject: docker: Make sure data directory exists
..


docker: Make sure data directory exists

Change-Id: I1f45082bd4843370aea3373447e8c9d58c94986c
---
M modules/docker/manifests/registry.pp
1 file changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/modules/docker/manifests/registry.pp 
b/modules/docker/manifests/registry.pp
index 2d43cb7..f449efc 100644
--- a/modules/docker/manifests/registry.pp
+++ b/modules/docker/manifests/registry.pp
@@ -3,7 +3,7 @@
 ){
 
 require_package('docker-registry')
- 
+
 $config = {
 'version' => '0.1',
 'storage' => {
@@ -19,6 +19,13 @@
 },
 }
 
+file { $datapath:
+ensure => directory,
+mode   => '0775',
+owner  => 'docker-registry',
+group  => 'docker-registry',
+}
+
 # This is by default 0700 for some reason - nothing sensitive inside
 # that doesn't have additional protection
 file { '/etc/docker':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f45082bd4843370aea3373447e8c9d58c94986c
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] docker: Make sure data directory exists - change (operations/puppet)

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

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

Change subject: docker: Make sure data directory exists
..

docker: Make sure data directory exists

Change-Id: I1f45082bd4843370aea3373447e8c9d58c94986c
---
M modules/docker/manifests/registry.pp
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/43/252643/1

diff --git a/modules/docker/manifests/registry.pp 
b/modules/docker/manifests/registry.pp
index 2d43cb7..dcfa5bb 100644
--- a/modules/docker/manifests/registry.pp
+++ b/modules/docker/manifests/registry.pp
@@ -19,6 +19,13 @@
 },
 }
 
+file { $datapath:
+ensure => directory,
+mode   => '0775',
+owner  => 'docker-registry',
+group  => 'docker-registry',
+}
+
 # This is by default 0700 for some reason - nothing sensitive inside
 # that doesn't have additional protection
 file { '/etc/docker':

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

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

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


[MediaWiki-commits] [Gerrit] docker: Fix registry package name - change (operations/puppet)

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

Change subject: docker: Fix registry package name
..


docker: Fix registry package name

Change-Id: If5653280c02d90a6316e8d956152b308f2068bd4
---
M modules/docker/manifests/registry.pp
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/modules/docker/manifests/registry.pp 
b/modules/docker/manifests/registry.pp
index 1fa4ac5..2d43cb7 100644
--- a/modules/docker/manifests/registry.pp
+++ b/modules/docker/manifests/registry.pp
@@ -2,7 +2,7 @@
 $datapath = '/srv/registry',
 ){
 
-require_package('docker-distribution')
+require_package('docker-registry')
  
 $config = {
 'version' => '0.1',
@@ -28,8 +28,8 @@
 
 file { '/etc/docker/registry/config.yml':
 content => ordered_yaml($config),
-owner   => 'docker-distributions',
-group   => 'docker-distribution',
+owner   => 'docker-registry',
+group   => 'docker-registry',
 mode=> '0444',
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If5653280c02d90a6316e8d956152b308f2068bd4
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] docker: Fix registry package name - change (operations/puppet)

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

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

Change subject: docker: Fix registry package name
..

docker: Fix registry package name

Change-Id: If5653280c02d90a6316e8d956152b308f2068bd4
---
M modules/docker/manifests/registry.pp
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/42/252642/1

diff --git a/modules/docker/manifests/registry.pp 
b/modules/docker/manifests/registry.pp
index 1fa4ac5..2d43cb7 100644
--- a/modules/docker/manifests/registry.pp
+++ b/modules/docker/manifests/registry.pp
@@ -2,7 +2,7 @@
 $datapath = '/srv/registry',
 ){
 
-require_package('docker-distribution')
+require_package('docker-registry')
  
 $config = {
 'version' => '0.1',
@@ -28,8 +28,8 @@
 
 file { '/etc/docker/registry/config.yml':
 content => ordered_yaml($config),
-owner   => 'docker-distributions',
-group   => 'docker-distribution',
+owner   => 'docker-registry',
+group   => 'docker-registry',
 mode=> '0444',
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] docker: Conform to puppet's stupid conventions - change (operations/puppet)

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

Change subject: docker: Conform to puppet's stupid conventions
..


docker: Conform to puppet's stupid conventions

Change-Id: I6d133438537997b06d5b6db101809819461c1885
---
R modules/docker/manifests/registry.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/docker/manifests/registry/init.pp 
b/modules/docker/manifests/registry.pp
similarity index 99%
rename from modules/docker/manifests/registry/init.pp
rename to modules/docker/manifests/registry.pp
index 69e6e84..1fa4ac5 100644
--- a/modules/docker/manifests/registry/init.pp
+++ b/modules/docker/manifests/registry.pp
@@ -3,7 +3,7 @@
 ){
 
 require_package('docker-distribution')
-
+ 
 $config = {
 'version' => '0.1',
 'storage' => {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d133438537997b06d5b6db101809819461c1885
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] docker: Conform to puppet's stupid conventions - change (operations/puppet)

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

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

Change subject: docker: Conform to puppet's stupid conventions
..

docker: Conform to puppet's stupid conventions

Change-Id: I6d133438537997b06d5b6db101809819461c1885
---
R modules/docker/manifests/registry.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/docker/manifests/registry/init.pp 
b/modules/docker/manifests/registry.pp
similarity index 99%
rename from modules/docker/manifests/registry/init.pp
rename to modules/docker/manifests/registry.pp
index 69e6e84..1fa4ac5 100644
--- a/modules/docker/manifests/registry/init.pp
+++ b/modules/docker/manifests/registry.pp
@@ -3,7 +3,7 @@
 ){
 
 require_package('docker-distribution')
-
+ 
 $config = {
 'version' => '0.1',
 'storage' => {

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

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

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


[MediaWiki-commits] [Gerrit] Refactor: Introduce printSource method - change (mediawiki...MathSearch)

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

Change subject: Refactor: Introduce printSource method
..


Refactor: Introduce printSource method

Change-Id: I553a8a4fd44dc1b1c9a68305833d4d3e6e03072e
---
M FormulaInfo.php
1 file changed, 16 insertions(+), 22 deletions(-)

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



diff --git a/FormulaInfo.php b/FormulaInfo.php
index 903de69..a46ea61 100644
--- a/FormulaInfo.php
+++ b/FormulaInfo.php
@@ -94,14 +94,8 @@
$out->addWikiText( '*' . $occ->printLink2Page( false ) 
);
}
$out->addWikiText( 'Hash: ' . $mo->getMd5() );
-   $out->addWikiText(
-   'TeX (as stored in database): ' . $mo->getTex()
-   . ''
-   );
-   $out->addWikiText(
-   'TeX (original user input): ' . $mo->getUserInputTex()
-   . ''
-   );
+   $this->printSource( $mo->getUserInputTex(), 'TeX (original user 
input)', 'latex' );
+   $this->printSource( $mo->getTex(), 'TeX (checked)', 'latex' );
$this->DisplayRendering( $mo->getUserInputTex(), 'latexml' );
$this->DisplayRendering( $mo->getUserInputTex(), 'mathml' );
$this->DisplayRendering( $mo->getUserInputTex(), 'png' );
@@ -115,23 +109,23 @@
$mo->getObservations();
if ( $wgMathDebug ) {
$out->addWikiText( '==LOG and Debug==' );
-   $out->addWikiText( 'Rendered at : ' . $mo->getTimestamp()
-   . ' an idexed at 
' . $mo->getIndexTimestamp()
-   . ''
-   );
-   $out->addWikiText(
-   'validxml : ' . 
$mo->isValidMathML(
-   $mo->getMathml()
-   ) . ' recheck:', false
-   );
-   $out->addHtml( $mo->isValidMathML( $mo->getMathml() ) ? 
"valid":"invalid" );
-   $out->addWikiText(
-   'status : ' . 
$mo->getStatusCode() . ''
-   );
-   $out->addHtml( htmlspecialchars( $mo->getLog() ) );
+   $this->printSource( $mo->getTimestamp(), 'Rendered at', 
'text', false );
+   $this->printSource( $mo->getIndexTimestamp(), 'and 
indexed at', 'text', false );
+   $this->printSource( $mo->isValidMathML( 
$mo->getMathml() ), 'validxml', 'text', false );
+   $out->addHtml( $mo->isValidMathML( $mo->getMathml() ) ? 
"valid" : "invalid" );
+   $this->printSource( $mo->getStatusCode(), 'status' );
+   $out->addHtml( htmlspecialchars( $mo->getLog(), 
'status' ) );
}
}
 
+   private function printSource( $source, $description = "", $language = 
"text", $linestart = true ) {
+   if ( $description ) {
+   $description .= ": ";
+   }
+   $this->getOutput()->addWikiText( "$description" .
+   $source . '', $linestart );
+   }
+
private static function getlengh( $binray ) {
$uncompressed = strlen( $binray );
$compressed = strlen( gzcompress( $binray ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I553a8a4fd44dc1b1c9a68305833d4d3e6e03072e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt 
Gerrit-Reviewer: Dyiop 
Gerrit-Reviewer: Hcohl 
Gerrit-Reviewer: Physikerwelt 
Gerrit-Reviewer: Whyameri 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] docker: Add role + class for setting up registry - change (operations/puppet)

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

Change subject: docker: Add role + class for setting up registry
..


docker: Add role + class for setting up registry

Change-Id: I7e99eb94d525fb758a8dc07f21d54cf858961dd4
---
M manifests/role/tools.pp
A modules/docker/manifests/registry/init.pp
2 files changed, 54 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/tools.pp b/manifests/role/tools.pp
index e0610ef..ffdfae5 100644
--- a/manifests/role/tools.pp
+++ b/manifests/role/tools.pp
@@ -18,6 +18,17 @@
 }
 }
 
+class role::toollabs::docker::registry {
+include role::toollabs::puppet::client
+include ::toollabs::infrastructure
+
+require role::labs::lvm::srv
+
+class { '::docker::registry':
+datapath => '/srv/registry',
+}
+}
+
 class role::toollabs::puppet::master {
 include ::toollabs::infrastructure
 include ::toollabs::puppetmaster
diff --git a/modules/docker/manifests/registry/init.pp 
b/modules/docker/manifests/registry/init.pp
new file mode 100644
index 000..69e6e84
--- /dev/null
+++ b/modules/docker/manifests/registry/init.pp
@@ -0,0 +1,43 @@
+class docker::registry(
+$datapath = '/srv/registry',
+){
+
+require_package('docker-distribution')
+
+$config = {
+'version' => '0.1',
+'storage' => {
+'filesystem' => {
+'rootdirectory' => $datapath,
+},
+'cache' => {
+'blobdescriptor' => 'inmemory',
+},
+},
+'http' => {
+'addr' => ':5000',
+},
+}
+
+# This is by default 0700 for some reason - nothing sensitive inside
+# that doesn't have additional protection
+file { '/etc/docker':
+ensure => directory,
+mode   => '0555',
+}
+
+file { '/etc/docker/registry/config.yml':
+content => ordered_yaml($config),
+owner   => 'docker-distributions',
+group   => 'docker-distribution',
+mode=> '0444',
+}
+
+service { 'docker-registry':
+ensure  => running,
+require => File[
+'/etc/docker',
+'/etc/docker/registry/config.yml'
+]
+}
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e99eb94d525fb758a8dc07f21d54cf858961dd4
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] docker: Add role + class for setting up registry - change (operations/puppet)

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

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

Change subject: docker: Add role + class for setting up registry
..

docker: Add role + class for setting up registry

Change-Id: I7e99eb94d525fb758a8dc07f21d54cf858961dd4
---
A manifests/role/docker.pp
A modules/docker/manifests/registry/init.pp
2 files changed, 50 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/40/252640/1

diff --git a/manifests/role/docker.pp b/manifests/role/docker.pp
new file mode 100644
index 000..d95e100
--- /dev/null
+++ b/manifests/role/docker.pp
@@ -0,0 +1,7 @@
+class role::docker::registry {
+require role::labs::lvm::srv
+
+class { '::docker::registry':
+datapath => '/srv/registry',
+}
+}
diff --git a/modules/docker/manifests/registry/init.pp 
b/modules/docker/manifests/registry/init.pp
new file mode 100644
index 000..76dbb9d
--- /dev/null
+++ b/modules/docker/manifests/registry/init.pp
@@ -0,0 +1,43 @@
+class docker::registry(
+$datapath = '/srv/registry',
+){
+
+require_package('docker-distribution')
+
+$config = {
+'version' => '0.1',
+'storage' => {
+'filesystem' => {
+'rootdirectory' => $datapath,
+},
+'cache' => {
+'blobdescriptor' => 'inmemory',
+},
+},
+'http' => {
+'addr' => ':5000',
+},
+}
+
+# This is by default 0700 for some reason - nothing sensitive inside
+# that doesn't have additional protection
+file { '/etc/docker':
+ensure => directory,
+mode   => '0555',
+}
+
+file { '/etc/docker/registry/config.yml':
+content => ordered_yaml($config),
+owner   => 'docker-distributions',
+group   => 'docker-distribution',
+mode=> '0444',
+}
+
+service { 'docker-registry':
+ensure  => running,
+require => File[
+'/etc/docker',
+'/etc/docker/registry/config.yml'
+]
+}
+}

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

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

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


[MediaWiki-commits] [Gerrit] Set up file storage of results for thumbor - change (mediawiki/vagrant)

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

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

Change subject: Set up file storage of results for thumbor
..

Set up file storage of results for thumbor

Bug: T118439
Change-Id: I3861215e84a07bd885bc25d0daf2aa3e080fcae6
---
M puppet/modules/thumbor/templates/thumbor.conf.erb
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/39/252639/1

diff --git a/puppet/modules/thumbor/templates/thumbor.conf.erb 
b/puppet/modules/thumbor/templates/thumbor.conf.erb
index 2ead6f8..b841945 100644
--- a/puppet/modules/thumbor/templates/thumbor.conf.erb
+++ b/puppet/modules/thumbor/templates/thumbor.conf.erb
@@ -143,7 +143,7 @@
 ## The result storage thumbor should use to store generated images. This must 
be
 ## the full name of a python module (python must be able to import it)
 ## Defaults to: None
-#RESULT_STORAGE = 'thumbor.result_storages.file_storage'
+RESULT_STORAGE = 'wikimedia_thumbor_result_storage'
 
 ## The imaging engine thumbor should use to perform image operations. This must
 ## be the full name of a python module (python must be able to import it)
@@ -489,7 +489,7 @@
 
 ## Expiration in seconds of generated images in the result storage
 ## Defaults to: 0
-RESULT_STORAGE_EXPIRATION_SECONDS = 2592000
+#RESULT_STORAGE_EXPIRATION_SECONDS = 0
 
 ## Path where the Result storage will store generated images
 ## Defaults to: /tmp/thumbor/result_storage

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3861215e84a07bd885bc25d0daf2aa3e080fcae6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gilles 

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


[MediaWiki-commits] [Gerrit] Configure thumbor/result-storage - change (integration/config)

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

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

Change subject: Configure thumbor/result-storage
..

Configure thumbor/result-storage

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/38/252638/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 07e94b3..fa38b7e 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2242,6 +2242,10 @@
 template:
   - name: tox-jessie
 
+  - name: thumbor/result-storage
+template:
+  - name: tox-jessie
+
   - name: integration/docroot
 test:
  - php-composer-test

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

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

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


[MediaWiki-commits] [Gerrit] File-based result storage - change (thumbor/result-storage)

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

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

Change subject: File-based result storage
..

File-based result storage

Note that the first hash is based on the source URL, not on the original
file's sha1. We always have the option to make something more custom
to our needs later, which might parse the source URL and extract the
sha1 from it.

Bug: T118439
Change-Id: Ib3ba1d4d8c5344bf425d6dbcb23ceb1250811ba3
---
A LICENSE
A README.md
A requirements.txt
A setup.cfg
A setup.py
A tox.ini
A wikimedia_thumbor_result_storage/__init__.py
7 files changed, 125 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/thumbor/result-storage 
refs/changes/37/252637/1

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000..133846d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Gilles Dubuc, Wikimedia Foundation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/README.md b/README.md
new file mode 100644
index 000..31e7680
--- /dev/null
+++ b/README.md
@@ -0,0 +1,2 @@
+# result-storage
+File-based result storage for Thumbor
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 000..ef29d7d
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1 @@
+thumbor
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 000..b88034e
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,2 @@
+[metadata]
+description-file = README.md
diff --git a/setup.py b/setup.py
new file mode 100644
index 000..8483981
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+
+from setuptools import setup, find_packages
+
+
+setup(
+name='wikimedia_thumbor_result_storage',
+version='0.1.1',
+url='https://github.com/wikimedia/thumbor-result-storage',
+license='MIT',
+author='Gilles Dubuc, Wikimedia Foundation',
+description='Thumbor result file storage',
+packages=find_packages(),
+include_package_data=True,
+zip_safe=False,
+platforms='any',
+install_requires=[
+'thumbor',
+],
+extras_require={
+'tests': [
+'pyvows',
+'coverage',
+],
+},
+classifiers=[
+'Development Status :: 4 - Beta',
+'Intended Audience :: Developers',
+'License :: OSI Approved :: MIT License',
+'Operating System :: OS Independent',
+'Programming Language :: Python',
+'Topic :: Software Development :: Libraries :: Python Modules'
+]
+)
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 000..157253d
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,12 @@
+[tox]
+minversion = 1.6
+skipsdist = True
+envlist = flake8, py27
+
+[testenv]
+setenv = VIRTUAL_ENV={envdir}
+deps = -r{toxinidir}/requirements.txt
+
+[testenv:flake8]
+commands = flake8 {posargs}
+deps = flake8
diff --git a/wikimedia_thumbor_result_storage/__init__.py 
b/wikimedia_thumbor_result_storage/__init__.py
new file mode 100644
index 000..318f9d0
--- /dev/null
+++ b/wikimedia_thumbor_result_storage/__init__.py
@@ -0,0 +1,52 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Licensed under the MIT license:
+# http://www.opensource.org/licenses/mit-license
+# Copyright (c) 2015 Wikimedia Foundation
+
+import hashlib
+import shutil
+import urllib
+from os.path import exists, join
+
+from thumbor.result_storages.file_storage import Storage as BaseFileStorage
+
+class Storage(BaseFileStorage):
+def normalize_path(self, path):
+path_segments = 
[self.context.config.RESULT_STORAGE_FILE_STORAGE_ROOT_PATH.rstrip('/'), 
Storage.PATH_FORMAT_VERSION, ]
+if self.is_auto_webp:
+path_segments.append('webp')
+
+decoded_path = urllib.unquote(path)
+
+# Hack, but thumbor passes the full path to this function, which 
doesn't
+# let us distinguish parameters from source URL
+decoded_image_url = urllib.unquot

[MediaWiki-commits] [Gerrit] Refactor: Introduce printSource method - change (mediawiki...MathSearch)

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

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

Change subject: Refactor: Introduce printSource method
..

Refactor: Introduce printSource method

Change-Id: I553a8a4fd44dc1b1c9a68305833d4d3e6e03072e
---
M FormulaInfo.php
1 file changed, 16 insertions(+), 22 deletions(-)


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

diff --git a/FormulaInfo.php b/FormulaInfo.php
index 903de69..a46ea61 100644
--- a/FormulaInfo.php
+++ b/FormulaInfo.php
@@ -94,14 +94,8 @@
$out->addWikiText( '*' . $occ->printLink2Page( false ) 
);
}
$out->addWikiText( 'Hash: ' . $mo->getMd5() );
-   $out->addWikiText(
-   'TeX (as stored in database): ' . $mo->getTex()
-   . ''
-   );
-   $out->addWikiText(
-   'TeX (original user input): ' . $mo->getUserInputTex()
-   . ''
-   );
+   $this->printSource( $mo->getUserInputTex(), 'TeX (original user 
input)', 'latex' );
+   $this->printSource( $mo->getTex(), 'TeX (checked)', 'latex' );
$this->DisplayRendering( $mo->getUserInputTex(), 'latexml' );
$this->DisplayRendering( $mo->getUserInputTex(), 'mathml' );
$this->DisplayRendering( $mo->getUserInputTex(), 'png' );
@@ -115,23 +109,23 @@
$mo->getObservations();
if ( $wgMathDebug ) {
$out->addWikiText( '==LOG and Debug==' );
-   $out->addWikiText( 'Rendered at : ' . $mo->getTimestamp()
-   . ' an idexed at 
' . $mo->getIndexTimestamp()
-   . ''
-   );
-   $out->addWikiText(
-   'validxml : ' . 
$mo->isValidMathML(
-   $mo->getMathml()
-   ) . ' recheck:', false
-   );
-   $out->addHtml( $mo->isValidMathML( $mo->getMathml() ) ? 
"valid":"invalid" );
-   $out->addWikiText(
-   'status : ' . 
$mo->getStatusCode() . ''
-   );
-   $out->addHtml( htmlspecialchars( $mo->getLog() ) );
+   $this->printSource( $mo->getTimestamp(), 'Rendered at', 
'text', false );
+   $this->printSource( $mo->getIndexTimestamp(), 'and 
indexed at', 'text', false );
+   $this->printSource( $mo->isValidMathML( 
$mo->getMathml() ), 'validxml', 'text', false );
+   $out->addHtml( $mo->isValidMathML( $mo->getMathml() ) ? 
"valid" : "invalid" );
+   $this->printSource( $mo->getStatusCode(), 'status' );
+   $out->addHtml( htmlspecialchars( $mo->getLog(), 
'status' ) );
}
}
 
+   private function printSource( $source, $description = "", $language = 
"text", $linestart = true ) {
+   if ( $description ) {
+   $description .= ": ";
+   }
+   $this->getOutput()->addWikiText( "$description" .
+   $source . '', $linestart );
+   }
+
private static function getlengh( $binray ) {
$uncompressed = strlen( $binray );
$compressed = strlen( gzcompress( $binray ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I553a8a4fd44dc1b1c9a68305833d4d3e6e03072e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt 

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


[MediaWiki-commits] [Gerrit] Add .gitreview - change (thumbor/result-storage)

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

Change subject: Add .gitreview
..


Add .gitreview

Change-Id: I1d69bfb4c88d44b05f0f104f1e27922689baf04c
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..ece6df4
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=thumbor/result-storage.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d69bfb4c88d44b05f0f104f1e27922689baf04c
Gerrit-PatchSet: 1
Gerrit-Project: thumbor/result-storage
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Fix force re-rendering button - change (mediawiki...MathSearch)

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

Change subject: Fix force re-rendering button
..


Fix force re-rendering button

Change-Id: I66a9304a6e6002cd55068981949996a83ea26761
---
M FormulaInfo.php
1 file changed, 5 insertions(+), 4 deletions(-)

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



diff --git a/FormulaInfo.php b/FormulaInfo.php
index 7452e4a..903de69 100644
--- a/FormulaInfo.php
+++ b/FormulaInfo.php
@@ -76,10 +76,11 @@
 
$pageName = (string)$revision->getTitle();
$out->addWikiText( "* Page found: [[$pageName#$eid|$pageName]] 
(eq $eid)  ", false );
-   $out->addHtml(
-   '(force 
rerendering)'
-   );
+   $link = $revision->getTitle()->getLinkURL( array(
+   'action' => 'purge',
+   'mathpurge' => 'true'
+   ) );
+   $out->addHtml( "(force rerendering)" );
/* @var $mo MathObject  */
$mo = MathObject::constructformpage( $oldID, $eid );
if ( !$mo ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I66a9304a6e6002cd55068981949996a83ea26761
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt 
Gerrit-Reviewer: Dyiop 
Gerrit-Reviewer: Hcohl 
Gerrit-Reviewer: Physikerwelt 
Gerrit-Reviewer: Whyameri 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix force re-rendering button - change (mediawiki...MathSearch)

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

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

Change subject: Fix force re-rendering button
..

Fix force re-rendering button

Change-Id: I66a9304a6e6002cd55068981949996a83ea26761
---
M FormulaInfo.php
1 file changed, 5 insertions(+), 4 deletions(-)


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

diff --git a/FormulaInfo.php b/FormulaInfo.php
index 7452e4a..903de69 100644
--- a/FormulaInfo.php
+++ b/FormulaInfo.php
@@ -76,10 +76,11 @@
 
$pageName = (string)$revision->getTitle();
$out->addWikiText( "* Page found: [[$pageName#$eid|$pageName]] 
(eq $eid)  ", false );
-   $out->addHtml(
-   '(force 
rerendering)'
-   );
+   $link = $revision->getTitle()->getLinkURL( array(
+   'action' => 'purge',
+   'mathpurge' => 'true'
+   ) );
+   $out->addHtml( "(force rerendering)" );
/* @var $mo MathObject  */
$mo = MathObject::constructformpage( $oldID, $eid );
if ( !$mo ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66a9304a6e6002cd55068981949996a83ea26761
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt 

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


[MediaWiki-commits] [Gerrit] Add .gitreview - change (thumbor/result-storage)

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

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

Change subject: Add .gitreview
..

Add .gitreview

Change-Id: I1d69bfb4c88d44b05f0f104f1e27922689baf04c
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/thumbor/result-storage 
refs/changes/34/252634/1

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..ece6df4
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=thumbor/result-storage.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d69bfb4c88d44b05f0f104f1e27922689baf04c
Gerrit-PatchSet: 1
Gerrit-Project: thumbor/result-storage
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Add hiera config for labtest cluster. - change (operations/puppet)

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

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

Change subject: Add hiera config for labtest cluster.
..

Add hiera config for labtest cluster.

Best I can tell there's no good way to set up a cluster like
this in heira, so I'm just defining it as a bunch of symlinked
host files.

Change-Id: Id47af95d98215ba84f0a1e6d8ebc98fab90672a4
---
A hieradata/hosts/labtestcontrol2001.yaml
A hieradata/hosts/labtestnet2001.yaml
A hieradata/hosts/labtestneutron2001.yaml
A hieradata/hosts/labtestservices2001.yaml
A hieradata/hosts/labtestvirt2001.yaml
5 files changed, 34 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/33/252633/1

diff --git a/hieradata/hosts/labtestcontrol2001.yaml 
b/hieradata/hosts/labtestcontrol2001.yaml
new file mode 100644
index 000..fa2c958
--- /dev/null
+++ b/hieradata/hosts/labtestcontrol2001.yaml
@@ -0,0 +1,30 @@
+
+cluster: testvirt
+
+
+#
+# testlabs
+#
+labs_nova_controller: "labtestcontrol2001.wikimedia.org"
+# _spare is a duplicate/backup controller.  In theory it has the
+#  same state as the main controller
+labs_nova_controller_spare: "labtestcontrol2001.wikimedia.org"
+# _other is the controller in the other datacenter
+labs_nova_controller_other: "labtestcontrol2001.wikimedia.org"
+labs_glance_controller: "labtestcontrol2001.wikimedia.org"
+labs_puppet_master: "labtest-puppetmaster-codfw.wikimedia.org"
+labs_keystone_host: "labtestcontrol2001.wikimedia.org"
+# These are the old, soon-to-be-phased-out dns servers:
+labs_ldap_dns_host: "labtest-ns0.wikimedia.org"
+labs_ldap_dns_host_secondary: "labtest-ns0.wikimedia.org"
+# These are the up-and-coming, better dns servers:
+labs_dns_host: "labtest-ns2.wikimedia.org"
+labs_recursor: "labtest-recursor0.wikimedia.org"
+labs_designate_hostname: "labtestservices2001.wikimedia.org"
+labs_designate_hostname_secondary: "labtestservices2001.wikimedia.org"
+
+labs_nova_network_host: "labtestnet2001"
+labs_nova_network_ip: "10.192.20.5"
+labs_nova_api_host: "labtestnet2001.codfw.wmnet"
+
+labs_certmanager_hostname: "labtestservices2001.wikimedia.org"
diff --git a/hieradata/hosts/labtestnet2001.yaml 
b/hieradata/hosts/labtestnet2001.yaml
new file mode 12
index 000..460ecbb
--- /dev/null
+++ b/hieradata/hosts/labtestnet2001.yaml
@@ -0,0 +1 @@
+labtestcontrol2001.yaml
\ No newline at end of file
diff --git a/hieradata/hosts/labtestneutron2001.yaml 
b/hieradata/hosts/labtestneutron2001.yaml
new file mode 12
index 000..460ecbb
--- /dev/null
+++ b/hieradata/hosts/labtestneutron2001.yaml
@@ -0,0 +1 @@
+labtestcontrol2001.yaml
\ No newline at end of file
diff --git a/hieradata/hosts/labtestservices2001.yaml 
b/hieradata/hosts/labtestservices2001.yaml
new file mode 12
index 000..460ecbb
--- /dev/null
+++ b/hieradata/hosts/labtestservices2001.yaml
@@ -0,0 +1 @@
+labtestcontrol2001.yaml
\ No newline at end of file
diff --git a/hieradata/hosts/labtestvirt2001.yaml 
b/hieradata/hosts/labtestvirt2001.yaml
new file mode 12
index 000..460ecbb
--- /dev/null
+++ b/hieradata/hosts/labtestvirt2001.yaml
@@ -0,0 +1 @@
+labtestcontrol2001.yaml
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id47af95d98215ba84f0a1e6d8ebc98fab90672a4
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] Special:Contribs: autofocus to 'target' if target hasn't bee... - change (mediawiki/core)

2015-11-11 Thread Glaisher (Code Review)
Glaisher has uploaded a new change for review.

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

Change subject: Special:Contribs: autofocus to 'target' if target hasn't been 
specified or in non-newbies mode
..

Special:Contribs: autofocus to 'target' if target hasn't been specified or in 
non-newbies mode

Target field doesn't work in newbies mode so users doesn't need to enter in 
that field
newbies mode also. This is not a huge issue normally but annoying when you're 
on a tablet
or mobile where the autofocus makes the screen keyboard be shown when you visit 
the page.

Bug: T117397
Change-Id: Ic6fd2fb2421325f748fccb2a5432e7713d0dcbb0
---
M includes/specials/SpecialContributions.php
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/32/252632/1

diff --git a/includes/specials/SpecialContributions.php 
b/includes/specials/SpecialContributions.php
index f0a5aa6..7ea64de 100644
--- a/includes/specials/SpecialContributions.php
+++ b/includes/specials/SpecialContributions.php
@@ -517,8 +517,13 @@
'mw-ui-input-inline',
'mw-autocomplete-user', // used by 
mediawiki.userSuggest
),
-   ) + ( $this->opts['target'] ? array() : array( 
'autofocus' ) )
+   ) + (
+   // Only autofocus if target hasn't been 
specified or in non-newbies mode
+   ( $this->opts['contribs'] == 'newbie' || 
$this->opts['target'] )
+   ? array() : array( 'autofocus' => true )
+   )
);
+
$targetSelection = Html::rawElement(
'td',
array( 'colspan' => 2 ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic6fd2fb2421325f748fccb2a5432e7713d0dcbb0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Glaisher 

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


[MediaWiki-commits] [Gerrit] Add note about excluding default gadgets in Special:GadgetUsage - change (mediawiki...Gadgets)

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

Change subject: Add note about excluding default gadgets in Special:GadgetUsage
..


Add note about excluding default gadgets in Special:GadgetUsage

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

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



diff --git a/i18n/en.json b/i18n/en.json
index 4d2a164..57d7de0 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -12,7 +12,7 @@
"gadgetusage-gadget": "Gadget",
"gadgetusage-usercount": "Number of users",
"gadgetusage-noresults": "No gadgets found.",
-   "gadgetusage-summary": "This table indicates the number of users who 
have enabled each gadget on this wiki. It may include gadgets that are no 
longer available.",
+   "gadgetusage-summary": "This table indicates the number of users who 
have enabled each gadget on this wiki. This list excludes gadgets enabled for 
everyone by default and may include gadgets that are no longer available.",
"gadgets-definition": "",
"gadgets-title": "Gadgets",
"gadgets-pagetext": "Below is a list of special gadgets users can 
enable on their [[Special:Preferences#mw-prefsection-gadgets|preferences 
page]], as defined by the [[MediaWiki:Gadgets-definition|definitions]].\nThis 
overview provides easy access to the system message pages that define each 
gadget's description and code.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia2cb867a90e8b7ff820722342e67d1b9aba88293
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: master
Gerrit-Owner: Niharika29 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: Legoktm 
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] Move Package['redis-server'] and File[$dir] from redis::lega... - change (operations/puppet)

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

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

Change subject: Move Package['redis-server'] and File[$dir] from redis::legacy 
to redis
..

Move Package['redis-server'] and File[$dir] from redis::legacy to redis

For reasons explained in I90842b83.

Change-Id: Idd5f0ec188514eb3286394f4520bcb4c0e9675fb
---
M modules/redis/manifests/init.pp
M modules/redis/manifests/legacy.pp
2 files changed, 7 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/31/252631/1

diff --git a/modules/redis/manifests/init.pp b/modules/redis/manifests/init.pp
index 3d27aa3..1092312 100644
--- a/modules/redis/manifests/init.pp
+++ b/modules/redis/manifests/init.pp
@@ -1,3 +1,9 @@
 class redis {
-  # placeholder for a new-and-improved redis class
+require_package('redis-server')
+
+file { '/srv/redis':
+owner   => 'redis',
+group   => 'redis',
+mode=> '0755',
+}
 }
diff --git a/modules/redis/manifests/legacy.pp 
b/modules/redis/manifests/legacy.pp
index 8c90cca..bf82a19 100644
--- a/modules/redis/manifests/legacy.pp
+++ b/modules/redis/manifests/legacy.pp
@@ -18,18 +18,6 @@
 ) {
 include ::redis
 
-package { 'redis-server':
-ensure => present,
-}
-
-file { $dir:
-ensure  => directory,
-owner   => 'redis',
-group   => 'redis',
-mode=> '0755',
-require => Package['redis-server'],
-}
-
 file { '/etc/redis/redis.conf':
 content => template('redis/redis.conf.erb'),
 owner   => 'root',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd5f0ec188514eb3286394f4520bcb4c0e9675fb
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Add note about excluding default gadgets in Special:GadgetUsage - change (mediawiki...Gadgets)

2015-11-11 Thread Niharika29 (Code Review)
Niharika29 has uploaded a new change for review.

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

Change subject: Add note about excluding default gadgets in Special:GadgetUsage
..

Add note about excluding default gadgets in Special:GadgetUsage

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


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

diff --git a/i18n/en.json b/i18n/en.json
index 4d2a164..ed1a763 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -12,7 +12,7 @@
"gadgetusage-gadget": "Gadget",
"gadgetusage-usercount": "Number of users",
"gadgetusage-noresults": "No gadgets found.",
-   "gadgetusage-summary": "This table indicates the number of users who 
have enabled each gadget on this wiki. It may include gadgets that are no 
longer available.",
+   "gadgetusage-summary": "This table indicates the number of users who 
have enabled each gadget on this wiki. This list excludes default gadgets and 
may include gadgets that are no longer available.",
"gadgets-definition": "",
"gadgets-title": "Gadgets",
"gadgets-pagetext": "Below is a list of special gadgets users can 
enable on their [[Special:Preferences#mw-prefsection-gadgets|preferences 
page]], as defined by the [[MediaWiki:Gadgets-definition|definitions]].\nThis 
overview provides easy access to the system message pages that define each 
gadget's description and code.",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2cb867a90e8b7ff820722342e67d1b9aba88293
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: master
Gerrit-Owner: Niharika29 

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


[MediaWiki-commits] [Gerrit] fix-up for I90842b834: fix hieradata for codfw memcaches - change (operations/puppet)

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

Change subject: fix-up for I90842b834: fix hieradata for codfw memcaches
..


fix-up for I90842b834: fix hieradata for codfw memcaches

Change-Id: I538bb9977f3c13486df3f7225d3dd2c0e8ba10c8
---
M hieradata/role/codfw/memcached.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/hieradata/role/codfw/memcached.yaml 
b/hieradata/role/codfw/memcached.yaml
index 08fb7c4..e6b6f16 100644
--- a/hieradata/role/codfw/memcached.yaml
+++ b/hieradata/role/codfw/memcached.yaml
@@ -1,4 +1,4 @@
-redis::dir: "/srv/redis"
+redis::legacy::dir: "/srv/redis"
 debdeploy::grains:
   debdeploy-memcached-codfw:
 value: standard

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I538bb9977f3c13486df3f7225d3dd2c0e8ba10c8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] fix-up for I90842b834: fix hieradata for codfw memcaches - change (operations/puppet)

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

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

Change subject: fix-up for I90842b834: fix hieradata for codfw memcaches
..

fix-up for I90842b834: fix hieradata for codfw memcaches

Change-Id: I538bb9977f3c13486df3f7225d3dd2c0e8ba10c8
---
M hieradata/role/codfw/memcached.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/29/252629/1

diff --git a/hieradata/role/codfw/memcached.yaml 
b/hieradata/role/codfw/memcached.yaml
index 08fb7c4..e6b6f16 100644
--- a/hieradata/role/codfw/memcached.yaml
+++ b/hieradata/role/codfw/memcached.yaml
@@ -1,4 +1,4 @@
-redis::dir: "/srv/redis"
+redis::legacy::dir: "/srv/redis"
 debdeploy::grains:
   debdeploy-memcached-codfw:
 value: standard

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I538bb9977f3c13486df3f7225d3dd2c0e8ba10c8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Rename ::redis to ::redis::legacy - change (operations/puppet)

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

Change subject: Rename ::redis to ::redis::legacy
..


Rename ::redis to ::redis::legacy

The redis module is not very good, and not capable of provisioning more than a
single redis instance per host. At the same time, the redis class is used by
about a dozen different modules and roles, so just going to work on the module
with a pair of pliers and a blow torch would not be safe.

So, what to do? One option is the '.*_new' pattern -- that is, introducing a
'redis_new' module and leaving the old one untouched. The problem with that
approach is that the imagined glorious reunification never happens, and we end
up with code duplication.

What I propose to do instead is this:

- Move the contents of the current ::redis class to ::redis::legacy.
- Add a new, empty ::redis class.
- Update users of ::redis to use ::redis::legacy.

This should all be a no-op.

In a follow up patch, I intend to move the resources that would be common to
all instances in a multi-instance setup to ::redis class -- for example, the
redis-server package, the /srv/redis directory, etc.

I think this strikes the right balance between implementing things the right
way and maintaining compatibility with existing code.

Change-Id: I90842b834563cd7113548ae29e050bddf334f05c
---
M hieradata/role/common/memcached.yaml
M manifests/role/ci.pp
M manifests/role/keystone.pp
M manifests/role/maps.pp
M manifests/role/ocg.pp
M manifests/role/rcstream.pp
M manifests/role/redisdb.pp
M manifests/role/wikimetrics.pp
M manifests/role/xenon.pp
M manifests/site.pp
M modules/dynamicproxy/manifests/init.pp
M modules/ircyall/manifests/init.pp
M modules/ores/manifests/redis.pp
M modules/quarry/manifests/init.pp
M modules/redis/manifests/ganglia.pp
M modules/redis/manifests/init.pp
A modules/redis/manifests/legacy.pp
M modules/role/manifests/deployment/server.pp
M modules/sentry/manifests/init.pp
M modules/toollabs/manifests/redis.pp
20 files changed, 110 insertions(+), 105 deletions(-)

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



diff --git a/hieradata/role/common/memcached.yaml 
b/hieradata/role/common/memcached.yaml
index 80bebc1..fc0d3bb 100644
--- a/hieradata/role/common/memcached.yaml
+++ b/hieradata/role/common/memcached.yaml
@@ -1,6 +1,6 @@
 cluster: memcached
-redis::maxmemory: "500Mb"
-redis::dir: "/a/redis"
-redis::password: "%{passwords::redis::main_password}"
+redis::legacy::maxmemory: "500Mb"
+redis::legacy::dir: "/a/redis"
+redis::legacy::password: "%{passwords::redis::main_password}"
 admin::groups:
   - perf-roots
diff --git a/manifests/role/ci.pp b/manifests/role/ci.pp
index 6665d20..4f0a2b7 100644
--- a/manifests/role/ci.pp
+++ b/manifests/role/ci.pp
@@ -354,7 +354,7 @@
 }
 
 # For CirrusSearch testing:
-class { '::redis':
+class { '::redis::legacy':
 maxmemory => '128mb',
 persist   => 'aof',
 redis_replication => undef,
diff --git a/manifests/role/keystone.pp b/manifests/role/keystone.pp
index 4d7a147..196510a 100644
--- a/manifests/role/keystone.pp
+++ b/manifests/role/keystone.pp
@@ -89,7 +89,7 @@
 }
 }
 
-class { '::redis':
+class { '::redis::legacy':
 maxmemory => '250mb',
 persist   => 'aof',
 redis_replication => $replication,
@@ -103,7 +103,7 @@
 class role::keystone::redis::labs {
 include passwords::openstack::keystone
 
-class { '::redis':
+class { '::redis::legacy':
 maxmemory => '250mb',
 persist   => 'aof',
 redis_replication => {
diff --git a/manifests/role/maps.pp b/manifests/role/maps.pp
index f2d2930..e05034c 100644
--- a/manifests/role/maps.pp
+++ b/manifests/role/maps.pp
@@ -49,7 +49,7 @@
 include ::postgresql::master
 include ::osm
 include ::osm::import_waterlines
-include ::redis
+include ::redis::legacy
 
 system::role { 'role::maps::master':
 ensure  => 'present',
diff --git a/manifests/role/ocg.pp b/manifests/role/ocg.pp
index a6ec519..4413c3a 100644
--- a/manifests/role/ocg.pp
+++ b/manifests/role/ocg.pp
@@ -77,7 +77,7 @@
 srange => '$INTERNAL',
 }
 
-class { 'redis':
+class { 'redis::legacy':
 maxmemory => '500Mb',
 password  => $passwords::redis::ocg_test_password,
 }
diff --git a/manifests/role/rcstream.pp b/manifests/role/rcstream.pp
index 7758bd8..843b0b4 100644
--- a/manifests/role/rcstream.pp
+++ b/manifests/role/rcstream.pp
@@ -13,7 +13,7 @@
 description => 'MediaWiki Recent Changes stream',
 }
 
-class { '::redis':
+class { '::redis::legacy':
 maxmemory => '100mb',
 dir   => '/var/run/redis',
 persist   => false,
diff --git a/manifests/role/redisdb.pp b/manifests/role/red

[MediaWiki-commits] [Gerrit] Revert "Increase abusefilter emergency disable threshold on ... - change (operations/mediawiki-config)

2015-11-11 Thread Glaisher (Code Review)
Glaisher has uploaded a new change for review.

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

Change subject: Revert "Increase abusefilter emergency disable threshold on 
MediaWiki.org"
..

Revert "Increase abusefilter emergency disable threshold on MediaWiki.org"

Recent spam attack has died down now so this is no longer
necessary.

This reverts commit 5f08de9a3c146257de8c566eadca91340e2f93f8.

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 1396ff7..400cd9d 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11384,11 +11384,6 @@
'commonswiki' => array( // T87431
'default' => 0.30,
),
-   'mediawikiwiki' => array(
-   // Temporary to prevent AF autodisable due to mass spambot 
attack
-   // 22-Oct-2015
-   'default' => 0.30,
-   ),
 ),
 'wmgAbuseFilterEmergencyDisableCount' => array(
'default' => array(
@@ -11398,11 +11393,6 @@
'default' => 25,
),
'commonswiki' => array( // T87431
-   'default' => 25,
-   ),
-   'mediawikiwiki' => array(
-   // Temporary to prevent AF autodisable due to mass spambot 
attack
-   // 22-Oct-2015
'default' => 25,
),
 ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I951a4d00680b5626c8a668eb950b11471912b567
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Glaisher 

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


[MediaWiki-commits] [Gerrit] Rename ::redis to ::redis::legacy - change (operations/puppet)

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

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

Change subject: Rename ::redis to ::redis::legacy
..

Rename ::redis to ::redis::legacy

The redis module is not very good, and not capable of provisioning more than a
single redis instance per host. At the same time, the redis class is used by
about a dozen different modules and roles, so just going to work on the module
with a pair of pliers and a blow torch would not be safe.

So, what to do? One option is the '.*_new' pattern -- that is, introducing a
'redis_new' module and leaving the old one untouched. The problem with that
approach is that the imagined glorious reunification never happens, and we end
up with code duplication.

What I propose to do instead is this:

- Move the contents of the current ::redis class to ::redis::legacy.
- Add a new, empty ::redis class.
- Update users of ::redis to use ::redis::legacy.

This should all be a no-op.

In a follow up patch, I intend to move the resources that would be common to
all instances in a multi-instance setup to ::redis class -- for example, the
redis-server package, the /srv/redis directory, etc.

I think this strikes the right balance between implementing things the right
way and maintaining compatibility with existing code.

Change-Id: I90842b834563cd7113548ae29e050bddf334f05c
---
M manifests/role/ci.pp
M manifests/role/keystone.pp
M manifests/role/ocg.pp
M manifests/role/rcstream.pp
M manifests/role/redisdb.pp
M manifests/role/wikimetrics.pp
M manifests/role/xenon.pp
M modules/dynamicproxy/manifests/init.pp
M modules/ircyall/manifests/init.pp
M modules/ores/manifests/redis.pp
M modules/quarry/manifests/init.pp
M modules/redis/manifests/init.pp
A modules/redis/manifests/legacy.pp
M modules/role/manifests/deployment/server.pp
M modules/toollabs/manifests/redis.pp
15 files changed, 100 insertions(+), 95 deletions(-)


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

diff --git a/manifests/role/ci.pp b/manifests/role/ci.pp
index 6665d20..4f0a2b7 100644
--- a/manifests/role/ci.pp
+++ b/manifests/role/ci.pp
@@ -354,7 +354,7 @@
 }
 
 # For CirrusSearch testing:
-class { '::redis':
+class { '::redis::legacy':
 maxmemory => '128mb',
 persist   => 'aof',
 redis_replication => undef,
diff --git a/manifests/role/keystone.pp b/manifests/role/keystone.pp
index 4d7a147..196510a 100644
--- a/manifests/role/keystone.pp
+++ b/manifests/role/keystone.pp
@@ -89,7 +89,7 @@
 }
 }
 
-class { '::redis':
+class { '::redis::legacy':
 maxmemory => '250mb',
 persist   => 'aof',
 redis_replication => $replication,
@@ -103,7 +103,7 @@
 class role::keystone::redis::labs {
 include passwords::openstack::keystone
 
-class { '::redis':
+class { '::redis::legacy':
 maxmemory => '250mb',
 persist   => 'aof',
 redis_replication => {
diff --git a/manifests/role/ocg.pp b/manifests/role/ocg.pp
index a6ec519..4413c3a 100644
--- a/manifests/role/ocg.pp
+++ b/manifests/role/ocg.pp
@@ -77,7 +77,7 @@
 srange => '$INTERNAL',
 }
 
-class { 'redis':
+class { 'redis::legacy':
 maxmemory => '500Mb',
 password  => $passwords::redis::ocg_test_password,
 }
diff --git a/manifests/role/rcstream.pp b/manifests/role/rcstream.pp
index 7758bd8..843b0b4 100644
--- a/manifests/role/rcstream.pp
+++ b/manifests/role/rcstream.pp
@@ -13,7 +13,7 @@
 description => 'MediaWiki Recent Changes stream',
 }
 
-class { '::redis':
+class { '::redis::legacy':
 maxmemory => '100mb',
 dir   => '/var/run/redis',
 persist   => false,
diff --git a/manifests/role/redisdb.pp b/manifests/role/redisdb.pp
index 99c4d65..60dd86e 100644
--- a/manifests/role/redisdb.pp
+++ b/manifests/role/redisdb.pp
@@ -29,7 +29,7 @@
 srange => '$ALL_NETWORKS',
 }
 
-class { '::redis':
+class { '::redis::legacy':
 maxmemory => $maxmemory,
 dir   => $dir,
 persist   => 'aof',
diff --git a/manifests/role/wikimetrics.pp b/manifests/role/wikimetrics.pp
index c669b44..ed96462 100644
--- a/manifests/role/wikimetrics.pp
+++ b/manifests/role/wikimetrics.pp
@@ -267,7 +267,7 @@
 # than the default redis.conf.erb template allows.
 $redis_dir= '/a/redis'
 $redis_dbfilename = "${hostname}-6379.rdb"
-class { '::redis':
+class { '::redis::legacy':
 dir => $redis_dir,
 dbfilename  => $redis_dbfilename,
 saves   => [ '900 1', '300 10', '60 20' ],
diff --git a/manifests/role/xenon.pp b/manifests/role/xenon.pp
index d29070c..908ba99 100644
--- a

[MediaWiki-commits] [Gerrit] Move down $logEntry publish() call in recordUpload2() - change (mediawiki/core)

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

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

Change subject: Move down $logEntry publish() call in recordUpload2()
..

Move down $logEntry publish() call in recordUpload2()

This was moved before the defered doEditContent() call
for new pages by mistake.

Bug: T118433
Change-Id: I007acf82622ec6d68c007921f632793392025f40
---
M includes/filerepo/file/LocalFile.php
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/25/252625/1

diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index 1a33538..c2bbb4e 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -1404,8 +1404,6 @@
) {
# Update memcache after the commit
$that->invalidateCache();
-   # Page exists, do RC entry now (otherwise we wait for 
later)
-   $logEntry->publish( $logId );
 
if ( $newPageContent ) {
# New file page; create the description page.
@@ -1419,7 +1417,6 @@
$user
);
 
-   // Now that the page exists, make an RC entry.
// This relies on the resetArticleID() call in 
WikiPage::insertOn(),
// which is triggered on $descTitle by 
doEditContent() above.
if ( isset( $status->value['revision'] ) ) {
@@ -1438,6 +1435,8 @@
$wikiPage->getTitle()->purgeSquid();
}
 
+   # Now that the page exists, make an RC entry.
+   $logEntry->publish( $logId );
# Run hook for other updates (typically more cache 
purging)
Hooks::run( 'FileUpload', array( $that, $reupload, 
!$newPageContent ) );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I007acf82622ec6d68c007921f632793392025f40
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] [WIP] No-op the notify* methods in JobQueueAggregatorRedis - change (mediawiki/core)

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

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

Change subject: [WIP] No-op the notify* methods in JobQueueAggregatorRedis
..

[WIP] No-op the notify* methods in JobQueueAggregatorRedis

This should be managed by the background service now

Change-Id: I5d905760b509f66e10019ff8a4146db8a6c4c9d7
---
M includes/jobqueue/aggregator/JobQueueAggregatorRedis.php
1 file changed, 4 insertions(+), 52 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/24/252624/1

diff --git a/includes/jobqueue/aggregator/JobQueueAggregatorRedis.php 
b/includes/jobqueue/aggregator/JobQueueAggregatorRedis.php
index f8a0040..6f6e36b 100644
--- a/includes/jobqueue/aggregator/JobQueueAggregatorRedis.php
+++ b/includes/jobqueue/aggregator/JobQueueAggregatorRedis.php
@@ -24,6 +24,8 @@
 /**
  * Class to handle tracking information about all queues using PhpRedis
  *
+ * The mediawiki/services/jobrunner background service must be set up and 
running.
+ *
  * @ingroup JobQueue
  * @ingroup Redis
  * @since 1.21
@@ -54,43 +56,11 @@
}
 
protected function doNotifyQueueEmpty( $wiki, $type ) {
-   $conn = $this->getConnection();
-   if ( !$conn ) {
-   return false;
-   }
-   try {
-   // Make sure doNotifyQueueNonEmpty() takes precedence 
to avoid races
-   $conn->watch( $this->getReadyQueueKey() );
-   $conn->multi()
-   ->hDel( $this->getReadyQueueKey(), 
$this->encQueueName( $type, $wiki ) )
-   ->exec();
-
-   return true;
-   } catch ( RedisException $e ) {
-   $this->handleException( $conn, $e );
-
-   return false;
-   }
+   return true; // managed by the service
}
 
protected function doNotifyQueueNonEmpty( $wiki, $type ) {
-   $conn = $this->getConnection();
-   if ( !$conn ) {
-   return false;
-   }
-   try {
-   $conn->multi( Redis::PIPELINE );
-   $conn->hSetNx( $this->getQueueTypesKey(), $type, 
'enabled' );
-   $conn->sAdd( $this->getWikiSetKey(), $wiki );
-   $conn->hSet( $this->getReadyQueueKey(), 
$this->encQueueName( $type, $wiki ), time() );
-   $conn->exec();
-
-   return true;
-   } catch ( RedisException $e ) {
-   $this->handleException( $conn, $e );
-
-   return false;
-   }
+   return true; // managed by the service
}
 
protected function doGetAllReadyWikiQueues() {
@@ -121,17 +91,14 @@
 
$pendingDBs = $this->findPendingWikiQueues(); 
// (type => list of wikis)
 
-   $conn->multi( Redis::PIPELINE );
$now = time();
$map = array( '_epoch' => time() ); // dummy 
key for empty Redis collections
foreach ( $pendingDBs as $type => $wikis ) {
-   $conn->hSetNx( 
$this->getQueueTypesKey(), $type, 'enabled' );
foreach ( $wikis as $wiki ) {
$map[$this->encQueueName( 
$type, $wiki )] = $now;
}
}
$conn->hMSet( $this->getReadyQueueKey(), $map );
-   $conn->exec();
 
$conn->delete( $this->getReadyQueueKey() . 
":lock" ); // unlock
}
@@ -151,7 +118,6 @@
}
try {
$conn->delete( $this->getReadyQueueKey() );
-   // leave key at getQueueTypesKey() alone
} catch ( RedisException $e ) {
$this->handleException( $conn, $e );
 
@@ -193,20 +159,6 @@
 */
private function getReadyQueueKey() {
return "jobqueue:aggregator:h-ready-queues:v2"; // global
-   }
-
-   /**
-* @return string
-*/
-   private function getQueueTypesKey() {
-   return "jobqueue:aggregator:h-queue-types:v2"; // global
-   }
-
-   /**
-* @return string
-*/
-   private function getWikiSetKey() {
-   return "jobqueue:aggregator:s-wikis:v2"; // global
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d905760b509f66e10019ff8a4146db8

[MediaWiki-commits] [Gerrit] Remove unused "use" statements - change (mediawiki...CirrusSearch)

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

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

Change subject: Remove unused "use" statements
..

Remove unused "use" statements

Change-Id: I720bd0258f13bd5ed9b244f1ca40c7da431c1986
---
M tests/jenkins/Jenkins.php
1 file changed, 0 insertions(+), 3 deletions(-)


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

diff --git a/tests/jenkins/Jenkins.php b/tests/jenkins/Jenkins.php
index 1bc555c..c208605 100644
--- a/tests/jenkins/Jenkins.php
+++ b/tests/jenkins/Jenkins.php
@@ -1,9 +1,6 @@
 https://gerrit.wikimedia.org/r/252623
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I720bd0258f13bd5ed9b244f1ca40c7da431c1986
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Followup a88df43d: make $wgDebugDumpSql log commented querie... - change (mediawiki/core)

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

Change subject: Followup a88df43d: make $wgDebugDumpSql log commented queries 
again
..


Followup a88df43d: make $wgDebugDumpSql log commented queries again

Change-Id: I0c10b2119f03fa047dbb2bad1c4c1233403bff59
---
M includes/db/Database.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/db/Database.php b/includes/db/Database.php
index 60cf0ec..968a0fd 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -989,7 +989,7 @@
}
 
if ( $this->debug() ) {
-   wfDebugLog( 'queries', sprintf( "%s: %s", 
$this->mDBname, $sql ) );
+   wfDebugLog( 'queries', sprintf( "%s: %s", 
$this->mDBname, $commentedSql ) );
}
 
$queryId = MWDebug::query( $sql, $fname, $isMaster );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c10b2119f03fa047dbb2bad1c4c1233403bff59
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] delete abacist module/role; decommed and unused - change (operations/puppet)

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

Change subject: delete abacist module/role; decommed and unused
..


delete abacist module/role; decommed and unused

Change-Id: I8e669c068b364362de84f2d00e5818178f79db99
---
M hieradata/common/role/deployment.yaml
D manifests/role/abacist.pp
M manifests/site.pp
D modules/abacist/manifests/init.pp
D modules/abacist/templates/abacist.conf.erb
5 files changed, 1 insertion(+), 80 deletions(-)

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



diff --git a/hieradata/common/role/deployment.yaml 
b/hieradata/common/role/deployment.yaml
index 0616938..4db53b1 100644
--- a/hieradata/common/role/deployment.yaml
+++ b/hieradata/common/role/deployment.yaml
@@ -53,8 +53,6 @@
 upstream: https://gerrit.wikimedia.org/r/mediawiki/tools/fluoride
   statsv/statsv:
 upstream: https://gerrit.wikimedia.org/r/analytics/statsv
-  abacist/abacist:
-upstream: https://gerrit.wikimedia.org/r/analytics/abacist
   test/testrepo:
 service_name: puppet
 checkout_submodules: true
diff --git a/manifests/role/abacist.pp b/manifests/role/abacist.pp
deleted file mode 100644
index f45762b..000
--- a/manifests/role/abacist.pp
+++ /dev/null
@@ -1,10 +0,0 @@
-# == Class: role::abacist
-#
-# Abacist is a simple, redis-backed web analytics framework.
-#
-class role::abacist {
-class { '::abacist':
-ensure => absent,
-eventlogging_publisher => 'tcp://eventlog1001.eqiad.wmnet:8600',
-}
-}
diff --git a/manifests/site.pp b/manifests/site.pp
index d89a7cd..3436c10 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2308,7 +2308,7 @@
 }
 
 node 'stat1001.eqiad.wmnet' {
-role statistics::web, abacist
+role statistics::web
 include standard
 include base::firewall
 }
diff --git a/modules/abacist/manifests/init.pp 
b/modules/abacist/manifests/init.pp
deleted file mode 100644
index c36f1bd..000
--- a/modules/abacist/manifests/init.pp
+++ /dev/null
@@ -1,51 +0,0 @@
-# == Class: abacist
-#
-# Abacist is a simple, Redis-backed web analytics framework.
-#
-# === Parameters
-#
-# [*eventlogging_publisher*]
-#   EventLogging endpoint. Example: 'tcp://eventlog1001.eqiad.wmnet:8600'.
-#
-# [*redis_server*]
-#   Address of redis server to use as a back-end. Default: 'localhost'.
-#
-class abacist(
-$eventlogging_publisher,
-$ensure   = 'present',
-$redis_server = 'localhost',
-) {
-require_package('python-redis', 'python-zmq')
-
-group { 'abacist':
-ensure => $ensure,
-}
-
-user { 'abacist':
-ensure => $ensure,
-gid=> 'abacist',
-shell  => '/bin/false',
-home   => '/nonexistent',
-system => true,
-managehome => false,
-}
-
-package { 'abacist':
-ensure   => $ensure,
-provider => 'trebuchet',
-notify   => Service['abacist'],
-}
-
-file { '/etc/init/abacist.conf':
-ensure  => $ensure,
-content => template('abacist/abacist.conf.erb'),
-require => Package['abacist'],
-notify  => Service['abacist'],
-}
-
-service { 'abacist':
-ensure   => ensure_service($ensure),
-provider => 'upstart',
-require  => User['abacist'],
-}
-}
diff --git a/modules/abacist/templates/abacist.conf.erb 
b/modules/abacist/templates/abacist.conf.erb
deleted file mode 100644
index dec4be8..000
--- a/modules/abacist/templates/abacist.conf.erb
+++ /dev/null
@@ -1,16 +0,0 @@
-# abacist
-#
-# This is an Upstart job configuration file for Abacist, a redis-backed
-# web analytics aggregator. This file was provisioned by Puppet.
-
-description "web analytics aggregator"
-
-start on (local-filesystems and net-device-up IFACE!=lo)
-
-setuid abacist
-setgid abacist
-
-respawn
-respawn limit unlimited
-
-exec /usr/bin/python /srv/deployment/abacist/abacist/abacist.py <%= 
@eventlogging_publisher %> --redis-server=<%= @redis_server %>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e669c068b364362de84f2d00e5818178f79db99
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] delete abacist module/role; decommed and unused - change (operations/puppet)

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

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

Change subject: delete abacist module/role; decommed and unused
..

delete abacist module/role; decommed and unused

Change-Id: I8e669c068b364362de84f2d00e5818178f79db99
---
M hieradata/common/role/deployment.yaml
D manifests/role/abacist.pp
M manifests/site.pp
D modules/abacist/manifests/init.pp
D modules/abacist/templates/abacist.conf.erb
5 files changed, 1 insertion(+), 80 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/22/252622/1

diff --git a/hieradata/common/role/deployment.yaml 
b/hieradata/common/role/deployment.yaml
index 0616938..4db53b1 100644
--- a/hieradata/common/role/deployment.yaml
+++ b/hieradata/common/role/deployment.yaml
@@ -53,8 +53,6 @@
 upstream: https://gerrit.wikimedia.org/r/mediawiki/tools/fluoride
   statsv/statsv:
 upstream: https://gerrit.wikimedia.org/r/analytics/statsv
-  abacist/abacist:
-upstream: https://gerrit.wikimedia.org/r/analytics/abacist
   test/testrepo:
 service_name: puppet
 checkout_submodules: true
diff --git a/manifests/role/abacist.pp b/manifests/role/abacist.pp
deleted file mode 100644
index f45762b..000
--- a/manifests/role/abacist.pp
+++ /dev/null
@@ -1,10 +0,0 @@
-# == Class: role::abacist
-#
-# Abacist is a simple, redis-backed web analytics framework.
-#
-class role::abacist {
-class { '::abacist':
-ensure => absent,
-eventlogging_publisher => 'tcp://eventlog1001.eqiad.wmnet:8600',
-}
-}
diff --git a/manifests/site.pp b/manifests/site.pp
index 5ddaaf3..b1ca743 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2299,7 +2299,7 @@
 }
 
 node 'stat1001.eqiad.wmnet' {
-role statistics::web, abacist
+role statistics::web
 include standard
 include base::firewall
 }
diff --git a/modules/abacist/manifests/init.pp 
b/modules/abacist/manifests/init.pp
deleted file mode 100644
index c36f1bd..000
--- a/modules/abacist/manifests/init.pp
+++ /dev/null
@@ -1,51 +0,0 @@
-# == Class: abacist
-#
-# Abacist is a simple, Redis-backed web analytics framework.
-#
-# === Parameters
-#
-# [*eventlogging_publisher*]
-#   EventLogging endpoint. Example: 'tcp://eventlog1001.eqiad.wmnet:8600'.
-#
-# [*redis_server*]
-#   Address of redis server to use as a back-end. Default: 'localhost'.
-#
-class abacist(
-$eventlogging_publisher,
-$ensure   = 'present',
-$redis_server = 'localhost',
-) {
-require_package('python-redis', 'python-zmq')
-
-group { 'abacist':
-ensure => $ensure,
-}
-
-user { 'abacist':
-ensure => $ensure,
-gid=> 'abacist',
-shell  => '/bin/false',
-home   => '/nonexistent',
-system => true,
-managehome => false,
-}
-
-package { 'abacist':
-ensure   => $ensure,
-provider => 'trebuchet',
-notify   => Service['abacist'],
-}
-
-file { '/etc/init/abacist.conf':
-ensure  => $ensure,
-content => template('abacist/abacist.conf.erb'),
-require => Package['abacist'],
-notify  => Service['abacist'],
-}
-
-service { 'abacist':
-ensure   => ensure_service($ensure),
-provider => 'upstart',
-require  => User['abacist'],
-}
-}
diff --git a/modules/abacist/templates/abacist.conf.erb 
b/modules/abacist/templates/abacist.conf.erb
deleted file mode 100644
index dec4be8..000
--- a/modules/abacist/templates/abacist.conf.erb
+++ /dev/null
@@ -1,16 +0,0 @@
-# abacist
-#
-# This is an Upstart job configuration file for Abacist, a redis-backed
-# web analytics aggregator. This file was provisioned by Puppet.
-
-description "web analytics aggregator"
-
-start on (local-filesystems and net-device-up IFACE!=lo)
-
-setuid abacist
-setgid abacist
-
-respawn
-respawn limit unlimited
-
-exec /usr/bin/python /srv/deployment/abacist/abacist/abacist.py <%= 
@eventlogging_publisher %> --redis-server=<%= @redis_server %>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e669c068b364362de84f2d00e5818178f79db99
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] decom abacist role - change (operations/puppet)

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

Change subject: decom abacist role
..


decom abacist role

Set ensure => absent on the ::abcist class resource so that its sub-resources
are purged from stat1001.

Change-Id: Iaa994005905c841cfc65ae162aeaeb919a13b79d
---
M manifests/role/abacist.pp
1 file changed, 1 insertion(+), 9 deletions(-)

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



diff --git a/manifests/role/abacist.pp b/manifests/role/abacist.pp
index 30ace4b..f45762b 100644
--- a/manifests/role/abacist.pp
+++ b/manifests/role/abacist.pp
@@ -3,16 +3,8 @@
 # Abacist is a simple, redis-backed web analytics framework.
 #
 class role::abacist {
-class { '::redis':
-maxmemory => '1Gb',
-before=> Class['::abacist'],
-}
-
 class { '::abacist':
+ensure => absent,
 eventlogging_publisher => 'tcp://eventlog1001.eqiad.wmnet:8600',
 }
-
-# The redis server is only accessed from localhost (and monitoring), so
-# no further ferm rules are needed
-Service['redis-server'] ~> Service['abacist']
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa994005905c841cfc65ae162aeaeb919a13b79d
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] decom abacist role - change (operations/puppet)

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

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

Change subject: decom abacist role
..

decom abacist role

Set ensure => absent on the ::abcist class resource so that its sub-resources
are purged from stat1001.

Change-Id: Iaa994005905c841cfc65ae162aeaeb919a13b79d
---
M manifests/role/abacist.pp
1 file changed, 1 insertion(+), 9 deletions(-)


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

diff --git a/manifests/role/abacist.pp b/manifests/role/abacist.pp
index 30ace4b..f45762b 100644
--- a/manifests/role/abacist.pp
+++ b/manifests/role/abacist.pp
@@ -3,16 +3,8 @@
 # Abacist is a simple, redis-backed web analytics framework.
 #
 class role::abacist {
-class { '::redis':
-maxmemory => '1Gb',
-before=> Class['::abacist'],
-}
-
 class { '::abacist':
+ensure => absent,
 eventlogging_publisher => 'tcp://eventlog1001.eqiad.wmnet:8600',
 }
-
-# The redis server is only accessed from localhost (and monitoring), so
-# no further ferm rules are needed
-Service['redis-server'] ~> Service['abacist']
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa994005905c841cfc65ae162aeaeb919a13b79d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Followup a88df43d: make $wgDebugDumpSql log commented querie... - change (mediawiki/core)

2015-11-11 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Followup a88df43d: make $wgDebugDumpSql log commented queries 
again
..

Followup a88df43d: make $wgDebugDumpSql log commented queries again

Change-Id: I0c10b2119f03fa047dbb2bad1c4c1233403bff59
---
M includes/db/Database.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/20/252620/1

diff --git a/includes/db/Database.php b/includes/db/Database.php
index 60cf0ec..968a0fd 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -989,7 +989,7 @@
}
 
if ( $this->debug() ) {
-   wfDebugLog( 'queries', sprintf( "%s: %s", 
$this->mDBname, $sql ) );
+   wfDebugLog( 'queries', sprintf( "%s: %s", 
$this->mDBname, $commentedSql ) );
}
 
$queryId = MWDebug::query( $sql, $fname, $isMaster );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c10b2119f03fa047dbb2bad1c4c1233403bff59
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] Render interactive graph with - change (mediawiki...Graph)

2015-11-11 Thread JGirault (Code Review)
JGirault has uploaded a new change for review.

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

Change subject: Render interactive graph with 
..

Render interactive graph with 

Renders an image first, and load graph libraries and renders
the interactive graph only when the user clicks on the image.

Change-Id: I42efddceb2aa9449075d6fbde1604a8ff222e254
---
M Graph.body.php
M extension.json
M i18n/en.json
M i18n/qqq.json
M js/graph-loader.js
M styles/common.less
6 files changed, 196 insertions(+), 99 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Graph 
refs/changes/19/252619/1

diff --git a/Graph.body.php b/Graph.body.php
index 177b840..ad74253 100644
--- a/Graph.body.php
+++ b/Graph.body.php
@@ -42,8 +42,11 @@
   array $args, Parser $parser, 
\PPFrame $frame ) {
// expand template arguments and other wiki markup
$input = $parser->recursivePreprocess( $input, $frame );
+
+$isInteractive = !empty($args['interactive']) && $args['interactive'] 
=== "true";
+
return self::buildHtml( $input, $parser->getTitle(), 
$parser->getRevisionId(),
-   $parser->getOutput(), 
$parser->getOptions()->getIsPreview() );
+   $parser->getOutput(), 
$parser->getOptions()->getIsPreview() , $isInteractive);
}
 
public static function finalizeParserOutput( ParserOutput $output, 
$title, $isPreview ) {
@@ -57,7 +60,6 @@
 
if ( $isPreview || !$wgGraphImgServiceUrl || 
!$wgGraphImgServiceAlways ) {
global $wgGraphDataDomains, 
$wgGraphUrlBlacklist, $wgGraphIsTrusted;
-// $output->addModules( 'ext.graph' );
$output->addJsConfigVars( 'wgGraphSpecs', 
$specs );
// TODO: these 3 js vars should be per domain 
if 'ext.graph' is added, not per page
$output->addJsConfigVars( 'wgGraphDataDomains', 
$wgGraphDataDomains );
@@ -91,9 +93,10 @@
 * @param int $revid
 * @param ParserOutput $parserOutput
 * @param bool $isPreview
+* @param bool $isInteractive
 * @return string
 */
-   public static function buildHtml( $jsonText, $title, $revid, 
$parserOutput, $isPreview ) {
+   public static function buildHtml( $jsonText, $title, $revid, 
$parserOutput, $isPreview, $isInteractive ) {
global $wgGraphImgServiceUrl, $wgServerName, 
$wgGraphImgServiceAlways;
 
$status = FormatJson::parse( $jsonText, FormatJson::TRY_FIXING 
| FormatJson::STRIP_COMMENTS );
@@ -111,6 +114,7 @@
$parserOutput->setExtensionData( 'graph_specs', $specs );
 
$html = '';
+$containerClass = 'mw-wiki-graph-container';
 
// Graphoid service image URL
if ( $wgGraphImgServiceUrl ) {
@@ -128,16 +132,21 @@
) );
}
 
-   if ( $isPreview || !$wgGraphImgServiceUrl || 
!$wgGraphImgServiceAlways ) {
-   $html .= Html::element( 'div', array(
-   'class' => 'mw-wiki-graph-lazy-load',
-   'data-graph-id' => $hash,
-   ) );
+   if (($isPreview && $isInteractive) || !$wgGraphImgServiceUrl || 
!$wgGraphImgServiceAlways) {
+$containerClass .= ' mw-wiki-graph-static';
+$html .= Html::rawElement( 'div', array(
+'class' => 'mw-wiki-graph-switch-button',
+'data-loading' => wfMessage( 'graph-loading' )->text(),
+'data-done' => wfMessage( 'graph-interactive-done' )->text()
+), wfMessage( 'graph-switch-button' )->text() );
}
 
-   return Html::rawElement( 'div', array(
-   'class' => 'mw-wiki-graph-container',
-   ), $html );
+$container = Html::rawElement( 'div', array(
+'class' => $containerClass,
+'data-graph-id' => $hash,
+), $html );
+
+   return Html::rawElement( 'div', array(), $container );
}
 }
 
diff --git a/extension.json b/extension.json
index 6af0fe3..ff97389 100644
--- a/extension.json
+++ b/extension.json
@@ -24,6 +24,9 @@
"scripts": [
"js/graph-loader.js"
],
+   "styles": [
+ "styles/common.less"
+   ],
"dependencies": [
"mediawiki.Uri"
],
diff --git a/i18n/en.json b/i18n/en.json
index bfaf31d..87f7534 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -36,5 +36,8 @@
"graph-ve-dialog-button-tooltip": "Graph",
"graph-ve-no-

[MediaWiki-commits] [Gerrit] Translate build script to JS - change (unicodejs)

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

Change subject: Translate build script to JS
..


Translate build script to JS

Change-Id: I9b2411c6253fa666b4717092616c1f3aa8525e4f
---
M src/unicodejs.derivedbidiclasses.js
M src/unicodejs.derivedcoreproperties.js
M src/unicodejs.derivedgeneralcategories.js
M src/unicodejs.graphemebreakproperties.js
M src/unicodejs.wordbreakproperties.js
A tools/unicodejs-properties.js
D tools/unicodejs-properties.py
7 files changed, 166 insertions(+), 121 deletions(-)

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



diff --git a/src/unicodejs.derivedbidiclasses.js 
b/src/unicodejs.derivedbidiclasses.js
index c578ae7..9663796 100644
--- a/src/unicodejs.derivedbidiclasses.js
+++ b/src/unicodejs.derivedbidiclasses.js
@@ -1,4 +1,4 @@
-// This file is GENERATED by tools/unicodejs-properties.py
+// This file is GENERATED by tools/unicodejs-properties.js
 // DO NOT EDIT
 unicodeJS.derivedbidiclasses = {
// partial extraction only
diff --git a/src/unicodejs.derivedcoreproperties.js 
b/src/unicodejs.derivedcoreproperties.js
index 8d0344e..c92bbcd 100644
--- a/src/unicodejs.derivedcoreproperties.js
+++ b/src/unicodejs.derivedcoreproperties.js
@@ -1,4 +1,4 @@
-// This file is GENERATED by tools/unicodejs-properties.py
+// This file is GENERATED by tools/unicodejs-properties.js
 // DO NOT EDIT
 unicodeJS.derivedcoreproperties = {
// partial extraction only
diff --git a/src/unicodejs.derivedgeneralcategories.js 
b/src/unicodejs.derivedgeneralcategories.js
index 84cad8c..3a37ab8 100644
--- a/src/unicodejs.derivedgeneralcategories.js
+++ b/src/unicodejs.derivedgeneralcategories.js
@@ -1,4 +1,4 @@
-// This file is GENERATED by tools/unicodejs-properties.py
+// This file is GENERATED by tools/unicodejs-properties.js
 // DO NOT EDIT
 unicodeJS.derivedgeneralcategories = {
// partial extraction only
diff --git a/src/unicodejs.graphemebreakproperties.js 
b/src/unicodejs.graphemebreakproperties.js
index a18c021..d812318 100644
--- a/src/unicodejs.graphemebreakproperties.js
+++ b/src/unicodejs.graphemebreakproperties.js
@@ -1,4 +1,4 @@
-// This file is GENERATED by tools/unicodejs-properties.py
+// This file is GENERATED by tools/unicodejs-properties.js
 // DO NOT EDIT
 unicodeJS.graphemebreakproperties = {
CR: [0x000D],
diff --git a/src/unicodejs.wordbreakproperties.js 
b/src/unicodejs.wordbreakproperties.js
index 99c1075..05db710 100644
--- a/src/unicodejs.wordbreakproperties.js
+++ b/src/unicodejs.wordbreakproperties.js
@@ -1,4 +1,4 @@
-// This file is GENERATED by tools/unicodejs-properties.py
+// This file is GENERATED by tools/unicodejs-properties.js
 // DO NOT EDIT
 unicodeJS.wordbreakproperties = {
DoubleQuote: [0x0022],
diff --git a/tools/unicodejs-properties.js b/tools/unicodejs-properties.js
new file mode 100755
index 000..e1b5d50
--- /dev/null
+++ b/tools/unicodejs-properties.js
@@ -0,0 +1,161 @@
+#!/usr/bin/env node
+
+// Generates unicodejs.*(properties|categories).js from Unicode data
+
+/* jshint node: true */
+
+var http = require( 'http' ),
+   fs = require( 'fs' );
+
+function extractProperties( body, jsname, full, propPatterns, 
excludeSurrogates ) {
+   var js, filename,
+   lines = body.split( /\n/ ),
+   // range[ property ] -> character range list e.g. [ 0x0040, [ 
0x0060-0x0070 ], 0x00A3, ... ]
+   ranges = {},
+   // A list of property name strings like "Extend", "Format" etc
+   properties = [],
+   fragments = [],
+   blankTest = /^\s*(#|$)/,
+   definitionTest = 
/^([0-9A-F]{4,6})(?:\.\.([0-9A-F]{4,6}))?\s*;\s*(\w+)\s*#/;
+
+   lines.forEach( function ( line ) {
+   var matches, jsname, start, end, propText;
+
+   line = line.trim();
+   // Ignore comment or blank lines
+   if ( line.match( blankTest ) ) {
+   return;
+   }
+   // Find things like one of the following:
+   //      ; propertyname
+   //   .. ; propertyname
+   matches = line.match( definitionTest );
+   if ( !matches ) {
+   throw new Error( 'Bad line: ' + line );
+   }
+
+   start = parseInt( matches[ 1 ], 16 );
+   end = parseInt( matches[ 2 ] || matches[ 1 ], 16 );
+   propText = matches[ 3 ];
+   if ( jsname === 'graphemebreakproperties' && start === 0xD800 
&& end === 0xDFFF ) {
+   // raw surrogates are not treated
+   return;
+   }
+
+   propPatterns.forEach( function ( propPattern ) {
+   var propName,
+   matches = propText.match( propPattern );
+   if ( matches ) {
+   

[MediaWiki-commits] [Gerrit] Translate build script to JS - change (unicodejs)

2015-11-11 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Translate build script to JS
..

Translate build script to JS

Change-Id: I9b2411c6253fa666b4717092616c1f3aa8525e4f
---
M src/unicodejs.derivedbidiclasses.js
M src/unicodejs.derivedcoreproperties.js
M src/unicodejs.derivedgeneralcategories.js
M src/unicodejs.graphemebreakproperties.js
M src/unicodejs.wordbreakproperties.js
A tools/unicodejs-properties.js
D tools/unicodejs-properties.py
7 files changed, 166 insertions(+), 121 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/unicodejs refs/changes/18/252618/1

diff --git a/src/unicodejs.derivedbidiclasses.js 
b/src/unicodejs.derivedbidiclasses.js
index c578ae7..9663796 100644
--- a/src/unicodejs.derivedbidiclasses.js
+++ b/src/unicodejs.derivedbidiclasses.js
@@ -1,4 +1,4 @@
-// This file is GENERATED by tools/unicodejs-properties.py
+// This file is GENERATED by tools/unicodejs-properties.js
 // DO NOT EDIT
 unicodeJS.derivedbidiclasses = {
// partial extraction only
diff --git a/src/unicodejs.derivedcoreproperties.js 
b/src/unicodejs.derivedcoreproperties.js
index 8d0344e..c92bbcd 100644
--- a/src/unicodejs.derivedcoreproperties.js
+++ b/src/unicodejs.derivedcoreproperties.js
@@ -1,4 +1,4 @@
-// This file is GENERATED by tools/unicodejs-properties.py
+// This file is GENERATED by tools/unicodejs-properties.js
 // DO NOT EDIT
 unicodeJS.derivedcoreproperties = {
// partial extraction only
diff --git a/src/unicodejs.derivedgeneralcategories.js 
b/src/unicodejs.derivedgeneralcategories.js
index 84cad8c..3a37ab8 100644
--- a/src/unicodejs.derivedgeneralcategories.js
+++ b/src/unicodejs.derivedgeneralcategories.js
@@ -1,4 +1,4 @@
-// This file is GENERATED by tools/unicodejs-properties.py
+// This file is GENERATED by tools/unicodejs-properties.js
 // DO NOT EDIT
 unicodeJS.derivedgeneralcategories = {
// partial extraction only
diff --git a/src/unicodejs.graphemebreakproperties.js 
b/src/unicodejs.graphemebreakproperties.js
index a18c021..d812318 100644
--- a/src/unicodejs.graphemebreakproperties.js
+++ b/src/unicodejs.graphemebreakproperties.js
@@ -1,4 +1,4 @@
-// This file is GENERATED by tools/unicodejs-properties.py
+// This file is GENERATED by tools/unicodejs-properties.js
 // DO NOT EDIT
 unicodeJS.graphemebreakproperties = {
CR: [0x000D],
diff --git a/src/unicodejs.wordbreakproperties.js 
b/src/unicodejs.wordbreakproperties.js
index 99c1075..05db710 100644
--- a/src/unicodejs.wordbreakproperties.js
+++ b/src/unicodejs.wordbreakproperties.js
@@ -1,4 +1,4 @@
-// This file is GENERATED by tools/unicodejs-properties.py
+// This file is GENERATED by tools/unicodejs-properties.js
 // DO NOT EDIT
 unicodeJS.wordbreakproperties = {
DoubleQuote: [0x0022],
diff --git a/tools/unicodejs-properties.js b/tools/unicodejs-properties.js
new file mode 100755
index 000..e1b5d50
--- /dev/null
+++ b/tools/unicodejs-properties.js
@@ -0,0 +1,161 @@
+#!/usr/bin/env node
+
+// Generates unicodejs.*(properties|categories).js from Unicode data
+
+/* jshint node: true */
+
+var http = require( 'http' ),
+   fs = require( 'fs' );
+
+function extractProperties( body, jsname, full, propPatterns, 
excludeSurrogates ) {
+   var js, filename,
+   lines = body.split( /\n/ ),
+   // range[ property ] -> character range list e.g. [ 0x0040, [ 
0x0060-0x0070 ], 0x00A3, ... ]
+   ranges = {},
+   // A list of property name strings like "Extend", "Format" etc
+   properties = [],
+   fragments = [],
+   blankTest = /^\s*(#|$)/,
+   definitionTest = 
/^([0-9A-F]{4,6})(?:\.\.([0-9A-F]{4,6}))?\s*;\s*(\w+)\s*#/;
+
+   lines.forEach( function ( line ) {
+   var matches, jsname, start, end, propText;
+
+   line = line.trim();
+   // Ignore comment or blank lines
+   if ( line.match( blankTest ) ) {
+   return;
+   }
+   // Find things like one of the following:
+   //      ; propertyname
+   //   .. ; propertyname
+   matches = line.match( definitionTest );
+   if ( !matches ) {
+   throw new Error( 'Bad line: ' + line );
+   }
+
+   start = parseInt( matches[ 1 ], 16 );
+   end = parseInt( matches[ 2 ] || matches[ 1 ], 16 );
+   propText = matches[ 3 ];
+   if ( jsname === 'graphemebreakproperties' && start === 0xD800 
&& end === 0xDFFF ) {
+   // raw surrogates are not treated
+   return;
+   }
+
+   propPatterns.forEach( function ( propPattern ) {
+   var propName,
+   matches = propText.match( propPattern );
+

[MediaWiki-commits] [Gerrit] [WIP] Make use of the per-server jobqueue:s-queuesWithJobs key - change (mediawiki...jobrunner)

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

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

Change subject: [WIP] Make use of the per-server jobqueue:s-queuesWithJobs key
..

[WIP] Make use of the per-server jobqueue:s-queuesWithJobs key

Instead of tracking types/domains and hitting the cross-product
of those for periodic updates, only do them for queue that are
tracked as having non-abandoned jobs.

This saves CPU, makes undelaying/recycling more responsive,
and simplifies the code.

Change-Id: I6ebffe55991ab050e2996bcba3e459ab7afdca90
---
M redisJobChronService
M src/RedisJobService.php
2 files changed, 67 insertions(+), 182 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/jobrunner 
refs/changes/17/252617/1

diff --git a/redisJobChronService b/redisJobChronService
index b4df999..09e47a7 100755
--- a/redisJobChronService
+++ b/redisJobChronService
@@ -10,15 +10,7 @@
 RedisJobService::checkEnvironment();
 
 class RedisJobChronService extends RedisJobService {
-   const HOT_QUEUE_TTL = 1800; // TTL on queue hotness
-   const COLD_QUEUE_FACTOR = 10; // check non-hot queues 1/X times
const LUA_WAIT_US = 5000; // time to wait between LUA scripts
-   const SYNC_DELAY = 10; // min time between syncAggregatorRegistry()
-
-   /** @var integer[] Map of (encoded queue name => UNIX timestamp) */
-   private $hotQueueMap = array();
-   /** @var integer Number of executePeriodicTasks() calls completed */
-   private $periodicTaskRounds = 0;
 
/**
 * Entry point method that starts the service in earnest and keeps 
running
@@ -40,18 +32,10 @@
throw new Exception( 'Could not install singal 
handlers.' );
}
 
-   $lastSyncTime = 0;
$memLast = memory_get_usage();
$this->incrStats( "start-chron.$host", 1 );
while ( true ) {
pcntl_signal_dispatch();
-
-   if ( ( time() - $lastSyncTime ) > self::SYNC_DELAY ) {
-   $lastSyncTime = time();
-   $count = $this->syncAggregatorRegistry();
-   $this->notice( "Synced $count aggregator(s) to 
the current one." );
-   $this->incrStats( "periodictasks.sync.$host", 1 
);
-   }
 
$count = $this->executePeriodicTasks();
$this->notice( "Updated the state of $count job(s) 
(recycle/undelay/abandon)." );
@@ -64,51 +48,6 @@
$this->incrStats( "memory.$host", $memCurrent - 
$memLast );
$memLast = $memCurrent;
}
-   }
-
-   /**
-* Merge wiki and queue type registration data into all aggregators
-*
-* This makes sure that the data is not lost on aggregator failure
-*
-* @return integer Servers fully updated
-*/
-   private function syncAggregatorRegistry() {
-   $count = count( $this->aggrSrvs );
-
-   try {
-   $types = $this->redisCmdHA(
-   $this->aggrSrvs,
-   'hGetAll',
-   array( $this->getQueueTypesKey() )
-   );
-   if ( $types ) {
-   $okCount = $this->redisCmdBroadcast(
-   $this->aggrSrvs,
-   'hMSet',
-   array( $this->getQueueTypesKey(), 
$types )
-   );
-   $count = min( $count, $okCount );
-   }
-
-   $wikis = $this->redisCmdHA(
-   $this->aggrSrvs,
-   'sMembers',
-   array( $this->getWikiSetKey() )
-   );
-   if ( $wikis ) {
-   $okCount = $this->redisCmdBroadcast(
-   $this->aggrSrvs,
-   'sAdd',
-   array_merge( array( 
$this->getWikiSetKey() ), $wikis )
-   );
-   $count = min( $count, $okCount );
-   }
-   } catch ( RedisExceptionHA $e ) {
-   $count = 0;
-   }
-
-   return $count;
}
 
/**
@@ -136,59 +75,26 @@
 
$this->incrStats( "periodictasks.claimed.$host", 1 );
 
-   $types = $this->redisCmdHA(
-   $this->aggrSrvs,
-   'hKeys',
-   array( $this->getQueueTypesKey() )
-

[MediaWiki-commits] [Gerrit] Fix Hunk.color_line - change (pywikibot/core)

2015-11-11 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

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

Change subject: Fix Hunk.color_line
..

Fix Hunk.color_line

9146f171 introduced a new approach to specifying color, which
was used by Hunk.color_line.

However it was not correctly used in all instances of that method.

Change-Id: I7dc19023ec0ae8795d243cc24561f95a33758cdd
---
M pywikibot/diff.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/16/252616/1

diff --git a/pywikibot/diff.py b/pywikibot/diff.py
index 299c65a..f83033f 100644
--- a/pywikibot/diff.py
+++ b/pywikibot/diff.py
@@ -161,7 +161,7 @@
 if color_closed:
 if char_ref != ' ':
 char_tagged = color_format('{color}{0}',
-   char, self.colors[color])
+   char, color=self.colors[color])
 color_closed = False
 else:
 if char_ref == ' ':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7dc19023ec0ae8795d243cc24561f95a33758cdd
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 

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


[MediaWiki-commits] [Gerrit] WIP: get project and membership information via the keystone... - change (mediawiki...OpenStackManager)

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

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

Change subject: WIP: get project and membership information via the keystone api
..

WIP: get project and membership information via the keystone api

Change-Id: Ibd728d72260c583ef2fd1ec0fca8e2c583e091f7
---
M nova/OpenStackNovaController.php
1 file changed, 67 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenStackManager 
refs/changes/15/252615/1

diff --git a/nova/OpenStackNovaController.php b/nova/OpenStackNovaController.php
index 1831dae..cb48a49 100644
--- a/nova/OpenStackNovaController.php
+++ b/nova/OpenStackNovaController.php
@@ -238,6 +238,73 @@
}
 
/**
+* @return a token for $wgOpenStackManagerLDAPUsername
+*  who happens to have admin rights in Keystone.
+*/
+   function _getAdminToken() {
+   global $wgOpenStackManagerLDAPUsername, 
$wgOpenStackManagerLDAPUserPassword;
+   $data = array(
+   'auth' => array(
+   'passwordCredentials' => array(
+   'username' => 
$wgOpenStackManagerLDAPUsername,
+   'password' => 
$wgOpenStackManagerLDAPUserPassword ),
+   'tenantId' => 'testlabs' ) );
+   $headers = array(
+   'Accept: application/json',
+   'Content-Type: application/json',
+   );
+   $ret = $this->restCall( 'identity', '/tokens', 'POST', $data, 
$headers );
+   if ( $ret['code'] !== 200 ) {
+   $wgAuth->printDebug( 
"OpenStackNovaController::authenticate return code: " . $ret['code'], 
NONSENSITIVE );
+   return "";
+   }
+   $user = $ret['body'];
+   $admintoken = $this->_get_property( $user->access->token, 'id' 
);
+   return $admintoken;
+   }
+
+   /**
+* @return array of project names
+*/
+   function getProjects() {
+   $admintoken = $this->_getAdminToken();
+   $headers = array( "X-Auth-Token: $admintoken" );
+
+   $projarr = array();
+   $ret = $this->restCall( 'identity', '/tenants', 'GET', array(), 
$headers );
+   $projects = self::_get_property( $ret['body'], 'tenants' );
+   if ( !$projects ) {
+   return $projarr();
+   }
+   foreach ( $projects as $project ) {
+   $projectname = self::_get_property( $project, 'name' );
+   $projectid = self::_get_property( $project, 'id' );
+   $projarr[$projectid] = $projectname;
+   }
+   return $projarr;
+   }
+
+   /**
+* @return array of user ids
+*/
+   function getUsersInProject( $projectid ) {
+   $admintoken = $this->_getAdminToken();
+   $headers = array( "X-Auth-Token: $admintoken" );
+
+   $userarr = array();
+   $ret = $this->restCall( 'identity', 
"/tenants/$projectid/users", 'GET', array(), $headers );
+   $users = self::_get_property( $ret['body'], 'users' );
+   if ( !$users ) {
+   return $userarr();
+   }
+   foreach ( $users as $user ) {
+   $name = self::_get_property( $user, 'name' );
+   $userarr[] = $name;
+   }
+   return $userarr;
+   }
+
+   /**
 * @return OpenStackNovaInstance[]
 */
function getInstances() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd728d72260c583ef2fd1ec0fca8e2c583e091f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenStackManager
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] Add FORCE INDEX to contributions queries to work around opti... - change (mediawiki...Flow)

2015-11-11 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Add FORCE INDEX to contributions queries to work around 
optimizer bug
..

Add FORCE INDEX to contributions queries to work around optimizer bug

With an index on (rev_user_id, rev_user_ip, rev_user_wiki) and a primary
key on (rev_id), queries like WHERE rev_user_id=X AND rev_user_ip=Y
AND rev_user_wiki=Z ORDER BY rev_id DESC work fine, but adding
AND rev_id < 'W' causes MySQL to do an index merge and a filesort.
Adding FORCE INDEX fixes this.

Not adding this for the newbie case, because that query doesn't
use the same pattern, and flow_revision_user may not be the
right index there.

Bug: T78671
Change-Id: Ib83275d4cdfc272cd0a532fbbb2675bdfae1ce6d
---
M includes/Formatter/ContributionsQuery.php
1 file changed, 20 insertions(+), 17 deletions(-)


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

diff --git a/includes/Formatter/ContributionsQuery.php 
b/includes/Formatter/ContributionsQuery.php
index 972813d..7e1280a 100644
--- a/includes/Formatter/ContributionsQuery.php
+++ b/includes/Formatter/ContributionsQuery.php
@@ -62,8 +62,8 @@
 * @return FormatterRow[]
 */
public function getResults( $pager, $offset, $limit, $descending ) {
-   // build DB query conditions
-   $conditions = $this->buildConditions( $pager, $offset, 
$descending );
+   // build DB query conditions and options
+   $queryInfo = $this->buildQueryInfo( $pager, $offset, 
$descending );
 
$types = array(
// revision class => block type
@@ -75,7 +75,7 @@
$results = array();
foreach ( $types as $revisionClass => $blockType ) {
// query DB for requested revisions
-   $rows = $this->queryRevisions( $conditions, $limit, 
$revisionClass );
+   $rows = $this->queryRevisions( $queryInfo, $limit, 
$revisionClass );
if ( !$rows ) {
continue;
}
@@ -128,10 +128,11 @@
 * @param ContribsPager|DeletedContribsPager $pager Object hooked into
 * @param string $offset Index offset, inclusive
 * @param bool $descending Query direction, false for ascending, true 
for descending
-* @return array Query conditions
+* @return array Query conditions and options
 */
-   protected function buildConditions( $pager, $offset, $descending ) {
+   protected function buildQueryInfo( $pager, $offset, $descending ) {
$conditions = array();
+   $options = array();
 
// Work out user condition
if ( property_exists( $pager, 'contribs' ) && $pager->contribs 
== 'newbie' ) {
@@ -156,6 +157,8 @@
$conditions['rev_user_ip'] = $pager->target;
$conditions['rev_user_wiki'] = wfWikiId();
}
+   // Hack around optimizer bug (T78671): index not used 
correctly when $offset is set
+   $options['USE INDEX']['flow_revision'] = 
'flow_revision_user';
}
 
// Make offset parameter.
@@ -172,17 +175,17 @@
$conditions['workflow_namespace'] = $pager->namespace;
}
 
-   return $conditions;
+   return array( 'conditions' => $conditions, 'options' => 
$options );
}
 
/**
-* @param array $conditions
+* @param array $queryInfo
 * @param int $limit
 * @param string $revisionClass Storage type (e.g. "PostRevision", 
"Header")
 * @return ResultWrapper|false false on failure
 * @throws \MWException
 */
-   protected function queryRevisions( $conditions, $limit, $revisionClass 
) {
+   protected function queryRevisions( $queryInfo, $limit, $revisionClass ) 
{
$dbr = $this->dbFactory->getDB( DB_SLAVE );
 
switch ( $revisionClass ) {
@@ -195,12 +198,12 @@
'flow_workflow', // resolve to 
workflow, to test if in correct wiki/namespace
),
array( '*' ),
-   $conditions,
+   $queryInfo['conditions'],
__METHOD__,
-   array(
+   array_merge( $queryInfo['options'], 
array(
'LIMIT' => $limit,
'ORDER BY' => 'rev_id DESC',
-   ),
+  

[MediaWiki-commits] [Gerrit] Better coverage of pagebundle POST API endpoints. - change (mediawiki...parsoid)

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

Change subject: Better coverage of pagebundle POST API endpoints.
..


Better coverage of pagebundle POST API endpoints.

Change-Id: Ic97f9364282474aeff199123d7e04ce6e576c80c
---
M tests/mocha/api.js
1 file changed, 83 insertions(+), 44 deletions(-)

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



diff --git a/tests/mocha/api.js b/tests/mocha/api.js
index e2337b2..4be573f 100644
--- a/tests/mocha/api.js
+++ b/tests/mocha/api.js
@@ -2,6 +2,7 @@
 'use strict';
 /*global describe, it, before*/
 
+var Util = require('../../lib/utils/Util.js').Util;
 var apiServer = require('../apiServer.js');
 var request = require('supertest');
 var domino = require('domino');
@@ -242,32 +243,34 @@
.end(done);
});
 
-   it('should accept the previous revision to reuse 
expansions', function(done) {
+   var previousRevHTML = {
+   revid: 0,
+   html: {
+   headers: {
+   'content-type': 
'text/html;profile="mediawiki.org/specs/html/1.0.0"',
+   },
+   body: "\nhttp://purl.org/dc/terms/ mw: http://mediawiki.org/rdf/\"; 
about=\"http://localhost/index.php/Special:Redirect/revision/1\";>http://localhost/index.php/Special:Redirect/\";>http://localhost/index.php/Main_Page\"/>Main_Pagehttp://localhost/index.php/\"/>MediaWiki has been successfully installed.\n\nConsult the User's Guide 
for information on using the wiki software.\n\n Getting 
started \n Configuration settings list\n MediaWiki FAQ\n https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce\"; 
id=\"mwDA\">MediaWiki release mailing list\n Localise MediaWiki for your language",
+   },
+   "data-parsoid": {
+   headers: {
+   'content-type': 
'application/json;profile="mediawiki.org/specs/data-parsoid/0.0.1"',
+   },
+   body: {
+   "counter": 14,
+   "ids": {
+   "mwAA": {"dsr": [0, 
592, 0, 0]}, "mwAQ": {"dsr": [0, 59, 0, 0]}, "mwAg": {"stx": "html", "dsr": [0, 
59, 8, 9]}, "mwAw": {"dsr": [61, 171, 0, 0]}, "mwBA": {"targetOff": 114, 
"contentOffsets": [114, 126], "dsr": [73, 127, 41, 1]}, "mwBQ": {"dsr": [173, 
194, 2, 2]}, "mwBg": {"dsr": [195, 592, 0, 0]}, "mwBw": {"dsr": [195, 300, 1, 
0]}, "mwCA": {"targetOff": 272, "contentOffsets": [272, 299], "dsr": [197, 300, 
75, 1]}, "mwCQ": {"dsr": [301, 373, 1, 0]}, "mwCg": {"targetOff": 359, 
"contentOffsets": [359, 372], "dsr": [303, 373, 56, 1]}, "mwCw": {"dsr": [374, 
472, 1, 0]}, "mwDA": {"targetOff": 441, "contentOffsets": [441, 471], "dsr": 
[376, 472, 65, 1]}, "mwDQ": {"dsr": [473, 592, 1, 0]}, "mwDg": {"targetOff": 
555, "contentOffsets": [555, 591], "dsr": [475, 592, 80, 1] },
+   },
+   },
+   },
+   };
+
+   it('should accept the previous revision to reuse 
expansions (html)', function(done) {
request(api)
.post(version === 3 ?
mockDomain + 
'/v3/transform/wikitext/to/html/Main_Page/1' :
'v2/' + mockDomain + 
'/html/Main_Page/1')
.send({
-   previous: {
-   revid: 0,
-   html: {
-   headers: {
-   'content-type': 
'text/html;profile="mediawiki.org/specs/html/1.0.0"',
-   },
-   body: "\nhttp://purl.org/dc/terms/ mw: 
http://mediawiki.org/rdf/\"; 
about=\"http://localhost/index.php/Special:Redirect/revision/1\";>http://localhost/index.php/Special:Redirect/\";>http://localhost/index.php/Main_Page\"/>Main_Pagehttp://localhost/index.php/\"/>MediaWiki has been successfully installed.\n\nConsult the User's Guide 
for information on using the wiki software.\n\n Getting 
started \n Configuration settings list\n MediaWiki FAQ\n https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce\"; 
id=\"mwDA\">MediaWiki release mailing list\n Localise MediaWiki for your langua

[MediaWiki-commits] [Gerrit] Better faking of onselectionchange - change (VisualEditor/VisualEditor)

2015-11-11 Thread DLynch (Code Review)
DLynch has uploaded a new change for review.

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

Change subject: Better faking of onselectionchange
..

Better faking of onselectionchange

Improve our faking by having fake selectionchange trigger immediately
after mousedown events as well.

We were only looking at mousemove when faking selectionchange, but
real selectionchange events also fire when clicking moves the cursor.
This meant that context items wouldn't reliably appear if you clicked
into them.

Bug: T114333
Change-Id: I9d69cd9f54457421ea01dff36fd621190bfc9b4a
---
M src/ce/ve.ce.Surface.js
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/13/252613/1

diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js
index 919e63a..19fed22 100644
--- a/src/ce/ve.ce.Surface.js
+++ b/src/ce/ve.ce.Surface.js
@@ -38,7 +38,7 @@
this.eventSequencer = new ve.EventSequencer( [
'keydown', 'keypress', 'keyup',
'compositionstart', 'compositionend',
-   'input'
+   'input', 'mousedown'
] );
this.clipboard = [];
this.clipboardId = String( Math.random() );
@@ -132,7 +132,13 @@
if ( this.hasSelectionChangeEvents ) {
this.$document.on( 'selectionchange', 
this.onDocumentSelectionChange.bind( this ) );
} else {
+   // fake selection change events; mousemove gets optimized away 
if we're not dragging
+   // mousedown needs to run after nativemousedown, because 
otherwise the selection hasn't
+   // finished changigng
this.$documentNode.on( 'mousemove', 
this.onDocumentSelectionChange.bind( this ) );
+   this.eventSequencer.after( {
+   mousedown: this.onDocumentSelectionChange.bind( this )
+   } );
}
 
this.$element.on( {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d69cd9f54457421ea01dff36fd621190bfc9b4a
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 

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


[MediaWiki-commits] [Gerrit] Don't use array plus to merge SQL condition arrays - change (mediawiki...Flow)

2015-11-11 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Don't use array plus to merge SQL condition arrays
..

Don't use array plus to merge SQL condition arrays

$conditions can contain an unkeyed value (i.e. its key is zero),
so using + will cause the first unkeyed value in the other array
to be dropped. The dropped value was 'workflow_id = tree_ancestor_id';
dropping that broke the join between the workflow table and the other
tables and caused the workflow_namespace condition to be ignored.

The consequence of this was that the namespace filter in Special:Contributions
wasn't applied to summary edits.

Change-Id: Idc1ff65123c35a9ae3623e744f2964cf2886bbaf
---
M includes/Formatter/ContributionsQuery.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/includes/Formatter/ContributionsQuery.php 
b/includes/Formatter/ContributionsQuery.php
index 8b85adb..972813d 100644
--- a/includes/Formatter/ContributionsQuery.php
+++ b/includes/Formatter/ContributionsQuery.php
@@ -245,11 +245,11 @@
return $dbr->select(
array( 'flow_revision', 
'flow_workflow', 'flow_tree_node' ),
array( '*' ),
-   $conditions + array(
+   array_merge( $conditions, array(
'workflow_id = 
tree_ancestor_id',
'tree_descendant_id = 
rev_type_id',
'rev_type' => 'post-summary'
-   ),
+   ) ),
__METHOD__,
array(
'LIMIT' => $limit,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc1ff65123c35a9ae3623e744f2964cf2886bbaf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] [DO NOT MERGE] Experimentally adding expandable items to not... - change (mediawiki...Echo)

2015-11-11 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review.

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

Change subject: [DO NOT MERGE] Experimentally adding expandable items to 
notification widgets
..

[DO NOT MERGE] Experimentally adding expandable items to notification widgets

This is an experimental branch for compraison. Another commit is under works
for the actual change. DO NOT MERGE.

Change-Id: I2bb3dabe08236625381d95f68a191e70e683af98
---
M Resources.php
M i18n/en.json
M i18n/qqq.json
M modules/demo/data/message_new.json
M modules/demo/widgets/mw.echo.demo.Page.js
M modules/nojs/mw.echo.notifications.less
A modules/ooui/mw.echo.ui.ExpandableNotificationItemWidget.js
A modules/ooui/mw.echo.ui.NotificationItemWidget.js
D modules/ooui/mw.echo.ui.NotificationOptionWidget.js
M modules/ooui/mw.echo.ui.NotificationsWidget.js
A modules/ooui/styles/mw.echo.ui.ExpandableNotificationItemWidget.less
R modules/ooui/styles/mw.echo.ui.NotificationItemWidget.less
R modules/ooui/styles/mw.echo.ui.NotificationItemWidget.modern.less
A modules/viewmodel/mw.echo.dm.ExternalAPIHandler.js
M modules/viewmodel/mw.echo.dm.NotificationItem.js
M modules/viewmodel/mw.echo.dm.NotificationsModel.js
A modules/viewmodel/mw.echo.dm.PrepopulatedNotificationsModel.js
M tests/browser/features/support/pages/article_page.rb
18 files changed, 747 insertions(+), 197 deletions(-)


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

diff --git a/Resources.php b/Resources.php
index 15f2e56..9f32bbe 100644
--- a/Resources.php
+++ b/Resources.php
@@ -35,13 +35,15 @@
'ooui/mw.echo.ui.js',
'ooui/mw.echo.ui.PlaceholderOptionWidget.js',
'ooui/mw.echo.ui.NotificationsWidget.js',
-   'ooui/mw.echo.ui.NotificationOptionWidget.js',
+   'ooui/mw.echo.ui.NotificationItemWidget.js',
+   'ooui/mw.echo.ui.ExpandableNotificationItemWidget.js',
'ooui/mw.echo.ui.BadgeLinkWidget.js',
'ooui/mw.echo.ui.NotificationBadgeWidget.js'
),
'styles' => array(
'ooui/styles/mw.echo.ui.NotificationsWidget.less',
-   'ooui/styles/mw.echo.ui.NotificationOptionWidget.less',
+   'ooui/styles/mw.echo.ui.NotificationItemWidget.less',
+   
'ooui/styles/mw.echo.ui.ExpandableNotificationItemWidget.less',
'ooui/styles/mw.echo.ui.NotificationBadgeWidget.less'
),
'skinStyles' => array(
@@ -50,7 +52,7 @@

'ooui/styles/mw.echo.ui.NotificationBadgeWidget.monobook.less'
),
'modern' => array(
-   
'ooui/styles/mw.echo.ui.NotificationOptionWidget.modern.less',
+   
'ooui/styles/mw.echo.ui.NotificationItemWidget.modern.less',

'ooui/styles/mw.echo.ui.NotificationBadgeWidget.modern.less'
)
),
@@ -62,6 +64,12 @@
'ext.echo.logger',
'mediawiki.jqueryMsg',
'mediawiki.language',
+   // OOJS-UI icons
+   // TODO: We are only using 1-2 icons from each
+   // bundle; split them up to our own bundle so we
+   // don't load heavy icons for nothing
+   'oojs-ui.styles.icons-user',
+   'oojs-ui.styles.icons-alerts',
),
'messages' => array(
'echo-overlay-link',
@@ -73,6 +81,7 @@
'echo-notification-alert-text-only',
'echo-notification-message-text-only',
'echo-email-batch-bullet',
+   'notification-link-text-expand-all',
'echo-notification-placeholder',
'tooltip-pt-notifications-alert',
'tooltip-pt-notifications-message',
@@ -87,6 +96,7 @@
'viewmodel/mw.echo.dm.NotificationItem.js',
'viewmodel/mw.echo.dm.AbstractAPIHandler.js',
'viewmodel/mw.echo.dm.APIHandler.js',
+   'viewmodel/mw.echo.dm.ExternalAPIHandler.js',
'viewmodel/mw.echo.dm.List.js',
'viewmodel/mw.echo.dm.SortedList.js',
'viewmodel/mw.echo.dm.NotificationList.js',
@@ -94,6 +104,7 @@
),
'dependencies' => array(
'mediawiki.api',
+   'mediawiki.ForeignApi',
'oojs'
),
'messages' => array(
diff --git a/i18

[MediaWiki-commits] [Gerrit] Remove spammy wfDebug() from LocalFile::loadFromCache() - change (mediawiki/core)

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

Change subject: Remove spammy wfDebug() from LocalFile::loadFromCache()
..


Remove spammy wfDebug() from LocalFile::loadFromCache()

Change-Id: I36ad31f197ec8f71c97e6a8673ac5ca979f8d9ab
---
M includes/filerepo/file/LocalFile.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index 12d4007..1a33538 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -256,7 +256,6 @@
 
// Check if the key existed and belongs to this version of 
MediaWiki
if ( is_array( $cachedValues ) && $cachedValues['version'] == 
MW_FILE_VERSION ) {
-   wfDebug( "Pulling file metadata from cache key $key\n" 
);
$this->fileExists = $cachedValues['fileExists'];
if ( $this->fileExists ) {
$this->setProps( $cachedValues );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36ad31f197ec8f71c97e6a8673ac5ca979f8d9ab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] resourceloader: Remove deprecated MessageBlobStore::getInsta... - change (mediawiki/core)

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

Change subject: resourceloader: Remove deprecated 
MessageBlobStore::getInstance()
..


resourceloader: Remove deprecated MessageBlobStore::getInstance()

Deprecated since MediaWiki 1.25.
Not used anywhere in public Wikimedia Git.

Change-Id: Iaa31d0e83b95fb033c62430bc3fc4dd66af16906
---
M RELEASE-NOTES-1.27
M includes/cache/MessageBlobStore.php
2 files changed, 1 insertion(+), 12 deletions(-)

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



diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index 6019a81..127eba7 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -115,6 +115,7 @@
 * LinkCache::getGoodLinks and LinkCache::getBadLinks were removed (deprecated 
in 1.26).
 * WikiPage::doQuickEdit() was removed (deprecated since 1.21).
 * Removed SiteObject and SiteArray classes (deprecated in 1.21).
+* MessageBlobStore::getInstance() was removed (deprecated since 1.25).
 
 == Compatibility ==
 
diff --git a/includes/cache/MessageBlobStore.php 
b/includes/cache/MessageBlobStore.php
index dcb358f..4f0824f 100644
--- a/includes/cache/MessageBlobStore.php
+++ b/includes/cache/MessageBlobStore.php
@@ -52,18 +52,6 @@
}
 
/**
-* Get the singleton instance
-*
-* @since 1.24
-* @deprecated since 1.25
-* @return MessageBlobStore
-*/
-   public static function getInstance() {
-   wfDeprecated( __METHOD__, '1.25' );
-   return new self;
-   }
-
-   /**
 * Get the message blobs for a set of modules
 *
 * @param ResourceLoader $resourceLoader

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa31d0e83b95fb033c62430bc3fc4dd66af16906
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use null for abstract methods and correct documentation - change (oojs/ui)

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

Change subject: Use null for abstract methods and correct documentation
..


Use null for abstract methods and correct documentation

Most methods documented as @abstract are not.

Bug: T54482
Change-Id: I4e1883064cd573c237a41612c4897e633bd1fda6
---
M src/Dialog.js
M src/Tool.js
M src/Window.js
M src/core.js
4 files changed, 4 insertions(+), 16 deletions(-)

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



diff --git a/src/Dialog.js b/src/Dialog.js
index 5294681..e7663fb 100644
--- a/src/Dialog.js
+++ b/src/Dialog.js
@@ -192,7 +192,6 @@
  * accept steps to the process the parent method provides using the {@link 
OO.ui.Process#first 'first'}
  * and {@link OO.ui.Process#next 'next'} methods of OO.ui.Process.
  *
- * @abstract
  * @param {string} [action] Symbolic name of action
  * @return {OO.ui.Process} Action process
  */
diff --git a/src/Tool.js b/src/Tool.js
index b28c80c..c85057e 100644
--- a/src/Tool.js
+++ b/src/Tool.js
@@ -196,28 +196,22 @@
  *
  * This is an abstract method that must be overridden in a concrete subclass.
  *
+ * @method
  * @protected
  * @abstract
  */
-OO.ui.Tool.prototype.onUpdateState = function () {
-   throw new Error(
-   'OO.ui.Tool.onUpdateState not implemented in this subclass:' + 
this.constructor
-   );
-};
+OO.ui.Tool.prototype.onUpdateState = null;
 
 /**
  * Handle the tool being selected.
  *
  * This is an abstract method that must be overridden in a concrete subclass.
  *
+ * @method
  * @protected
  * @abstract
  */
-OO.ui.Tool.prototype.onSelect = function () {
-   throw new Error(
-   'OO.ui.Tool.onSelect not implemented in this subclass:' + 
this.constructor
-   );
-};
+OO.ui.Tool.prototype.onSelect = null;
 
 /**
  * Check if the tool is active.
diff --git a/src/Window.js b/src/Window.js
index 4ac032f..03d8544 100644
--- a/src/Window.js
+++ b/src/Window.js
@@ -312,7 +312,6 @@
  * To add window content that persists between openings, you may wish to use 
the #initialize method
  * instead.
  *
- * @abstract
  * @param {Object} [data] Window opening data
  * @return {OO.ui.Process} Setup process
  */
@@ -331,7 +330,6 @@
  * provides using the {@link OO.ui.Process#first first} and {@link 
OO.ui.Process#next next}
  * methods of OO.ui.Process.
  *
- * @abstract
  * @param {Object} [data] Window opening data
  * @return {OO.ui.Process} Ready process
  */
@@ -350,7 +348,6 @@
  * using the {@link OO.ui.Process#first first} and {@link OO.ui.Process#next 
next} methods
  * of OO.ui.Process.
  *
- * @abstract
  * @param {Object} [data] Window closing data
  * @return {OO.ui.Process} Hold process
  */
@@ -369,7 +366,6 @@
  * using the {@link OO.ui.Process#first first} and {@link OO.ui.Process#next 
next} methods
  * of OO.ui.Process.
  *
- * @abstract
  * @param {Object} [data] Window closing data
  * @return {OO.ui.Process} Teardown process
  */
diff --git a/src/core.js b/src/core.js
index f7bd19f..8c8dbb5 100644
--- a/src/core.js
+++ b/src/core.js
@@ -336,7 +336,6 @@
 * Alternative implementations of OO.ui.msg may use any substitution 
system they like, as long as
 * they support unnamed, ordered message parameters.
 *
-* @abstract
 * @param {string} key Message key
 * @param {Mixed...} [params] Message parameters
 * @return {string} Translated message with parameters substituted

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e1883064cd573c237a41612c4897e633bd1fda6
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
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] Refactor wmgQuickSurveysConfig to wgQuickSurveysConfig - change (operations/mediawiki-config)

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

Change subject: Refactor wmgQuickSurveysConfig to wgQuickSurveysConfig
..


Refactor wmgQuickSurveysConfig to wgQuickSurveysConfig

QuickSurveys should be loading a survey on testwiki but isn't.
This should fix that.

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 11fc90e..60f44d2 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -15804,7 +15804,7 @@
'testwiki' => true,
 ),
 
-'wmgQuickSurveysConfig' => array(
+'wgQuickSurveysConfig' => array(
'default' => array(),
'testwiki' => array(
array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6120771e67323acb3464a19962dac3a8d286
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jhobs 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jhobs 
Gerrit-Reviewer: Phuedx 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update restbase to 140518b - change (mediawiki...deploy)

2015-11-11 Thread GWicke (Code Review)
GWicke has submitted this change and it was merged.

Change subject: Update restbase to 140518b
..


Update restbase to 140518b

List of changes:
5c316c0 Use correct Parsoid v3 path for POST of pagebundle.
13ac27f Don't retry failed Parsoid POST requests

Change-Id: Ie410e2c88e140d120d9b369706761f2057d414e3
---
M restbase
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/restbase b/restbase
index 0b094b4..140518b 16
--- a/restbase
+++ b/restbase
-Subproject commit 0b094b445907e20c53885b87fffea9a0b201a59c
+Subproject commit 140518b793d95b0b3c48e6f92b8be8430a78994e

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie410e2c88e140d120d9b369706761f2057d414e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/restbase/deploy
Gerrit-Branch: master
Gerrit-Owner: GWicke 
Gerrit-Reviewer: GWicke 

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


[MediaWiki-commits] [Gerrit] Update restbase to 140518b - change (mediawiki...deploy)

2015-11-11 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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

Change subject: Update restbase to 140518b
..

Update restbase to 140518b

List of changes:
5c316c0 Use correct Parsoid v3 path for POST of pagebundle.
13ac27f Don't retry failed Parsoid POST requests

Change-Id: Ie410e2c88e140d120d9b369706761f2057d414e3
---
M restbase
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/restbase/deploy 
refs/changes/10/252610/1

diff --git a/restbase b/restbase
index 0b094b4..140518b 16
--- a/restbase
+++ b/restbase
-Subproject commit 0b094b445907e20c53885b87fffea9a0b201a59c
+Subproject commit 140518b793d95b0b3c48e6f92b8be8430a78994e

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie410e2c88e140d120d9b369706761f2057d414e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/restbase/deploy
Gerrit-Branch: master
Gerrit-Owner: GWicke 

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


[MediaWiki-commits] [Gerrit] resourceloader: Remove deprecated MessageBlobStore::getInsta... - change (mediawiki/core)

2015-11-11 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: resourceloader: Remove deprecated 
MessageBlobStore::getInstance()
..

resourceloader: Remove deprecated MessageBlobStore::getInstance()

Deprecated since MediaWiki 1.25.
Not used anywhere in public Wikimedia Git.

Change-Id: Iaa31d0e83b95fb033c62430bc3fc4dd66af16906
---
M RELEASE-NOTES-1.27
M includes/cache/MessageBlobStore.php
2 files changed, 1 insertion(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/09/252609/1

diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index 6019a81..127eba7 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -115,6 +115,7 @@
 * LinkCache::getGoodLinks and LinkCache::getBadLinks were removed (deprecated 
in 1.26).
 * WikiPage::doQuickEdit() was removed (deprecated since 1.21).
 * Removed SiteObject and SiteArray classes (deprecated in 1.21).
+* MessageBlobStore::getInstance() was removed (deprecated since 1.25).
 
 == Compatibility ==
 
diff --git a/includes/cache/MessageBlobStore.php 
b/includes/cache/MessageBlobStore.php
index dcb358f..4f0824f 100644
--- a/includes/cache/MessageBlobStore.php
+++ b/includes/cache/MessageBlobStore.php
@@ -52,18 +52,6 @@
}
 
/**
-* Get the singleton instance
-*
-* @since 1.24
-* @deprecated since 1.25
-* @return MessageBlobStore
-*/
-   public static function getInstance() {
-   wfDeprecated( __METHOD__, '1.25' );
-   return new self;
-   }
-
-   /**
 * Get the message blobs for a set of modules
 *
 * @param ResourceLoader $resourceLoader

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa31d0e83b95fb033c62430bc3fc4dd66af16906
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Add per-server JobQueueRedis aggregation - change (mediawiki/core)

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

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

Change subject: Add per-server JobQueueRedis aggregation
..

Add per-server JobQueueRedis aggregation

* Start tracking queues with non-abandoned jobs per partition server.
  The s-queuesWithJobs key can easily be queried too see which
  queues need to have periodic tasks run (or for debugging).
* This is requirement for the redis jobchron service to be able to
  avoid hitting (type X wikis) number of queues for periodic tasks,
  when only a tiny fraction of those actually have any jobs. For WMF,
  there are over 30K queues, most of them empty, so doing that can help
  lower redis-server CPU (or at least make jobchron more responsive).
* This also allows for jobchron to manage the aggregator by taking the
  per-server aggregator sets and merging them. This scales much better
  as there are only a modest number of these daemons (18 for WMF) but
  vastly more web thread pushing jobs (and thus numerous connections).

Change-Id: I1549f0edc78cc4004dd887b475dec4c0ebd306c6
---
M includes/jobqueue/JobQueueRedis.php
1 file changed, 54 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/08/252608/1

diff --git a/includes/jobqueue/JobQueueRedis.php 
b/includes/jobqueue/JobQueueRedis.php
index deb5aa5..9ffbcdd 100644
--- a/includes/jobqueue/JobQueueRedis.php
+++ b/includes/jobqueue/JobQueueRedis.php
@@ -27,7 +27,7 @@
  * This is a faster and less resource-intensive job queue than JobQueueDB.
  * All data for a queue using this class is placed into one redis server.
  *
- * There are eight main redis keys used to track jobs:
+ * There are eight main redis keys (per queue) used to track jobs:
  *   - l-unclaimed  : A list of job IDs used for ready unclaimed jobs
  *   - z-claimed: A sorted set of (job ID, UNIX timestamp as score) used 
for job retries
  *   - z-abandoned  : A sorted set of (job ID, UNIX timestamp as score) used 
for broken jobs
@@ -42,6 +42,9 @@
  * there should be no other such jobs with that SHA1. Every h-idBySha1 entry 
has an h-sha1ById
  * entry and every h-sha1ById must refer to an ID that is l-unclaimed. If a 
job has its
  * ID in z-claimed or z-abandoned, then it must also have an h-attempts entry 
for its ID.
+ *
+ * The following keys are used to track queue states:
+ *   - s-queuesWithJobs : A set of all queues with non-abandoned jobs
  *
  * Additionally, "rootjob:* keys track "root jobs" used for additional 
de-duplication.
  * Aside from root job keys, all keys have no expiry, and are only removed 
when jobs are run.
@@ -239,7 +242,8 @@
 * @throws RedisException
 */
protected function pushBlobs( RedisConnRef $conn, array $items ) {
-   $args = array(); // ([id, sha1, rtime, blob [, id, sha1, rtime, 
blob ... ] ] )
+   $args = array( $this->encQueueName() );
+   // Next args come in 4s ([id, sha1, rtime, blob [, id, sha1, 
rtime, blob ... ] ] )
foreach ( $items as $item ) {
$args[] = (string)$item['uuid'];
$args[] = (string)$item['sha1'];
@@ -248,10 +252,17 @@
}
static $script =
 << 0 then
@@ -269,6 +280,8 @@
pushed = pushed + 1
end
end
+   -- Mark this queue as having jobs
+   redis.call('sAdd',kQwJobs,queueId)
return pushed
 LUA;
return $conn->luaEval( $script,
@@ -279,10 +292,11 @@
$this->getQueueKey( 'h-idBySha1' ), # 
KEYS[3]
$this->getQueueKey( 'z-delayed' ), # 
KEYS[4]
$this->getQueueKey( 'h-data' ), # 
KEYS[5]
+   $this->getGlobalKey( 's-queuesWithJobs' 
), # KEYS[6]
),
$args
),
-   5 # number of first argument(s) that are keys
+   6 # number of first argument(s) that are keys
);
}
 
@@ -327,16 +341,20 @@
protected function popAndAcquireBlob( RedisConnRef $conn ) {
static $script =
 <getQueueKey( 'h-attempts' ), # KEYS[5]
$this->getQueueKey( 'h-data' ), # KEYS[6]
-   time(), # ARGV[1] (injected to be 
replication-safe)
+   $this->getGlobalKey( 's-queuesWithJobs' ), # 
KEYS[7]
+   $this->encQueueName(), # ARGV[1]
+   time(), # ARGV[2] (injected to be 
replication-safe)
),
-   6 # number of first argumen

[MediaWiki-commits] [Gerrit] mailmap: Remove unused alias for ttij...@wikimedia.org - change (VisualEditor/VisualEditor)

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

Change subject: mailmap: Remove unused alias for ttij...@wikimedia.org
..


mailmap: Remove unused alias for ttij...@wikimedia.org

This was accidentally added based on AUTHORS.txt (Fixed in 2c3a2f7).

This address was never used as either author or commiter in the history
of this repository (based on grepping 'git log --format='%ae %ce').

Change-Id: Ifb21d881e210be18acea227a3297daee3c7ba122
---
M .mailmap
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/.mailmap b/.mailmap
index 1cdaa41..a75cda6 100644
--- a/.mailmap
+++ b/.mailmap
@@ -68,7 +68,6 @@
 Thalia Chan  
 Thalia Chan 
 Timo Tijhof 
-Timo Tijhof  
 Timo Tijhof  
 Trevor Parscal 
 Trevor Parscal  

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb21d881e210be18acea227a3297daee3c7ba122
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
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] T115327: Log errors passed along in express - change (mediawiki...parsoid)

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

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

Change subject: T115327: Log errors passed along in express
..

T115327: Log errors passed along in express

 * Use our logger on the chained errors from helpers, like the
   body-parser.

 * Also, prefer res.send when passing data.

 * Maybe the finalhandler deserves a spot in package.json

Change-Id: Ibc870e15c58b45f2cf9428d8d5541480c8b8e469
---
M lib/api/ParsoidService.js
M lib/api/apiUtils.js
M lib/api/routes.js
3 files changed, 21 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/07/252607/1

diff --git a/lib/api/ParsoidService.js b/lib/api/ParsoidService.js
index a1c962b..d44cb08 100644
--- a/lib/api/ParsoidService.js
+++ b/lib/api/ParsoidService.js
@@ -6,6 +6,7 @@
 
 // global includes
 var express = require('express');
+var finalHandler = require('express/node_modules/finalhandler');  // Suspect!
 var compression = require('compression');
 var hbs = require('express-handlebars');
 var favicon = require('serve-favicon');
@@ -111,6 +112,22 @@
next();
});
 
+   // Log unhandleds errors passed along with our logger.
+   var logError = function(err, req, res) {
+   var logger = res.locals.env ? res.locals.env.logger : 
processLogger;
+   var args = ['warning', req.method, req.originalUrl, err];
+   if (err.type === 'entity.too.large') {
+   // Add the expected length of the stream.
+   args.push('expected: ' + err.expected);
+   }
+   logger.log.apply(logger, args);
+   };
+
+   app.use(function(err, req, res, next) {
+   var done = finalHandler(req, res, { onerror: logError });
+   done(err);
+   });
+
// Catch errors
app.on('error', function(err) {
if (err.errno === 'EADDRINUSE') {
diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js
index e62b0f7..e39901b 100644
--- a/lib/api/apiUtils.js
+++ b/lib/api/apiUtils.js
@@ -67,24 +67,6 @@
 };
 
 /**
- * End response, but only if response hasn't been sent.
- *
- * @method
- * @param {Response} res The response object from our routing function.
- * @param {MWParserEnvironment} env
- * @param {String|Buffer} [out]
- */
-apiUtils.endResponse = function(res, env, out) {
-   if (env.responseSent) {
-   return;
-   } else {
-   env.responseSent = true;
-   res.end(out);
-   env.log("end/response");
-   }
-};
-
-/**
  * Send response, but only if response hasn't been sent.
  *
  * @method
@@ -495,7 +477,7 @@
innerXML: res.locals.bodyOnly && res.locals.apiVersion 
> 2,
}).str;
apiUtils.setHeader(res, env, 'content-type', 
apiUtils.HTML_CONTENT_TYPE);
-   apiUtils.endResponse(res, env, output);
+   apiUtils.sendResponse(res, env, output);
}
 
if (timer) {
diff --git a/lib/api/routes.js b/lib/api/routes.js
index 087ea3e..0c3e0d3 100644
--- a/lib/api/routes.js
+++ b/lib/api/routes.js
@@ -126,7 +126,7 @@
apiUtils.sendResponse(res, env, 
logData.fullMsg(), logData.flatLogObject().code || 500);
}).catch(function(e) {
console.error(e.stack || e);
-   res.end(e.stack || e);
+   res.end();
}).nodify(callback);
}
return Promise.resolve().nodify(callback);
@@ -173,7 +173,7 @@
 
// robots.txt: no indexing.
routes.robots = function(req, res) {
-   res.end("User-agent: *\nDisallow: /\n");
+   res.send("User-agent: *\nDisallow: /\n");
};
 
// Return Parsoid version based on package.json + git sha1 if available
@@ -434,7 +434,7 @@
.then(apiUtils.endHtml2wt)
.then(function(output) {
apiUtils.setHeader(res, env, 'content-type', 
apiUtils.WIKITEXT_CONTENT_TYPE);
-   apiUtils.endResponse(res, env, output);
+   apiUtils.sendResponse(res, env, output);
});
return apiUtils.cpuTimeout(p, res)
.catch(apiUtils.timeoutResp.bind(null, env));

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

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

___

[MediaWiki-commits] [Gerrit] Deploy QuickSurveys to English Wikipedia - change (operations/mediawiki-config)

2015-11-11 Thread Jhobs (Code Review)
Jhobs has uploaded a new change for review.

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

Change subject: Deploy QuickSurveys to English Wikipedia
..

Deploy QuickSurveys to English Wikipedia

 * Enable QuickSurveys on English Wikipedia
 * Disable QuickSurveys on testwiki

Bug: T110661
Change-Id: I6d4d77a2cc34fe113f87cefe8ce8f2c4a9b36c59
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 11fc90e..eb8cdb3 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -15801,12 +15801,12 @@
 // https://phabricator.wikimedia.org/T110661
 'wmgUseQuickSurveys' => array(
'default' => false,
-   'testwiki' => true,
+   'enwiki' => true,
 ),
 
 'wmgQuickSurveysConfig' => array(
'default' => array(),
-   'testwiki' => array(
+   'enwiki' => array(
array(
// T113443
"name" => "reader-segmentation-1",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d4d77a2cc34fe113f87cefe8ce8f2c4a9b36c59
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jhobs 

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


[MediaWiki-commits] [Gerrit] Use null for abstract methods and correct documentation - change (oojs/ui)

2015-11-11 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Use null for abstract methods and correct documentation
..

Use null for abstract methods and correct documentation

Most methods documented as @abstract are not.

Bug: T54482
Change-Id: I4e1883064cd573c237a41612c4897e633bd1fda6
---
M src/Dialog.js
M src/Tool.js
M src/Window.js
M src/core.js
4 files changed, 2 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/05/252605/1

diff --git a/src/Dialog.js b/src/Dialog.js
index 5294681..e7663fb 100644
--- a/src/Dialog.js
+++ b/src/Dialog.js
@@ -192,7 +192,6 @@
  * accept steps to the process the parent method provides using the {@link 
OO.ui.Process#first 'first'}
  * and {@link OO.ui.Process#next 'next'} methods of OO.ui.Process.
  *
- * @abstract
  * @param {string} [action] Symbolic name of action
  * @return {OO.ui.Process} Action process
  */
diff --git a/src/Tool.js b/src/Tool.js
index b28c80c..12e9342 100644
--- a/src/Tool.js
+++ b/src/Tool.js
@@ -199,11 +199,7 @@
  * @protected
  * @abstract
  */
-OO.ui.Tool.prototype.onUpdateState = function () {
-   throw new Error(
-   'OO.ui.Tool.onUpdateState not implemented in this subclass:' + 
this.constructor
-   );
-};
+OO.ui.Tool.prototype.onUpdateState = null;
 
 /**
  * Handle the tool being selected.
@@ -213,11 +209,7 @@
  * @protected
  * @abstract
  */
-OO.ui.Tool.prototype.onSelect = function () {
-   throw new Error(
-   'OO.ui.Tool.onSelect not implemented in this subclass:' + 
this.constructor
-   );
-};
+OO.ui.Tool.prototype.onSelect = null;
 
 /**
  * Check if the tool is active.
diff --git a/src/Window.js b/src/Window.js
index 4ac032f..03d8544 100644
--- a/src/Window.js
+++ b/src/Window.js
@@ -312,7 +312,6 @@
  * To add window content that persists between openings, you may wish to use 
the #initialize method
  * instead.
  *
- * @abstract
  * @param {Object} [data] Window opening data
  * @return {OO.ui.Process} Setup process
  */
@@ -331,7 +330,6 @@
  * provides using the {@link OO.ui.Process#first first} and {@link 
OO.ui.Process#next next}
  * methods of OO.ui.Process.
  *
- * @abstract
  * @param {Object} [data] Window opening data
  * @return {OO.ui.Process} Ready process
  */
@@ -350,7 +348,6 @@
  * using the {@link OO.ui.Process#first first} and {@link OO.ui.Process#next 
next} methods
  * of OO.ui.Process.
  *
- * @abstract
  * @param {Object} [data] Window closing data
  * @return {OO.ui.Process} Hold process
  */
@@ -369,7 +366,6 @@
  * using the {@link OO.ui.Process#first first} and {@link OO.ui.Process#next 
next} methods
  * of OO.ui.Process.
  *
- * @abstract
  * @param {Object} [data] Window closing data
  * @return {OO.ui.Process} Teardown process
  */
diff --git a/src/core.js b/src/core.js
index f7bd19f..8c8dbb5 100644
--- a/src/core.js
+++ b/src/core.js
@@ -336,7 +336,6 @@
 * Alternative implementations of OO.ui.msg may use any substitution 
system they like, as long as
 * they support unnamed, ordered message parameters.
 *
-* @abstract
 * @param {string} key Message key
 * @param {Mixed...} [params] Message parameters
 * @return {string} Translated message with parameters substituted

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e1883064cd573c237a41612c4897e633bd1fda6
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] mailmap: Remove unused alias for ttij...@wikimedia.org - change (mediawiki...VisualEditor)

2015-11-11 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: mailmap: Remove unused alias for ttij...@wikimedia.org
..

mailmap: Remove unused alias for ttij...@wikimedia.org

This was accidentally added based on AUTHORS.txt (Fixed in 2c3a2f7).

This address was never used as either author or commiter in the history of this 
repository (based on grepping 'git log --format='%ae %ce').

Change-Id: Ifb21d881e210be18acea227a3297daee3c7ba122
---
M .mailmap
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/.mailmap b/.mailmap
index a06b804..2e2c574 100644
--- a/.mailmap
+++ b/.mailmap
@@ -69,7 +69,6 @@
 Thalia Chan 
 Thalia Chan  
 Timo Tijhof 
-Timo Tijhof  
 Timo Tijhof  
 Trevor Parscal 
 Trevor Parscal  

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

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

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


[MediaWiki-commits] [Gerrit] mailmap: Remove unused alias for ttij...@wikimedia.org - change (VisualEditor/VisualEditor)

2015-11-11 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: mailmap: Remove unused alias for ttij...@wikimedia.org
..

mailmap: Remove unused alias for ttij...@wikimedia.org

This was accidentally added based on AUTHORS.txt (Fixed in 2c3a2f7).

This address was never used as either author or commiter in the history of this 
repository (based on grepping 'git log --format='%ae %ce').

Change-Id: Ifb21d881e210be18acea227a3297daee3c7ba122
---
M .mailmap
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/03/252603/1

diff --git a/.mailmap b/.mailmap
index 1cdaa41..a75cda6 100644
--- a/.mailmap
+++ b/.mailmap
@@ -68,7 +68,6 @@
 Thalia Chan  
 Thalia Chan 
 Timo Tijhof 
-Timo Tijhof  
 Timo Tijhof  
 Trevor Parscal 
 Trevor Parscal  

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb21d881e210be18acea227a3297daee3c7ba122
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Random numbers now get another digit if too many failed atte... - change (mediawiki...SemanticForms)

2015-11-11 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Random numbers now get another digit if too many failed attempts
..


Random numbers now get another digit if too many failed attempts

Change-Id: I18f4beb9e26e9f79517019bdbe76ed6d4c75b8a2
---
M includes/SF_AutoeditAPI.php
1 file changed, 17 insertions(+), 8 deletions(-)

Approvals:
  Yaron Koren: Checked; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/SF_AutoeditAPI.php b/includes/SF_AutoeditAPI.php
index c1a54bc..f803fa1 100644
--- a/includes/SF_AutoeditAPI.php
+++ b/includes/SF_AutoeditAPI.php
@@ -723,19 +723,28 @@
throw new MWException( wfMessage( 
'sf_autoedit_invalidtargetspecified', trim( preg_replace( '//', $titleNumber, $targetNameFormula ) ) )->parse() );
}
 
-   // if title exists already cycle through numbers for 
this tag until
-   // we find one that gives a nonexistent page title;
-   //
-   // can not use $targetTitle->exists(); it does not use
-   // Title::GAID_FOR_UPDATE, which is needed to get 
correct data from
-   // cache; use $targetTitle->getArticleID() instead
+   // If title exists already, cycle through numbers for
+   // this tag until we find one that gives a nonexistent
+   // page title.
+   // We cannot use $targetTitle->exists(); it does not use
+   // Title::GAID_FOR_UPDATE, which is needed to get
+   // correct data from cache; use
+   // $targetTitle->getArticleID() instead.
+   $numAttemptsAtTitle = 0;
while ( $targetTitle->getArticleID( 
Title::GAID_FOR_UPDATE ) !== 0 ) {
+   $numAttemptsAtTitle++;
 
if ( $isRandom ) {
+   // If the set of pages is "crowded"
+   // already, go one digit higher.
+   if ( $numAttemptsAtTitle > 20 ) {
+   $randomNumDigits++;
+   }
$titleNumber = 
SFUtils::makeRandomNumber( $randomNumDigits, $randomNumHasPadding );
}
-   // if title number is blank, change it to 2; 
otherwise,
-   // increment it, and if necessary pad it with 
leading 0s as well
+   // If title number is blank, change it to 2;
+   // otherwise, increment it, and if necessary
+   // pad it with leading 0s as well.
elseif ( $titleNumber == "" ) {
$titleNumber = 2;
} else {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I18f4beb9e26e9f79517019bdbe76ed6d4c75b8a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Random numbers now get another digit if too many failed atte... - change (mediawiki...SemanticForms)

2015-11-11 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

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

Change subject: Random numbers now get another digit if too many failed attempts
..

Random numbers now get another digit if too many failed attempts

Change-Id: I18f4beb9e26e9f79517019bdbe76ed6d4c75b8a2
---
M includes/SF_AutoeditAPI.php
1 file changed, 17 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms 
refs/changes/02/252602/1

diff --git a/includes/SF_AutoeditAPI.php b/includes/SF_AutoeditAPI.php
index c1a54bc..f803fa1 100644
--- a/includes/SF_AutoeditAPI.php
+++ b/includes/SF_AutoeditAPI.php
@@ -723,19 +723,28 @@
throw new MWException( wfMessage( 
'sf_autoedit_invalidtargetspecified', trim( preg_replace( '//', $titleNumber, $targetNameFormula ) ) )->parse() );
}
 
-   // if title exists already cycle through numbers for 
this tag until
-   // we find one that gives a nonexistent page title;
-   //
-   // can not use $targetTitle->exists(); it does not use
-   // Title::GAID_FOR_UPDATE, which is needed to get 
correct data from
-   // cache; use $targetTitle->getArticleID() instead
+   // If title exists already, cycle through numbers for
+   // this tag until we find one that gives a nonexistent
+   // page title.
+   // We cannot use $targetTitle->exists(); it does not use
+   // Title::GAID_FOR_UPDATE, which is needed to get
+   // correct data from cache; use
+   // $targetTitle->getArticleID() instead.
+   $numAttemptsAtTitle = 0;
while ( $targetTitle->getArticleID( 
Title::GAID_FOR_UPDATE ) !== 0 ) {
+   $numAttemptsAtTitle++;
 
if ( $isRandom ) {
+   // If the set of pages is "crowded"
+   // already, go one digit higher.
+   if ( $numAttemptsAtTitle > 20 ) {
+   $randomNumDigits++;
+   }
$titleNumber = 
SFUtils::makeRandomNumber( $randomNumDigits, $randomNumHasPadding );
}
-   // if title number is blank, change it to 2; 
otherwise,
-   // increment it, and if necessary pad it with 
leading 0s as well
+   // If title number is blank, change it to 2;
+   // otherwise, increment it, and if necessary
+   // pad it with leading 0s as well.
elseif ( $titleNumber == "" ) {
$titleNumber = 2;
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I18f4beb9e26e9f79517019bdbe76ed6d4c75b8a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 

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


[MediaWiki-commits] [Gerrit] Introduce new 'format' template property - change (mediawiki...TemplateData)

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

Change subject: Introduce new 'format' template property
..


Introduce new 'format' template property

Adding format data, which defines the preferred source format
to use when using templates.

Possible formats:
* Inline - all parameters in a single line
* Block - each parameter is in its own line

Bug: T64147
Change-Id: Id856c4a38890526060d0619432f06174d66f7792
---
M Specification.md
M TemplateDataBlob.php
M extension.json
M i18n/en.json
M i18n/qqq.json
M modules/ext.templateDataGenerator.data.js
M modules/ext.templateDataGenerator.ui.tdDialog.js
M tests/TemplateDataBlobTest.php
M tests/ext.templateData.tests.js
9 files changed, 189 insertions(+), 5 deletions(-)

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



diff --git a/Specification.md b/Specification.md
index 6a361a3..0ac3ee1 100644
--- a/Specification.md
+++ b/Specification.md
@@ -97,6 +97,29 @@
 
 Authors MUST ensure that the `maps` object contains only `Map` objects. 
Authors MAY include a parameter in multiple `Map` objects. Authors are NOT 
REQUIRED to reference each parameter in at least one `Map` object.
 
+ 3.1.6 `format`
+* Value: `string` of either `inline` or `block`
+* Default: `inline`
+
+How the template's wikitext representation SHOULD be laid out. Authors MAY 
choose to use this parameter to express that a template will be better 
understood by other human readers of the wikitext representation if a template 
is in one form or the other.
+
+If the parameter is set to `block`, Consumers SHOULD create a wikitext 
representation with a single newline after the template invocation and each 
parameter value, a single space between each pipe and its subsequent parameter 
key, and a space either side of the assignment separator between the parameter 
key and value, like so:
+
+```
+{{Foo
+| bar = baz
+| qux = quux
+}}
+```
+
+If the parameter is set to `inline`, Consumers SHOULD create a wikitext 
representation with no whitespace, like so:
+
+```
+{{Foo|bar=baz|qux=quux}}
+```
+
+In the absence of the parameter being set, the system will supply `inline` as 
a fallback value. Authors are RECOMMENDED to set `inline` explicitly if they 
actively chose to use the template that way.
+
 ### 3.2 Param
 * Value: `Object`
 
diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php
index f05aa16..c1d965a 100644
--- a/TemplateDataBlob.php
+++ b/TemplateDataBlob.php
@@ -47,6 +47,7 @@
$tdb->data->description = null;
$tdb->data->params = new stdClass();
$tdb->data->paramOrder = array();
+   $tdb->data->format = 'inline';
$tdb->data->sets = array();
$tdb->data->maps = new stdClass();
}
@@ -83,6 +84,7 @@
'paramOrder',
'sets',
'maps',
+   'format',
);
 
static $paramKeys = array(
@@ -115,6 +117,11 @@
'wiki-template-name',
);
 
+   static $formats = array(
+   'block',
+   'inline'
+   );
+
static $typeCompatMap = array(
'string/line' => 'line',
'string/wiki-page-name' => 'wiki-page-name',
@@ -144,6 +151,18 @@
$data->description = self::normaliseInterfaceText( 
$data->description );
} else {
$data->description = null;
+   }
+
+   // Root.format
+   if ( isset( $data->format ) ) {
+   if ( !in_array( $data->format, $formats ) ) {
+   return Status::newFatal(
+   'templatedata-invalid-format',
+   'format'
+   );
+   }
+   } else {
+   $data->format = 'inline';
}
 
// Root.params
@@ -674,6 +693,12 @@
$data->description :
wfMessage( 
'templatedata-doc-desc-empty' )->inLanguage( $lang )->text()
)
+   . Html::element(
+   'p',
+   array(),
+   // Messages: templatedata-modal-format-inline, 
templatedata-modal-format-block
+   wfMessage( 'templatedata-doc-format-' . 
$data->format )->inLanguage( $lang )->text()
+   )
. ''
. Html::element(
'caption',
dif

[MediaWiki-commits] [Gerrit] k8s: Add UidEnforcer admission controller - change (operations/puppet)

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

Change subject: k8s: Add UidEnforcer admission controller
..


k8s: Add UidEnforcer admission controller

Change-Id: If25127265e4f39dd3a5665611ec4fa07b50ff537
---
M modules/k8s/templates/initscripts/kube-apiserver.systemd.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/k8s/templates/initscripts/kube-apiserver.systemd.erb 
b/modules/k8s/templates/initscripts/kube-apiserver.systemd.erb
index 70f7222..55a3c39 100644
--- a/modules/k8s/templates/initscripts/kube-apiserver.systemd.erb
+++ b/modules/k8s/templates/initscripts/kube-apiserver.systemd.erb
@@ -8,7 +8,7 @@
 --etcd-servers=<%= @etcd_servers %> \
 --service-cluster-ip-range=192.168.0.0/24 \
 --token-auth-file=/etc/kubernetes/tokenauth \
---admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger \
+
--admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger,UidEnforcer \
 --authorization-mode=ABAC \
 --authorization-policy-file=/etc/kubernetes/abac \
 --tls-private-key-file=/var/lib/kubernetes/ssl/private_keys/server.key \

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If25127265e4f39dd3a5665611ec4fa07b50ff537
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] k8s: Add UidEnforcer admission controller - change (operations/puppet)

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

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

Change subject: k8s: Add UidEnforcer admission controller
..

k8s: Add UidEnforcer admission controller

Change-Id: If25127265e4f39dd3a5665611ec4fa07b50ff537
---
M modules/k8s/templates/initscripts/kube-apiserver.systemd.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/01/252601/1

diff --git a/modules/k8s/templates/initscripts/kube-apiserver.systemd.erb 
b/modules/k8s/templates/initscripts/kube-apiserver.systemd.erb
index 70f7222..55a3c39 100644
--- a/modules/k8s/templates/initscripts/kube-apiserver.systemd.erb
+++ b/modules/k8s/templates/initscripts/kube-apiserver.systemd.erb
@@ -8,7 +8,7 @@
 --etcd-servers=<%= @etcd_servers %> \
 --service-cluster-ip-range=192.168.0.0/24 \
 --token-auth-file=/etc/kubernetes/tokenauth \
---admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger \
+
--admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger,UidEnforcer \
 --authorization-mode=ABAC \
 --authorization-policy-file=/etc/kubernetes/abac \
 --tls-private-key-file=/var/lib/kubernetes/ssl/private_keys/server.key \

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

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

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


[MediaWiki-commits] [Gerrit] group1 wikis to 1.27.0-wmf.6 - change (operations/mediawiki-config)

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

Change subject: group1 wikis to 1.27.0-wmf.6
..


group1 wikis to 1.27.0-wmf.6

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

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



diff --git a/wikiversions.json b/wikiversions.json
index 112b23e..695a7e7 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1 +1 @@
-{"aawiki":"php-1.27.0-wmf.5","aawikibooks":"php-1.27.0-wmf.5","aawiktionary":"php-1.27.0-wmf.5","abwiki":"php-1.27.0-wmf.5","abwiktionary":"php-1.27.0-wmf.5","acewiki":"php-1.27.0-wmf.5","advisorywiki":"php-1.27.0-wmf.5","afwiki":"php-1.27.0-wmf.5","afwikibooks":"php-1.27.0-wmf.5","afwikiquote":"php-1.27.0-wmf.5","afwiktionary":"php-1.27.0-wmf.5","akwiki":"php-1.27.0-wmf.5","akwikibooks":"php-1.27.0-wmf.5","akwiktionary":"php-1.27.0-wmf.5","alswiki":"php-1.27.0-wmf.5","alswikibooks":"php-1.27.0-wmf.5","alswikiquote":"php-1.27.0-wmf.5","alswiktionary":"php-1.27.0-wmf.5","amwiki":"php-1.27.0-wmf.5","amwikiquote":"php-1.27.0-wmf.5","amwiktionary":"php-1.27.0-wmf.5","angwiki":"php-1.27.0-wmf.5","angwikibooks":"php-1.27.0-wmf.5","angwikiquote":"php-1.27.0-wmf.5","angwikisource":"php-1.27.0-wmf.5","angwiktionary":"php-1.27.0-wmf.5","anwiki":"php-1.27.0-wmf.5","anwiktionary":"php-1.27.0-wmf.5","arbcom_dewiki":"php-1.27.0-wmf.5","arbcom_enwiki":"php-1.27.0-wmf.5","arbcom_fiwiki":"php-1.27.0-wmf.5","arbcom_nlwiki":"php-1.27.0-wmf.5","arcwiki":"php-1.27.0-wmf.5","arwiki":"php-1.27.0-wmf.5","arwikibooks":"php-1.27.0-wmf.5","arwikimedia":"php-1.27.0-wmf.5","arwikinews":"php-1.27.0-wmf.5","arwikiquote":"php-1.27.0-wmf.5","arwikisource":"php-1.27.0-wmf.5","arwikiversity":"php-1.27.0-wmf.5","arwiktionary":"php-1.27.0-wmf.5","arzwiki":"php-1.27.0-wmf.5","astwiki":"php-1.27.0-wmf.5","astwikibooks":"php-1.27.0-wmf.5","astwikiquote":"php-1.27.0-wmf.5","astwiktionary":"php-1.27.0-wmf.5","aswiki":"php-1.27.0-wmf.5","aswikibooks":"php-1.27.0-wmf.5","aswikisource":"php-1.27.0-wmf.5","aswiktionary":"php-1.27.0-wmf.5","auditcomwiki":"php-1.27.0-wmf.5","avwiki":"php-1.27.0-wmf.5","avwiktionary":"php-1.27.0-wmf.5","aywiki":"php-1.27.0-wmf.5","aywikibooks":"php-1.27.0-wmf.5","aywiktionary":"php-1.27.0-wmf.5","azbwiki":"php-1.27.0-wmf.5","azwiki":"php-1.27.0-wmf.5","azwikibooks":"php-1.27.0-wmf.5","azwikiquote":"php-1.27.0-wmf.5","azwikisource":"php-1.27.0-wmf.5","azwiktionary":"php-1.27.0-wmf.5","barwiki":"php-1.27.0-wmf.5","bat_smgwiki":"php-1.27.0-wmf.5","bawiki":"php-1.27.0-wmf.5","bawikibooks":"php-1.27.0-wmf.5","bclwiki":"php-1.27.0-wmf.5","bdwikimedia":"php-1.27.0-wmf.5","be_x_oldwiki":"php-1.27.0-wmf.5","betawikiversity":"php-1.27.0-wmf.5","bewiki":"php-1.27.0-wmf.5","bewikibooks":"php-1.27.0-wmf.5","bewikimedia":"php-1.27.0-wmf.5","bewikiquote":"php-1.27.0-wmf.5","bewikisource":"php-1.27.0-wmf.5","bewiktionary":"php-1.27.0-wmf.5","bgwiki":"php-1.27.0-wmf.5","bgwikibooks":"php-1.27.0-wmf.5","bgwikinews":"php-1.27.0-wmf.5","bgwikiquote":"php-1.27.0-wmf.5","bgwikisource":"php-1.27.0-wmf.5","bgwiktionary":"php-1.27.0-wmf.5","bhwiki":"php-1.27.0-wmf.5","bhwiktionary":"php-1.27.0-wmf.5","biwiki":"php-1.27.0-wmf.5","biwikibooks":"php-1.27.0-wmf.5","biwiktionary":"php-1.27.0-wmf.5","bjnwiki":"php-1.27.0-wmf.5","bmwiki":"php-1.27.0-wmf.5","bmwikibooks":"php-1.27.0-wmf.5","bmwikiquote":"php-1.27.0-wmf.5","bmwiktionary":"php-1.27.0-wmf.5","bnwiki":"php-1.27.0-wmf.5","bnwikibooks":"php-1.27.0-wmf.5","bnwikisource":"php-1.27.0-wmf.5","bnwiktionary":"php-1.27.0-wmf.5","boardgovcomwiki":"php-1.27.0-wmf.5","boardwiki":"php-1.27.0-wmf.5","bowiki":"php-1.27.0-wmf.5","bowikibooks":"php-1.27.0-wmf.5","bowiktionary":"php-1.27.0-wmf.5","bpywiki":"php-1.27.0-wmf.5","brwiki":"php-1.27.0-wmf.5","brwikimedia":"php-1.27.0-wmf.5","brwikiquote":"php-1.27.0-wmf.5","brwikisource":"php-1.27.0-wmf.5","brwiktionary":"php-1.27.0-wmf.5","bswiki":"php-1.27.0-wmf.5","bswikibooks":"php-1.27.0-wmf.5","bswikinews":"php-1.27.0-wmf.5","bswikiquote":"php-1.27.0-wmf.5","bswikisource":"php-1.27.0-wmf.5","bswiktionary":"php-1.27.0-wmf.5","bugwiki":"php-1.27.0-wmf.5","bxrwiki":"php-1.27.0-wmf.5","cawiki":"php-1.27.0-wmf.5","cawikibooks":"php-1.27.0-wmf.5","cawikimedia":"php-1.27.0-wmf.5","cawikinews":"php-1.27.0-wmf.5","cawikiquote":"php-1.27.0-wmf.5","cawikisource":"php-1.27.0-wmf.5","cawiktionary":"php-1.27.0-wmf.5","cbk_zamwiki":"php-1.27.0-wmf.5","cdowiki":"php-1.27.0-wmf.5","cebwiki":"php-1.27.0-wmf.5","cewiki":"php-1.27.0-wmf.5","chairwiki":"php-1.27.0-wmf.5","chapcomwiki":"php-1.27.0-wmf.5","checkuserwiki":"php-1.27.0-wmf.5","chowiki":"php-1.27.0-wmf.5","chrwiki":"php-1.27.0-wmf.5","chrwiktionary":"php-1.27.0-wmf.5","chwiki":"php-1.27.0-wmf.5","chwikibooks":"php-1.27.0-wmf.5","chwiktionary":"php-1.27.0-wmf.5","chywiki":"php-1.27.0-wmf.5","ckbwiki":"php-1.27.0-wmf.5","cnwikimedia":"php-1.27.0-wmf.5","collabwiki":"php-1.27.0-wmf.

[MediaWiki-commits] [Gerrit] group1 wikis to 1.27.0-wmf.6 - change (operations/mediawiki-config)

2015-11-11 Thread 20after4 (Code Review)
20after4 has uploaded a new change for review.

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

Change subject: group1 wikis to 1.27.0-wmf.6
..

group1 wikis to 1.27.0-wmf.6

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


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

diff --git a/wikiversions.json b/wikiversions.json
index 112b23e..695a7e7 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1 +1 @@
-{"aawiki":"php-1.27.0-wmf.5","aawikibooks":"php-1.27.0-wmf.5","aawiktionary":"php-1.27.0-wmf.5","abwiki":"php-1.27.0-wmf.5","abwiktionary":"php-1.27.0-wmf.5","acewiki":"php-1.27.0-wmf.5","advisorywiki":"php-1.27.0-wmf.5","afwiki":"php-1.27.0-wmf.5","afwikibooks":"php-1.27.0-wmf.5","afwikiquote":"php-1.27.0-wmf.5","afwiktionary":"php-1.27.0-wmf.5","akwiki":"php-1.27.0-wmf.5","akwikibooks":"php-1.27.0-wmf.5","akwiktionary":"php-1.27.0-wmf.5","alswiki":"php-1.27.0-wmf.5","alswikibooks":"php-1.27.0-wmf.5","alswikiquote":"php-1.27.0-wmf.5","alswiktionary":"php-1.27.0-wmf.5","amwiki":"php-1.27.0-wmf.5","amwikiquote":"php-1.27.0-wmf.5","amwiktionary":"php-1.27.0-wmf.5","angwiki":"php-1.27.0-wmf.5","angwikibooks":"php-1.27.0-wmf.5","angwikiquote":"php-1.27.0-wmf.5","angwikisource":"php-1.27.0-wmf.5","angwiktionary":"php-1.27.0-wmf.5","anwiki":"php-1.27.0-wmf.5","anwiktionary":"php-1.27.0-wmf.5","arbcom_dewiki":"php-1.27.0-wmf.5","arbcom_enwiki":"php-1.27.0-wmf.5","arbcom_fiwiki":"php-1.27.0-wmf.5","arbcom_nlwiki":"php-1.27.0-wmf.5","arcwiki":"php-1.27.0-wmf.5","arwiki":"php-1.27.0-wmf.5","arwikibooks":"php-1.27.0-wmf.5","arwikimedia":"php-1.27.0-wmf.5","arwikinews":"php-1.27.0-wmf.5","arwikiquote":"php-1.27.0-wmf.5","arwikisource":"php-1.27.0-wmf.5","arwikiversity":"php-1.27.0-wmf.5","arwiktionary":"php-1.27.0-wmf.5","arzwiki":"php-1.27.0-wmf.5","astwiki":"php-1.27.0-wmf.5","astwikibooks":"php-1.27.0-wmf.5","astwikiquote":"php-1.27.0-wmf.5","astwiktionary":"php-1.27.0-wmf.5","aswiki":"php-1.27.0-wmf.5","aswikibooks":"php-1.27.0-wmf.5","aswikisource":"php-1.27.0-wmf.5","aswiktionary":"php-1.27.0-wmf.5","auditcomwiki":"php-1.27.0-wmf.5","avwiki":"php-1.27.0-wmf.5","avwiktionary":"php-1.27.0-wmf.5","aywiki":"php-1.27.0-wmf.5","aywikibooks":"php-1.27.0-wmf.5","aywiktionary":"php-1.27.0-wmf.5","azbwiki":"php-1.27.0-wmf.5","azwiki":"php-1.27.0-wmf.5","azwikibooks":"php-1.27.0-wmf.5","azwikiquote":"php-1.27.0-wmf.5","azwikisource":"php-1.27.0-wmf.5","azwiktionary":"php-1.27.0-wmf.5","barwiki":"php-1.27.0-wmf.5","bat_smgwiki":"php-1.27.0-wmf.5","bawiki":"php-1.27.0-wmf.5","bawikibooks":"php-1.27.0-wmf.5","bclwiki":"php-1.27.0-wmf.5","bdwikimedia":"php-1.27.0-wmf.5","be_x_oldwiki":"php-1.27.0-wmf.5","betawikiversity":"php-1.27.0-wmf.5","bewiki":"php-1.27.0-wmf.5","bewikibooks":"php-1.27.0-wmf.5","bewikimedia":"php-1.27.0-wmf.5","bewikiquote":"php-1.27.0-wmf.5","bewikisource":"php-1.27.0-wmf.5","bewiktionary":"php-1.27.0-wmf.5","bgwiki":"php-1.27.0-wmf.5","bgwikibooks":"php-1.27.0-wmf.5","bgwikinews":"php-1.27.0-wmf.5","bgwikiquote":"php-1.27.0-wmf.5","bgwikisource":"php-1.27.0-wmf.5","bgwiktionary":"php-1.27.0-wmf.5","bhwiki":"php-1.27.0-wmf.5","bhwiktionary":"php-1.27.0-wmf.5","biwiki":"php-1.27.0-wmf.5","biwikibooks":"php-1.27.0-wmf.5","biwiktionary":"php-1.27.0-wmf.5","bjnwiki":"php-1.27.0-wmf.5","bmwiki":"php-1.27.0-wmf.5","bmwikibooks":"php-1.27.0-wmf.5","bmwikiquote":"php-1.27.0-wmf.5","bmwiktionary":"php-1.27.0-wmf.5","bnwiki":"php-1.27.0-wmf.5","bnwikibooks":"php-1.27.0-wmf.5","bnwikisource":"php-1.27.0-wmf.5","bnwiktionary":"php-1.27.0-wmf.5","boardgovcomwiki":"php-1.27.0-wmf.5","boardwiki":"php-1.27.0-wmf.5","bowiki":"php-1.27.0-wmf.5","bowikibooks":"php-1.27.0-wmf.5","bowiktionary":"php-1.27.0-wmf.5","bpywiki":"php-1.27.0-wmf.5","brwiki":"php-1.27.0-wmf.5","brwikimedia":"php-1.27.0-wmf.5","brwikiquote":"php-1.27.0-wmf.5","brwikisource":"php-1.27.0-wmf.5","brwiktionary":"php-1.27.0-wmf.5","bswiki":"php-1.27.0-wmf.5","bswikibooks":"php-1.27.0-wmf.5","bswikinews":"php-1.27.0-wmf.5","bswikiquote":"php-1.27.0-wmf.5","bswikisource":"php-1.27.0-wmf.5","bswiktionary":"php-1.27.0-wmf.5","bugwiki":"php-1.27.0-wmf.5","bxrwiki":"php-1.27.0-wmf.5","cawiki":"php-1.27.0-wmf.5","cawikibooks":"php-1.27.0-wmf.5","cawikimedia":"php-1.27.0-wmf.5","cawikinews":"php-1.27.0-wmf.5","cawikiquote":"php-1.27.0-wmf.5","cawikisource":"php-1.27.0-wmf.5","cawiktionary":"php-1.27.0-wmf.5","cbk_zamwiki":"php-1.27.0-wmf.5","cdowiki":"php-1.27.0-wmf.5","cebwiki":"php-1.27.0-wmf.5","cewiki":"php-1.27.0-wmf.5","chairwiki":"php-1.27.0-wmf.5","chapcomwiki":"php-1.27.0-wmf.5","checkuserwiki":"php-1.27.0-wmf.5","chowiki":"php-1.27.0-wmf.5","chrwiki":"php-1.27.0-wmf.5","chrwiktionary":"php-1.27.0-wmf.5","chwiki":"php-1.27.0-wmf.5","chwikibooks":"php-1.27.0-wmf.5","chwiktionary":"php-1.27.0-wmf.5","chywiki":"php-1.27.0-wmf.5","ckbwiki":"php-1.27.0-wmf.5","cnwikime

[MediaWiki-commits] [Gerrit] Revert "Avoid doNotifyQueueEmpty() race conditions for Redis" - change (mediawiki/core)

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

Change subject: Revert "Avoid doNotifyQueueEmpty() race conditions for Redis"
..


Revert "Avoid doNotifyQueueEmpty() race conditions for Redis"

This might hitting a phpredis bug causing "read error" messages.

This reverts commit ab2e1dae28f3b15e100e814544419f6719ef06f5.

Change-Id: I45b009e8768b79368898762bfedbca4dc0a79943
---
M includes/jobqueue/aggregator/JobQueueAggregatorRedis.php
1 file changed, 1 insertion(+), 5 deletions(-)

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



diff --git a/includes/jobqueue/aggregator/JobQueueAggregatorRedis.php 
b/includes/jobqueue/aggregator/JobQueueAggregatorRedis.php
index f8a0040..6c49646 100644
--- a/includes/jobqueue/aggregator/JobQueueAggregatorRedis.php
+++ b/includes/jobqueue/aggregator/JobQueueAggregatorRedis.php
@@ -59,11 +59,7 @@
return false;
}
try {
-   // Make sure doNotifyQueueNonEmpty() takes precedence 
to avoid races
-   $conn->watch( $this->getReadyQueueKey() );
-   $conn->multi()
-   ->hDel( $this->getReadyQueueKey(), 
$this->encQueueName( $type, $wiki ) )
-   ->exec();
+   $conn->hDel( $this->getReadyQueueKey(), 
$this->encQueueName( $type, $wiki ) );
 
return true;
} catch ( RedisException $e ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I45b009e8768b79368898762bfedbca4dc0a79943
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.6
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] dynamicproxy: Do not include redis collector manually - change (operations/puppet)

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

Change subject: dynamicproxy: Do not include redis collector manually
..


dynamicproxy: Do not include redis collector manually

Comes in with redis

Change-Id: I4f9718f4ff04f90cc4c649ecf3f97d3bf04dc307
---
M modules/dynamicproxy/manifests/init.pp
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/modules/dynamicproxy/manifests/init.pp 
b/modules/dynamicproxy/manifests/init.pp
index 7213cbf..0e7c1a0 100644
--- a/modules/dynamicproxy/manifests/init.pp
+++ b/modules/dynamicproxy/manifests/init.pp
@@ -175,10 +175,6 @@
 # Also monitor local redis
 include ::redis::client::python
 
-diamond::collector { 'Redis':
-require => Class['::redis::client::python'],
-}
-
 ferm::service{ 'http':
 proto => 'tcp',
 port  => '80',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f9718f4ff04f90cc4c649ecf3f97d3bf04dc307
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] dynamicproxy: Do not include redis collector manually - change (operations/puppet)

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

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

Change subject: dynamicproxy: Do not include redis collector manually
..

dynamicproxy: Do not include redis collector manually

Comes in with redis

Change-Id: I4f9718f4ff04f90cc4c649ecf3f97d3bf04dc307
---
M modules/dynamicproxy/manifests/init.pp
1 file changed, 0 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/99/252599/1

diff --git a/modules/dynamicproxy/manifests/init.pp 
b/modules/dynamicproxy/manifests/init.pp
index 7213cbf..0e7c1a0 100644
--- a/modules/dynamicproxy/manifests/init.pp
+++ b/modules/dynamicproxy/manifests/init.pp
@@ -175,10 +175,6 @@
 # Also monitor local redis
 include ::redis::client::python
 
-diamond::collector { 'Redis':
-require => Class['::redis::client::python'],
-}
-
 ferm::service{ 'http':
 proto => 'tcp',
 port  => '80',

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

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

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


[MediaWiki-commits] [Gerrit] Navigate to target URL specified in Install Referrer. - change (apps...wikipedia)

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

Change subject: Navigate to target URL specified in Install Referrer.
..


Navigate to target URL specified in Install Referrer.

This allows the app to automatically open the referring URL specified in
the INSTALL_REFERRER intent. This makes it possible to show a banner in
mobile web that takes the user to the Play Store to install the app, and
then for the app to automatically go to the page that the user was
browsing in mobile web.

Bug: T117219
Change-Id: I5fdf38ee6f0c3ea4cf787a38ec9bfa981fed88cf
---
M app/src/main/java/org/wikipedia/analytics/InstallReferrerReceiver.java
M app/src/main/java/org/wikipedia/util/ShareUtil.java
2 files changed, 24 insertions(+), 0 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/analytics/InstallReferrerReceiver.java 
b/app/src/main/java/org/wikipedia/analytics/InstallReferrerReceiver.java
index e727f0e..5eed1a1 100644
--- a/app/src/main/java/org/wikipedia/analytics/InstallReferrerReceiver.java
+++ b/app/src/main/java/org/wikipedia/analytics/InstallReferrerReceiver.java
@@ -1,6 +1,8 @@
 package org.wikipedia.analytics;
 
 import org.wikipedia.WikipediaApp;
+import org.wikipedia.page.PageActivity;
+import org.wikipedia.util.ShareUtil;
 import org.wikipedia.util.log.L;
 import android.content.BroadcastReceiver;
 import android.content.Context;
@@ -50,5 +52,15 @@
 InstallReferrerFunnel funnel = new 
InstallReferrerFunnel(WikipediaApp.getInstance());
 funnel.logInstall(refUrl, refCampaignId, refCampaignInstallId);
 }
+if (!TextUtils.isEmpty(refUrl) && ShareUtil.canOpenUrlInApp(ctx, 
refUrl)) {
+openPageFromUrl(ctx, refUrl);
+}
+}
+
+private void openPageFromUrl(Context context, String url) {
+Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
+intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+intent.setClass(context, PageActivity.class);
+context.startActivity(intent);
 }
 }
diff --git a/app/src/main/java/org/wikipedia/util/ShareUtil.java 
b/app/src/main/java/org/wikipedia/util/ShareUtil.java
index 9b49e04..acf2abd 100644
--- a/app/src/main/java/org/wikipedia/util/ShareUtil.java
+++ b/app/src/main/java/org/wikipedia/util/ShareUtil.java
@@ -213,6 +213,18 @@
 return context.getPackageManager().queryIntentActivities(intent, 0);
 }
 
+public static boolean canOpenUrlInApp(@NonNull Context context, @NonNull 
String url) {
+boolean canOpen = false;
+Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
+for (ResolveInfo intentActivity : queryIntentActivities(intent, 
context)) {
+if (getPackageName(intentActivity).matches(APP_PACKAGE_REGEX)) {
+canOpen = true;
+break;
+}
+}
+return canOpen;
+}
+
 private static boolean isIntentActivityBlacklisted(@Nullable ResolveInfo 
intentActivity,
@Nullable String 
packageNameBlacklistRegex) {
 return intentActivity != null

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5fdf38ee6f0c3ea4cf787a38ec9bfa981fed88cf
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: Sniedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] RESTBase / Parsoid: Always use localhost for contacting the API - change (mediawiki/vagrant)

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

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

Change subject: RESTBase / Parsoid: Always use localhost for contacting the API
..

RESTBase / Parsoid: Always use localhost for contacting the API

It is safe to assume that the MediaWiki instance to contact listens on
localhost. As a bonus, this allows RESTBase and Parsoid in Labs to
actually contact the MW API.

Change-Id: I4a3b2ec11050dae5b3fd021c90a05b474b929edf
---
M puppet/hieradata/common.yaml
M puppet/modules/restbase/templates/config.yaml.erb
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/98/252598/1

diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
index 3848a24..c2f1faf 100644
--- a/puppet/hieradata/common.yaml
+++ b/puppet/hieradata/common.yaml
@@ -222,7 +222,7 @@
 mediawiki::parsoid::dir: "%{hiera('mwv::services_dir')}/parsoid"
 mediawiki::parsoid::port: 8000
 mediawiki::parsoid::domain: "%{hiera('role::mediawiki::hostname')}"
-mediawiki::parsoid::uri: "%{hiera('mediawiki::server_url')}/w/api.php"
+mediawiki::parsoid::uri: "http://localhost%{::port_fragment}/w/api.php";
 mediawiki::parsoid::use_php_preprocessor: true
 mediawiki::parsoid::use_selser: true
 mediawiki::parsoid::allow_cors: '*'
diff --git a/puppet/modules/restbase/templates/config.yaml.erb 
b/puppet/modules/restbase/templates/config.yaml.erb
index c3e4cec..90b01a5 100644
--- a/puppet/modules/restbase/templates/config.yaml.erb
+++ b/puppet/modules/restbase/templates/config.yaml.erb
@@ -103,7 +103,7 @@
 options:
   apiRequest:
 method: post
-uri: '<%= scope['::mediawiki::server_url'] %>/w/api.php'
+uri: 'http://localhost<%= scope['::port_fragment'] 
%>/w/api.php'
 headers:
   host: '{$.request.params.domain}'
 body: '{$.request.body}'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a3b2ec11050dae5b3fd021c90a05b474b929edf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

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


[MediaWiki-commits] [Gerrit] [wip] Add a NetworkHandler as a central API authority to Echo - change (mediawiki...Echo)

2015-11-11 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review.

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

Change subject: [wip] Add a NetworkHandler as a central API authority to Echo
..

[wip] Add a NetworkHandler as a central API authority to Echo

This is in preparation for dealing with cross-wiki notifications
where we may need several types of operations to extract bundled
notifications from local and external APIs.

Also, organize all network-related helpers in their own folder.

Change-Id: Ib730c780ea52c93a6026c5d0b22012b6f39bb50d
---
M Resources.php
M modules/ext.echo.init.js
R modules/viewmodel/handlers/mw.echo.dm.APIHandler.js
A modules/viewmodel/handlers/mw.echo.dm.ForeignAPIHandler.js
R modules/viewmodel/handlers/mw.echo.dm.LocalAPIHandler.js
A modules/viewmodel/handlers/mw.echo.dm.NetworkHandler.js
M modules/viewmodel/mw.echo.dm.NotificationsModel.js
M tests/qunit/viewmodel/test_mw.echo.dm.NotificationsModel.js
8 files changed, 154 insertions(+), 54 deletions(-)


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

diff --git a/Resources.php b/Resources.php
index 9bbe643..7b09f6e 100644
--- a/Resources.php
+++ b/Resources.php
@@ -84,11 +84,12 @@
'ext.echo.dm' => $echoResourceTemplate + array(
'scripts' => array(
'viewmodel/mw.echo.dm.js',
-   'viewmodel/mw.echo.dm.NotificationItem.js',
-   'viewmodel/mw.echo.dm.AbstractAPIHandler.js',
-   'viewmodel/mw.echo.dm.APIHandler.js',
'viewmodel/mw.echo.dm.List.js',
'viewmodel/mw.echo.dm.SortedList.js',
+   'viewmodel/handlers/mw.echo.dm.APIHandler.js',
+   'viewmodel/handlers/mw.echo.dm.LocalAPIHandler.js',
+   'viewmodel/handlers/mw.echo.dm.NetworkHandler.js',
+   'viewmodel/mw.echo.dm.NotificationItem.js',
'viewmodel/mw.echo.dm.NotificationList.js',
'viewmodel/mw.echo.dm.NotificationsModel.js',
),
diff --git a/modules/ext.echo.init.js b/modules/ext.echo.init.js
index 0d84e4f..0376691 100644
--- a/modules/ext.echo.init.js
+++ b/modules/ext.echo.init.js
@@ -34,7 +34,8 @@
 
// Respond to click on the notification button and load the UI 
on demand
$( '.mw-echo-notification-badge-nojs' ).click( function ( e ) {
-   var myType = $( this ).parent().prop( 'id' ) === 
'pt-notifications-alert' ? 'alert' : 'message',
+   var alertNetworkHandler, msgNetworkHandler,
+   myType = $( this ).parent().prop( 'id' ) === 
'pt-notifications-alert' ? 'alert' : 'message',
time = mw.now();
 
if ( e.which !== 1 ) {
@@ -46,10 +47,10 @@
 
// Fire the notification API requests
apiRequest = new mw.Api( { ajax: { cache: false } } 
).get( $.extend( { notsections: myType }, mw.echo.apiCallParams ) )
-   .then( function ( data ) {
-   mw.track( 
'timing.MediaWiki.echo.overlay.api', mw.now() - time );
-   return data;
-   } );
+   .then( function ( data ) {
+   mw.track( 
'timing.MediaWiki.echo.overlay.api', mw.now() - time );
+   return data;
+   } );
 
// Load the ui
mw.loader.using( 'ext.echo.ui', function () {
@@ -57,13 +58,12 @@
 
// Load message button and popup if messages 
exist
if ( $existingMessageLink.length ) {
+   msgNetworkHandler = new 
mw.echo.dm.NetworkHandler( {
+   type: 'message',
+   baseParams: 
mw.echo.apiCallParams
+   } );
messageNotificationsModel = new 
mw.echo.dm.NotificationsModel(
-   new mw.echo.dm.APIHandler( {
-   type: 'message',
-   limit: 25,
-   userLang: 
mw.config.get( 'wgUserLanguage' ),
-   baseParams: 
mw.echo.apiCallParams
-   } ),
+   msgNetworkHandler,
{
   

[MediaWiki-commits] [Gerrit] build: Bump development dependencies for karma now we can - change (oojs/core)

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

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

Change subject: build: Bump development dependencies for karma now we can
..

build: Bump development dependencies for karma now we can

* grunt-karma – 0.11.1 to 0.12.1
  Some bug fixes and development dependency upgrades. No impact.

* karma – 0.12.37 to 0.13.15
  Some new features we do not yet use, bug fixes, and development
  dependency upgrades. No impact.

* qunitjs – 1.19.0 to 1.20.0
  Some new features we do not yet use, bug fixes, and development
  dependency upgrades. No impact.

Change-Id: I7430299d712a9bad838a4dc4244e7b9b1c2afebc
---
M package.json
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/core refs/changes/96/252596/1

diff --git a/package.json b/package.json
index 6133028..4923aba 100644
--- a/package.json
+++ b/package.json
@@ -32,15 +32,15 @@
 "grunt-contrib-uglify": "0.10.0",
 "grunt-contrib-watch": "0.6.1",
 "grunt-jscs": "2.3.0",
-"grunt-karma": "0.11.1",
+"grunt-karma": "0.12.1",
 "jquery": "1.11.3",
-"karma": "0.12.37",
+"karma": "0.13.15",
 "karma-chrome-launcher": "0.2.1",
 "karma-coverage": "0.5.3",
 "karma-firefox-launcher": "0.1.6",
 "karma-qunit": "0.1.8",
 "karma-sauce-launcher": "0.3.0",
 "qunit": "0.7.7",
-"qunitjs": "1.19.0"
+"qunitjs": "1.20.0"
   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7430299d712a9bad838a4dc4244e7b9b1c2afebc
Gerrit-PatchSet: 1
Gerrit-Project: oojs/core
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] Hygiene: add JSHint to development dependencies - change (mediawiki...mobileapps)

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

Change subject: Hygiene: add JSHint to development dependencies
..


Hygiene: add JSHint to development dependencies

A .jshintrc and .jshintignore are specified indicating that the project
is developed using JSHint. This patch explicitly specifies it as a dev
dependency.

Change-Id: I29c6a78724f7fdc6a1493fd6f9dd554d0e17c1fb
---
M package.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/package.json b/package.json
index a686699..760c998 100644
--- a/package.json
+++ b/package.json
@@ -52,6 +52,7 @@
   "devDependencies": {
 "extend": "^3.0.0",
 "istanbul": "^0.3.22",
+"jshint": "^2.8.0",
 "mocha": "^2.3.3",
 "mocha-jshint": "^2.2.3",
 "mocha-lcov-reporter": "^1.0.0",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I29c6a78724f7fdc6a1493fd6f9dd554d0e17c1fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Bgerstle 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] replace.py: use keyword args for explicitly in save() - change (pywikibot/core)

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

Change subject: replace.py: use keyword args for explicitly in save()
..


replace.py: use keyword args for explicitly in save()

Use keywords arguments explicitly in save().
It might create conflicts when Page is subclassed and *args, **kwargs are
used when overriding save() method.

See e.g. ProofreadPage.save() method.

Change-Id: I05763aa4f5c0e49b69c2a00ecd6b278aa9c82255
---
M scripts/replace.py
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/scripts/replace.py b/scripts/replace.py
index 2ccebd4..8fd216d 100755
--- a/scripts/replace.py
+++ b/scripts/replace.py
@@ -755,7 +755,7 @@
 self.options['always'] = True
 if choice == 'y':
 page.text = new_text
-page.save(self.generate_summary(applied), async=True,
+page.save(summary=self.generate_summary(applied), 
async=True,
   callback=self._count_changes, quiet=True)
 while not self._pending_processed_titles.empty():
 proc_title, res = self._pending_processed_titles.get()
@@ -766,7 +766,7 @@
 if self.getOption('always') and new_text != original_text:
 try:
 page.text = new_text
-page.save(self.generate_summary(applied),
+page.save(summary=self.generate_summary(applied),
   callback=self._count_changes, quiet=True)
 except pywikibot.EditConflict:
 pywikibot.output(u'Skipping %s because of edit conflict'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I05763aa4f5c0e49b69c2a00ecd6b278aa9c82255
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] startup.test: Add IE11 and Edge strings to Grade A tests - change (mediawiki/core)

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

Change subject: startup.test: Add IE11 and Edge strings to Grade A tests
..


startup.test: Add IE11 and Edge strings to Grade A tests

Change-Id: Ia4fa69c1abfb8381913885aada0784a04c22aa7c
---
M tests/qunit/suites/resources/startup.test.js
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/tests/qunit/suites/resources/startup.test.js 
b/tests/qunit/suites/resources/startup.test.js
index 5ea7a81..d3c4748 100644
--- a/tests/qunit/suites/resources/startup.test.js
+++ b/tests/qunit/suites/resources/startup.test.js
@@ -25,8 +25,13 @@
'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.2; 
Trident/4.0; Media Center PC 4.0; SLCC1; .NET CLR 3.0.04320)',
'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 7.1; 
Trident/5.0)',
'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; 
WOW64; Trident/6.0)',
+   'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) 
like Gecko',
// IE Mobile
'Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 
7.5; Trident/5.0; IEMobile/9.0; NOKIA; Lumia 800)',
+   // Edge
+   'Mozilla/5.0 (Windows NT 10.0; Win64; x64) 
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 
Edge/12.246',
+   // Edge Mobile
+   'Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; 
Microsoft; Lumia 640 XL LTE) AppleWebKit/537.36 (KHTML, like Gecko) 
Chrome/42.0.2311.135 Mobile Safari/537.36 Edge/12.10166',
// BlackBerry 6+
'Mozilla/5.0 (BlackBerry; U; BlackBerry 9300; en) 
AppleWebKit/534.8+ (KHTML, like Gecko) Version/6.0.0.570 Mobile Safari/534.8+',
'Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en) 
AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.346 Mobile 
Safari/534.11+',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia4fa69c1abfb8381913885aada0784a04c22aa7c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] k8s: Fix typo - change (operations/puppet)

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

Change subject: k8s: Fix typo
..


k8s: Fix typo

Change-Id: Iba7b952e32f5104d4b5982ad5f9b2dd064aec25c
---
M modules/k8s/templates/initscripts/kube-proxy.systemd.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/k8s/templates/initscripts/kube-proxy.systemd.erb 
b/modules/k8s/templates/initscripts/kube-proxy.systemd.erb
index d64b103..3ce1cd1 100644
--- a/modules/k8s/templates/initscripts/kube-proxy.systemd.erb
+++ b/modules/k8s/templates/initscripts/kube-proxy.systemd.erb
@@ -4,7 +4,7 @@
 [Service]
 ExecStart=/usr/bin/kube-proxy \
 --kubeconfig=/etc/kubernetes/kubeconfig \
---proxymode=iptables \
+--proxy-mode=iptables \
 --masquerade-all=true
 
 [Install]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba7b952e32f5104d4b5982ad5f9b2dd064aec25c
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] k8s: Fix typo - change (operations/puppet)

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

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

Change subject: k8s: Fix typo
..

k8s: Fix typo

Change-Id: Iba7b952e32f5104d4b5982ad5f9b2dd064aec25c
---
M modules/k8s/templates/initscripts/kube-proxy.systemd.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/95/252595/1

diff --git a/modules/k8s/templates/initscripts/kube-proxy.systemd.erb 
b/modules/k8s/templates/initscripts/kube-proxy.systemd.erb
index d64b103..3ce1cd1 100644
--- a/modules/k8s/templates/initscripts/kube-proxy.systemd.erb
+++ b/modules/k8s/templates/initscripts/kube-proxy.systemd.erb
@@ -4,7 +4,7 @@
 [Service]
 ExecStart=/usr/bin/kube-proxy \
 --kubeconfig=/etc/kubernetes/kubeconfig \
---proxymode=iptables \
+--proxy-mode=iptables \
 --masquerade-all=true
 
 [Install]

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

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

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


[MediaWiki-commits] [Gerrit] k8s: Switch to using new cmdline for kube-proxy - change (operations/puppet)

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

Change subject: k8s: Switch to using new cmdline for kube-proxy
..


k8s: Switch to using new cmdline for kube-proxy

Switching to 1.2.alpha.3 of kube

Change-Id: I3402468a24e8f03af4cd26b1e722bbf215163d52
---
M modules/k8s/templates/initscripts/kube-proxy.systemd.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/k8s/templates/initscripts/kube-proxy.systemd.erb 
b/modules/k8s/templates/initscripts/kube-proxy.systemd.erb
index 2d9bc5a..d64b103 100644
--- a/modules/k8s/templates/initscripts/kube-proxy.systemd.erb
+++ b/modules/k8s/templates/initscripts/kube-proxy.systemd.erb
@@ -4,7 +4,7 @@
 [Service]
 ExecStart=/usr/bin/kube-proxy \
 --kubeconfig=/etc/kubernetes/kubeconfig \
---legacy-userspace-proxy=false \
+--proxymode=iptables \
 --masquerade-all=true
 
 [Install]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3402468a24e8f03af4cd26b1e722bbf215163d52
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] k8s: Switch to using new cmdline for kube-proxy - change (operations/puppet)

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

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

Change subject: k8s: Switch to using new cmdline for kube-proxy
..

k8s: Switch to using new cmdline for kube-proxy

Switching to 1.2.alpha.3 of kube

Change-Id: I3402468a24e8f03af4cd26b1e722bbf215163d52
---
M modules/k8s/templates/initscripts/kube-proxy.systemd.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/94/252594/1

diff --git a/modules/k8s/templates/initscripts/kube-proxy.systemd.erb 
b/modules/k8s/templates/initscripts/kube-proxy.systemd.erb
index 2d9bc5a..d64b103 100644
--- a/modules/k8s/templates/initscripts/kube-proxy.systemd.erb
+++ b/modules/k8s/templates/initscripts/kube-proxy.systemd.erb
@@ -4,7 +4,7 @@
 [Service]
 ExecStart=/usr/bin/kube-proxy \
 --kubeconfig=/etc/kubernetes/kubeconfig \
---legacy-userspace-proxy=false \
+--proxymode=iptables \
 --masquerade-all=true
 
 [Install]

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

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

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


[MediaWiki-commits] [Gerrit] core: Use Object.create directly now that we can - change (oojs/core)

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

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

Change subject: core: Use Object.create directly now that we can
..

core: Use Object.create directly now that we can

Change-Id: Ifa95484c066c83e1c0f6563305248460b74ceead
---
M src/Factory.js
M src/core.js
2 files changed, 5 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/core refs/changes/93/252593/1

diff --git a/src/Factory.js b/src/Factory.js
index bb78455..3aad31f 100644
--- a/src/Factory.js
+++ b/src/Factory.js
@@ -1,5 +1,3 @@
-/*global createObject */
-
 /**
  * @class OO.Factory
  * @extends OO.Registry
@@ -100,7 +98,7 @@
// the constructor's prototype (which also makes it an "instanceof" the 
constructor),
// then invoke the constructor with the object as context, and return 
it (ignoring
// the constructor's return value).
-   obj = createObject( constructor.prototype );
+   obj = Object.create( constructor.prototype );
constructor.apply( obj, args );
return obj;
 };
diff --git a/src/core.js b/src/core.js
index 62d2a6d..d9ee178 100644
--- a/src/core.js
+++ b/src/core.js
@@ -8,21 +8,7 @@
oo = {},
// Optimisation: Local reference to Object.prototype.hasOwnProperty
hasOwn = oo.hasOwnProperty,
-   toString = oo.toString,
-   // Object.create() is impossible to fully polyfill, so don't require it
-   createObject = Object.create || ( function () {
-   // Reusable constructor function
-   function Empty() {}
-   return function ( prototype, properties ) {
-   var obj;
-   Empty.prototype = prototype;
-   obj = new Empty();
-   if ( properties && hasOwn.call( properties, 
'constructor' ) ) {
-   obj.constructor = properties.constructor.value;
-   }
-   return obj;
-   };
-   } )();
+   toString = oo.toString;
 
 /* Class Methods */
 
@@ -90,7 +76,7 @@
// allows people to comply with their style guide.
targetFn[ 'super' ] = targetFn.parent = originFn;
 
-   targetFn.prototype = createObject( originFn.prototype, {
+   targetFn.prototype = Object.create( originFn.prototype, {
// Restore constructor property of targetFn
constructor: {
value: targetConstructor,
@@ -102,7 +88,7 @@
 
// Extend static properties - always initialize both sides
oo.initClass( originFn );
-   targetFn.static = createObject( originFn.static );
+   targetFn.static = Object.create( originFn.static );
 };
 
 /**
@@ -244,7 +230,7 @@
 oo.cloneObject = function ( origin ) {
var key, r;
 
-   r = createObject( origin.constructor.prototype );
+   r = Object.create( origin.constructor.prototype );
 
for ( key in origin ) {
if ( hasOwn.call( origin, key ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa95484c066c83e1c0f6563305248460b74ceead
Gerrit-PatchSet: 1
Gerrit-Project: oojs/core
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] [WIP] TitleSearchWidget: Use OO.ui.mixin.RequestManager - change (mediawiki/core)

2015-11-11 Thread DLynch (Code Review)
DLynch has uploaded a new change for review.

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

Change subject: [WIP] TitleSearchWidget: Use OO.ui.mixin.RequestManager
..

[WIP] TitleSearchWidget: Use OO.ui.mixin.RequestManager

Get that request management goodness that only LookupWidgets used to
benefit from.

Requires I7b2e0c09fdb39ced848b09aeec5ffabeb6685396 from OOUI.

Change-Id: I6ff686b3b157d23ff534357ce25ebcb4ef7efea1
---
M resources/src/mediawiki.widgets/mw.widgets.TitleSearchWidget.js
1 file changed, 24 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/92/252592/1

diff --git a/resources/src/mediawiki.widgets/mw.widgets.TitleSearchWidget.js 
b/resources/src/mediawiki.widgets/mw.widgets.TitleSearchWidget.js
index 546fbf8..b9060f5 100644
--- a/resources/src/mediawiki.widgets/mw.widgets.TitleSearchWidget.js
+++ b/resources/src/mediawiki.widgets/mw.widgets.TitleSearchWidget.js
@@ -11,6 +11,7 @@
 *
 * @class
 * @extends OO.ui.SearchWidget
+* @mixins OO.ui.mixin.RequestManager
 * @mixins mw.widgets.TitleWidget
 *
 * @constructor
@@ -23,6 +24,7 @@
 
// Mixin constructors
mw.widgets.TitleWidget.call( this, config );
+   OO.ui.mixin.RequestManager.call( this, config );
 
this.query.setValidation( this.isQueryValid.bind( this ) );
 
@@ -46,6 +48,7 @@
/* Setup */
 
OO.inheritClass( mw.widgets.TitleSearchWidget, OO.ui.SearchWidget );
+   OO.mixinClass( mw.widgets.TitleSearchWidget, OO.ui.mixin.RequestManager 
);
OO.mixinClass( mw.widgets.TitleSearchWidget, mw.widgets.TitleWidget );
 
/* Methods */
@@ -72,19 +75,30 @@
mw.widgets.TitleSearchWidget.prototype.onQueryChange = function () {
var widget = this;
 
-   if ( this.currentRequest ) {
-   this.currentRequest.abort();
-   }
-
-   this.currentRequest = this.getSuggestionsPromise();
-   this.currentRequest.done( function ( response ) {
+   this.getRequestData().done( function ( data ) {
// Parent method

mw.widgets.TitleSearchWidget.parent.prototype.onQueryChange.call( widget );
-
-   widget.results.addItems( widget.getOptionsFromData( 
response.query || {} ) );
-
-   widget.currentRequest = false;
+   widget.results.addItems( widget.getOptionsFromData( 
data ) );
} );
};
 
+   /**
+* @inheritdoc
+*/
+   mw.widgets.TitleSearchWidget.prototype.getRequestQuery = function () {
+   return this.getQueryValue();
+   };
+   /**
+* @inheritdoc
+*/
+   mw.widgets.TitleSearchWidget.prototype.getRequest = function () {
+   return this.getSuggestionsPromise();
+   };
+   /**
+* @inheritdoc
+*/
+   mw.widgets.TitleSearchWidget.prototype.getRequestCacheDataFromResponse 
= function ( response ) {
+   return response.query || {};
+   };
+
 }( jQuery, mediaWiki ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ff686b3b157d23ff534357ce25ebcb4ef7efea1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: DLynch 

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


[MediaWiki-commits] [Gerrit] Fix typo in commment and missing spaces - change (mediawiki...Scribunto)

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

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

Change subject: Fix typo in commment and missing spaces
..

Fix typo in commment and missing spaces

Change-Id: Ifda05edd9b488768814d3251a93d71e9b55ea5a6
---
M tests/engines/LuaCommon/TextLibraryTest.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto 
refs/changes/91/252591/1

diff --git a/tests/engines/LuaCommon/TextLibraryTest.php 
b/tests/engines/LuaCommon/TextLibraryTest.php
index fffcd9a..2505d9a 100644
--- a/tests/engines/LuaCommon/TextLibraryTest.php
+++ b/tests/engines/LuaCommon/TextLibraryTest.php
@@ -5,8 +5,8 @@
 
public function __construct( $name = null, array $data = array(), 
$dataName = '', $engineName = null ) {
parent::__construct( $name, $data, $dataName, $engineName);
-   if ( defined('HHVM_VERSION') ) {
-   // HHVM bug 
https://github.com/facebook/hhvm/issues/5813$
+   if ( defined( 'HHVM_VERSION' ) ) {
+   // HHVM bug https://github.com/facebook/hhvm/issues/5813
$this->skipTests['json decode, invalid values (trailing 
comma)'] =
'json decode bug in HHVM';
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifda05edd9b488768814d3251a93d71e9b55ea5a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: JanZerebecki 

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


[MediaWiki-commits] [Gerrit] paraminfo_tests: update and add version checks - change (pywikibot/core)

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

Change subject: paraminfo_tests: update and add version checks
..


paraminfo_tests: update and add version checks

Add watchlist type 'categorize', added in 1.27.0-wmf.4 (MW d40cd42b)
Check version for watchlist type 'external', added in 1.20 (MW df0cf1e3)

Check version for content model and format 'json',
added in 1.24 (MW d2a82fcb).

Change-Id: I1c8d3c1251df582b4abdf043b1acbb4404f034d6
---
M tests/paraminfo_tests.py
1 file changed, 15 insertions(+), 3 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, but someone else must approve
  Mpaa: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/paraminfo_tests.py b/tests/paraminfo_tests.py
index d4fd436..e4b98fb 100644
--- a/tests/paraminfo_tests.py
+++ b/tests/paraminfo_tests.py
@@ -87,7 +87,15 @@
 
 def test_watchlist_type(self):
 """Test watchlist type."""
-known = ['edit', 'external', 'new', 'log']  # 'external' is likely new
+known = ['edit', 'new', 'log']
+
+_version = MediaWikiVersion(self.site.version())
+
+if _version >= MediaWikiVersion('1.20'):
+known.append('external')
+if _version.version >= (1, 27):
+if _version >= MediaWikiVersion('1.27.0-wmf.4') or _version.suffix 
== 'alpha':
+known.append('categorize')
 
 self._check_param_values(self.site, 'query+watchlist', 'type', known)
 
@@ -110,10 +118,12 @@
 base = [
 'text/x-wiki',
 'text/javascript',
-'application/json',
 'text/css',
 'text/plain',
 ]
+if MediaWikiVersion(self.site.version()) >= MediaWikiVersion('1.24'):
+base.append('application/json')
+
 self._check_param_values(self.site, 'edit', 'contentformat', base)
 self._check_param_values(self.site, 'parse', 'contentformat', base)
 
@@ -122,7 +132,6 @@
 base = [
 'wikitext',
 'javascript',
-'json',
 'css',
 'text',
 ]
@@ -133,6 +142,9 @@
 'Scribunto',
 'JsonSchema',
 ]
+if MediaWikiVersion(self.site.version()) >= MediaWikiVersion('1.24'):
+base.append('json')
+
 self._check_param_subset(self.site, 'edit', 'contentmodel', base)
 self._check_param_subset(self.site, 'parse', 'contentmodel', base)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1c8d3c1251df582b4abdf043b1acbb4404f034d6
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: Ricordisamoa 
Gerrit-Reviewer: XZise 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Really validate that $wgArticlePath starts with a slash - change (mediawiki/core)

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

Change subject: Really validate that $wgArticlePath starts with a slash
..


Really validate that $wgArticlePath starts with a slash

The regular expression wasn't entirely correct.
Follow-up to a4a3d0454069c25a24e2bfe732a665cc6a865878.

Bug: T48998
Change-Id: I08bdf2db20c1c3de55527fc812bcbb55fa23f7bc
---
M includes/Setup.php
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/includes/Setup.php b/includes/Setup.php
index d826b87..bd20ac3 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -520,12 +520,12 @@
 $ps_validation = Profiler::instance()->scopedProfileIn( $fname . '-validation' 
);
 
 // T48998: Bail out early if $wgArticlePath is non-absolute
-if ( !preg_match( '/^https?:\/\/|\//', $wgArticlePath ) ) {
+if ( !preg_match( '/^(https?:\/\/|\/)/', $wgArticlePath ) ) {
throw new FatalError(
-   'If you use a relative URL on $wgArticlePath, it must start ' .
-   'with a slash (/).See ' .
+   'If you use a relative URL for $wgArticlePath, it must start ' .
+   'with a slash (/).See ' .
'https://www.mediawiki.org/wiki/Manual:$wgArticlePath";>' .
-   'https://www.mediawiki.org/wiki/Manual:$wgArticlePath'
+   'https://www.mediawiki.org/wiki/Manual:$wgArticlePath.'
);
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I08bdf2db20c1c3de55527fc812bcbb55fa23f7bc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: devunt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: c1ac880..c6aeff4 - change (mediawiki/extensions)

2015-11-11 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: c1ac880..c6aeff4
..

Syncronize VisualEditor: c1ac880..c6aeff4

Change-Id: I0498b62fe7fd9cafbfd36bb3c92173243b3387a1
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/90/252590/1

diff --git a/VisualEditor b/VisualEditor
index c1ac880..c6aeff4 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit c1ac8806c62593ee0d33a91e6c6b0e4f4f73551a
+Subproject commit c6aeff4ba9289aecae6e50f8afd390bcad0fd24a

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0498b62fe7fd9cafbfd36bb3c92173243b3387a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Edit mode switching: Separate styles - change (mediawiki...VisualEditor)

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

Change subject: Edit mode switching: Separate styles
..


Edit mode switching: Separate styles

Ensures that these styles are loaded *after* OOUI by making
them dependent on it, unlike DesktopArticleTarget.init
which isn't.

Change-Id: Ia1fff16432d20fb56707c5e21c6a930d2478e311
---
M extension.json
A modules/ve-mw/init/styles/ve.init.MWVESwitchConfirmDialog-monobook.css
A modules/ve-mw/init/styles/ve.init.MWVESwitchConfirmDialog-vector.css
A modules/ve-mw/init/styles/ve.init.MWVESwitchConfirmDialog.css
M modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-monobook.css
M modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-vector.css
M modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css
7 files changed, 52 insertions(+), 25 deletions(-)

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



diff --git a/extension.json b/extension.json
index fd053eb..7ef959a 100644
--- a/extension.json
+++ b/extension.json
@@ -975,6 +975,15 @@
"scripts": [

"modules/ve-mw/init/ve.init.MWVESwitchConfirmDialog.js"
],
+   "styles": 
"modules/ve-mw/init/styles/ve.init.MWVESwitchConfirmDialog.css",
+   "skinStyles": {
+   "vector": [
+   
"modules/ve-mw/init/styles/ve.init.MWVESwitchConfirmDialog-vector.css"
+   ],
+   "monobook": [
+   
"modules/ve-mw/init/styles/ve.init.MWVESwitchConfirmDialog-monobook.css"
+   ]
+   },
"dependencies": [
"oojs",
"oojs-ui",
diff --git 
a/modules/ve-mw/init/styles/ve.init.MWVESwitchConfirmDialog-monobook.css 
b/modules/ve-mw/init/styles/ve.init.MWVESwitchConfirmDialog-monobook.css
new file mode 100644
index 000..f4a05dc
--- /dev/null
+++ b/modules/ve-mw/init/styles/ve.init.MWVESwitchConfirmDialog-monobook.css
@@ -0,0 +1,14 @@
+/*!
+ * VisualEditor MediaWiki Initialization edit switching styles.
+ *
+ * @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+
+.ve-init-mw-desktopArticleTarget-editSwitch {
+   font-size: 1.0079em;
+}
+
+.ve-init-mw-desktopArticleTarget-editSwitch .oo-ui-buttonElement-button {
+   padding: 0.35em;
+}
diff --git 
a/modules/ve-mw/init/styles/ve.init.MWVESwitchConfirmDialog-vector.css 
b/modules/ve-mw/init/styles/ve.init.MWVESwitchConfirmDialog-vector.css
new file mode 100644
index 000..25c61bd
--- /dev/null
+++ b/modules/ve-mw/init/styles/ve.init.MWVESwitchConfirmDialog-vector.css
@@ -0,0 +1,14 @@
+/*!
+ * VisualEditor MediaWiki Initialization edit switching styles.
+ *
+ * @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+
+.ve-init-mw-desktopArticleTarget-editSwitch {
+   font-size: 0.9143em;
+}
+
+.ve-init-mw-desktopArticleTarget-editSwitch .oo-ui-buttonElement-button {
+   padding: 0.3em;
+}
diff --git a/modules/ve-mw/init/styles/ve.init.MWVESwitchConfirmDialog.css 
b/modules/ve-mw/init/styles/ve.init.MWVESwitchConfirmDialog.css
new file mode 100644
index 000..40ee485
--- /dev/null
+++ b/modules/ve-mw/init/styles/ve.init.MWVESwitchConfirmDialog.css
@@ -0,0 +1,15 @@
+/*!
+ * VisualEditor MediaWiki Initialization edit switching styles.
+ *
+ * @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+
+.ve-init-mw-desktopArticleTarget-editSwitch {
+   float: right;
+   margin: 0;
+}
+
+.ve-init-mw-desktopArticleTarget-editSwitch .oo-ui-iconElement-icon {
+   opacity: 0.8;
+}
\ No newline at end of file
diff --git 
a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-monobook.css 
b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-monobook.css
index 580b226..837f1a3 100644
--- 
a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-monobook.css
+++ 
b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-monobook.css
@@ -22,11 +22,3 @@
background-image: -o-linear-gradient(top, #eaf4fa 0%, #b0d9ee 100%);
background-image: linear-gradient(to bottom, #eaf4fa 0%, #b0d9ee 100%);
 }
-
-.ve-init-mw-desktopArticleTarget-editSwitch {
-   font-size: 1.0079em;
-}
-
-.ve-init-mw-desktopArticleTarget-editSwitch .oo-ui-buttonElement-button {
-   padding: 0.35em;
-}
diff --git 
a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-vector.css 
b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-vector.css
index e399103..9c10390 100644
--- a/modules/ve-mw/init

[MediaWiki-commits] [Gerrit] Hygiene: refactor lead image parallax scrolling - change (apps...wikipedia)

2015-11-11 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review.

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

Change subject: Hygiene: refactor lead image parallax scrolling
..

Hygiene: refactor lead image parallax scrolling

The parallax effect used in the lead image requires the coordination of
views internal to ArticleHeaderView. Move this logic from
LeadImagesHandler into ArticleHeaderView and replace MarginLayoutParams
offsetting with translations which are simpler and available in all
ViewGroups.

Possible tangential fix for T116006.

Bug: T116122
Bug: T116006
Change-Id: I4dead75193f80d1355848aba15e187f73cd301bc
---
M app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
M app/src/main/java/org/wikipedia/views/ArticleHeaderView.java
M app/src/main/java/org/wikipedia/views/ObservableWebView.java
3 files changed, 35 insertions(+), 41 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java 
b/app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
index 0c2f85d..4d23b31 100755
--- a/app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
+++ b/app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
@@ -90,10 +90,8 @@
 private ImageViewWithFace image;
 
 private int displayHeightDp;
-private int imageBaseYOffset;
 private float faceYOffsetNormalized;
 private float displayDensity;
-@NonNull private final WebViewScrollListener webViewScrollListener = new 
WebViewScrollListener();
 
 public LeadImagesHandler(@NonNull final PageFragment parentFragment,
  @NonNull CommunicationBridge bridge,
@@ -293,8 +291,6 @@
 
 // tell our listener that it's ok to start loading the rest of the 
WebView content
 listener.onLayoutComplete(sequence);
-
-forceRefreshWebView();
 }
 
 private void setWebViewPaddingTop(int padding) {
@@ -353,6 +349,7 @@
 private void loadLeadImage(@Nullable String url) {
 if (!isMainPage() && !TextUtils.isEmpty(url) && leadImagesEnabled) {
 String fullUrl = WikipediaApp.getInstance().getNetworkProtocol() + 
":" + url;
+articleHeaderView.setImageYOffset(0);
 articleHeaderView.loadImage(fullUrl);
 }
 }
@@ -371,12 +368,8 @@
 image.startAnimation(anim);
 }
 
-private void forceRefreshWebView() {
-webViewScrollListener.onScrollChanged(webView.getScrollY(), 
webView.getScrollY());
-}
-
 private void initWebView() {
-webView.addOnScrollChangeListener(webViewScrollListener);
+webView.addOnScrollChangeListener(articleHeaderView);
 
 webView.addOnClickListener(new ObservableWebView.OnClickListener() {
 @Override
@@ -427,28 +420,6 @@
 return parentFragment.getActivity();
 }
 
-private class WebViewScrollListener implements 
ObservableWebView.OnScrollChangeListener {
-@Override
-public void onScrollChanged(int oldScrollY, int scrollY) {
-CoordinatorLayout.LayoutParams contParams = 
(CoordinatorLayout.LayoutParams) articleHeaderView
-.getLayoutParams();
-FrameLayout.LayoutParams imgParams = (FrameLayout.LayoutParams) 
image.getLayoutParams();
-if (scrollY > articleHeaderView.getHeight()) {
-if (contParams.topMargin != -articleHeaderView.getHeight()) {
-contParams.topMargin = -articleHeaderView.getHeight();
-imgParams.topMargin = 0;
-articleHeaderView.setLayoutParams(contParams);
-image.setLayoutParams(imgParams);
-}
-} else {
-contParams.topMargin = -scrollY;
-imgParams.topMargin = imageBaseYOffset + scrollY / 2; 
//parallax, baby
-articleHeaderView.setLayoutParams(contParams);
-image.setLayoutParams(imgParams);
-}
-}
-}
-
 private class ImageLoadListener implements 
ImageViewWithFace.OnImageLoadListener {
 @Override
 public void onImageLoaded(Bitmap bitmap, @Nullable final PointF 
faceLocation) {
@@ -476,6 +447,7 @@
 // give our image an offset based on the location of the face,
 // relative to the image container
 float scale = (float) newHeight / (float) bmpHeight;
+int imageBaseYOffset;
 if (faceLocation != null) {
 int faceY = (int) (faceLocation.y * scale);
 // if we have a face, then offset to the face location
@@ -508,7 +480,7 @@
 setImageLayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, 
newHeight);
 }
 
-forceRefreshWebView();
+articleHeaderView.setImageYOffset(imageBaseYOffset);
 
 

[MediaWiki-commits] [Gerrit] Cleaner Special:Watchlist options form - change (mediawiki/core)

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

Change subject: Cleaner Special:Watchlist options form
..


Cleaner Special:Watchlist options form

* Show/hide links have been changed to checkboxes
* The 'show last' links have been changed to a selector
* New hidden parameter as action=submit has been added to detect form
  submissions
* Changed form method to 'get', so as to make links bookmarkable

Bug: T50615
Change-Id: I3bcd27596c21aa474547f182469abbf2ca34c4eb
---
M includes/specials/SpecialWatchlist.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 80 insertions(+), 66 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  Siebrand: Looks good to me, but someone else must approve
  Florianschmidtwelzow: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index 962e0c3..7cc7d5f 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -103,6 +103,11 @@
$user = $this->getUser();
 
$opts->add( 'days', $user->getOption( 'watchlistdays' ), 
FormOptions::FLOAT );
+   $opts->add( 'extended', $user->getBoolOption( 'extendwatchlist' 
) );
+   if ( $this->getRequest()->getVal( 'action' ) == 'submit' ) {
+   // The user has submitted the form, so we dont need the 
default values
+   return $opts;
+   }
 
$opts->add( 'hideminor', $user->getBoolOption( 
'watchlisthideminor' ) );
$opts->add( 'hidebots', $user->getBoolOption( 
'watchlisthidebots' ) );
@@ -114,8 +119,6 @@
if ( $this->getConfig()->get( 'RCWatchCategoryMembership' ) ) {
$opts->add( 'hidecategorization', $user->getBoolOption( 
'watchlisthidecategorization' ) );
}
-
-   $opts->add( 'extended', $user->getBoolOption( 'extendwatchlist' 
) );
 
return $opts;
}
@@ -418,16 +421,16 @@
}
 
$nondefaults = $opts->getChangedValues();
-   $cutofflinks = $this->cutoffLinks( $opts['days'], $nondefaults 
) . "\n";
+   $cutofflinks = $this->msg( 'wlshowtime' ) . ' ' . 
$this->cutoffselector( $opts );
 
# Spit out some control panel links
$filters = array(
-   'hideminor' => 'rcshowhideminor',
-   'hidebots' => 'rcshowhidebots',
-   'hideanons' => 'rcshowhideanons',
-   'hideliu' => 'rcshowhideliu',
-   'hidemyself' => 'rcshowhidemine',
-   'hidepatrolled' => 'rcshowhidepatr'
+   'hideminor' => 'wlshowhideminor',
+   'hidebots' => 'wlshowhidebots',
+   'hideanons' => 'wlshowhideanons',
+   'hideliu' => 'wlshowhideliu',
+   'hidemyself' => 'wlshowhidemine',
+   'hidepatrolled' => 'wlshowhidepatr'
);
 
if ( $this->getConfig()->get( 'RCWatchCategoryMembership' ) ) {
@@ -444,13 +447,18 @@
 
$links = array();
foreach ( $filters as $name => $msg ) {
-   $links[] = $this->showHideLink( $nondefaults, $msg, 
$name, $opts[$name] );
+   $links[] = $this->showHideCheck( $nondefaults, $msg, 
$name, $opts[$name] );
}
 
$hiddenFields = $nondefaults;
+   $hiddenFields['action'] = 'submit';
unset( $hiddenFields['namespace'] );
unset( $hiddenFields['invert'] );
unset( $hiddenFields['associated'] );
+   unset( $hiddenFields['days'] );
+   foreach ( $filters as $key => $value ) {
+   unset( $hiddenFields[$key] );
+   }
 
# Create output
$form = '';
@@ -458,8 +466,10 @@
# Namespace filter and put the whole form together.
$form .= $wlInfo;
$form .= $cutofflinks;
-   $form .= $lang->pipeList( $links ) . "\n";
-   $form .= "\n";
+   $form .= $this->msg( 'hide' ) .
+   $this->msg( 'colon-separator' )->escaped() .
+   implode( ' ', $links );
+   $form .= "\n\n";
$form .= Html::namespaceSelector(
array(
'selected' => $opts['namespace'],
@@ -494,6 +504,41 @@
$this->getOutput()->addHTML( $form );
 
$this->setBottomText( $opts );
+   }
+
+   function cutoffselector( $options ) {
+   $list = array();
+   $selectOptions = '';
+  

  1   2   3   4   >