[MediaWiki-commits] [Gerrit] tlsproxy: enable client/server TFO support in the kernel - change (operations/puppet)

2016-06-21 Thread Ema (Code Review)
Ema has uploaded a new change for review.

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

Change subject: tlsproxy: enable client/server TFO support in the kernel
..

tlsproxy: enable client/server TFO support in the kernel

Enable client/server support for TCP Fast Open (TFO).

The values (bitmap) are:

1: Enables sending data in the opening SYN on the client w/ SG_FASTOPEN
2: Enables TCP Fast Open on the server side, i.e., allowing data
   in a SYN packet to be accepted and passed to the application before the
   3-way hand shake finishes

This is the first step towards enabling TCP Fast Open on tlsproxy. An
nginx configuration change is also necessary (fastopen=N).

Bug: T108827
Ref: https://www.rfc-editor.org/rfc/rfc7413.txt
Change-Id: Id0b37f26225e26d94e31d6948f4679a9d80fdd41
---
M modules/tlsproxy/manifests/instance.pp
1 file changed, 13 insertions(+), 0 deletions(-)


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

diff --git a/modules/tlsproxy/manifests/instance.pp 
b/modules/tlsproxy/manifests/instance.pp
index e62d222..a2b7b27 100644
--- a/modules/tlsproxy/manifests/instance.pp
+++ b/modules/tlsproxy/manifests/instance.pp
@@ -3,6 +3,19 @@
 # Tune kernel settings
 include base::mysterious_sysctl
 
+# Enable client/server TCP Fast Open (TFO)
+#
+# The values (bitmap) are
+# 1: Enables sending data in the opening SYN on the client w/ MSG_FASTOPEN
+# 2: Enables TCP Fast Open on the server side, i.e., allowing data in
+#a SYN packet to be accepted and passed to the application before
+#3-way hand shake finishes
+sysctl::parameters { 'TCP Fast Open':
+values => {
+'net.ipv4.tcp_fastopen' => 3,
+},
+}
+
 $varnish_version4 = hiera('varnish_version4', false)
 $keepalives_per_worker = 
hiera('tlsproxy::localssl::keepalives_per_worker', 0)
 $websocket_support = hiera('cache::websocket_support', false)

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

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

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


[MediaWiki-commits] [Gerrit] Trim search queries in VE's reference search widget - change (mediawiki...Cite)

2016-06-21 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Trim search queries in VE's reference search widget
..

Trim search queries in VE's reference search widget

Bug: T138278
Change-Id: I044fa6b8b5049e5520f0e1b4993eebab8498bd55
---
M modules/ve-cite/ve.ui.MWReferenceSearchWidget.js
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js 
b/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js
index 789edc9..da5f5b0 100644
--- a/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js
+++ b/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js
@@ -207,8 +207,7 @@
  */
 ve.ui.MWReferenceSearchWidget.prototype.addResults = function () {
var i, len, item, $citation, $name,
-   value = this.query.getValue(),
-   query = value.toLowerCase(),
+   query = this.query.getValue().trim().toLowerCase(),
items = [];
 
for ( i = 0, len = this.index.length; i < len; i++ ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I044fa6b8b5049e5520f0e1b4993eebab8498bd55
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
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] Change TimeStamp to Timestamp - change (mediawiki...ContentTranslation)

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

Change subject: Change TimeStamp to Timestamp
..


Change TimeStamp to Timestamp

For consistency, timestamp is considered as single word elsewhere.

Change-Id: I312d4d184ba2d482a00e83f45be3110ce5446c3a
---
M api/ApiQueryContentTranslation.php
M includes/Translation.php
M modules/dashboard/ext.cx.translationlist.js
3 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/api/ApiQueryContentTranslation.php 
b/api/ApiQueryContentTranslation.php
index 06d3c83..e83bb68 100644
--- a/api/ApiQueryContentTranslation.php
+++ b/api/ApiQueryContentTranslation.php
@@ -83,7 +83,7 @@
// We will have extra continue in case the last batch is 
exactly the size of the limit
$count = count( $translations );
if ( $count === $params['limit'] ) {
-   $offset = $translations[$count - 
1]->translation['lastUpdateTimeStamp'];
+   $offset = $translations[$count - 
1]->translation['lastUpdateTimestamp'];
$this->setContinueEnumParameter( 'offset', $offset );
}
 
diff --git a/includes/Translation.php b/includes/Translation.php
index f8d733c..b947bfe 100644
--- a/includes/Translation.php
+++ b/includes/Translation.php
@@ -482,8 +482,8 @@
'sourceURL' => $row->translation_source_url,
'targetURL' => $row->translation_target_url,
'status' => $row->translation_status,
-   'startTimeStamp' => $row->translation_start_timestamp,
-   'lastUpdateTimeStamp' => 
$row->translation_last_updated_timestamp,
+   'startTimestamp' => $row->translation_start_timestamp,
+   'lastUpdateTimestamp' => 
$row->translation_last_updated_timestamp,
'progress' => $row->translation_progress,
'startedTranslator' => $row->translation_started_by,
'lastUpdatedTranslator' => 
$row->translation_last_update_by,
diff --git a/modules/dashboard/ext.cx.translationlist.js 
b/modules/dashboard/ext.cx.translationlist.js
index 6fd00cf..ef50c7d 100644
--- a/modules/dashboard/ext.cx.translationlist.js
+++ b/modules/dashboard/ext.cx.translationlist.js
@@ -255,7 +255,7 @@
.data( 'translation', translation );
$lastUpdated = $( '' )
.addClass( 'last-updated' )
-   .text( moment( translation.lastUpdateTimeStamp, 
'MMDDHHmmss Z' ).fromNow() );
+   .text( moment( translation.lastUpdateTimestamp, 
'MMDDHHmmss Z' ).fromNow() );
$image = $( '' )
.addClass( 'cx-tlitem__image' );
$progressbar = $( '' )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I312d4d184ba2d482a00e83f45be3110ce5446c3a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] package_builder: Add gobject-introspection to package list - change (operations/puppet)

2016-06-21 Thread Muehlenhoff (Code Review)
Muehlenhoff has submitted this change and it was merged.

Change subject: package_builder: Add gobject-introspection to package list
..


package_builder: Add gobject-introspection to package list

The build of librsvg failed in the source package generation stage of
pdebuild (i.e. before the build dependencies are installed in the pbuilder
chroot):

dh: unable to load addon gir: Can't locate Debian/Debhelper/Sequence/gir.pm in 
@INC (you may need to install the Debian::Debhelper::Sequence::gir module) 
(@INC contains:
/etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 
/usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 
/usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 
/usr/local/lib/site_perl .) at (eval 13) line 2.

The debhelper sequencer is provided by gobject-introspection

Change-Id: I5999db117af38f1f46689b3fa65b968f5642d5e1
---
M modules/package_builder/manifests/init.pp
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Muehlenhoff: Verified; Looks good to me, approved
  Alexandros Kosiaris: Looks good to me, but someone else must approve



diff --git a/modules/package_builder/manifests/init.pp 
b/modules/package_builder/manifests/init.pp
index 8f3accc..94368e3 100644
--- a/modules/package_builder/manifests/init.pp
+++ b/modules/package_builder/manifests/init.pp
@@ -35,6 +35,7 @@
 'unzip',
 'debian-archive-keyring',
 'gnome-pkg-tools',
+'gobject-introspection',
 ])
 
 if $::operatingsystem == 'Ubuntu' {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5999db117af38f1f46689b3fa65b968f5642d5e1
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Muehlenhoff 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Muehlenhoff 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Manage Postgresql data dir with Puppet - change (operations/puppet)

2016-06-21 Thread Gehel (Code Review)
Gehel has submitted this change and it was merged.

Change subject: Manage Postgresql data dir with Puppet
..


Manage Postgresql data dir with Puppet

Default data directory (/var/lib/postgresql/...) is created during
installation of debian package. In case we want to use another data directory,
like it is the case for maps servers, this directory is not created and need
to be managed by Puppet.

Minor refactoring of existing tests was done to ensure all tests are green.

Bug: T138092
Change-Id: Iec59cf0290a5ea34cdab26d3604b32a9edde4967
---
M hieradata/role/common/maps/master.yaml
M hieradata/role/common/maps/slave.yaml
M modules/postgresql/manifests/master.pp
M modules/postgresql/manifests/server.pp
M modules/postgresql/manifests/slave.pp
M modules/postgresql/spec/classes/postgresql_server_spec.rb
M modules/postgresql/spec/classes/postgresql_slave_spec.rb
M modules/postgresql/spec/defines/postgresql_user_spec.rb
M modules/postgresql/templates/postgresql.conf.erb
M modules/role/manifests/osm/common.pp
M modules/role/manifests/osm/master.pp
M modules/role/manifests/osm/slave.pp
M modules/role/manifests/postgres/common.pp
M modules/role/manifests/postgres/master.pp
M modules/role/manifests/postgres/slave.pp
15 files changed, 99 insertions(+), 66 deletions(-)

Approvals:
  Gehel: Looks good to me, approved
  Alexandros Kosiaris: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/hieradata/role/common/maps/master.yaml 
b/hieradata/role/common/maps/master.yaml
index f78..4e2860e 100644
--- a/hieradata/role/common/maps/master.yaml
+++ b/hieradata/role/common/maps/master.yaml
@@ -1,5 +1,5 @@
 postgresql::master::pgversion: 9.4
-postgresql::master::datadir: /srv/postgresql/9.4/main
+postgresql::master::root_dir: /srv/postgresql
 postgresql::master::includes:
   - tuning.conf
   - logging.conf
diff --git a/hieradata/role/common/maps/slave.yaml 
b/hieradata/role/common/maps/slave.yaml
index 4454cb9..1ef1126 100644
--- a/hieradata/role/common/maps/slave.yaml
+++ b/hieradata/role/common/maps/slave.yaml
@@ -1,5 +1,5 @@
 postgresql::slave::pgversion: 9.4
-postgresql::slave::datadir: /srv/postgresql/9.4/main
+postgresql::slave::root_dir: /srv/postgresql
 postgresql::slave::includes: tuning.conf
 # Defined in the private repo
 #postgresql::slave::replication_pass: justapass
diff --git a/modules/postgresql/manifests/master.pp 
b/modules/postgresql/manifests/master.pp
index 1869fff..148a67c 100644
--- a/modules/postgresql/manifests/master.pp
+++ b/modules/postgresql/manifests/master.pp
@@ -17,6 +17,8 @@
 #   Defaults to 64. Refer to postgresql documentation for its meaning
 #   wal_keep_segments
 #   Defaults to 128. Refer to postgresql documentation for its meaning
+#   root_dir
+#   See $postgresql::server::root_dir
 #
 # Actions:
 #  Install/configure postgresql as a master. Also create replication users
@@ -38,14 +40,14 @@
 $max_wal_senders=3,
 $checkpoint_segments=64,
 $wal_keep_segments=128,
-$datadir=undef
-) {
+$root_dir='/var/lib/postgresql',
+) {
 
 class { 'postgresql::server':
 ensure=> $ensure,
 pgversion => $pgversion,
 includes  => [ $includes, 'master.conf'],
-datadir   => $datadir,
+root_dir  => $root_dir,
 }
 
 file { "/etc/postgresql/${pgversion}/main/master.conf":
diff --git a/modules/postgresql/manifests/server.pp 
b/modules/postgresql/manifests/server.pp
index 9ef223b..1bbf031 100644
--- a/modules/postgresql/manifests/server.pp
+++ b/modules/postgresql/manifests/server.pp
@@ -13,6 +13,9 @@
 #   includes
 #   An array of files that will be included in the config. It is
 #   the caller's responsibility to provide these
+#   root_dir
+#   The root directory for postgresql data. The actual directory will be
+#   "${root_dir}/${pgversion}/main".
 #
 # Actions:
 #  Install/configure postgresql
@@ -32,7 +35,7 @@
 $includes = [],
 $listen_addresses = '*',
 $port = '5432',
-$datadir  = undef,
+$root_dir = '/var/lib/postgresql',
 ) {
 package { [
 "postgresql-${pgversion}",
@@ -45,6 +48,23 @@
 ensure => $ensure,
 }
 
+$data_dir = "${root_dir}/${pgversion}/main"
+
+file {  [ $root_dir, "${root_dir}/${pgversion}" ] :
+ensure  => ensure_directory($ensure),
+owner   => 'postgres',
+group   => 'postgres',
+mode=> '0755',
+require => Package["postgresql-${pgversion}"],
+}
+
+file { $data_dir:
+ensure => ensure_directory($ensure),
+owner  => 'postgres',
+group  => 'postgres',
+mode   => '0700',
+}
+
 exec { 'pgreload':
 command => "/usr/bin/pg_ctlcluster ${pgversion} main reload",
 user=> 'postgres',
diff --git a/modules/postgresql/manifests/slave.pp 
b/modules/postgresql/manifests/slave.pp
index 

[MediaWiki-commits] [Gerrit] otrs: add check_procs for clamd/freshclam - change (operations/puppet)

2016-06-21 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: otrs: add check_procs for clamd/freshclam
..


otrs: add check_procs for clamd/freshclam

The role class is a misnomer (this sets up everything, not just the
webserver) and the lines between the clamav module, the otrs module and
the role class are very blurry. Add the checks to the role class for
now.

Bug: T137188
Change-Id: I9907565d36fc8356f7596703273e78bb8fe4e417
---
M modules/role/manifests/otrs/webserver.pp
1 file changed, 9 insertions(+), 0 deletions(-)

Approvals:
  Muehlenhoff: Looks good to me, but someone else must approve
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/modules/role/manifests/otrs/webserver.pp 
b/modules/role/manifests/otrs/webserver.pp
index d79d689..4fda246 100644
--- a/modules/role/manifests/otrs/webserver.pp
+++ b/modules/role/manifests/otrs/webserver.pp
@@ -59,6 +59,15 @@
 check_command => 'check_smtp',
 }
 
+nrpe::monitor_service{ 'clamd':
+description  => 'clamd running',
+nrpe_command => '/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u 
clamav -C clamd'
+}
+nrpe::monitor_service{ 'freshclam':
+description  => 'freshclam running',
+nrpe_command => '/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u 
clamav -C freshclam'
+}
+
 # can conflict with ferm module
 if ! defined(Package['libnet-dns-perl']){
 package { 'libnet-dns-perl':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9907565d36fc8356f7596703273e78bb8fe4e417
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Muehlenhoff 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] New Wikidata Build - 2016-06-21T10:00:01+0000 - change (mediawiki...Wikidata)

2016-06-21 Thread WikidataBuilder (Code Review)
WikidataBuilder has uploaded a new change for review.

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

Change subject: New Wikidata Build - 2016-06-21T10:00:01+
..

New Wikidata Build - 2016-06-21T10:00:01+

Change-Id: I34484f67c8e344d75347a0a92c486092f4e6b955
---
M composer.lock
M extensions/PropertySuggester/PropertySuggesterHooks.php
M extensions/PropertySuggester/README.md
A extensions/PropertySuggester/i18n/de.json
A extensions/PropertySuggester/i18n/es.json
A extensions/PropertySuggester/i18n/fr.json
A extensions/PropertySuggester/i18n/gl.json
A extensions/PropertySuggester/i18n/he.json
A extensions/PropertySuggester/i18n/id.json
A extensions/PropertySuggester/i18n/it.json
A extensions/PropertySuggester/i18n/mk.json
M extensions/PropertySuggester/i18n/qqq.json
A extensions/PropertySuggester/i18n/ru.json
A extensions/PropertySuggester/i18n/uk.json
A extensions/PropertySuggester/i18n/zh-hans.json
M extensions/PropertySuggester/maintenance/UpdateTable.php
M extensions/PropertySuggester/modules/ext.PropertySuggester.EntitySelector.js
M extensions/PropertySuggester/src/PropertySuggester/SuggesterParamsParser.php
M 
extensions/PropertySuggester/src/PropertySuggester/Suggesters/SimpleSuggester.php
M extensions/PropertySuggester/src/PropertySuggester/SuggestionGenerator.php
M 
extensions/PropertySuggester/src/PropertySuggester/UpdateTable/Importer/BasicImporter.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/GetSuggestionsTest.php
A 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/PropertySuggesterHooksTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/ResultBuilderTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php
A extensions/Wikibase/client/i18n/sat.json
M extensions/Wikibase/client/includes/WikibaseClient.php
M extensions/Wikibase/lib/i18n/fi.json
M extensions/Wikibase/lib/includes/Interactors/TermIndexSearchInteractor.php
M extensions/Wikibase/lib/includes/TermIndexEntry.php
M extensions/Wikibase/lib/tests/phpunit/Store/TermIndexTest.php
A extensions/Wikibase/repo/i18n/sat.json
M extensions/Wikibase/repo/includes/Api/SetReference.php
M extensions/Wikibase/repo/includes/WikibaseRepo.php
M extensions/Wikibase/repo/tests/phpunit/includes/Api/SetReferenceTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/WikibaseRepoTest.php
M vendor/composer/installed.json
38 files changed, 496 insertions(+), 188 deletions(-)


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

diff --git a/composer.lock b/composer.lock
index 6bc5c08..c47b190 100644
--- a/composer.lock
+++ b/composer.lock
@@ -813,16 +813,16 @@
 },
 {
 "name": "propertysuggester/property-suggester",
-"version": "3.0.1",
+"version": "3.0.2",
 "source": {
 "type": "git",
 "url": "https://github.com/Wikidata-lib/PropertySuggester.git;,
-"reference": "c267839dbf9e1369053999ebee996bff7c87f3ee"
+"reference": "fdb33b593b96a890145c6ae008333768fb4f0d3c"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/Wikidata-lib/PropertySuggester/zipball/c267839dbf9e1369053999ebee996bff7c87f3ee;,
-"reference": "c267839dbf9e1369053999ebee996bff7c87f3ee",
+"url": 
"https://api.github.com/repos/Wikidata-lib/PropertySuggester/zipball/fdb33b593b96a890145c6ae008333768fb4f0d3c;,
+"reference": "fdb33b593b96a890145c6ae008333768fb4f0d3c",
 "shasum": ""
 },
 "require": {
@@ -856,7 +856,7 @@
 "wikibase",
 "wikidata"
 ],
-"time": "2016-03-16 11:16:15"
+"time": "2016-06-20 17:44:28"
 },
 {
 "name": "serialization/serialization",
@@ -1570,12 +1570,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "ec1396d91432627aedd33cef4cf020045df36322"
+"reference": "ca948d8eb949433d105fbf51448b902c89cb652e"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/ec1396d91432627aedd33cef4cf020045df36322;,
-"reference": "ec1396d91432627aedd33cef4cf020045df36322",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/ca948d8eb949433d105fbf51448b902c89cb652e;,
+"reference": "ca948d8eb949433d105fbf51448b902c89cb652e",
 "shasum": ""
 },
 

[MediaWiki-commits] [Gerrit] New Wikidata Build - 2016-06-21T10:00:01+0000 - change (mediawiki...Wikidata)

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

Change subject: New Wikidata Build - 2016-06-21T10:00:01+
..


New Wikidata Build - 2016-06-21T10:00:01+

Change-Id: I34484f67c8e344d75347a0a92c486092f4e6b955
---
M composer.lock
M extensions/PropertySuggester/PropertySuggesterHooks.php
M extensions/PropertySuggester/README.md
A extensions/PropertySuggester/i18n/de.json
A extensions/PropertySuggester/i18n/es.json
A extensions/PropertySuggester/i18n/fr.json
A extensions/PropertySuggester/i18n/gl.json
A extensions/PropertySuggester/i18n/he.json
A extensions/PropertySuggester/i18n/id.json
A extensions/PropertySuggester/i18n/it.json
A extensions/PropertySuggester/i18n/mk.json
M extensions/PropertySuggester/i18n/qqq.json
A extensions/PropertySuggester/i18n/ru.json
A extensions/PropertySuggester/i18n/uk.json
A extensions/PropertySuggester/i18n/zh-hans.json
M extensions/PropertySuggester/maintenance/UpdateTable.php
M extensions/PropertySuggester/modules/ext.PropertySuggester.EntitySelector.js
M extensions/PropertySuggester/src/PropertySuggester/SuggesterParamsParser.php
M 
extensions/PropertySuggester/src/PropertySuggester/Suggesters/SimpleSuggester.php
M extensions/PropertySuggester/src/PropertySuggester/SuggestionGenerator.php
M 
extensions/PropertySuggester/src/PropertySuggester/UpdateTable/Importer/BasicImporter.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/GetSuggestionsTest.php
A 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/PropertySuggesterHooksTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/ResultBuilderTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php
A extensions/Wikibase/client/i18n/sat.json
M extensions/Wikibase/client/includes/WikibaseClient.php
M extensions/Wikibase/lib/i18n/fi.json
M extensions/Wikibase/lib/includes/Interactors/TermIndexSearchInteractor.php
M extensions/Wikibase/lib/includes/TermIndexEntry.php
M extensions/Wikibase/lib/tests/phpunit/Store/TermIndexTest.php
A extensions/Wikibase/repo/i18n/sat.json
M extensions/Wikibase/repo/includes/Api/SetReference.php
M extensions/Wikibase/repo/includes/WikibaseRepo.php
M extensions/Wikibase/repo/tests/phpunit/includes/Api/SetReferenceTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/WikibaseRepoTest.php
M vendor/composer/installed.json
38 files changed, 496 insertions(+), 188 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index 6bc5c08..c47b190 100644
--- a/composer.lock
+++ b/composer.lock
@@ -813,16 +813,16 @@
 },
 {
 "name": "propertysuggester/property-suggester",
-"version": "3.0.1",
+"version": "3.0.2",
 "source": {
 "type": "git",
 "url": "https://github.com/Wikidata-lib/PropertySuggester.git;,
-"reference": "c267839dbf9e1369053999ebee996bff7c87f3ee"
+"reference": "fdb33b593b96a890145c6ae008333768fb4f0d3c"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/Wikidata-lib/PropertySuggester/zipball/c267839dbf9e1369053999ebee996bff7c87f3ee;,
-"reference": "c267839dbf9e1369053999ebee996bff7c87f3ee",
+"url": 
"https://api.github.com/repos/Wikidata-lib/PropertySuggester/zipball/fdb33b593b96a890145c6ae008333768fb4f0d3c;,
+"reference": "fdb33b593b96a890145c6ae008333768fb4f0d3c",
 "shasum": ""
 },
 "require": {
@@ -856,7 +856,7 @@
 "wikibase",
 "wikidata"
 ],
-"time": "2016-03-16 11:16:15"
+"time": "2016-06-20 17:44:28"
 },
 {
 "name": "serialization/serialization",
@@ -1570,12 +1570,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "ec1396d91432627aedd33cef4cf020045df36322"
+"reference": "ca948d8eb949433d105fbf51448b902c89cb652e"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/ec1396d91432627aedd33cef4cf020045df36322;,
-"reference": "ec1396d91432627aedd33cef4cf020045df36322",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/ca948d8eb949433d105fbf51448b902c89cb652e;,
+"reference": "ca948d8eb949433d105fbf51448b902c89cb652e",
 "shasum": ""
 },
 "require": {
@@ -1647,7 +1647,7 @@
 

[MediaWiki-commits] [Gerrit] Automatically set map view if not defined explicitly - change (mediawiki...Kartographer)

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

Change subject: Automatically set map view if not defined explicitly
..


Automatically set map view if not defined explicitly

Bug: T137678
Change-Id: I3b7f0cb1017ae5c7c4d5394568ffa4a02a09b63d
---
M i18n/en.json
M i18n/qqq.json
M includes/Tag/MapFrame.php
M includes/Tag/MapLink.php
M includes/Tag/TagHandler.php
M modules/kartographer.js
M tests/parserTests.txt
7 files changed, 116 insertions(+), 25 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index d356df9..be99bc3 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -24,6 +24,7 @@
"kartographer-error-missing-attr": "Attribute \"$1\" is missing",
"kartographer-error-bad_attr": "Attribute \"$1\" has an invalid value",
"kartographer-error-bad_data": "The JSON content is not valid 
GeoJSON+simplestyle",
+   "kartographer-error-latlon": "Either both \"latitude\" and 
\"longitude\" parameters should be supplied or neither of them",
"kartographer-tracking-category": "Pages with maps",
"kartographer-tracking-category-desc": "The page includes a map",
"kartographer-coord-combined": "$1 $2",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index b40c092..34714cc 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -27,6 +27,7 @@
"kartographer-error-missing-attr": "Error shown instead of a map when 
required parameter(s) is missing.\n\nParameters:\n* $1 - non-localized 
attribute name, such as 'height', 'latitude', etc",
"kartographer-error-bad_attr": "Error shown instead of a map in case of 
a problem with parameters.\n\nParameters:\n* $1 - non-localized attribute name, 
such as 'height', 'latitude', etc",
"kartographer-error-bad_data": "This error is shown if the content of 
the tag is syntactically valid JSON however it does not adhere to GeoJSON and 
simplestyle specifications",
+   "kartographer-error-latlon": "Error shown by maplink or 
mapframe when certain parameters are incorrect",
"kartographer-tracking-category": "Name of the tracking category",
"kartographer-tracking-category-desc": "Description on 
[[Special:TrackingCategories]] for the 
{{msg-mw|kartographer-tracking-category}} tracking category.",
"kartographer-coord-combined": "{{optional}}\nJoins two parts of 
geogrpahical coordinates. $1 and $2 are latitude and longitude, respectively.",
diff --git a/includes/Tag/MapFrame.php b/includes/Tag/MapFrame.php
index f5a0792..a7f1022 100644
--- a/includes/Tag/MapFrame.php
+++ b/includes/Tag/MapFrame.php
@@ -86,10 +86,15 @@
'mw-data' => 'interface',
'style' => "width:{$width}; 
height:{$this->height}px;",
'data-style' => $this->mapStyle,
-   'data-zoom' => $this->zoom,
-   'data-lat' => $this->lat,
-   'data-lon' => $this->lon,
];
+   if ( $this->zoom !== null ) {
+   $attrs['data-zoom'] = $this->zoom;
+   }
+   if ( $this->lat !== null && $this->lon !== null 
) {
+   $attrs['data-lat'] = $this->lat;
+   $attrs['data-lon'] = $this->lon;
+
+   }
if ( isset( $alignClasses[$this->align] ) ) {
$attrs['class'] .= ' ' . 
$alignClasses[$this->align];
}
diff --git a/includes/Tag/MapLink.php b/includes/Tag/MapLink.php
index 639724f..cab6e18 100644
--- a/includes/Tag/MapLink.php
+++ b/includes/Tag/MapLink.php
@@ -39,10 +39,15 @@
'class' => 'mw-kartographer-link',
'mw-data' => 'interface',
'data-style' => $this->mapStyle,
-   'data-zoom' => $this->zoom,
-   'data-lat' => $this->lat,
-   'data-lon' => $this->lon,
];
+   if ( $this->zoom !== null ) {
+   $attrs['data-zoom'] = $this->zoom;
+   }
+   if ( $this->lat !== null && $this->lon !== null ) {
+   $attrs['data-lat'] = $this->lat;
+   $attrs['data-lon'] = $this->lon;
+
+   }
$style = $this->extractMarkerCss();
if ( $style ) {
$attrs['class'] .= ' mw-kartographer-autostyled';
diff --git a/includes/Tag/TagHandler.php b/includes/Tag/TagHandler.php
index e2c3e0d..695c50d 100644
--- a/includes/Tag/TagHandler.php
+++ b/includes/Tag/TagHandler.php

[MediaWiki-commits] [Gerrit] Enhance code documentation. - change (mediawiki...RevisionSlider)

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

Change subject: Enhance code documentation.
..


Enhance code documentation.

Bug: T137965
Change-Id: Ice393838545f1545ee085ecdcddfa35f60b32ecd
---
M modules/ext.RevisionSlider.DiffPage.js
M modules/ext.RevisionSlider.HelpDialog.js
M modules/ext.RevisionSlider.Pointer.js
M modules/ext.RevisionSlider.PointerView.js
M modules/ext.RevisionSlider.Revision.js
M modules/ext.RevisionSlider.RevisionList.js
M modules/ext.RevisionSlider.RevisionListView.js
M modules/ext.RevisionSlider.Slider.js
M modules/ext.RevisionSlider.SliderView.js
M modules/ext.RevisionSlider.fetchRevisions.js
10 files changed, 342 insertions(+), 7 deletions(-)

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



diff --git a/modules/ext.RevisionSlider.DiffPage.js 
b/modules/ext.RevisionSlider.DiffPage.js
index 4d7dd3b..5857710 100644
--- a/modules/ext.RevisionSlider.DiffPage.js
+++ b/modules/ext.RevisionSlider.DiffPage.js
@@ -1,8 +1,19 @@
 ( function ( mw, $ ) {
+   /**
+* Module handling diff page reloading and the RevisionSlider browser 
history
+*
+* @constructor
+*/
var DiffPage = function () {
};
 
$.extend( DiffPage.prototype, {
+   /**
+* Refreshes the diff view with two given revision IDs
+*
+* @param {number} revId1
+* @param {number} revId2
+*/
refresh: function ( revId1, revId2 ) {
$( 'table.diff[data-mw="interface"]' )
.append( $( '' ) )
@@ -43,6 +54,13 @@
} );
},
 
+   /**
+* Pushes the current state onto the history stack
+*
+* @param {number} revId1
+* @param {number} revId2
+* @param {SliderView} sliderView
+*/
pushState: function ( revId1, revId2, sliderView ) {
// IE8 and IE9 do not have history.pushState()
if ( typeof history.pushState === 'function' ) {
@@ -60,6 +78,9 @@
}
},
 
+   /**
+* @param {SliderView} sliderView
+*/
initOnPopState: function ( sliderView ) {
var self = this;
window.addEventListener( 'popstate', function ( event ) 
{
diff --git a/modules/ext.RevisionSlider.HelpDialog.js 
b/modules/ext.RevisionSlider.HelpDialog.js
index 00cc000..e069350 100644
--- a/modules/ext.RevisionSlider.HelpDialog.js
+++ b/modules/ext.RevisionSlider.HelpDialog.js
@@ -2,6 +2,12 @@
// JSHint does not like OOJS' usage of "static" and "super"
/*jshint -W024 */
 
+   /**
+* Module containing the RevisionSlider tutorial
+*
+* @param {Object} config
+* @constructor
+*/
var HelpDialog = function ( config ) {
HelpDialog.super.call( this, config );
};
@@ -22,7 +28,14 @@
];
 
$.extend( HelpDialog.prototype, {
+   /**
+* @type {OO.ui.PanelLayout[]}
+*/
slides: [],
+
+   /**
+* @type {number}
+*/
slidePointer: 0,
 
initialize: function () {
@@ -37,6 +50,9 @@
this.$body.append( this.stackLayout.$element );
},
 
+   /**
+* @return {OO.ui.PanelLayout}
+*/
getSlide1: function () {
var slide = new OO.ui.PanelLayout( { $: this.$, padded: 
true, expanded: false } );
 
@@ -52,6 +68,9 @@
return slide;
},
 
+   /**
+* @return {OO.ui.PanelLayout}
+*/
getSlide2: function () {
var slide = new OO.ui.PanelLayout( { $: this.$, padded: 
true, expanded: false } );
 
@@ -65,6 +84,9 @@
return slide;
},
 
+   /**
+* @return {OO.ui.PanelLayout}
+*/
getSlide3: function () {
var slide = new OO.ui.PanelLayout( { $: this.$, padded: 
true, expanded: false } );
 
@@ -79,6 +101,9 @@
return slide;
},
 
+   /**
+* @return {OO.ui.PanelLayout}
+*/
getSlide4: function () {
var slide = new OO.ui.PanelLayout( { $: this.$, padded: 
true, expanded: false } );
 
@@ -92,6 +117,10 @@
return slide;
},
 
+   /**
+* @param {string} action
+* @return 

[MediaWiki-commits] [Gerrit] Make full screen control a real link so users can open it in... - change (mediawiki...Kartographer)

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

Change subject: Make full screen control a real link so users can open it in a 
new tab/window.
..


Make full screen control a real link so users
can open it in a new tab/window.

Bug: T133787
Change-Id: I2daa1acd30f8d34bb91f0a7ef7ee20d7021b08a4
---
M modules/kartographer.js
1 file changed, 24 insertions(+), 16 deletions(-)

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



diff --git a/modules/kartographer.js b/modules/kartographer.js
index 371791a..af24b3a 100644
--- a/modules/kartographer.js
+++ b/modules/kartographer.js
@@ -56,33 +56,41 @@
},
 
onAdd: function ( map ) {
-   var container = L.DomUtil.create( 'div', 'leaflet-bar' 
),
-   link = L.DomUtil.create( 'a', 
'oo-ui-icon-fullScreen', container );
+   var container = L.DomUtil.create( 'div', 'leaflet-bar' 
);
 
-   this.href = link.href = '#' + 
mw.kartographer.getMapHash( this.options.mapData, this.map );
-   link.title = mw.msg( 'kartographer-fullscreen-text' );
+   this.link = L.DomUtil.create( 'a', 
'oo-ui-icon-fullScreen', container );
+   this.link.title = mw.msg( 
'kartographer-fullscreen-text' );
this.map = map;
 
-   L.DomEvent.addListener( link, 'click', 
this.onShowFullScreen, this );
+   this.map.on( 'moveend', this.onMapMove, this );
+   if ( !router.isSupported() ) {
+   L.DomEvent.addListener( this.link, 'click', 
this.onShowFullScreen, this );
+   }
L.DomEvent.disableClickPropagation( container );
+   this.updateHash();
 
return container;
},
 
-   onShowFullScreen: function ( e ) {
-   var hash = mw.kartographer.getMapHash( 
this.options.mapData, this.map );
-   L.DomEvent.stop( e );
-
-   this.href = '#' + hash;
-
-   if ( router.isSupported() ) {
-   router.navigate( hash );
-   } else {
-   mw.kartographer.openFullscreenMap( this.map, 
getMapPosition( this.map ) );
+   onMapMove: function () {
+   /*jscs:disable disallowDanglingUnderscores */
+   if ( !this.map._loaded ) {
+   return false;
}
+   /*jscs:enable disallowDanglingUnderscores */
+   this.updateHash();
+   },
+
+   updateHash: function () {
+   var hash = mw.kartographer.getMapHash( 
this.options.mapData, this.map );
+   this.link.href = '#' + hash;
+   },
+
+   onShowFullScreen: function ( e ) {
+   L.DomEvent.stop( e );
+   mw.kartographer.openFullscreenMap( this.map, 
getMapPosition( this.map ) );
}
} );
-
/**
 * Create a new interactive map
 *

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki.action.edit.stash: Restore dependency to 'jquery.g... - change (mediawiki/core)

2016-06-21 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review.

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

Change subject: mediawiki.action.edit.stash: Restore dependency to 
'jquery.getAttrs'
..

mediawiki.action.edit.stash: Restore dependency to 'jquery.getAttrs'

mediawiki.action.edit.stash.js uses .serializeObject().
jQuery.fn.serializeObject is defined in module 'jquery.getAttrs'.
The dependency to 'jquery.getAttrs' was removed in 9bec479f.

* Follow-up 9bec479f.

Change-Id: I73bf1a29d76ab97a690b729a7e658048b011c680
---
M resources/Resources.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/30/295330/1

diff --git a/resources/Resources.php b/resources/Resources.php
index e31e77e..90510fc 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1417,6 +1417,7 @@
'mediawiki.action.edit.styles',
'jquery.textSelection',
'jquery.byteLimit',
+   'jquery.getAttrs',
'mediawiki.api',
],
'position' => 'top',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I73bf1a29d76ab97a690b729a7e658048b011c680
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader 

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


[MediaWiki-commits] [Gerrit] ferm: Populate INTERNAL from network::constants - change (operations/puppet)

2016-06-21 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: ferm: Populate INTERNAL from network::constants
..

ferm: Populate INTERNAL from network::constants

INTERNAL was a default variable declared during the first days of ferm
being introduced and was meant as a way to ease the transition to it by
allowing ferm to be used, with quite lax established rules that people
could reuse without having to go through the undocumented/unmaintained pain
network.pp was back then. Now that networks::constants is a quite well
maintained and structured, move INTERNAL into using the
slice_network_constants function(). Furthermore, vary the slicing on the
$::realm in question in order to allow labs realm to use ferm should the
need arise

Change-Id: I7b243278e250c433b3ea3514537bb3abd1b47d44
---
M modules/base/templates/firewall/defs.erb
M modules/network/manifests/constants.pp
2 files changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/modules/base/templates/firewall/defs.erb 
b/modules/base/templates/firewall/defs.erb
index 6aa11d8..4b5f2e5 100644
--- a/modules/base/templates/firewall/defs.erb
+++ b/modules/base/templates/firewall/defs.erb
@@ -1,5 +1,6 @@
 <%-
 external_networks = scope.lookupvar('network::constants::external_networks')
+internal_networks = scope.lookupvar('network::constants::internal_networks')
 all_networks = scope.lookupvar('network::constants::all_networks')
 all_network_subnets = 
scope.lookupvar('network::constants::all_network_subnets')
 special_hosts = scope.lookupvar('network::constants::special_hosts')
@@ -10,7 +11,7 @@
 mw_appserver_networks = 
scope.lookupvar('network::constants::mw_appserver_networks')
 -%>
 
-@def $INTERNAL = (10.0.0.0/8 2620:0:860:100::/56 2620:0:861:100::/56 
2620:0:862:100::/56 2620:0:863:100::/56);
+@def $INTERNAL = (<%- internal_networks.each do |net| -%><%= net %> <% end 
-%>);
 @def $EXTERNAL_NETWORKS = (<%- external_networks.each do |external_net| -%><%= 
external_net %> <% end -%>);
 @def $ALL_NETWORKS = (<%- all_networks.each do |net| -%><%= net %> <% end -%>);
 
diff --git a/modules/network/manifests/constants.pp 
b/modules/network/manifests/constants.pp
index 1a77758..f8161b1 100644
--- a/modules/network/manifests/constants.pp
+++ b/modules/network/manifests/constants.pp
@@ -16,6 +16,7 @@
 '185.15.56.0/22',
 '2a02:ec80::/32',
 ]
+$internal_networks = slice_network_constants($::realm, {'sphere' => 
'private'})
 
 # are you really sure you want to use this? maybe what you really
 # the trusted/production networks. See $production_networks for this.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b243278e250c433b3ea3514537bb3abd1b47d44
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris 

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


[MediaWiki-commits] [Gerrit] ferm: Kill INTERNAL_V4/INTERNAL_V6 definitions - change (operations/puppet)

2016-06-21 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: ferm: Kill INTERNAL_V4/INTERNAL_V6 definitions
..

ferm: Kill INTERNAL_V4/INTERNAL_V6 definitions

Not used anywhere and not really helpful anyway as it turned out
Also we should never distinguish IPv4 from IPv6 and treat them
differently. At least not on such a generic basis

Change-Id: Ica387e2f95fb906035e119129730fd5e5c5ea8e9
---
M modules/base/templates/firewall/defs.erb
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/32/295332/1

diff --git a/modules/base/templates/firewall/defs.erb 
b/modules/base/templates/firewall/defs.erb
index 8ae30de..6aa11d8 100644
--- a/modules/base/templates/firewall/defs.erb
+++ b/modules/base/templates/firewall/defs.erb
@@ -10,9 +10,7 @@
 mw_appserver_networks = 
scope.lookupvar('network::constants::mw_appserver_networks')
 -%>
 
-@def $INTERNAL_V4 = (10.0.0.0/8);
-@def $INTERNAL_V6 = (2620:0:860:100::/56 2620:0:861:100::/56 
2620:0:862:100::/56 2620:0:863:100::/56);
-@def $INTERNAL = ($INTERNAL_V4 $INTERNAL_V6);
+@def $INTERNAL = (10.0.0.0/8 2620:0:860:100::/56 2620:0:861:100::/56 
2620:0:862:100::/56 2620:0:863:100::/56);
 @def $EXTERNAL_NETWORKS = (<%- external_networks.each do |external_net| -%><%= 
external_net %> <% end -%>);
 @def $ALL_NETWORKS = (<%- all_networks.each do |net| -%><%= net %> <% end -%>);
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica387e2f95fb906035e119129730fd5e5c5ea8e9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris 

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


[MediaWiki-commits] [Gerrit] Deploy Compact Language Links as default (Stage 1) - change (operations/mediawiki-config)

2016-06-21 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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

Change subject: Deploy Compact Language Links as default (Stage 1)
..

Deploy Compact Language Links as default (Stage 1)

Beta feature is replaced by a user preference that is enabled by
default in the following sites:
* Wikiversity
* Wikivoyage

Bug: T136677
Change-Id: I87a1561e36684381c21cc295e6a936422770c703
---
M wmf-config/InitialiseSettings.php
1 file changed, 12 insertions(+), 10 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index fb0b71b..1365e64 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12635,6 +12635,18 @@
'testwiki' => false,
'test2wiki' => false,
'nonbetafeatures' => false,
+   'wikiversity' => false,
+   'wikivoyage' => false,
+],
+
+// Whether Compact Links is enabled for new accounts *by default*
+'wmgULSCompactLinksForNewAccounts' => [
+   'default' => false,
+],
+
+// Whether Compact Links is enabled for anonymous users *by default*
+'wmgULSCompactLinksEnableAnon' => [
+   'default' => false,
 ],
 
 //  BetaFeatures end ---
@@ -15953,16 +15965,6 @@
 
 'wmgULSEventLogging' => [
'default' => true,
-],
-
-// Whether Compact Links is enabled for new accounts *by default*
-'wmgULSCompactLinksForNewAccounts' => [
-   'default' => false,
-],
-
-// Whether Compact Links is enabled for anonymous users *by default*
-'wmgULSCompactLinksEnableAnon' => [
-   'default' => false,
 ],
 
 'wmgWikibaseCachePrefix' => [

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

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

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


[MediaWiki-commits] [Gerrit] Define global transition vars before using them - change (mediawiki...Echo)

2016-06-21 Thread Sbisson (Code Review)
Sbisson has uploaded a new change for review.

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

Change subject: Define global transition vars before using them
..

Define global transition vars before using them

Bug: T132954
Change-Id: I9515f79285672aff10545502ba1558dc2443eaff
---
M includes/NotifUser.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/includes/NotifUser.php b/includes/NotifUser.php
index 2442bb8..d344054 100644
--- a/includes/NotifUser.php
+++ b/includes/NotifUser.php
@@ -756,6 +756,8 @@
}
 
protected function getForeignTimestamp( $section = 
EchoAttributeManager::ALL ) {
+   global $wgEchoSectionTransition, $wgEchoBundleTransition;
+
if (
// In section transition mode, we don't trust the 
individual echo_unread_wikis rows
// but we do trust that alert+message=all. In bundle 
transition mode, we don't trust

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9515f79285672aff10545502ba1558dc2443eaff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Sbisson 

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


[MediaWiki-commits] [Gerrit] Add full stop to echo-pref-tooltip-cx - change (mediawiki...ContentTranslation)

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

Change subject: Add full stop to echo-pref-tooltip-cx
..


Add full stop to echo-pref-tooltip-cx

A full stop appears in other messages of this kind.

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

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



diff --git a/i18n/en.json b/i18n/en.json
index 8f9cd99..89ffd42 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -180,7 +180,7 @@
"cx-tools-missing-link-title": "Missing link",
"cx-tools-missing-link-mark-link": "{{GENDER:|Mark}} as missing",
"echo-category-title-cx": "Translations",
-   "echo-pref-tooltip-cx": "Notify me about my translations created using 
Content Translation tool",
+   "echo-pref-tooltip-cx": "Notify me about my translations created using 
Content Translation tool.",
"cx-notification-first-translation": "Congratulations on your first 
translation! Check your contributions and find more pages to translate.",
"cx-notification-first-translation-email-subject": "Congratulations for 
your first translation",
"cx-notification-tenth-translation": "Congratulations for your tenth 
translation! You are becoming an expert translator. Keep up the good work!",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icc710954e49b65f28feacc60ad54661256295d42
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Amire80 
Gerrit-Reviewer: Santhosh 
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] Depool db1068; repool db1070 as api - change (operations/mediawiki-config)

2016-06-21 Thread Jcrespo (Code Review)
Jcrespo has uploaded a new change for review.

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

Change subject: Depool db1068; repool db1070 as api
..

Depool db1068; repool db1070 as api

Change-Id: If8f786604b2f979993e747f3b89384d1df4eedc7
---
M wmf-config/db-eqiad.php
1 file changed, 4 insertions(+), 3 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index c2de140..7da0ecc 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -130,7 +130,7 @@
'db1056' => 100, # 2.8TB  96GB, api
'db1059' => 100, # 2.8TB  96GB, api
'db1064' => 500, # 2.8TB 160GB
-   'db1068' => 500, # 2.8TB 160GB
+#  'db1068' => 500, # 2.8TB 160GB
'db1081' => 300, # 3.6TB 512GB
'db1084' => 300, # 3.6TB 512GB
'db1091' => 300, # 3.6TB 512GB
@@ -139,8 +139,8 @@
'db1049' => 0,   # 2.8TB  64GB, master
'db1026' => 0,   # 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
'db1045' => 0,   # 1.4TB  64GB, vslow, dump
-   'db1070' => 200, # 2.8TB 160GB, api, old master
-   'db1071' => 50,  # 2.8TB 160GB, low weight after repool
+   'db1070' => 50,  # 2.8TB 160GB, api, old master
+   'db1071' => 50,  # 2.8TB 160GB, api
'db1082' => 300, # 3.6TB 512GB
'db1087' => 300, # 3.6TB 512GB
'db1092' => 300, # 3.6TB 512GB
@@ -306,6 +306,7 @@
),
'api' => array(
'db1070' => 1,
+   'db1071' => 1,
),
'watchlist' => array(
'db1026' => 1,

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

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

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


[MediaWiki-commits] [Gerrit] Depool db1068; repool db1070 as api - change (operations/mediawiki-config)

2016-06-21 Thread Jcrespo (Code Review)
Jcrespo has submitted this change and it was merged.

Change subject: Depool db1068; repool db1070 as api
..


Depool db1068; repool db1070 as api

Change-Id: If8f786604b2f979993e747f3b89384d1df4eedc7
---
M wmf-config/db-eqiad.php
1 file changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index c2de140..7da0ecc 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -130,7 +130,7 @@
'db1056' => 100, # 2.8TB  96GB, api
'db1059' => 100, # 2.8TB  96GB, api
'db1064' => 500, # 2.8TB 160GB
-   'db1068' => 500, # 2.8TB 160GB
+#  'db1068' => 500, # 2.8TB 160GB
'db1081' => 300, # 3.6TB 512GB
'db1084' => 300, # 3.6TB 512GB
'db1091' => 300, # 3.6TB 512GB
@@ -139,8 +139,8 @@
'db1049' => 0,   # 2.8TB  64GB, master
'db1026' => 0,   # 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
'db1045' => 0,   # 1.4TB  64GB, vslow, dump
-   'db1070' => 200, # 2.8TB 160GB, api, old master
-   'db1071' => 50,  # 2.8TB 160GB, low weight after repool
+   'db1070' => 50,  # 2.8TB 160GB, api, old master
+   'db1071' => 50,  # 2.8TB 160GB, api
'db1082' => 300, # 3.6TB 512GB
'db1087' => 300, # 3.6TB 512GB
'db1092' => 300, # 3.6TB 512GB
@@ -306,6 +306,7 @@
),
'api' => array(
'db1070' => 1,
+   'db1071' => 1,
),
'watchlist' => array(
'db1026' => 1,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If8f786604b2f979993e747f3b89384d1df4eedc7
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jcrespo 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove automatic mark-as-read-when-seen - change (mediawiki...Echo)

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

Change subject: Remove automatic mark-as-read-when-seen
..


Remove automatic mark-as-read-when-seen

Bug: T132525
Change-Id: I095704252eaf2f8fe71950a4cfcd42a6fce431ff
---
M modules/ext.echo.init.js
M modules/ui/mw.echo.ui.NotificationBadgeWidget.js
M modules/ui/mw.echo.ui.NotificationsListWidget.js
M modules/ui/mw.echo.ui.NotificationsWrapper.js
M modules/ui/mw.echo.ui.SingleNotificationItemWidget.js
5 files changed, 4 insertions(+), 22 deletions(-)

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



diff --git a/modules/ext.echo.init.js b/modules/ext.echo.init.js
index 43a8d91..51901f2 100644
--- a/modules/ext.echo.init.js
+++ b/modules/ext.echo.init.js
@@ -73,7 +73,6 @@
messageController,
messageModelManager,
{
-   markReadWhenSeen: false,
$overlay: 
mw.echo.ui.$overlay,
numItems: numMessages,
hasUnseen: 
hasUnseenMessages,
@@ -108,7 +107,6 @@
alertController,
alertModelManager,
{
-   markReadWhenSeen: false,
numItems: numAlerts,
hasUnseen: hasUnseenAlerts,
badgeIcon: {
diff --git a/modules/ui/mw.echo.ui.NotificationBadgeWidget.js 
b/modules/ui/mw.echo.ui.NotificationBadgeWidget.js
index a06a11f..097a891 100644
--- a/modules/ui/mw.echo.ui.NotificationBadgeWidget.js
+++ b/modules/ui/mw.echo.ui.NotificationBadgeWidget.js
@@ -14,7 +14,6 @@
 *  an array of both. Defaults to 'message'
 * @cfg {number} [numItems=0] How many items are in the button display
 * @cfg {boolean} [hasUnseen=false] Whether there are unseen items
-* @cfg {boolean} [markReadWhenSeen=false] Mark all notifications as 
read on open
 * @cfg {number} [popupWidth=450] The width of the popup
 * @cfg {string|Object} [badgeIcon] The icons to use for this button.
 *  If this is a string, it will be used as the icon regardless of the 
state.
@@ -56,7 +55,6 @@
 
this.maxNotificationCount = mw.config.get( 
'wgEchoMaxNotificationCount' );
this.numItems = config.numItems || 0;
-   this.markReadWhenSeen = !!config.markReadWhenSeen;
this.badgeIcon = config.badgeIcon || {};
this.hasRunFirstTime = false;
 
@@ -82,8 +80,7 @@
this.manager,
{
type: this.types,
-   $overlay: this.$menuOverlay,
-   markReadWhenSeen: this.markReadWhenSeen
+   $overlay: this.$menuOverlay
}
);
 
@@ -277,7 +274,7 @@
 * Update the badge state and label based on changes to the model
 */
mw.echo.ui.NotificationBadgeWidget.prototype.updateBadge = function () {
-   var unreadCount, cappedUnreadCount, badgeLabel, localUnread;
+   var unreadCount, cappedUnreadCount, badgeLabel;
 
unreadCount = this.manager.getUnreadCounter().getCount();
cappedUnreadCount = this.getCappedNotificationCount( 
unreadCount );
@@ -293,8 +290,7 @@
}
 
// Check if we need to display the 'mark all unread' button
-   localUnread = this.manager.hasLocalUnread();
-   this.markAllReadButton.toggle( !this.markReadWhenSeen && 
localUnread );
+   this.markAllReadButton.toggle( this.manager.hasLocalUnread() );
};
 
/**
@@ -351,11 +347,6 @@
function () {
if ( widget.popup.isVisible() ) {
widget.popup.clip();
-
-   // Mark notifications as 'read' 
if markReadWhenSeen is set to true
-   if ( widget.markReadWhenSeen ) {
-   
widget.controller.markEntireListModelRead( 'local', true );
-   }
 
// Update seen time
return 
widget.controller.updateLocalSeenTime();
diff --git a/modules/ui/mw.echo.ui.NotificationsListWidget.js 

[MediaWiki-commits] [Gerrit] Define global transition vars before using them - change (mediawiki...Echo)

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

Change subject: Define global transition vars before using them
..


Define global transition vars before using them

Bug: T132954
Change-Id: I9515f79285672aff10545502ba1558dc2443eaff
---
M includes/NotifUser.php
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/includes/NotifUser.php b/includes/NotifUser.php
index 2442bb8..d344054 100644
--- a/includes/NotifUser.php
+++ b/includes/NotifUser.php
@@ -756,6 +756,8 @@
}
 
protected function getForeignTimestamp( $section = 
EchoAttributeManager::ALL ) {
+   global $wgEchoSectionTransition, $wgEchoBundleTransition;
+
if (
// In section transition mode, we don't trust the 
individual echo_unread_wikis rows
// but we do trust that alert+message=all. In bundle 
transition mode, we don't trust

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9515f79285672aff10545502ba1558dc2443eaff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
Gerrit-Reviewer: Catrope 
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 tilerator to c787f4d - change (maps...deploy)

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

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

Change subject: Update tilerator to c787f4d
..

Update tilerator to c787f4d

List of changes:
c787f4d Added keepJob param
xxx Update node module dependencies

Change-Id: I41c02dda4698b9478ddf0eedab0e8481f855d46e
---
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/package.json
M 
node_modules/jade/node_modules/clean-css/node_modules/source-map/node_modules/amdefine/package.json
M node_modules/kartotherian-autogen/package.json
M 
node_modules/kartotherian-cassandra/node_modules/multistream/node_modules/readable-stream/package.json
M node_modules/kartotherian-cassandra/package.json
M node_modules/kartotherian-core/node_modules/xmldoc/package.json
M node_modules/kartotherian-core/package.json
M node_modules/kartotherian-demultiplexer/package.json
M node_modules/kartotherian-layermixer/package.json
M node_modules/kartotherian-overzoom/package.json
M 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/readable-stream/package.json
M node_modules/kartotherian-postgres/package.json
M node_modules/kartotherian-server/package.json
M node_modules/kartotherian-substantial/package.json
M node_modules/kue-ui/package.json
M 
node_modules/kue/node_modules/stylus/node_modules/debug/node_modules/ms/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/commander/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/sntp/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/asn1/package.json
M 

[MediaWiki-commits] [Gerrit] Deploy Compact Language Links as default (Stage 2) - change (operations/mediawiki-config)

2016-06-21 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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

Change subject: Deploy Compact Language Links as default (Stage 2)
..

Deploy Compact Language Links as default (Stage 2)

Beta feature is replaced by a user preference that is enabled by
default in the following sites:

* Wikipedia, bottom 50 (in terms of number of articles)
* Wikibooks
* Wikinews

New accounts and anonymous users will have Compact Language Links  enabled by
default.

Bug: T136677
Change-Id: Id11a9d9346b111d0150368e11b63c363f29e9ac9
---
A dblists/clldefault.dblist
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
3 files changed, 56 insertions(+), 3 deletions(-)


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

diff --git a/dblists/clldefault.dblist b/dblists/clldefault.dblist
new file mode 100644
index 000..d4a7f49
--- /dev/null
+++ b/dblists/clldefault.dblist
@@ -0,0 +1,50 @@
+lbewiki
+igwiki
+jbowiki
+roa_rupwiki
+tywiki
+jamwiki
+zawiki
+kgwiki
+mdfwiki
+wowiki
+srnwiki
+lgwiki
+abwiki
+ltgwiki
+zuwiki
+smwiki
+chrwiki
+omwiki
+tnwiki
+chywiki
+rmywiki
+cuwiki
+twwiki
+tumwiki
+xhwiki
+rnwiki
+pihwiki
+biwiki
+gotwiki
+sswiki
+pntwiki
+bmwiki
+chwiki
+mowiki
+tswiki
+adywiki
+iuwiki
+stwiki
+eewiki
+nywiki
+fjwiki
+kswiki
+akwiki
+ikwiki
+sgwiki
+vewiki
+dzwiki
+ffwiki
+tiwiki
+crwiki
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 77f6b6c..20f175c 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -166,7 +166,7 @@
foreach ( [ 'private', 'fishbowl', 'special', 'closed', 'flow', 
'flaggedrevs', 'small', 'medium',
'large', 'wikimania', 'wikidata', 'wikidataclient', 
'visualeditor-default',
'commonsuploads', 'nonbetafeatures', 'group0', 
'group1', 'group2', 'wikipedia', 'nonglobal',
-   'wikitech', 'nonecho'
+   'wikitech', 'nonecho', 'clldefault'
] as $tag ) {
$dblist = MWWikiversions::readDbListFile( $tag );
if ( in_array( $wgDBname, $dblist ) ) {
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 1365e64..991b4e9 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12637,16 +12637,19 @@
'nonbetafeatures' => false,
'wikiversity' => false,
'wikivoyage' => false,
+   'wikinews' => false,
+   'wikibooks' => false,
+   'clldefault' => false,
 ],
 
 // Whether Compact Links is enabled for new accounts *by default*
 'wmgULSCompactLinksForNewAccounts' => [
-   'default' => false,
+   'default' => true,
 ],
 
 // Whether Compact Links is enabled for anonymous users *by default*
 'wmgULSCompactLinksEnableAnon' => [
-   'default' => false,
+   'default' => true,
 ],
 
 //  BetaFeatures end ---

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

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

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


[MediaWiki-commits] [Gerrit] (WIP) Notify TileratorUI on new expiry files - change (operations/puppet)

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

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

Change subject: (WIP) Notify TileratorUI on new expiry files
..

(WIP) Notify TileratorUI on new expiry files

When expiry file has been generated, let Tiletator know
about it. Tilerator will process all files matching the pattern
since the last run (as stored in the state file)

Bug: T108459
Change-Id: If453b48296f01f631ffc4223d56611ed6a16067a
---
M modules/osm/templates/replicate-osm.erb
1 file changed, 11 insertions(+), 1 deletion(-)


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

diff --git a/modules/osm/templates/replicate-osm.erb 
b/modules/osm/templates/replicate-osm.erb
index 875973b..3272724 100644
--- a/modules/osm/templates/replicate-osm.erb
+++ b/modules/osm/templates/replicate-osm.erb
@@ -25,4 +25,14 @@
   --expire-output $EXPIRY_FILE \
   --username osmupdater \
   --database gis \
-  --append $EXTRA_PARAMS -
+  --append $EXTRA_PARAMS - && \
+/usr/bin/curl \
+  -d expdirpath=<%= @expire_dir %> \ # expiration files dir
+  -d expmask=expire\\.list\\.* \ # regex to match 
expiration files
+  -d statefile=<%= @expire_dir %>/expire.state \ # tilerator uses this 
file to record last imported data file
+  -d fromZoom=10   \ # new jobs will be 
created from this zoom
+  -d beforeZoom=16 \ # and until (but not 
including) this zoom
+  -d generatorId=gen   \ # copy tiles from ("gen" 
will only produce non-empty tiles)
+  -d storageId=v3  \ # copy tiles to
+  -d deleteEmpty=1 \ # if tile is empty, make 
sure we don't store it, if it was there before
+  http://localhost:6535/add

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

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

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


[MediaWiki-commits] [Gerrit] Update #lsth - change (mediawiki...LabeledSectionTransclusion)

2016-06-21 Thread Skizzerz (Code Review)
Skizzerz has uploaded a new change for review.

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

Change subject: Update #lsth
..

Update #lsth

The lsth function now uses the same machinery as lst/lstx. This allows
it to properly honor noinclude/includeonly/onlyinclude sections as well
as a handful of other improvements (notably, it handles both == wiki
sections == as well as html sections, and can mix between the
two when using the {{#lsth:Page|start|end}} syntax).

Beyond that, the heading comparison for lsth is now case-sensitive (the
documentation indicated that before it was case-insensitive). A fully
case-insensitive comparison does not make sense, and doing a proper
caseless compare would be exceedingly difficult, especially once other
languages are taken into consideration. Even in just English, consider
the following section:
== My Section ==

While the "My Section" text as well as "span" and "class" could be
matched case-insenstively, the class name "mySection" should remain
case-sensitive, as a class "mySection" and a class "mysection" are two
entirely different classes according to the HTML spec.

If case insensitivity is truly desired, perhaps a new function #lsthi
could be introduced. However, I feel that the case insensitivity
property of the previous #lsth was not used very much, so I did not want
to code up something that would generally never see use.

Change-Id: I10e0d78a51b6621959ee51d24a6ba5ee4e5d2eec
---
M LabeledSectionTransclusion.class.php
1 file changed, 137 insertions(+), 57 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LabeledSectionTransclusion
 refs/changes/53/295453/1

diff --git a/LabeledSectionTransclusion.class.php 
b/LabeledSectionTransclusion.class.php
index f4ae2c6..db9dcf8 100644
--- a/LabeledSectionTransclusion.class.php
+++ b/LabeledSectionTransclusion.class.php
@@ -12,7 +12,7 @@
$parser->setHook( 'section', array( __CLASS__, 'noop' ) );
$parser->setFunctionHook( 'lst', array( __CLASS__, 
'pfuncIncludeObj' ), Parser::SFH_OBJECT_ARGS );
$parser->setFunctionHook( 'lstx', array( __CLASS__, 
'pfuncExcludeObj' ), Parser::SFH_OBJECT_ARGS );
-   $parser->setFunctionHook( 'lsth', array( __CLASS__, 
'pfuncIncludeHeading' ) );
+   $parser->setFunctionHook( 'lsth', array( __CLASS__, 
'pfuncIncludeHeading' ), Parser::SFH_OBJECT_ARGS );
 
return true;
}
@@ -291,10 +291,14 @@
 
$newFrame = $frame->newChild( false, $finalTitle );
if ( !count( $args ) ) {
-   return $newFrame->expand( $root );
+   if ( $func == 'lsth' ) {
+   $begin = false;
+   } else {
+   return $newFrame->expand( $root );
+   }
+   } else {
+   $begin = trim( $frame->expand( array_shift( $args ) ) );
}
-
-   $begin = trim( $frame->expand( array_shift( $args ) ) );
 
if ( $func == 'lstx' ) {
if ( !count( $args ) ) {
@@ -305,17 +309,26 @@
}
 
if ( !count( $args ) ) {
-   $end = $begin;
+   if ( $func == 'lsth' ) {
+   $end = false;
+   } else {
+   $end = $begin;
+   }
} else {
$end = trim( $frame->expand( array_shift( $args ) ) );
}
 
-   $beginAttr = self::getAttrPattern_( $begin, 'begin' );
-   $beginRegex = "/^$beginAttr$/s";
-   $endAttr = self::getAttrPattern_( $end, 'end' );
-   $endRegex = "/^$endAttr$/s";
+   if ( $func == 'lsth' ) {
+   $beginRegex = false;
+   $endRegex = false;
+   } else {
+   $beginAttr = self::getAttrPattern_( $begin, 'begin' );
+   $beginRegex = "/^$beginAttr$/s";
+   $endAttr = self::getAttrPattern_( $end, 'end' );
+   $endRegex = "/^$endAttr$/s";
+   }
 
-   return compact( 'dom', 'root', 'newFrame', 'repl', 
'beginRegex', 'begin', 'endRegex' );
+   return compact( 'dom', 'root', 'newFrame', 'repl', 
'beginRegex', 'begin', 'endRegex', 'end' );
}
 
/**
@@ -501,66 +514,133 @@
 * A parser extension that further extends labeled section transclusion,
 * adding a function, #lsth for transcluding marked sections of text,
 *
-* @todo: MW 1.12 version, as per #lst/#lstx
-*
 * @param $parser Parser
 * @param $page string
 * @param $sec string
 * @param $to string
 * @return mixed|string
 */
-  

[MediaWiki-commits] [Gerrit] labstore: Remove redundant calls to lower() for user names - change (operations/puppet)

2016-06-21 Thread Tim Landscheidt (Code Review)
Hello Andrew Bogott, Yuvipanda, Chasemp,

I'd like you to do a code review.  Please visit

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

to review the following change.

Change subject: labstore: Remove redundant calls to lower() for user names
..

labstore: Remove redundant calls to lower() for user names

create-dbusers lowered the case for user names, probably as an
artefact of previously (incorrectly) looking up the wiki user name
which always starts with a capital letter.  Shell user names however
are guaranteed to be lower case, and if they were not, mangling them
would be wrong.  Thus this change removes the calls to lower().

Additionally, this change rewrites the logic for stripping the project
prefix from service group names to not treat the project name as a
regular expression.

Change-Id: Ib0ef575324ad2cf8199295d0a67bea6ab78fb078
---
M modules/labstore/files/create-dbusers
1 file changed, 2 insertions(+), 4 deletions(-)


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

diff --git a/modules/labstore/files/create-dbusers 
b/modules/labstore/files/create-dbusers
index 8c0695d..0e95812 100755
--- a/modules/labstore/files/create-dbusers
+++ b/modules/labstore/files/create-dbusers
@@ -18,7 +18,6 @@
 import ldap3
 import pymysql
 import yaml
-import re
 import os
 import string
 import random
@@ -48,11 +47,10 @@
 def homedir(self):
 prefix = '/srv/project/%s' % self.project
 if self.kind == 'user':
-return os.path.join(prefix, 'home', self.name.lower())
+return os.path.join(prefix, 'home', self.name)
 else:
 return os.path.join(
-prefix, 'project',
-re.sub(r'^%s\.' % self.project, '', self.name.lower())
+prefix, 'project', self.name[len(self.project) + 1:]
 )
 
 def __repr__(self):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0ef575324ad2cf8199295d0a67bea6ab78fb078
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Chasemp 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Update kartotherian to 4bc44bd - change (maps...deploy)

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

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

Change subject: Update kartotherian to 4bc44bd
..

Update kartotherian to 4bc44bd

List of changes:
4bc44bd Added canvas dependencies
xxx Update node module dependencies

Change-Id: I000ea8dadd24914b826e201dc23c610a0164b4af
---
M node_modules/accepts/node_modules/negotiator/package.json
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/include_dirs.js
A node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_callbacks.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_callbacks_12_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_callbacks_pre_12_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_converters.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_converters_43_inl.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_converters_pre_43_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_implementation_12_inl.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_implementation_pre_12_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_maybe_43_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_maybe_pre_43_inl.h
C node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_new.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_object_wrap.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_persistent_12_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_persistent_pre_12_inl.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_string_bytes.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_typedarray_contents.h
A node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_weak.h
C node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/package.json
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/tools/1to2.js
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/tools/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json
M node_modules/kartotherian-autogen/package.json
M node_modules/kartotherian-cassandra/package.json
M node_modules/kartotherian-core/node_modules/xmldoc/package.json
M node_modules/kartotherian-core/package.json
M node_modules/kartotherian-demultiplexer/package.json
M node_modules/kartotherian-geoshapes/package.json
M node_modules/kartotherian-layermixer/package.json
M node_modules/kartotherian-maki/package.json
M node_modules/kartotherian-overzoom/package.json
M node_modules/kartotherian-server/package.json
M node_modules/kartotherian-snapshot/node_modules/abaculus/package.json
A node_modules/kartotherian-snapshot/node_modules/canvas/.npmignore
A node_modules/kartotherian-snapshot/node_modules/canvas/.travis.yml
A node_modules/kartotherian-snapshot/node_modules/canvas/binding.gyp
A node_modules/kartotherian-snapshot/node_modules/canvas/build/Makefile
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/canvas-postbuild.node.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/canvas.node.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas-postbuild.node.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas.node.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/Canvas.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/CanvasGradient.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/CanvasPattern.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/CanvasRenderingContext2d.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/FontFace.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/Image.o.d
A 

[MediaWiki-commits] [Gerrit] Fix ULSCompactLinksEnableAnon - change (mediawiki...UniversalLanguageSelector)

2016-06-21 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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

Change subject: Fix ULSCompactLinksEnableAnon
..

Fix ULSCompactLinksEnableAnon

Bug: T138321
Change-Id: I776c31f94c1314091a3d9b635a33962775dd9b52
---
M UniversalLanguageSelector.hooks.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index 6326246..0effab0 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -63,6 +63,10 @@
return true;
}
 
+   if ( $user->isAnon() && $wgULSCompactLinksEnableAnon == false ) 
{
+   return false;
+   }
+
if ( $wgULSCompactLanguageLinksBetaFeature === true &&
$wgInterwikiMagic === true &&
$wgHideInterlanguageLinks === false &&

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I776c31f94c1314091a3d9b635a33962775dd9b52
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 

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


[MediaWiki-commits] [Gerrit] Hygiene: move getRevision and buildSummaryResponse to library - change (mediawiki...mobileapps)

2016-06-21 Thread BearND (Code Review)
BearND has uploaded a new change for review.

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

Change subject: Hygiene: move getRevision and buildSummaryResponse to library
..

Hygiene: move getRevision and buildSummaryResponse to library

Going to use the two functions for random page functionality, too.
Don't need to pass in pageTitle to buildSummaryResponse since the
extract also includes it, making this function more generally applicable.

Change-Id: Ia652d88c050f1f6a6b07d7acae49117b46ef2f9b
---
M lib/feed/featured.js
M lib/mwapi.js
2 files changed, 17 insertions(+), 15 deletions(-)


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

diff --git a/lib/feed/featured.js b/lib/feed/featured.js
index 9831d90..71c61ad 100644
--- a/lib/feed/featured.js
+++ b/lib/feed/featured.js
@@ -70,19 +70,6 @@
 return extract;
 }
 
-function getRevision(extractObj) {
-return extractObj.revisions[0].revid;
-}
-
-function buildResponse(pageTitle, extractPageObj) {
-return {
-title: pageTitle,
-thumbnail: extractPageObj.thumbnail,
-description: extractPageObj.terms && 
extractPageObj.terms.description[0],
-extract: extractPageObj.extract
-};
-}
-
 function promise(app, req) {
 if (req.params.domain.indexOf('en') !== 0) {
 throw new HTTPError({
@@ -106,9 +93,9 @@
 mwapi.checkForQueryPagesInResponse(req, extractResponse);
 var extractPageObj = getPageObject(extractResponse, true);
 return {
-payload: buildResponse(pageTitle, extractPageObj),
+payload: mwapi.buildSummaryResponse(extractPageObj),
 meta: {
-etag: tfaPageObj.pageid + '/' + getRevision(extractPageObj),
+etag: tfaPageObj.pageid + '/' + 
mwapi.getRevisionFromExtract(extractPageObj)
 }
 };
 });
diff --git a/lib/mwapi.js b/lib/mwapi.js
index d1588f7..ba552d2 100644
--- a/lib/mwapi.js
+++ b/lib/mwapi.js
@@ -159,6 +159,19 @@
   return api.mwApiGet(app, req.params.domain, query);
 }
 
+function getRevisionFromExtract(extractObj) {
+return extractObj.revisions[0].revid;
+}
+
+function buildSummaryResponse(extractObj) {
+return {
+title: extractObj.title,
+thumbnail: extractObj.thumbnail,
+description: extractObj.terms && extractObj.terms.description[0],
+extract: extractObj.extract
+};
+}
+
 function requestMostReadMetadata(app, req, titlesList) {
 var query = {
 action: 'query',
@@ -227,6 +240,8 @@
 checkForQueryPagesInResponse: checkForQueryPagesInResponse,
 requestExtract: requestExtract,
 requestExtractAndDescription: requestExtractAndDescription,
+getRevisionFromExtract: getRevisionFromExtract,
+buildSummaryResponse: buildSummaryResponse,
 requestMostReadMetadata: requestMostReadMetadata,
 API_QUERY_MAX_TITLES: API_QUERY_MAX_TITLES,
 

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

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

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


[MediaWiki-commits] [Gerrit] Archive extension - change (mediawiki...Gather)

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

Change subject: Archive extension
..


Archive extension

Per ,
the extension is now unmaintained, and should be archived to avoid
increasing maintainence burden.

Bug: T136176
Change-Id: Id6224db35259778ceb44be00f5e8702ca5d76571
---
D .jsbeautifyrc
D .jscsrc
D .jscsrctest.js
D .jshintignore
D .jshintrc
D .rubocop.yml
D .svgo.yml
D Gather.alias.php
M Gather.php
D Gemfile.lock
D Gruntfile.js
M README.txt
M composer.json
M extension.json
D i18n/ady-cyrl.json
D i18n/ar.json
D i18n/arq.json
D i18n/ba.json
D i18n/bcl.json
D i18n/bgn.json
D i18n/bho.json
D i18n/bn.json
D i18n/bs.json
D i18n/ca.json
D i18n/ce.json
D i18n/ckb.json
D i18n/cs.json
D i18n/da.json
D i18n/de.json
D i18n/diq.json
D i18n/ee.json
D i18n/el.json
D i18n/en-gb.json
D i18n/en.json
D i18n/eo.json
D i18n/es.json
D i18n/eu.json
D i18n/fa.json
D i18n/fi.json
D i18n/fo.json
D i18n/fr.json
D i18n/frp.json
D i18n/fy.json
D i18n/gd.json
D i18n/gl.json
D i18n/gom-deva.json
D i18n/gom-latn.json
D i18n/he.json
D i18n/hi.json
D i18n/ht.json
D i18n/hu.json
D i18n/hy.json
D i18n/inh.json
D i18n/it.json
D i18n/ja.json
D i18n/jv.json
D i18n/ka.json
D i18n/khw.json
D i18n/kk-cyrl.json
D i18n/km.json
D i18n/kn.json
D i18n/ko.json
D i18n/krl.json
D i18n/ksh.json
D i18n/ku-latn.json
D i18n/la.json
D i18n/lb.json
D i18n/lki.json
D i18n/lo.json
D i18n/lrc.json
D i18n/lt.json
D i18n/lv.json
D i18n/mai.json
D i18n/mg.json
D i18n/mk.json
D i18n/mr.json
D i18n/ms.json
D i18n/nb.json
D i18n/nds-nl.json
D i18n/ne.json
D i18n/nl.json
D i18n/oc.json
D i18n/om.json
D i18n/pam.json
D i18n/pl.json
D i18n/ps.json
D i18n/pt-br.json
D i18n/pt.json
D i18n/qqq.json
D i18n/roa-tara.json
D i18n/ru.json
D i18n/sa.json
D i18n/sco.json
D i18n/sd.json
D i18n/sh.json
D i18n/si.json
D i18n/so.json
D i18n/sr-ec.json
D i18n/su.json
D i18n/sv.json
D i18n/sw.json
D i18n/ta.json
D i18n/te.json
D i18n/tg-cyrl.json
D i18n/tl.json
D i18n/tr.json
D i18n/uk.json
D i18n/ur.json
D i18n/vi.json
D i18n/vo.json
D i18n/xmf.json
D i18n/yi.json
D i18n/zh-hans.json
D i18n/zh-hant.json
D images/beta-feature-ltr.svg
D images/beta-feature-rtl.svg
D includes/EchoGatherModerationHidePresentationModel.php
D includes/EchoGatherModerationPresentationModel.php
D includes/Gather.hooks.php
D includes/api/ApiEditList.php
D includes/api/ApiMixinListAccess.php
D includes/api/ApiQueryListMembership.php
D includes/api/ApiQueryListPages.php
D includes/api/ApiQueryLists.php
D includes/models/ArraySerializable.php
D includes/models/Collection.php
D includes/models/CollectionBase.php
D includes/models/CollectionFeed.php
D includes/models/CollectionFeedItem.php
D includes/models/CollectionInfo.php
D includes/models/CollectionItem.php
D includes/models/CollectionsList.php
D includes/models/Image.php
D includes/models/WithImage.php
D includes/specials/SpecialGather.php
D includes/specials/SpecialGatherEditFeed.php
D includes/specials/SpecialGatherLists.php
D includes/views/Collection.php
D includes/views/CollectionFeed.php
D includes/views/CollectionFeedItem.php
D includes/views/CollectionItemCard.php
D includes/views/CollectionsList.php
D includes/views/CollectionsListItemCard.php
D includes/views/Image.php
D includes/views/NoPublic.php
D includes/views/NotFound.php
D includes/views/Pagination.php
D includes/views/ReportTable.php
D includes/views/ReportTableRow.php
D includes/views/Tabs.php
D includes/views/View.php
D includes/views/helpers/CSS.php
D includes/views/helpers/Template.php
D maintenance/updateCounts.php
M package.json
D phpcs.xml
D resources/ext.gather.api/CollectionsGateway.js
D resources/ext.gather.api/RelatedPagesGateway.js
D resources/ext.gather.buttonspinner/ButtonWithSpinner.js
D resources/ext.gather.buttonspinner/button.less
D resources/ext.gather.collection.base/CollectionsContentOverlayBase.js
D resources/ext.gather.collection.confirm/ConfirmationOverlay.js
D resources/ext.gather.collection.confirm/confirmationOverlay.hogan
D resources/ext.gather.collection.confirm/confirmationOverlay.less
D resources/ext.gather.collection.confirm/vector.less
D resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js
D resources/ext.gather.collection.contentOverlay/content.hogan
D resources/ext.gather.collection.contentOverlay/contentOverlay.less
D resources/ext.gather.collection.contentOverlay/header.hogan
D resources/ext.gather.collection.contentOverlay/images/noimage.png
D resources/ext.gather.collection.contentOverlay/images/noimage.svg
D resources/ext.gather.collection.contentOverlay/images/watchstar.svg
D resources/ext.gather.collection.contentOverlay/vector.less
D resources/ext.gather.collection.delete/CollectionDeleteOverlay.js
D resources/ext.gather.collection.editor/CollectionEditOverlay.js
D resources/ext.gather.collection.editor/SearchTutorialOverlay.hogan
D 

[MediaWiki-commits] [Gerrit] Update kartotherian to 38d22a9 - change (maps...deploy)

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

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

Change subject: Update kartotherian to 38d22a9
..

Update kartotherian to 38d22a9

List of changes:
xxx Update node module dependencies

Change-Id: I1c58111e3cbeedc77fa5ed66df93bbe618385751
---
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/include_dirs.js
A node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_callbacks.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_callbacks_12_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_callbacks_pre_12_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_converters.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_converters_43_inl.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_converters_pre_43_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_implementation_12_inl.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_implementation_pre_12_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_maybe_43_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_maybe_pre_43_inl.h
C node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_new.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_object_wrap.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_persistent_12_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_persistent_pre_12_inl.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_string_bytes.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_typedarray_contents.h
A node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_weak.h
C node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/package.json
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/tools/1to2.js
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/tools/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json
M node_modules/kartotherian-autogen/package.json
M node_modules/kartotherian-cassandra/package.json
M node_modules/kartotherian-core/node_modules/xmldoc/package.json
M node_modules/kartotherian-core/package.json
M node_modules/kartotherian-demultiplexer/package.json
M node_modules/kartotherian-geoshapes/package.json
M node_modules/kartotherian-layermixer/package.json
M node_modules/kartotherian-maki/package.json
M node_modules/kartotherian-overzoom/package.json
M node_modules/kartotherian-server/package.json
M node_modules/kartotherian-snapshot/node_modules/abaculus/package.json
A node_modules/kartotherian-snapshot/node_modules/canvas/.npmignore
A node_modules/kartotherian-snapshot/node_modules/canvas/.travis.yml
A node_modules/kartotherian-snapshot/node_modules/canvas/binding.gyp
A node_modules/kartotherian-snapshot/node_modules/canvas/build/Makefile
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/canvas-postbuild.node.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/canvas.node.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas-postbuild.node.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas.node.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/Canvas.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/CanvasGradient.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/CanvasPattern.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/CanvasRenderingContext2d.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/FontFace.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/Image.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/ImageData.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/color.o.d
A 

[MediaWiki-commits] [Gerrit] Add a node-type index - change (VisualEditor/VisualEditor)

2016-06-21 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Add a node-type index
..

Add a node-type index

Bug: T135950
Change-Id: I51ae4491c26851f9a590825bff962c917bc77ee1
---
M src/dm/ve.dm.Document.js
1 file changed, 85 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/49/295349/1

diff --git a/src/dm/ve.dm.Document.js b/src/dm/ve.dm.Document.js
index 28f0ccb..971a1f9 100644
--- a/src/dm/ve.dm.Document.js
+++ b/src/dm/ve.dm.Document.js
@@ -50,6 +50,7 @@
// Properties
this.parentDocument = parentDocument;
this.completeHistory = [];
+   this.nodesByType = {};
 
if ( data instanceof ve.dm.ElementLinearData ) {
// Pre-split ElementLinearData
@@ -306,6 +307,7 @@
// The end state is stack = [ [this.documentNode] [ array, of, its, 
children ] ]
// so attach all nodes in stack[1] to the root node
ve.batchSplice( this.documentNode, 0, 0, currentStack );
+   this.updateNodesByType( [ this.documentNode ], [] );
 
doc.buildingNodeTree = false;
 };
@@ -954,16 +956,19 @@
  * @return {ve.dm.Node[]} Array containing the rebuilt/inserted nodes
  */
 ve.dm.Document.prototype.rebuildNodes = function ( parent, index, numNodes, 
offset, newLength ) {
-   var // Get a slice of the document where it's been changed
-   data = this.data.sliceObject( offset, offset + newLength ),
+   // Get a slice of the document where it's been changed
+   var data = this.data.sliceObject( offset, offset + newLength ),
// Build document fragment from data
fragment = new this.constructor( data, this.htmlDocument, this 
),
// Get generated child nodes from the document fragment
-   nodes = fragment.getDocumentNode().getChildren();
-   // Replace nodes in the model tree
-   ve.batchSplice( parent, index, numNodes, nodes );
+   addedNodes = fragment.getDocumentNode().getChildren(),
+   // Replace nodes in the model tree
+   removedNodes = ve.batchSplice( parent, index, numNodes, 
addedNodes );
+
+   this.updateNodesByType( addedNodes, removedNodes );
+
// Return inserted nodes
-   return nodes;
+   return addedNodes;
 };
 
 /**
@@ -981,6 +986,80 @@
 };
 
 /**
+ * Update the nodes-by-type index
+ *
+ * @param {ve.dm.Node[]} addedNodes Added nodes
+ * @param {ve.dm.Node[]} removedNodes Removed nodes
+ */
+ve.dm.Document.prototype.updateNodesByType = function ( addedNodes, 
removedNodes ) {
+   var doc = this;
+
+   function remove( node ) {
+   var type = node.getType(),
+   nodes = doc.nodesByType[ type ] || [],
+   index = nodes.indexOf( node );
+
+   if ( index !== -1 ) {
+   nodes.splice( index, 1 );
+   if ( !nodes.length ) {
+   delete doc.nodesByType[ type ];
+   }
+   }
+   }
+
+   function add( node ) {
+   var type = node.getType(),
+   nodes = doc.nodesByType[ type ] = doc.nodesByType[ type 
] || [];
+
+   nodes.push( node );
+   }
+
+   function traverse( nodes, action ) {
+   nodes.forEach( function ( node ) {
+   if ( node.hasChildren() ) {
+   node.traverse( action );
+   }
+   action( node );
+   } );
+   }
+
+   traverse( removedNodes, remove );
+   traverse( addedNodes, add );
+};
+
+/**
+ * Get all nodes in the tree for a specific type
+ *
+ * If a string type is passed only nodes of that exact type will be returned,
+ * if a node class is passed, all sub types will be matched.
+ *
+ * @param {string|Function} type Node type name or node constructor
+ * @param {boolean} sort Sort nodes by document order
+ * @return {ve.dm.Node[]} Nodes of a specific type
+ */
+ve.dm.Document.prototype.getNodesByType = function ( type, sort ) {
+   var t, nodeType,
+   nodes = [];
+   if ( type instanceof Function ) {
+   for ( t in this.nodesByType ) {
+   nodeType = ve.dm.nodeFactory.lookup( t );
+   if ( nodeType.prototype === type.prototype || 
nodeType.prototype instanceof type ) {
+   nodes = nodes.concat( this.getNodesByType( t ) 
);
+   }
+   }
+   } else {
+   nodes = this.nodesByType[ type ];
+   }
+
+   if ( sort ) {
+   nodes.sort( function ( a, b ) {
+   return a.getOffset() - b.getOffset();
+   } );
+   }
+   return nodes;
+};
+
+/**
  * Fix up data so it can safely be 

[MediaWiki-commits] [Gerrit] Script to restore LQT topics to their pre-import state - change (mediawiki...Flow)

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

Change subject: Script to restore LQT topics to their pre-import state
..


Script to restore LQT topics to their pre-import state

The script doesn't entirely "revert" the LQT conversion.
The history of the conversion still exists & it will just create
a new revision with the pre-conversion content (similar to other
"revert" operations in MW).
We also don't really want to "revert" anyway: we want to keep Flow
around because there may already be newer content there.

LQT->Flow conversion does a few things to LQT content:
1/ it archives the LQT board to a subpage
2/ it disables LQT: {{#useliquidthreads:0}}
3/ it edits LQT content to redirect to the Flow post

2 & 3 are relatively straightforward: we want to undo those content
changes (in the way described earlier)

1 is slightly more annoying: that archived LQT board may (and has,
in some cases) already have been moved elsewhere (e.g. to localize
the archive name). Such moves make it impossible to find the LQT
board if we want to run the import again, which intentionally
ignores manual page moves.
To work around this, we'll figure out the original & current LQT
board name and make sure it's moved to its current location AGAIN,
but this time by "Flow talk page manager", and in 1 go.
This will allow the Flow importer to find it and associate it with
the Flow board that has already been created in an earlier
conversion attempt.

Bug: T119509
Change-Id: I1bf5fb41e33c7ffb195675aa0453008566ef9b67
---
A maintenance/FlowRestoreLQT.php
1 file changed, 300 insertions(+), 0 deletions(-)

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



diff --git a/maintenance/FlowRestoreLQT.php b/maintenance/FlowRestoreLQT.php
new file mode 100644
index 000..5b97b60
--- /dev/null
+++ b/maintenance/FlowRestoreLQT.php
@@ -0,0 +1,300 @@
+mDescription = 'Restores LQT boards after a Flow 
conversion (revert LQT conversion edits & move LQT boards back)';
+
+   $this->addOption( 'dryrun', 'Simulate script run, without 
making actual changes' );
+   $this->addOption( 'overwrite-flow', 'Removes the Flow board 
entirely, restoring LQT to its original location' );
+
+   $this->setBatchSize( 1 );
+   }
+
+   public function execute() {
+   $this->talkpageManagerUser = 
FlowHooks::getOccupationController()->getTalkpageManager();
+   $this->dbFactory = Container::get( 'db.factory' );
+   $this->dryRun = $this->getOption( 'dryrun', false );
+   $this->overwrite = $this->getOption( 'overwrite-flow', false );
+
+   $this->output( "Restoring posts...\n" );
+   $this->restoreLQTThreads();
+
+   $this->output( "Restoring boards...\n" );
+   $this->restoreLQTBoards();
+   }
+
+   /**
+* During an import, LQT boards are moved out of the way (archived) to 
make
+* place for the Flow board.
+* And after completing an import, LQT boards are disabled with
+* {{#useliquidthreads:0}}
+* That's all perfectly fine assuming the conversion goes well, but 
we'll
+* want to go back to the original content with this script...
+*/
+   protected function restoreLQTBoards() {
+   $dbr = $this->dbFactory->getWikiDB( DB_SLAVE );
+   $startId = 0;
+
+   do {
+   // fetch all LQT boards that have been moved out of the 
way,
+   // with their original title & their current title
+   $rows = $dbr->select(
+   array( 'logging', 'page', 'revision' ),
+   // log_namespace & log_title will be the 
original location
+   // page_namespace & page_title will be the 
current location
+   // rev_id is the first Flow talk page manager 
edit id
+   // log_id is the log entry for when importer 
moved LQT page
+   array( 'log_namespace', 'log_title', 'page_id', 
'page_namespace', 'page_title', 'rev_id' => 'MIN(rev_id)', 'log_id' ),
+   array(
+   'log_user' => 
$this->talkpageManagerUser->getId(),
+   'log_type' => 'move',
+   'page_content_model' => 'wikitext',
+   'page_id > ' . $dbr->addQuotes( 
$startId ),
+   ),
+   __METHOD__,
+   array(
+   'GROUP BY' => 'rev_page',
+   'LIMIT' => $this->mBatchSize,
+   'ORDER BY' => 'log_id ASC',
+

[MediaWiki-commits] [Gerrit] Group0 to 1.28.0-wmf.7 - change (operations/mediawiki-config)

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

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

Change subject: Group0 to 1.28.0-wmf.7
..

Group0 to 1.28.0-wmf.7

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


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

diff --git a/wikiversions.json b/wikiversions.json
index 9e4255b..2779a50 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -478,7 +478,7 @@
 "maiwiki": "php-1.28.0-wmf.6",
 "map_bmswiki": "php-1.28.0-wmf.6",
 "mdfwiki": "php-1.28.0-wmf.6",
-"mediawikiwiki": "php-1.28.0-wmf.6",
+"mediawikiwiki": "php-1.28.0-wmf.7",
 "metawiki": "php-1.28.0-wmf.6",
 "mgwiki": "php-1.28.0-wmf.6",
 "mgwikibooks": "php-1.28.0-wmf.6",
@@ -745,9 +745,9 @@
 "tawikisource": "php-1.28.0-wmf.6",
 "tawiktionary": "php-1.28.0-wmf.6",
 "tenwiki": "php-1.28.0-wmf.6",
-"test2wiki": "php-1.28.0-wmf.6",
-"testwiki": "php-1.28.0-wmf.6",
-"testwikidatawiki": "php-1.28.0-wmf.6",
+"test2wiki": "php-1.28.0-wmf.7",
+"testwiki": "php-1.28.0-wmf.7",
+"testwikidatawiki": "php-1.28.0-wmf.7",
 "tetwiki": "php-1.28.0-wmf.6",
 "tewiki": "php-1.28.0-wmf.6",
 "tewikibooks": "php-1.28.0-wmf.6",
@@ -877,7 +877,7 @@
 "zawikiquote": "php-1.28.0-wmf.6",
 "zawiktionary": "php-1.28.0-wmf.6",
 "zeawiki": "php-1.28.0-wmf.6",
-"zerowiki": "php-1.28.0-wmf.6",
+"zerowiki": "php-1.28.0-wmf.7",
 "zh_classicalwiki": "php-1.28.0-wmf.6",
 "zh_min_nanwiki": "php-1.28.0-wmf.6",
 "zh_min_nanwikibooks": "php-1.28.0-wmf.6",

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

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

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


[MediaWiki-commits] [Gerrit] Repool db1068 with low weight; depool db1061 and db1062 - change (operations/mediawiki-config)

2016-06-21 Thread Jcrespo (Code Review)
Jcrespo has submitted this change and it was merged.

Change subject: Repool db1068 with low weight; depool db1061 and db1062
..


Repool db1068 with low weight; depool db1061 and db1062

Change-Id: I55f9e2088f9bcbabf85a0d99ee90647bc42eb3a7
---
M wmf-config/db-eqiad.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 7da0ecc..a8b1217 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -130,7 +130,7 @@
'db1056' => 100, # 2.8TB  96GB, api
'db1059' => 100, # 2.8TB  96GB, api
'db1064' => 500, # 2.8TB 160GB
-#  'db1068' => 500, # 2.8TB 160GB
+   'db1068' => 50,  # 2.8TB 160GB, low weight after maintenance
'db1081' => 300, # 3.6TB 512GB
'db1084' => 300, # 3.6TB 512GB
'db1091' => 300, # 3.6TB 512GB
@@ -151,7 +151,7 @@
'db1022' => 100, # 1.4TB  64GB, api
'db1030' => 0,   # 1.4TB  64GB, vslow, dump
'db1037' => 50,  # 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
-   'db1061' => 500, # 2.8TB 128GB
+#  'db1061' => 500, # 2.8TB 128GB
'db1085' => 300, # 3.6TB 512GB
'db1088' => 300, # 3.6TB 512GB
'db1093' => 300, # 3.6TB 512GB
@@ -162,7 +162,7 @@
'db1028' => 50,  # 1.4TB  64GB, vslow, dump
'db1034' => 150, # 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
'db1039' => 300, # 1.4TB  64GB
-   'db1062' => 500, # 2.8TB 128GB
+#  'db1062' => 500, # 2.8TB 128GB
'db1079' => 300, # 3.6TB 512GB
'db1086' => 300, # 3.6TB 512GB
'db1094' => 300, # 3.6TB 512GB

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I55f9e2088f9bcbabf85a0d99ee90647bc42eb3a7
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jcrespo 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] add prometheus VMs in eqiad/codfw - change (operations/dns)

2016-06-21 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review.

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

Change subject: add prometheus VMs in eqiad/codfw
..

add prometheus VMs in eqiad/codfw

Bug: T136313
Change-Id: I29d8f8b83b2f69fa03134413a1fb13941850cce3
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/44/295344/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index a0929fb..fbac4bc 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -857,6 +857,8 @@
 190 1H IN PTR   aqs1005-b.eqiad.wmnet. ; cassandra instance
 195 1H IN PTR   restbase1008-b.eqiad.wmnet.
 196 1H IN PTR   restbase1008-c.eqiad.wmnet.
+197 1H IN PTR   prometheus1001.eqiad.wmnet. ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
+198 1H IN PTR   prometheus1002.eqiad.wmnet. ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
 
 201 1H IN PTR   d-i-test.eqiad.wmnet. ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
 
@@ -2938,6 +2940,8 @@
 178 1H IN PTR   restbase2007-c.codfw.wmnet.
 179 1H IN PTR   maps2002.codfw.wmnet.
 180 1H IN PTR   planet2001.codfw.wmnet. ; VM on the ganeti01.svc.codfw.wmnet 
cluster
+181 1H IN PTR   prometheus2001.codfw.wmnet. ; VM on the 
ganeti01.svc.codfw.wmnet cluster
+182 1H IN PTR   prometheus2002.codfw.wmnet. ; VM on the 
ganeti01.svc.codfw.wmnet cluster
 
 $ORIGIN 17.192.{{ zonename }}.
 1   1H IN PTR   vl2018-eth1.lvs2001.codfw.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index 02732e5..fb24644 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -741,6 +741,8 @@
 praseodymium1H  IN A10.64.16.149
 praseodymium-a  1H  IN A10.64.16.188 ; cassandra instance
 praseodymium-b  1H  IN A10.64.16.189 ; cassandra instance
+prometheus1001  1H  IN A10.64.32.197 ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
+prometheus1002  1H  IN A10.64.32.198 ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
 promethium  1H  IN A10.64.20.12
 
 rcs1001 1H  IN A10.64.32.148
@@ -2760,6 +2762,8 @@
 pc2005  1H  IN A10.192.32.128
 pc2006  1H  IN A10.192.48.39
 phab20011H  IN A10.192.32.147
+prometheus2001  1H  IN A10.192.16.181 ; VM on the ganeti01.svc.codfw.wmnet 
cluster
+prometheus2002  1H  IN A10.192.16.182 ; VM on the ganeti01.svc.codfw.wmnet 
cluster
 pybal-test2001  1H  IN A10.192.16.139 ; VM on the ganeti01.svc.codfw.wmnet 
cluster
 pybal-test2002  1H  IN A10.192.16.140 ; VM on the ganeti01.svc.codfw.wmnet 
cluster
 pybal-test2003  1H  IN A10.192.16.141 ; VM on the ganeti01.svc.codfw.wmnet 
cluster

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I29d8f8b83b2f69fa03134413a1fb13941850cce3
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Filippo Giunchedi 

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


[MediaWiki-commits] [Gerrit] Fix ve.BranchNode#traverse and make non-static - change (VisualEditor/VisualEditor)

2016-06-21 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Fix ve.BranchNode#traverse and make non-static
..

Fix ve.BranchNode#traverse and make non-static

Previously made reference to ve.ce.BranchNode and
was unnecessarily static.

Change-Id: Ic0b3fdff1325672314d3bf579ab25d99dfe8c511
---
M src/ui/elements/ve.ui.PreviewElement.js
M src/ve.BranchNode.js
2 files changed, 5 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/45/295345/1

diff --git a/src/ui/elements/ve.ui.PreviewElement.js 
b/src/ui/elements/ve.ui.PreviewElement.js
index 7c974e6..460b84a 100644
--- a/src/ui/elements/ve.ui.PreviewElement.js
+++ b/src/ui/elements/ve.ui.PreviewElement.js
@@ -110,7 +110,7 @@
 
// Traverse children to see when they are all rerendered
if ( this.view instanceof ve.ce.BranchNode ) {
-   ve.BranchNode.static.traverse( this.view, queueNode );
+   this.view.traverse( queueNode );
} else {
queueNode( this.view );
}
diff --git a/src/ve.BranchNode.js b/src/ve.BranchNode.js
index 3172424..23719a7 100644
--- a/src/ve.BranchNode.js
+++ b/src/ve.BranchNode.js
@@ -26,7 +26,7 @@
 
 OO.initClass( ve.BranchNode );
 
-/* Static Methods */
+/* Methods */
 
 /**
  * Traverse a branch node depth-first.
@@ -35,19 +35,17 @@
  * @param {Function} callback Callback to execute for each traversed node
  * @param {ve.Node} callback.node Node being traversed
  */
-ve.BranchNode.static.traverse = function ( node, callback ) {
+ve.BranchNode.prototype.traverse = function ( node, callback ) {
var i, len,
children = node.getChildren();
 
for ( i = 0, len = children.length; i < len; i++ ) {
callback.call( this, children[ i ] );
-   if ( children[ i ] instanceof ve.ce.BranchNode ) {
-   this.traverse( children[ i ], callback );
+   if ( children[ i ].hasChildren() ) {
+   children[ i ].traverse( callback );
}
}
 };
-
-/* Methods */
 
 /**
  * Check if the node has children.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0b3fdff1325672314d3bf579ab25d99dfe8c511
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
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] Don't reimport existing headers - change (mediawiki...Flow)

2016-06-21 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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

Change subject: Don't reimport existing headers
..

Don't reimport existing headers

maintenance/FlowRestoreLQT.php will restore LQT board content,
causing new revisions. The DB source store (or even the filebased
source store, should it exist there) would not be able to find
these headers since they won't match the already imported header.

Instead of using the unreliable source store id, let's just use
the already known workflow id...

Bug: T119509
Change-Id: I881910977a8826ca5a389c1eb832844ece4dbb93
---
M includes/Import/Importer.php
M includes/Import/LiquidThreadsApi/Objects.php
2 files changed, 11 insertions(+), 3 deletions(-)


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

diff --git a/includes/Import/Importer.php b/includes/Import/Importer.php
index 8604297..1cff2fa 100644
--- a/includes/Import/Importer.php
+++ b/includes/Import/Importer.php
@@ -640,7 +640,15 @@
return;
}
 
-   $existingId = $pageState->getImportedId( $importHeader );
+   /*
+* We don't need $pageState->getImportedId( $importHeader ) 
here, there
+* can only be 1 header per workflow and we already know the 
workflow,
+* might as well query it from the workflow instead of using 
the id from
+* the source store.
+* reason I prefer not to use source store is that a header 
import is
+* incomplete (it doesn't import full history, just the last 
revision.
+*/
+   $existingId = $pageState->boardWorkflow->getId();
if ( $existingId && $pageState->getTopRevision( 'Header', 
$existingId ) ) {
$pageState->logger->info( 'header previously imported' 
);
return;
diff --git a/includes/Import/LiquidThreadsApi/Objects.php 
b/includes/Import/LiquidThreadsApi/Objects.php
index 0eca7fc..7f92f4c 100644
--- a/includes/Import/LiquidThreadsApi/Objects.php
+++ b/includes/Import/LiquidThreadsApi/Objects.php
@@ -310,7 +310,7 @@
 
 class ImportRevision implements IObjectRevision {
/** @var IImportObject **/
-   protected $parentObject;
+   protected $parent;
 
/** @var array **/
protected $apiResponse;
@@ -420,7 +420,7 @@
 // Represents a revision the script makes on its own behalf, using a script 
user
 class ScriptedImportRevision implements IObjectRevision {
/** @var IImportObject **/
-   protected $parentObject;
+   protected $parent;
 
/** @var User */
protected $destinationScriptUser;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I881910977a8826ca5a389c1eb832844ece4dbb93
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie 

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


[MediaWiki-commits] [Gerrit] Add ą, č, ę, ė, į, š, ų, ū, ž to linkTrail for lt language - change (mediawiki/core)

2016-06-21 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review.

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

Change subject: Add ą, č, ę, ė, į, š, ų, ū, ž to linkTrail for lt language
..

Add ą, č, ę, ė, į, š, ų, ū, ž to linkTrail for lt language

Per request on bug by Durininkas.

Bug: T138293
Change-Id: I3d0a8dcb384a28261d6a97da1957623ac4b389f9
---
M languages/messages/MessagesLt.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/42/295342/1

diff --git a/languages/messages/MessagesLt.php 
b/languages/messages/MessagesLt.php
index a8e6c77..b79f9d8 100644
--- a/languages/messages/MessagesLt.php
+++ b/languages/messages/MessagesLt.php
@@ -183,3 +183,4 @@
'ISO 8601 both' => 'xnY-xnm-xnd"T"xnH:xni:xns',
 ];
 
+$linkTrail = '/^([a-ząčęėįšųūž]+)(.*)$/sDu';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d0a8dcb384a28261d6a97da1957623ac4b389f9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] Fix ve.BranchNode#traverse and make non-static - change (VisualEditor/VisualEditor)

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

Change subject: Fix ve.BranchNode#traverse and make non-static
..


Fix ve.BranchNode#traverse and make non-static

Previously made reference to ve.ce.BranchNode and
was unnecessarily static.

Change-Id: Ic0b3fdff1325672314d3bf579ab25d99dfe8c511
---
M src/ui/elements/ve.ui.PreviewElement.js
M src/ve.BranchNode.js
2 files changed, 6 insertions(+), 9 deletions(-)

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



diff --git a/src/ui/elements/ve.ui.PreviewElement.js 
b/src/ui/elements/ve.ui.PreviewElement.js
index 7c974e6..460b84a 100644
--- a/src/ui/elements/ve.ui.PreviewElement.js
+++ b/src/ui/elements/ve.ui.PreviewElement.js
@@ -110,7 +110,7 @@
 
// Traverse children to see when they are all rerendered
if ( this.view instanceof ve.ce.BranchNode ) {
-   ve.BranchNode.static.traverse( this.view, queueNode );
+   this.view.traverse( queueNode );
} else {
queueNode( this.view );
}
diff --git a/src/ve.BranchNode.js b/src/ve.BranchNode.js
index 3172424..ac768fd 100644
--- a/src/ve.BranchNode.js
+++ b/src/ve.BranchNode.js
@@ -26,28 +26,25 @@
 
 OO.initClass( ve.BranchNode );
 
-/* Static Methods */
+/* Methods */
 
 /**
  * Traverse a branch node depth-first.
  *
- * @param {ve.BranchNode} node Branch node to traverse
  * @param {Function} callback Callback to execute for each traversed node
  * @param {ve.Node} callback.node Node being traversed
  */
-ve.BranchNode.static.traverse = function ( node, callback ) {
+ve.BranchNode.prototype.traverse = function ( callback ) {
var i, len,
-   children = node.getChildren();
+   children = this.getChildren();
 
for ( i = 0, len = children.length; i < len; i++ ) {
callback.call( this, children[ i ] );
-   if ( children[ i ] instanceof ve.ce.BranchNode ) {
-   this.traverse( children[ i ], callback );
+   if ( children[ i ].hasChildren() ) {
+   children[ i ].traverse( callback );
}
}
 };
-
-/* Methods */
 
 /**
  * Check if the node has children.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0b3fdff1325672314d3bf579ab25d99dfe8c511
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Improve client-side unread count estimation - change (mediawiki...Echo)

2016-06-21 Thread Sbisson (Code Review)
Sbisson has uploaded a new change for review.

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

Change subject: Improve client-side unread count estimation
..

Improve client-side unread count estimation

- Remove duplicated counter adjustments.

- Differentiate between all IDs to mark as
  read vs. all IDs that represent visible
  notifications when adjusting the counter.

Change-Id: I1b3e52a929c6e920e3b782c9ef028539b3db0c99
---
M modules/controller/mw.echo.Controller.js
1 file changed, 2 insertions(+), 3 deletions(-)


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

diff --git a/modules/controller/mw.echo.Controller.js 
b/modules/controller/mw.echo.Controller.js
index ea08418..3f54ae0 100644
--- a/modules/controller/mw.echo.Controller.js
+++ b/modules/controller/mw.echo.Controller.js
@@ -302,7 +302,7 @@
for ( i = 0; i < items.length; i++ ) {
item = items[ i ];
if ( !item.isRead() ) {
-   itemIds = itemIds.concat( item.getAllIds() );
+   itemIds.push( item.getId() );
}
}
 
@@ -410,7 +410,7 @@
notification.toggleRead( isRead );
} );
 
-   this.manager.getUnreadCounter().estimateChange( isRead ? 
-allIds.length : allIds.length );
+   this.manager.getUnreadCounter().estimateChange( isRead ? 
-itemIds.length : itemIds.length );
 
return this.api.markItemsRead( allIds, model.getSource(), 
isRead ).then( this.refreshUnreadCount.bind( this ) );
};
@@ -484,7 +484,6 @@
// Synchronously remove this model from the 
widget
controller.removeCrossWikiItem();
 
-   controller.manager.counter.estimateChange( 
-itemCounter );
return 
mw.echo.api.NetworkHandler.static.waitForAllPromises( promises );
} );
};

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b3e52a929c6e920e3b782c9ef028539b3db0c99
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Sbisson 

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


[MediaWiki-commits] [Gerrit] Improve client-side unread count estimation - change (mediawiki...Echo)

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

Change subject: Improve client-side unread count estimation
..


Improve client-side unread count estimation

- Remove duplicated counter adjustments.

- Differentiate between all IDs to mark as
  read vs. all IDs that represent visible
  notifications when adjusting the counter.

Change-Id: I1b3e52a929c6e920e3b782c9ef028539b3db0c99
---
M modules/controller/mw.echo.Controller.js
1 file changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/modules/controller/mw.echo.Controller.js 
b/modules/controller/mw.echo.Controller.js
index ea08418..3f54ae0 100644
--- a/modules/controller/mw.echo.Controller.js
+++ b/modules/controller/mw.echo.Controller.js
@@ -302,7 +302,7 @@
for ( i = 0; i < items.length; i++ ) {
item = items[ i ];
if ( !item.isRead() ) {
-   itemIds = itemIds.concat( item.getAllIds() );
+   itemIds.push( item.getId() );
}
}
 
@@ -410,7 +410,7 @@
notification.toggleRead( isRead );
} );
 
-   this.manager.getUnreadCounter().estimateChange( isRead ? 
-allIds.length : allIds.length );
+   this.manager.getUnreadCounter().estimateChange( isRead ? 
-itemIds.length : itemIds.length );
 
return this.api.markItemsRead( allIds, model.getSource(), 
isRead ).then( this.refreshUnreadCount.bind( this ) );
};
@@ -484,7 +484,6 @@
// Synchronously remove this model from the 
widget
controller.removeCrossWikiItem();
 
-   controller.manager.counter.estimateChange( 
-itemCounter );
return 
mw.echo.api.NetworkHandler.static.waitForAllPromises( promises );
} );
};

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b3e52a929c6e920e3b782c9ef028539b3db0c99
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Improve client-side unread count estimation - change (mediawiki...Echo)

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

Change subject: Improve client-side unread count estimation
..


Improve client-side unread count estimation

- Remove duplicated counter adjustments.

- Differentiate between all IDs to mark as
  read vs. all IDs that represent visible
  notifications when adjusting the counter.

Change-Id: I1b3e52a929c6e920e3b782c9ef028539b3db0c99
(cherry picked from commit 5a5e1970c5e8e08ec8ee502b53a5a9937f888d70)
---
M modules/controller/mw.echo.Controller.js
1 file changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/modules/controller/mw.echo.Controller.js 
b/modules/controller/mw.echo.Controller.js
index ea08418..3f54ae0 100644
--- a/modules/controller/mw.echo.Controller.js
+++ b/modules/controller/mw.echo.Controller.js
@@ -302,7 +302,7 @@
for ( i = 0; i < items.length; i++ ) {
item = items[ i ];
if ( !item.isRead() ) {
-   itemIds = itemIds.concat( item.getAllIds() );
+   itemIds.push( item.getId() );
}
}
 
@@ -410,7 +410,7 @@
notification.toggleRead( isRead );
} );
 
-   this.manager.getUnreadCounter().estimateChange( isRead ? 
-allIds.length : allIds.length );
+   this.manager.getUnreadCounter().estimateChange( isRead ? 
-itemIds.length : itemIds.length );
 
return this.api.markItemsRead( allIds, model.getSource(), 
isRead ).then( this.refreshUnreadCount.bind( this ) );
};
@@ -484,7 +484,6 @@
// Synchronously remove this model from the 
widget
controller.removeCrossWikiItem();
 
-   controller.manager.counter.estimateChange( 
-itemCounter );
return 
mw.echo.api.NetworkHandler.static.waitForAllPromises( promises );
} );
};

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b3e52a929c6e920e3b782c9ef028539b3db0c99
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.28.0-wmf.7
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Sbisson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] SubGroupListWidget: use timestamp from model, not from listW... - change (mediawiki...Echo)

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

Change subject: SubGroupListWidget: use timestamp from model, not from 
listWidget
..


SubGroupListWidget: use timestamp from model, not from listWidget

This ensures that the fallback timestamp is used if the list is
still empty. Not doing this causes the wikis in the cross-wiki bundle
to appear in the wrong order. Also, it makes more sense to use the
model as the source of truth regardless.

Bug: T138115
Change-Id: Icbfdc7e7c7f67179e50f0f692aef1a54568265e6
(cherry picked from commit 92d1d600aec840f3416572bd59be0855c2ea27c5)
---
M modules/ui/mw.echo.ui.SubGroupListWidget.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ui/mw.echo.ui.SubGroupListWidget.js 
b/modules/ui/mw.echo.ui.SubGroupListWidget.js
index 1ccd13f..2ea91d5 100644
--- a/modules/ui/mw.echo.ui.SubGroupListWidget.js
+++ b/modules/ui/mw.echo.ui.SubGroupListWidget.js
@@ -206,7 +206,7 @@
 * @return {number} Timestamp
 */
mw.echo.ui.SubGroupListWidget.prototype.getTimestamp = function () {
-   return this.listWidget.getTimestamp();
+   return this.model.getTimestamp();
};
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icbfdc7e7c7f67179e50f0f692aef1a54568265e6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.28.0-wmf.7
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Trim search queries in VE's reference search widget - change (mediawiki...Cite)

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

Change subject: Trim search queries in VE's reference search widget
..


Trim search queries in VE's reference search widget

Bug: T138278
Change-Id: I044fa6b8b5049e5520f0e1b4993eebab8498bd55
---
M modules/ve-cite/ve.ui.MWReferenceSearchWidget.js
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js 
b/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js
index 789edc9..da5f5b0 100644
--- a/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js
+++ b/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js
@@ -207,8 +207,7 @@
  */
 ve.ui.MWReferenceSearchWidget.prototype.addResults = function () {
var i, len, item, $citation, $name,
-   value = this.query.getValue(),
-   query = value.toLowerCase(),
+   query = this.query.getValue().trim().toLowerCase(),
items = [];
 
for ( i = 0, len = this.index.length; i < len; i++ ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I044fa6b8b5049e5520f0e1b4993eebab8498bd55
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Repool db1068 with low weight; depool db1061 and db1062 - change (operations/mediawiki-config)

2016-06-21 Thread Jcrespo (Code Review)
Jcrespo has uploaded a new change for review.

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

Change subject: Repool db1068 with low weight; depool db1061 and db1062
..

Repool db1068 with low weight; depool db1061 and db1062

Change-Id: I55f9e2088f9bcbabf85a0d99ee90647bc42eb3a7
---
M wmf-config/db-eqiad.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 7da0ecc..a8b1217 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -130,7 +130,7 @@
'db1056' => 100, # 2.8TB  96GB, api
'db1059' => 100, # 2.8TB  96GB, api
'db1064' => 500, # 2.8TB 160GB
-#  'db1068' => 500, # 2.8TB 160GB
+   'db1068' => 50,  # 2.8TB 160GB, low weight after maintenance
'db1081' => 300, # 3.6TB 512GB
'db1084' => 300, # 3.6TB 512GB
'db1091' => 300, # 3.6TB 512GB
@@ -151,7 +151,7 @@
'db1022' => 100, # 1.4TB  64GB, api
'db1030' => 0,   # 1.4TB  64GB, vslow, dump
'db1037' => 50,  # 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
-   'db1061' => 500, # 2.8TB 128GB
+#  'db1061' => 500, # 2.8TB 128GB
'db1085' => 300, # 3.6TB 512GB
'db1088' => 300, # 3.6TB 512GB
'db1093' => 300, # 3.6TB 512GB
@@ -162,7 +162,7 @@
'db1028' => 50,  # 1.4TB  64GB, vslow, dump
'db1034' => 150, # 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
'db1039' => 300, # 1.4TB  64GB
-   'db1062' => 500, # 2.8TB 128GB
+#  'db1062' => 500, # 2.8TB 128GB
'db1079' => 300, # 3.6TB 512GB
'db1086' => 300, # 3.6TB 512GB
'db1094' => 300, # 3.6TB 512GB

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

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

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


[MediaWiki-commits] [Gerrit] Integrate search into Feed (with voice). - change (apps...wikipedia)

2016-06-21 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: Integrate search into Feed (with voice).
..

Integrate search into Feed (with voice).

Change-Id: Iff74f9054f1f6913dc1e15d433cc78e6283d1e9e
---
M app/src/main/java/org/wikipedia/feed/FeedFragment.java
M app/src/main/java/org/wikipedia/feed/FeedViewCallback.java
M app/src/main/java/org/wikipedia/feed/searchbar/SearchCardView.java
M app/src/main/java/org/wikipedia/feed/view/FeedRecyclerAdapter.java
M app/src/main/java/org/wikipedia/page/PageActivity.java
M app/src/main/java/org/wikipedia/page/ToolbarProvider.java
M app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
7 files changed, 97 insertions(+), 17 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/feed/FeedFragment.java 
b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
index da8b7a1..11d7e8d 100644
--- a/app/src/main/java/org/wikipedia/feed/FeedFragment.java
+++ b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
@@ -40,6 +40,7 @@
 void onAddToolbar(Toolbar toolbar);
 void onRemoveToolbar(Toolbar toolbar);
 void onFeedSearchRequested();
+void onFeedVoiceSearchRequested();
 void onFeedSelectPage(PageTitle title);
 void onFeedAddPageToList(PageTitle title);
 }
@@ -133,5 +134,19 @@
 getCallback().onFeedAddPageToList(title);
 }
 }
+
+@Override
+public void onSearchRequested() {
+if (getCallback() != null) {
+getCallback().onFeedSearchRequested();
+}
+}
+
+@Override
+public void onVoiceSearchRequested() {
+if (getCallback() != null) {
+getCallback().onFeedVoiceSearchRequested();
+}
+}
 }
 }
diff --git a/app/src/main/java/org/wikipedia/feed/FeedViewCallback.java 
b/app/src/main/java/org/wikipedia/feed/FeedViewCallback.java
index 7954be9..1816d9a 100644
--- a/app/src/main/java/org/wikipedia/feed/FeedViewCallback.java
+++ b/app/src/main/java/org/wikipedia/feed/FeedViewCallback.java
@@ -7,4 +7,6 @@
 public interface FeedViewCallback {
 void onSelectPage(@NonNull PageTitle title);
 void onAddPageToList(@NonNull PageTitle title);
+void onSearchRequested();
+void onVoiceSearchRequested();
 }
diff --git a/app/src/main/java/org/wikipedia/feed/searchbar/SearchCardView.java 
b/app/src/main/java/org/wikipedia/feed/searchbar/SearchCardView.java
index 1b6d0f2..289776d 100644
--- a/app/src/main/java/org/wikipedia/feed/searchbar/SearchCardView.java
+++ b/app/src/main/java/org/wikipedia/feed/searchbar/SearchCardView.java
@@ -2,10 +2,12 @@
 
 import android.content.Context;
 import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
 import android.support.v7.widget.CardView;
 import android.view.View;
 
 import org.wikipedia.R;
+import org.wikipedia.feed.FeedViewCallback;
 import org.wikipedia.util.FeedbackUtil;
 
 import butterknife.BindView;
@@ -14,6 +16,7 @@
 public class SearchCardView extends CardView {
 @BindView(R.id.search_container) View searchContainer;
 @BindView(R.id.voice_search_button) View voiceSearchButton;
+@Nullable private FeedViewCallback callback;
 
 public SearchCardView(Context context) {
 super(context);
@@ -21,6 +24,29 @@
 inflate(getContext(), R.layout.view_search_bar, this);
 ButterKnife.bind(this);
 FeedbackUtil.setToolbarButtonLongPressToast(voiceSearchButton);
+
+searchContainer.setOnClickListener(new OnClickListener() {
+@Override
+public void onClick(View v) {
+if (callback != null) {
+callback.onSearchRequested();
+}
+}
+});
+
+voiceSearchButton.setOnClickListener(new OnClickListener() {
+@Override
+public void onClick(View v) {
+if (callback != null) {
+callback.onVoiceSearchRequested();
+}
+}
+});
+}
+
+@NonNull public SearchCardView setCallback(@Nullable FeedViewCallback 
callback) {
+this.callback = callback;
+return this;
 }
 
 public void set(@NonNull SearchCard card) {
diff --git a/app/src/main/java/org/wikipedia/feed/view/FeedRecyclerAdapter.java 
b/app/src/main/java/org/wikipedia/feed/view/FeedRecyclerAdapter.java
index e75a628..cf748e8 100644
--- a/app/src/main/java/org/wikipedia/feed/view/FeedRecyclerAdapter.java
+++ b/app/src/main/java/org/wikipedia/feed/view/FeedRecyclerAdapter.java
@@ -79,7 +79,7 @@
 case VIEW_TYPE_BECAUSE_YOU_READ:
 return new 
BecauseYouReadCardView(context).setCallback(callback);
 case VIEW_TYPE_SEARCH_BAR:
-

[MediaWiki-commits] [Gerrit] Improve client-side unread count estimation - change (mediawiki...Echo)

2016-06-21 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Improve client-side unread count estimation
..

Improve client-side unread count estimation

- Remove duplicated counter adjustments.

- Differentiate between all IDs to mark as
  read vs. all IDs that represent visible
  notifications when adjusting the counter.

Change-Id: I1b3e52a929c6e920e3b782c9ef028539b3db0c99
(cherry picked from commit 5a5e1970c5e8e08ec8ee502b53a5a9937f888d70)
---
M modules/controller/mw.echo.Controller.js
1 file changed, 2 insertions(+), 3 deletions(-)


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

diff --git a/modules/controller/mw.echo.Controller.js 
b/modules/controller/mw.echo.Controller.js
index ea08418..3f54ae0 100644
--- a/modules/controller/mw.echo.Controller.js
+++ b/modules/controller/mw.echo.Controller.js
@@ -302,7 +302,7 @@
for ( i = 0; i < items.length; i++ ) {
item = items[ i ];
if ( !item.isRead() ) {
-   itemIds = itemIds.concat( item.getAllIds() );
+   itemIds.push( item.getId() );
}
}
 
@@ -410,7 +410,7 @@
notification.toggleRead( isRead );
} );
 
-   this.manager.getUnreadCounter().estimateChange( isRead ? 
-allIds.length : allIds.length );
+   this.manager.getUnreadCounter().estimateChange( isRead ? 
-itemIds.length : itemIds.length );
 
return this.api.markItemsRead( allIds, model.getSource(), 
isRead ).then( this.refreshUnreadCount.bind( this ) );
};
@@ -484,7 +484,6 @@
// Synchronously remove this model from the 
widget
controller.removeCrossWikiItem();
 
-   controller.manager.counter.estimateChange( 
-itemCounter );
return 
mw.echo.api.NetworkHandler.static.waitForAllPromises( promises );
} );
};

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b3e52a929c6e920e3b782c9ef028539b3db0c99
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.28.0-wmf.7
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Sbisson 

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


[MediaWiki-commits] [Gerrit] Postgresql: init database with Puppet - change (operations/puppet)

2016-06-21 Thread Gehel (Code Review)
Gehel has uploaded a new change for review.

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

Change subject: Postgresql: init database with Puppet
..

Postgresql: init database with Puppet

Database is initialized by postgresql package, but if we move the data
directory somewhere else, it needs to be initialized.

Bug: T138092
Change-Id: If7240e6d8ca20b5bbe11a4f411f43d7773433f00
---
M modules/postgresql/manifests/master.pp
1 file changed, 12 insertions(+), 0 deletions(-)


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

diff --git a/modules/postgresql/manifests/master.pp 
b/modules/postgresql/manifests/master.pp
index 148a67c..5a273ed 100644
--- a/modules/postgresql/manifests/master.pp
+++ b/modules/postgresql/manifests/master.pp
@@ -43,6 +43,8 @@
 $root_dir='/var/lib/postgresql',
 ) {
 
+$data_dir = "${root_dir}/${pgversion}/main"
+
 class { 'postgresql::server':
 ensure=> $ensure,
 pgversion => $pgversion,
@@ -58,4 +60,14 @@
 content => template('postgresql/master.conf.erb'),
 require => Class['postgresql::server'],
 }
+
+if $ensure == 'present' {
+exec { 'pg-initdb':
+command => "/usr/lib/postgresql/${pgversion}/bin/initdb -D 
${data_dir}",
+user=> 'postgres',
+unless  => "/usr/bin/test -f ${data_dir}/PG_VERSION",
+require => Class['postgresql::server'],
+notify  => Exec['pgreload'],
+}
+}
 }

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

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

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


[MediaWiki-commits] [Gerrit] SubGroupListWidget: use timestamp from model, not from listW... - change (mediawiki...Echo)

2016-06-21 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: SubGroupListWidget: use timestamp from model, not from 
listWidget
..

SubGroupListWidget: use timestamp from model, not from listWidget

This ensures that the fallback timestamp is used if the list is
still empty. Not doing this causes the wikis in the cross-wiki bundle
to appear in the wrong order. Also, it makes more sense to use the
model as the source of truth regardless.

Bug: T138115
Change-Id: Icbfdc7e7c7f67179e50f0f692aef1a54568265e6
(cherry picked from commit 92d1d600aec840f3416572bd59be0855c2ea27c5)
---
M modules/ui/mw.echo.ui.SubGroupListWidget.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ui/mw.echo.ui.SubGroupListWidget.js 
b/modules/ui/mw.echo.ui.SubGroupListWidget.js
index 1ccd13f..2ea91d5 100644
--- a/modules/ui/mw.echo.ui.SubGroupListWidget.js
+++ b/modules/ui/mw.echo.ui.SubGroupListWidget.js
@@ -206,7 +206,7 @@
 * @return {number} Timestamp
 */
mw.echo.ui.SubGroupListWidget.prototype.getTimestamp = function () {
-   return this.listWidget.getTimestamp();
+   return this.model.getTimestamp();
};
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icbfdc7e7c7f67179e50f0f692aef1a54568265e6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.28.0-wmf.7
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] Initial open source commit - change (mediawiki...CommentStreams)

2016-06-21 Thread Cicalese (Code Review)
Cicalese has uploaded a new change for review.

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

Change subject: Initial open source commit
..

Initial open source commit

Change-Id: I7c6f310cc542c057675d433bfe23a5824f52c455
---
A COPYING
A CommentStreams.php
A api/ApiCSDeleteComment.php
A api/ApiCSEditComment.php
A api/ApiCSPostComment.php
A api/ApiCSQueryComment.php
A api/ApiCSQueryDatabase.php
A extension.json
A i18n/CommentStreams.namespaces.php
A i18n/en.json
A i18n/qqq.json
A js+css/CommentStreams.Controller.js
A js+css/CommentStreams.Data.js
A js+css/CommentStreams.Querier.js
A js+css/CommentStreams.css
A js+css/images/more.png
A js+css/images/thumbs-down.png
A js+css/images/thumbs-up.png
A js+css/images/user.png
A js+css/spin.min.js
A php/Comment.php
A php/CommentManager.php
A php/CommentStreams_body.php
A php/DatabaseQuerier.php
A sql/commentData.sql
A sql/downvotes.sql
A sql/nextComment.sql
A sql/upvotes.sql
28 files changed, 2,392 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CommentStreams 
refs/changes/46/295346/1

diff --git a/COPYING b/COPYING
new file mode 100644
index 000..5fe3e10
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 The MITRE Corporation
+
+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/CommentStreams.php b/CommentStreams.php
new file mode 100644
index 000..aa50561
--- /dev/null
+++ b/CommentStreams.php
@@ -0,0 +1,43 @@
+https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   );
+   return;
+}
+else {
+   die( 'This version of CommentStreams requires MediaWiki 1.25+.');
+}
diff --git a/api/ApiCSDeleteComment.php b/api/ApiCSDeleteComment.php
new file mode 100644
index 000..2905e34
--- /dev/null
+++ b/api/ApiCSDeleteComment.php
@@ -0,0 +1,114 @@
+getMain()->getVal( 'type' );
+   $pageId = $this->getMain()->getVal( 'pageId' );
+   $token = $this->getMain()->getVal( 'token' );
+   if($type == 'childComment' ) {
+   // Just delete the comment
+   $result = self::deleteComment($pageId);
+   if($result == 'success')
+   $this->getResult()->addValue(null, 
$this->getModuleName(), array('result' => 'success'));
+   else
+   $this->getResult()->addValue(null, 
$this->getModuleName(), array('result' => 'failure', 'error' => $result));
+   }
+   else if($type == 'headComment') {
+   // First check if it has any replies, if so, fail. 
Else, delete and succeed.
+   $childrenCount = 
DatabaseQuerier::numberOfChildCommentsForParentCommentId($pageId);
+   if($childrenCount > 0)
+   $this->getResult()->addValue(null, 
$this->getModuleName(), array('result' => 'failure', 'error' => 'haschildren'));
+   else {
+   $result = self::deleteComment($pageId);
+   if($result == 'success')
+   $this->getResult()->addValue(null, 
$this->getModuleName(), array('result' => 'success'));
+   else
+   $this->getResult()->addValue(null, 
$this->getModuleName(), array('result' => 'failure', 'error' => $result));
+   }
+   }
+   else {
+   $this->getResult()->addValue(null, "error", 
array('code' => 'unrecognizedparameter', 'info' => 'type parameter 
unrecognized'));
+   }
+
+   return true;
+   }
+   public function getDescription() {
+   return 'Delete a CommentStreams comment.';
+   }
+   public function getAllowedParams() {
+   return array(
+ 

[MediaWiki-commits] [Gerrit] SubGroupListWidget: use timestamp from model. not from listW... - change (mediawiki...Echo)

2016-06-21 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: SubGroupListWidget: use timestamp from model. not from 
listWidget
..

SubGroupListWidget: use timestamp from model. not from listWidget

This ensures that the fallback timestamp is used if the list is
still empty. Not doing this causes the wikis in the cross-wiki bundle
to appear in the wrong order. Also, it makes more sense to use the
model as the source of truth regardless.

Bug: T138115
Change-Id: Icbfdc7e7c7f67179e50f0f692aef1a54568265e6
---
M modules/ui/mw.echo.ui.SubGroupListWidget.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ui/mw.echo.ui.SubGroupListWidget.js 
b/modules/ui/mw.echo.ui.SubGroupListWidget.js
index 1ccd13f..2ea91d5 100644
--- a/modules/ui/mw.echo.ui.SubGroupListWidget.js
+++ b/modules/ui/mw.echo.ui.SubGroupListWidget.js
@@ -206,7 +206,7 @@
 * @return {number} Timestamp
 */
mw.echo.ui.SubGroupListWidget.prototype.getTimestamp = function () {
-   return this.listWidget.getTimestamp();
+   return this.model.getTimestamp();
};
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icbfdc7e7c7f67179e50f0f692aef1a54568265e6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
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] SubGroupListWidget: use timestamp from model, not from listW... - change (mediawiki...Echo)

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

Change subject: SubGroupListWidget: use timestamp from model, not from 
listWidget
..


SubGroupListWidget: use timestamp from model, not from listWidget

This ensures that the fallback timestamp is used if the list is
still empty. Not doing this causes the wikis in the cross-wiki bundle
to appear in the wrong order. Also, it makes more sense to use the
model as the source of truth regardless.

Bug: T138115
Change-Id: Icbfdc7e7c7f67179e50f0f692aef1a54568265e6
---
M modules/ui/mw.echo.ui.SubGroupListWidget.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ui/mw.echo.ui.SubGroupListWidget.js 
b/modules/ui/mw.echo.ui.SubGroupListWidget.js
index 1ccd13f..2ea91d5 100644
--- a/modules/ui/mw.echo.ui.SubGroupListWidget.js
+++ b/modules/ui/mw.echo.ui.SubGroupListWidget.js
@@ -206,7 +206,7 @@
 * @return {number} Timestamp
 */
mw.echo.ui.SubGroupListWidget.prototype.getTimestamp = function () {
-   return this.listWidget.getTimestamp();
+   return this.model.getTimestamp();
};
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icbfdc7e7c7f67179e50f0f692aef1a54568265e6
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Sbisson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] add prometheus VMs in eqiad/codfw - change (operations/dns)

2016-06-21 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: add prometheus VMs in eqiad/codfw
..


add prometheus VMs in eqiad/codfw

Bug: T136313
Change-Id: I29d8f8b83b2f69fa03134413a1fb13941850cce3
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 2f63780..1091e3e 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -855,6 +855,8 @@
 190 1H IN PTR   aqs1005-b.eqiad.wmnet. ; cassandra instance
 195 1H IN PTR   restbase1008-b.eqiad.wmnet.
 196 1H IN PTR   restbase1008-c.eqiad.wmnet.
+197 1H IN PTR   prometheus1001.eqiad.wmnet. ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
+198 1H IN PTR   prometheus1002.eqiad.wmnet. ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
 
 201 1H IN PTR   d-i-test.eqiad.wmnet. ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
 
@@ -2936,6 +2938,8 @@
 178 1H IN PTR   restbase2007-c.codfw.wmnet.
 179 1H IN PTR   maps2002.codfw.wmnet.
 180 1H IN PTR   planet2001.codfw.wmnet. ; VM on the ganeti01.svc.codfw.wmnet 
cluster
+181 1H IN PTR   prometheus2001.codfw.wmnet. ; VM on the 
ganeti01.svc.codfw.wmnet cluster
+182 1H IN PTR   prometheus2002.codfw.wmnet. ; VM on the 
ganeti01.svc.codfw.wmnet cluster
 
 $ORIGIN 17.192.{{ zonename }}.
 1   1H IN PTR   vl2018-eth1.lvs2001.codfw.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index b0535a6..0d43386 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -741,6 +741,8 @@
 praseodymium1H  IN A10.64.16.149
 praseodymium-a  1H  IN A10.64.16.188 ; cassandra instance
 praseodymium-b  1H  IN A10.64.16.189 ; cassandra instance
+prometheus1001  1H  IN A10.64.32.197 ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
+prometheus1002  1H  IN A10.64.32.198 ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
 promethium  1H  IN A10.64.20.12
 
 rcs1001 1H  IN A10.64.32.148
@@ -2760,6 +2762,8 @@
 pc2005  1H  IN A10.192.32.128
 pc2006  1H  IN A10.192.48.39
 phab20011H  IN A10.192.32.147
+prometheus2001  1H  IN A10.192.16.181 ; VM on the ganeti01.svc.codfw.wmnet 
cluster
+prometheus2002  1H  IN A10.192.16.182 ; VM on the ganeti01.svc.codfw.wmnet 
cluster
 pybal-test2001  1H  IN A10.192.16.139 ; VM on the ganeti01.svc.codfw.wmnet 
cluster
 pybal-test2002  1H  IN A10.192.16.140 ; VM on the ganeti01.svc.codfw.wmnet 
cluster
 pybal-test2003  1H  IN A10.192.16.141 ; VM on the ganeti01.svc.codfw.wmnet 
cluster

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I29d8f8b83b2f69fa03134413a1fb13941850cce3
Gerrit-PatchSet: 2
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Filippo Giunchedi 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Initial open source commit - change (mediawiki...CommentStreams)

2016-06-21 Thread Cicalese (Code Review)
Cicalese has submitted this change and it was merged.

Change subject: Initial open source commit
..


Initial open source commit

Change-Id: I7c6f310cc542c057675d433bfe23a5824f52c455
---
A COPYING
A CommentStreams.php
A api/ApiCSDeleteComment.php
A api/ApiCSEditComment.php
A api/ApiCSPostComment.php
A api/ApiCSQueryComment.php
A api/ApiCSQueryDatabase.php
A extension.json
A i18n/CommentStreams.namespaces.php
A i18n/en.json
A i18n/qqq.json
A js+css/CommentStreams.Controller.js
A js+css/CommentStreams.Data.js
A js+css/CommentStreams.Querier.js
A js+css/CommentStreams.css
A js+css/images/more.png
A js+css/images/thumbs-down.png
A js+css/images/thumbs-up.png
A js+css/images/user.png
A js+css/spin.min.js
A php/Comment.php
A php/CommentManager.php
A php/CommentStreams_body.php
A php/DatabaseQuerier.php
A sql/commentData.sql
A sql/downvotes.sql
A sql/nextComment.sql
A sql/upvotes.sql
28 files changed, 2,392 insertions(+), 0 deletions(-)

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



diff --git a/COPYING b/COPYING
new file mode 100644
index 000..5fe3e10
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 The MITRE Corporation
+
+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/CommentStreams.php b/CommentStreams.php
new file mode 100644
index 000..aa50561
--- /dev/null
+++ b/CommentStreams.php
@@ -0,0 +1,43 @@
+https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   );
+   return;
+}
+else {
+   die( 'This version of CommentStreams requires MediaWiki 1.25+.');
+}
diff --git a/api/ApiCSDeleteComment.php b/api/ApiCSDeleteComment.php
new file mode 100644
index 000..2905e34
--- /dev/null
+++ b/api/ApiCSDeleteComment.php
@@ -0,0 +1,114 @@
+getMain()->getVal( 'type' );
+   $pageId = $this->getMain()->getVal( 'pageId' );
+   $token = $this->getMain()->getVal( 'token' );
+   if($type == 'childComment' ) {
+   // Just delete the comment
+   $result = self::deleteComment($pageId);
+   if($result == 'success')
+   $this->getResult()->addValue(null, 
$this->getModuleName(), array('result' => 'success'));
+   else
+   $this->getResult()->addValue(null, 
$this->getModuleName(), array('result' => 'failure', 'error' => $result));
+   }
+   else if($type == 'headComment') {
+   // First check if it has any replies, if so, fail. 
Else, delete and succeed.
+   $childrenCount = 
DatabaseQuerier::numberOfChildCommentsForParentCommentId($pageId);
+   if($childrenCount > 0)
+   $this->getResult()->addValue(null, 
$this->getModuleName(), array('result' => 'failure', 'error' => 'haschildren'));
+   else {
+   $result = self::deleteComment($pageId);
+   if($result == 'success')
+   $this->getResult()->addValue(null, 
$this->getModuleName(), array('result' => 'success'));
+   else
+   $this->getResult()->addValue(null, 
$this->getModuleName(), array('result' => 'failure', 'error' => $result));
+   }
+   }
+   else {
+   $this->getResult()->addValue(null, "error", 
array('code' => 'unrecognizedparameter', 'info' => 'type parameter 
unrecognized'));
+   }
+
+   return true;
+   }
+   public function getDescription() {
+   return 'Delete a CommentStreams comment.';
+   }
+   public function getAllowedParams() {
+   return array(
+   'type' => array(
+   

[MediaWiki-commits] [Gerrit] DRAFT Echo notifications for simple mention failures - change (mediawiki...Echo)

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

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

Change subject: DRAFT Echo notifications for simple mention failures
..

DRAFT Echo notifications for simple mention failures

Bug T136326
Change-Id: I388bdc3714feb9a2865a5ad10dbeabb0a6a09a4f
---
M Echo.php
M autoload.php
M i18n/en.json
M i18n/qqq.json
M includes/DiscussionParser.php
A includes/formatters/MentionFailurePresentationModel.php
6 files changed, 139 insertions(+), 0 deletions(-)


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

diff --git a/Echo.php b/Echo.php
index 9eeeaf4..e98afff 100644
--- a/Echo.php
+++ b/Echo.php
@@ -284,6 +284,10 @@
'priority' => 4,
'tooltip' => 'echo-pref-tooltip-mention',
),
+   'mention-failure' => array(
+   'priority' => 4,
+   'tooltip' => 'echo-pref-tooltip-mention-failure',
+   ),
'emailuser' => array(
'priority' => 9,
'tooltip' => 'echo-pref-tooltip-emailuser',
@@ -324,6 +328,15 @@
'path' => "$echoIconPath/link-blue.svg",
),
'mention' => array(
+   'path' => "$echoIconPath/mention.svg",
+   ),
+   'mention-failure' => array(
+   'path' => "$echoIconPath/mention.svg",
+   ),
+   'mention-failure-user-unknown' => array(
+   'path' => "$echoIconPath/mention.svg",
+   ),
+   'mention-failure-too-many' => array(
'path' => "$echoIconPath/mention.svg",
),
'reviewed' => array(
@@ -461,6 +474,24 @@
'email-body-batch-params' => array( 'agent', 'title', 
'section-title', 'main-title-text', 'user' ),
'icon' => 'mention',
),
+   'mention-failure' => array(
+   'user-locators' => array(
+   'EchoUserLocator::locateEventAgent'
+   ),
+   'notify-type-availability' => array(
+   'email' => false,
+   ),
+   'primary-link' => array(
+   'message' => 
'notification-link-text-view-mention-failure',
+   'destination' => 'section'
+   ),
+   'category' => 'mention-failure',
+   'group' => 'interactive',
+   'section' => 'alert',
+   'presentation-model' => 'EchoMentionFailurePresentationModel',
+   'title-message' => 'notification-mention-failure',
+   'icon' => 'mention-failure',
+   ),
'user-rights' => array(
EchoAttributeManager::ATTR_LOCATORS => array(
array( 'EchoUserLocator::locateFromEventExtra', array( 
'user' ) ),
diff --git a/autoload.php b/autoload.php
index 136a862..416c62e 100644
--- a/autoload.php
+++ b/autoload.php
@@ -66,6 +66,7 @@
'EchoLocalCache' => __DIR__ . '/includes/cache/LocalCache.php',
'EchoMentionFormatter' => __DIR__ . 
'/includes/formatters/MentionFormatter.php',
'EchoMentionPresentationModel' => __DIR__ . 
'/includes/formatters/MentionPresentationModel.php',
+   'EchoMentionFailurePresentationModel' => __DIR__ . 
'/includes/formatters/MentionFailurePresentationModel.php',
'EchoModelFormatter' => __DIR__ . 
'/includes/formatters/EchoModelFormatter.php',
'EchoMultipleIterator' => __DIR__ . 
'/includes/iterator/MultipleIterator.php',
'EchoNotRecursiveIterator' => __DIR__ . 
'/includes/iterator/NotRecursiveIterator.php',
diff --git a/i18n/en.json b/i18n/en.json
index e7422bb..4f28791 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -64,6 +64,7 @@
"echo-category-title-article-linked": "Page {{PLURAL:$1|link|links}}",
"echo-category-title-reverted": "Edit {{PLURAL:$1|revert|reverts}}",
"echo-category-title-mention": "{{PLURAL:$1|Mention|Mentions}}",
+   "echo-category-title-mention-failure": "Failed 
{{PLURAL:$1|Mention|Mentions}}",
"echo-category-title-other": "{{PLURAL:$1|Other}}",
"echo-category-title-system": "{{PLURAL:$1|System}}",
"echo-category-title-user-rights": "{{PLURAL:$1|User rights change|User 
rights changes}}",
@@ -72,6 +73,7 @@
"echo-pref-tooltip-article-linked": "Notify me when someone links to a 
page I created from an article page.",
"echo-pref-tooltip-reverted": "Notify me when someone reverts an edit I 
made, by using the undo or rollback tool.",
"echo-pref-tooltip-mention": "Notify me when someone links to my user 
page.",
+   "echo-pref-tooltip-mention-failure": "Notify me when my edit failed to 
mention users.",
"echo-pref-tooltip-user-rights": "Notify me when someone changes my 
user rights.",
"echo-pref-tooltip-emailuser": "Notify me when someone sends me an 
email.",
"echo-no-agent": "[Nobody]",
@@ -124,6 +126,7 @@

[MediaWiki-commits] [Gerrit] Enable 720p and 1080p .ogv Ogg Theora transcodes - change (mediawiki...TimedMediaHandler)

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

Change subject: Enable 720p and 1080p .ogv Ogg Theora transcodes
..


Enable 720p and 1080p .ogv Ogg Theora transcodes

Variable bitrate HD transcodes aren't as huge overall as I had
feared -- see https://phabricator.wikimedia.org/T108172#2340964

720p plays back in ogv.js on any MacBook Pro I've tested, and on
64-bit iOS devices such as iPad Air.

1080p plays back acceptably on Macs and iPad Pro as well.

(MS Edge provides similar performance as Safari on Windows 10,
while IE stumbles along at half the decode speed.)

For the 4K rendering of 'Tears of Steel', 720p renders to an
average 2.1 Mbps and 1080p to average 4.0 Mbps, which is
actually about the same as our current constant bitrate WebMs.
Note that instantaneous bandwidth peaks rather higher during
scenes with high complexity!

Bug: T108172
Change-Id: I2a95708d25c64f747353dd9f6157894b51034cb3
---
M TimedMediaHandler.php
1 file changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Paladox: Looks good to me, but someone else must approve
  Filippo Giunchedi: Looks good to me, but someone else must approve
  Brion VIBBER: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/TimedMediaHandler.php b/TimedMediaHandler.php
index 68838b1..1d4faf1 100644
--- a/TimedMediaHandler.php
+++ b/TimedMediaHandler.php
@@ -172,6 +172,14 @@
// High-bitrate Ogg stream
WebVideoTranscode::ENC_OGV_480P,
 
+   // Variable-bitrate HD Ogg stream
+   // for ogv.js on reasonably speedy machines
+   WebVideoTranscode::ENC_OGV_720P,
+
+   // Variable-bitrate HD Ogg stream
+   // for ogv.js on reasonably speedy machines
+   WebVideoTranscode::ENC_OGV_1080P,
+
 /*
// MP4 H.264/AAC
// Primary format for the Apple/Microsoft world

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a95708d25c64f747353dd9f6157894b51034cb3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Integrate most read - change (apps...wikipedia)

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

Change subject: Integrate most read
..


Integrate most read

Bug: T129082
Change-Id: I688329f705646d917e00662be57385bc2cd4e50a
---
M app/src/main/java/org/wikipedia/feed/FeedCoordinator.java
M app/src/main/java/org/wikipedia/feed/demo/IntegerListCard.java
A app/src/main/java/org/wikipedia/feed/mostread/MostReadCardView.java
M app/src/main/java/org/wikipedia/feed/mostread/MostReadClient.java
A app/src/main/java/org/wikipedia/feed/mostread/MostReadItemCard.java
A app/src/main/java/org/wikipedia/feed/mostread/MostReadListCard.java
M app/src/main/java/org/wikipedia/feed/view/FeedRecyclerAdapter.java
M app/src/main/res/values/strings_no_translate.xml
M app/src/test/java/org/wikipedia/feed/mostread/MostReadClientTest.java
9 files changed, 214 insertions(+), 23 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/feed/FeedCoordinator.java 
b/app/src/main/java/org/wikipedia/feed/FeedCoordinator.java
index e8a2326..33ad66e 100644
--- a/app/src/main/java/org/wikipedia/feed/FeedCoordinator.java
+++ b/app/src/main/java/org/wikipedia/feed/FeedCoordinator.java
@@ -6,6 +6,7 @@
 import org.wikipedia.feed.becauseyouread.BecauseYouReadClient;
 import org.wikipedia.feed.continuereading.ContinueReadingClient;
 import org.wikipedia.feed.demo.IntegerListClient;
+import org.wikipedia.feed.mostread.MostReadClient;
 import org.wikipedia.feed.searchbar.SearchClient;
 
 public class FeedCoordinator extends FeedCoordinatorBase {
@@ -25,6 +26,7 @@
 addPendingClient(new BecauseYouReadClient());
 addPendingClient(new ContinueReadingClient());
 addPendingClient(new IntegerListClient());
+addPendingClient(new MostReadClient());
 
 }
 
diff --git a/app/src/main/java/org/wikipedia/feed/demo/IntegerListCard.java 
b/app/src/main/java/org/wikipedia/feed/demo/IntegerListCard.java
index b7ade21..f6e7b5d 100644
--- a/app/src/main/java/org/wikipedia/feed/demo/IntegerListCard.java
+++ b/app/src/main/java/org/wikipedia/feed/demo/IntegerListCard.java
@@ -16,7 +16,7 @@
 }
 
 @NonNull @Override public String title() {
-return "Trending articles";
+return "In the news";
 }
 
 @Nullable @Override public String subtitle() {
@@ -24,7 +24,7 @@
 }
 
 @Nullable @Override public String footer() {
-return "All top read articles on Fri, April 08";
+return "More news from Fri, April 08";
 }
 
 private static List newItems() {
@@ -37,4 +37,4 @@
 }
 return items;
 }
-}
\ No newline at end of file
+}
diff --git 
a/app/src/main/java/org/wikipedia/feed/mostread/MostReadCardView.java 
b/app/src/main/java/org/wikipedia/feed/mostread/MostReadCardView.java
new file mode 100644
index 000..081bc9b
--- /dev/null
+++ b/app/src/main/java/org/wikipedia/feed/mostread/MostReadCardView.java
@@ -0,0 +1,53 @@
+package org.wikipedia.feed.mostread;
+
+import android.content.Context;
+import android.support.annotation.NonNull;
+
+import org.wikipedia.feed.demo.IntegerListCard;
+import org.wikipedia.feed.view.CardFooterView;
+import org.wikipedia.feed.view.CardHeaderView;
+import org.wikipedia.feed.view.ListCardItemView;
+import org.wikipedia.feed.view.ListCardView;
+import org.wikipedia.views.DefaultViewHolder;
+
+import java.util.List;
+
+public class MostReadCardView extends ListCardView {
+public MostReadCardView(Context context) {
+super(context);
+}
+
+public void set(@NonNull MostReadListCard card) {
+header(card);
+footer(card);
+set(new RecyclerAdapter(card.items()));
+}
+
+private void header(@NonNull MostReadListCard card) {
+CardHeaderView header = new CardHeaderView(getContext())
+.setTitle(card.title())
+.setSubtitle(card.subtitle());
+header(header);
+}
+
+private void footer(@NonNull MostReadListCard card) {
+CardFooterView footer = new CardFooterView(getContext())
+.setText(card.footer());
+footer.setVisibility(card.items().size() > 2 ? VISIBLE : GONE);
+footer(footer);
+}
+
+private static class RecyclerAdapter extends 
ListCardView.RecyclerAdapter {
+RecyclerAdapter(@NonNull List items) {
+super(items);
+}
+
+@Override public void 
onBindViewHolder(DefaultViewHolder holder,
+   int position) {
+MostReadItemCard card = item(position);
+holder.getView().setTitle(card.title());
+holder.getView().setSubtitle(card.subtitle());
+holder.getView().setImage(card.image());
+}
+}
+}
\ No newline at end of file
diff --git a/app/src/main/java/org/wikipedia/feed/mostread/MostReadClient.java 

[MediaWiki-commits] [Gerrit] Hygiene: rename PageActivity to MainActivity - change (apps...wikipedia)

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

Change subject: Hygiene: rename PageActivity to MainActivity
..


Hygiene: rename PageActivity to MainActivity

• Replace all occurrences of PageActivity with MainActivity.

• Move MainActivity to org.wikipedia.

No functional changes intended.

Bug: T136961
Change-Id: I8a93a66d4b99130d56708b1c64b6535c1a12518c
---
M app/src/androidTest/java/org/wikipedia/page/BasePageLoadTest.java
M app/src/androidTest/java/org/wikipedia/test/TranslationTests.java
M app/src/main/AndroidManifest.xml
R app/src/main/java/org/wikipedia/MainActivity.java
M app/src/main/java/org/wikipedia/analytics/InstallReceiver.java
M app/src/main/java/org/wikipedia/editing/EditHandler.java
M app/src/main/java/org/wikipedia/editing/EditPreviewFragment.java
M app/src/main/java/org/wikipedia/history/HistoryFragment.java
M app/src/main/java/org/wikipedia/interlanguage/LangLinksActivity.java
M app/src/main/java/org/wikipedia/nearby/NearbyFragment.java
M app/src/main/java/org/wikipedia/page/FindInPageActionProvider.java
M app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
R app/src/main/java/org/wikipedia/page/MainActivityLongPressHandler.java
M app/src/main/java/org/wikipedia/page/NavDrawerHelper.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/PageInfoDialog.java
M app/src/main/java/org/wikipedia/page/ToCHandler.java
M app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
M app/src/main/java/org/wikipedia/page/gallery/GalleryActivity.java
M app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
M app/src/main/java/org/wikipedia/page/snippet/CompatActionMode.java
M app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java
M app/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
M app/src/main/java/org/wikipedia/random/RandomHandler.java
M app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java
M app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java
M app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
M app/src/main/java/org/wikipedia/search/SearchResultsFragment.java
M app/src/main/java/org/wikipedia/util/FeedbackUtil.java
M app/src/main/java/org/wikipedia/widgets/WidgetProviderFeaturedPage.java
M app/src/main/java/org/wikipedia/widgets/WidgetProviderSearch.java
M app/src/main/java/org/wikipedia/wiktionary/WiktionaryDialog.java
M app/src/main/res/layout/fragment_page.xml
33 files changed, 176 insertions(+), 168 deletions(-)

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



diff --git a/app/src/androidTest/java/org/wikipedia/page/BasePageLoadTest.java 
b/app/src/androidTest/java/org/wikipedia/page/BasePageLoadTest.java
index 7959cea..705e1f1 100644
--- a/app/src/androidTest/java/org/wikipedia/page/BasePageLoadTest.java
+++ b/app/src/androidTest/java/org/wikipedia/page/BasePageLoadTest.java
@@ -15,6 +15,7 @@
 import org.junit.Rule;
 import org.junit.runner.RunWith;
 import org.wikipedia.Site;
+import org.wikipedia.MainActivity;
 import org.wikipedia.history.HistoryEntry;
 
 @LargeTest
@@ -25,7 +26,7 @@
 
 @Rule
 @NonNull
-public final ActivityTestRule activityRule = new 
ActivityTestRule<>(PageActivity.class);
+public final ActivityTestRule activityRule = new 
ActivityTestRule<>(MainActivity.class);
 
 protected void loadPageSync(String title) {
 loadPage(title, TEST_SITE);
@@ -91,7 +92,7 @@
 return (PageFragment) getActivity().getTopFragment();
 }
 
-protected PageActivity getActivity() {
+protected MainActivity getActivity() {
 return activityRule.getActivity();
 }
 
diff --git a/app/src/androidTest/java/org/wikipedia/test/TranslationTests.java 
b/app/src/androidTest/java/org/wikipedia/test/TranslationTests.java
index ecb12ab..d00d393 100644
--- a/app/src/androidTest/java/org/wikipedia/test/TranslationTests.java
+++ b/app/src/androidTest/java/org/wikipedia/test/TranslationTests.java
@@ -8,7 +8,7 @@
 import android.util.Log;
 //import org.wikimedia.wikipedia.test.R;
 import org.wikipedia.R;
-import org.wikipedia.page.PageActivity;
+import org.wikipedia.MainActivity;
 
 import java.lang.reflect.Field;
 import java.util.ArrayList;
@@ -24,17 +24,17 @@
  *
  * TODO: check content_license_html is valid HTML
  */
-public class TranslationTests extends 
ActivityInstrumentationTestCase2 {
+public class TranslationTests extends 
ActivityInstrumentationTestCase2 {
 private static final String TAG = "TrTest";
 
 /** Add more if needed, but then also add some tests. */
 private static final String[] POSSIBLE_PARAMS = new String[] {"%s", 
"%1$s", "%2$s", "%d", "%.2f"};
 
-private PageActivity activity;
+private MainActivity activity;
 private final StringBuilder mismatches = new StringBuilder();
 
 public 

[MediaWiki-commits] [Gerrit] Make namespace and content model lists extensible - change (mediawiki...VisualEditor)

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

Change subject: Make namespace and content model lists extensible
..


Make namespace and content model lists extensible

This should really be done automatically by resource loader,
but merging only works on globals. We use this same hack
for plugin modules.

Change-Id: I5f729ddb6146565dc839f60353ac8fa5b2a29ca8
---
M ApiVisualEditor.php
M VisualEditor.hooks.php
2 files changed, 42 insertions(+), 25 deletions(-)

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



diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index 5676b26..0ffa506 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -651,10 +651,27 @@
 * @return boolean
 */
public static function isAllowedNamespace( Config $config, $namespaceId 
) {
-   $availableNamespaces = $config->get( 
'VisualEditorAvailableNamespaces' );
-   $canonicalName = MWNamespace::getCanonicalName( $namespaceId );
-   return ( isset( $availableNamespaces[$namespaceId] ) && 
$availableNamespaces[$namespaceId] ) ||
-( isset( $availableNamespaces[$canonicalName] ) && 
$availableNamespaces[$canonicalName] );
+   $availableNamespaces = self::getAvailableNamespaceIds( $config 
);
+   return in_array( $namespaceId, $availableNamespaces );
+   }
+
+   /**
+* Get a list of allowed namespace IDs
+*
+* @param Config $config Configuration object
+* @return array
+*/
+   public static function getAvailableNamespaceIds( Config $config ) {
+   $availableNamespaces = array_merge(
+   ExtensionRegistry::getInstance()->getAttribute( 
'VisualEditorAvailableNamespaces' ),
+   $config->get( 'VisualEditorAvailableNamespaces' )
+   );
+   return array_map( function ( $namespace ) {
+   // Convert canonical namespace names to IDs
+   return is_numeric( $namespace ) ?
+   $namespace :
+   MWNamespace::getCanonicalIndex( strtolower( 
$namespace ) );
+   }, array_keys( array_filter( $availableNamespaces ) ) );
}
 
/**
@@ -665,8 +682,13 @@
 * @return boolean
 */
public static function isAllowedContentType( Config $config, 
$contentModel ) {
-   $availableContentModels = $config->get( 
'VisualEditorAvailableContentModels' );
-   return isset( $availableContentModels[ $contentModel ] );
+   $availableContentModels = array_merge(
+   ExtensionRegistry::getInstance()->getAttribute( 
'VisualEditorAvailableContentModels' ),
+   $config->get( 'VisualEditorAvailableContentModels' )
+   );
+   return
+   isset( $availableContentModels[ $contentModel ] ) &&
+   $availableContentModels[ $contentModel ];
}
 
/**
diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index fe4368f..873b5ba 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -508,11 +508,9 @@
 
public static function onGetPreferences( User $user, array 
&$preferences ) {
global $wgLang;
+   $config = ConfigFactory::getDefaultInstance()->makeConfig( 
'visualeditor' );
if ( !class_exists( 'BetaFeatures' ) ) {
-   $namespaces = ConfigFactory::getDefaultInstance()
-   ->makeConfig( 'visualeditor' )
-   ->get( 'VisualEditorAvailableNamespaces' );
-   $onNamespaces = array_keys( array_filter( $namespaces ) 
);
+   $namespaces = 
ApiVisualEditor::getAvailableNamespaceIds( $config );
 
$enablePreference = [
'type' => 'toggle',
@@ -520,9 +518,9 @@
'visualeditor-preference-enable',
$wgLang->commaList( array_map(
[ 'self', 'convertNs' ],
-   $onNamespaces
+   $namespaces
) ),
-   count( $onNamespaces )
+   count( $namespaces )
],
'section' => 'editing/editor'
];
@@ -539,7 +537,6 @@
$user->getOption( 'visualeditor-autodisable' )
];
 
-   $config = ConfigFactory::getDefaultInstance()->makeConfig( 

[MediaWiki-commits] [Gerrit] Add logic to show the Page/FeedFragment - change (apps...wikipedia)

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

Change subject: Add logic to show the Page/FeedFragment
..


Add logic to show the Page/FeedFragment

Bug: T136961
Change-Id: I62e21c1222c8390a0fbc6ffa3076ecb62004e347
---
M app/src/main/java/org/wikipedia/MainActivity.java
M app/src/main/java/org/wikipedia/feed/FeedFragment.java
M app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/PageLoadStrategy.java
M app/src/main/java/org/wikipedia/settings/Prefs.java
M app/src/main/res/values/preference_keys.xml
M app/src/main/res/xml/developer_preferences.xml
8 files changed, 41 insertions(+), 1 deletion(-)

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



diff --git a/app/src/main/java/org/wikipedia/MainActivity.java 
b/app/src/main/java/org/wikipedia/MainActivity.java
index b21868d..b05da0f 100644
--- a/app/src/main/java/org/wikipedia/MainActivity.java
+++ b/app/src/main/java/org/wikipedia/MainActivity.java
@@ -54,6 +54,7 @@
 import org.wikipedia.events.ChangeTextSizeEvent;
 import org.wikipedia.events.ThemeChangeEvent;
 import org.wikipedia.events.WikipediaZeroStateChangeEvent;
+import org.wikipedia.feed.FeedActivity;
 import org.wikipedia.history.HistoryEntry;
 import org.wikipedia.interlanguage.LangLinksActivity;
 import org.wikipedia.login.LoginActivity;
@@ -83,6 +84,8 @@
 import org.wikipedia.views.WikiDrawerLayout;
 import org.wikipedia.widgets.WidgetProviderFeaturedPage;
 import org.wikipedia.zero.ZeroConfig;
+
+import java.util.concurrent.TimeUnit;
 
 import static org.wikipedia.util.DeviceUtil.hideSoftKeyboard;
 import static org.wikipedia.util.DeviceUtil.isBackKeyUp;
@@ -451,6 +454,13 @@
 } else if (intent.hasExtra(EXTRA_FEATURED_ARTICLE_FROM_WIDGET)) {
 new IntentFunnel(app).logFeaturedArticleWidgetTap();
 loadMainPageInForegroundTab();
+} else if (Prefs.enableFeed() && 
TimeUnit.MILLISECONDS.toDays(System.currentTimeMillis() - 
Prefs.pageLastShown()) > 0) {
+launchFeedActivity();
+
+// Uncommenting the following line gives the desired back button 
behavior but there's
+// currently no way to open a page from the Feed. todo: uncomment 
once the Feed is
+// interactive.
+// finish();
 } else {
 loadMainPageIfNoTabs();
 }
@@ -1047,4 +1057,8 @@
 widgetIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, ids);
 sendBroadcast(widgetIntent);
 }
+
+private void launchFeedActivity() {
+startActivity(FeedActivity.newIntent(this));
+}
 }
\ No newline at end of file
diff --git a/app/src/main/java/org/wikipedia/feed/FeedFragment.java 
b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
index 9fa61f2..4239e20 100644
--- a/app/src/main/java/org/wikipedia/feed/FeedFragment.java
+++ b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
@@ -13,6 +13,7 @@
 import org.wikipedia.activity.FragmentUtil;
 import org.wikipedia.feed.model.Card;
 import org.wikipedia.feed.view.FeedView;
+import org.wikipedia.settings.Prefs;
 
 import java.util.List;
 
@@ -36,6 +37,7 @@
 super.onCreate(savedInstanceState);
 app = WikipediaApp.getInstance();
 coordinator = new FeedCoordinator(getContext());
+Prefs.pageLastShown(0);
 }
 
 @Nullable @Override public View onCreateView(LayoutInflater inflater,
diff --git a/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java 
b/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
index 128df3e..1c0ffb5 100644
--- a/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
+++ b/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
@@ -236,6 +236,10 @@
 return false;
 }
 
+@Override public boolean backStackEmpty() {
+return backStack.isEmpty();
+}
+
 @Override
 public void onHidePageContent() {
 bottomContentHandler.hide();
diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java 
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index 14cb19e..31fbdfa 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragment.java
@@ -463,6 +463,11 @@
 super.onPause();
 Prefs.setTabs(tabList);
 closePageScrollFunnel();
+
+long time = tabList.size() >= 1 && !pageLoadStrategy.backStackEmpty()
+? System.currentTimeMillis()
+: 0;
+Prefs.pageLastShown(time);
 }
 
 @Override
diff --git a/app/src/main/java/org/wikipedia/page/PageLoadStrategy.java 
b/app/src/main/java/org/wikipedia/page/PageLoadStrategy.java
index 459035f..6650aea 100644
--- a/app/src/main/java/org/wikipedia/page/PageLoadStrategy.java
+++ 

[MediaWiki-commits] [Gerrit] Added scap3 config - change (mediawiki...deploy)

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

Change subject: Added scap3 config
..


Added scap3 config

Change-Id: I3266d2a8cc96183a5a68ab07889a6b342b7219ac
---
A scap/scap.cfg
A scap/target-canary
A scap/targets
A scap/targets-betacluster
4 files changed, 26 insertions(+), 0 deletions(-)

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



diff --git a/scap/scap.cfg b/scap/scap.cfg
new file mode 100644
index 000..baff8bb
--- /dev/null
+++ b/scap/scap.cfg
@@ -0,0 +1,20 @@
+[global]
+git_repo: graphoid/deploy
+git_deploy_dir: /srv/deployment
+git_repo_user: deploy-service
+ssh_user: deploy-service
+server_groups: canary, default
+canary_dsh_targets: target-canary
+dsh_targets: targets
+git_submodules: True
+service_name: graphoid
+service_port: 19000
+lock_file: /tmp/scap.graphoid.lock
+
+[wmnet]
+git_server: tin.eqiad.wmnet
+
+# [deployment-prep.eqiad.wmflabs]
+# git_server: deployment-tin.deployment-prep.eqiad.wmflabs
+# server_groups: default
+# dsh_targets: targets-betacluster
diff --git a/scap/target-canary b/scap/target-canary
new file mode 100644
index 000..49e9dd7
--- /dev/null
+++ b/scap/target-canary
@@ -0,0 +1 @@
+scb2001.codfw.wmnet
diff --git a/scap/targets b/scap/targets
new file mode 100644
index 000..0cd7f5f
--- /dev/null
+++ b/scap/targets
@@ -0,0 +1,4 @@
+scb1001.eqiad.wmnet
+scb1002.eqiad.wmnet
+scb2001.codfw.wmnet
+scb2002.codfw.wmnet
diff --git a/scap/targets-betacluster b/scap/targets-betacluster
new file mode 100644
index 000..29d91ac
--- /dev/null
+++ b/scap/targets-betacluster
@@ -0,0 +1 @@
+deployment-graphoid.deployment-prep.eqiad.wmflabs

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3266d2a8cc96183a5a68ab07889a6b342b7219ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/graphoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Updated to latest graph2 lib - change (mediawiki...Graph)

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

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

Change subject: Updated to latest graph2 lib
..

Updated to latest graph2 lib

Change-Id: Ie52cde6ed480c74b186a45e9959e87782ca72fa7
---
M lib/graph2.compiled.js
1 file changed, 29 insertions(+), 21 deletions(-)


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

diff --git a/lib/graph2.compiled.js b/lib/graph2.compiled.js
index bfe1214..ed62c37 100644
--- a/lib/graph2.compiled.js
+++ b/lib/graph2.compiled.js
@@ -145,18 +145,12 @@
 var self = this;
 self.isTrusted = isTrusted;
 self.domains = domains;
+self.domainMap = domainMap;
 self.logger = logger;
 self.objExtender = objExtender;
 self.parseUrl = parseUrl;
 self.formatUrl = formatUrl;
-
 self.validators = {};
-Object.keys(domains).map(function(protocol) {
-// Only allow subdomains for https & http. Other protocols must be 
exact match.
-self.validators[protocol] = makeValidator(domains[protocol], protocol 
=== 'https' || protocol === 'http');
-});
-
-self.domainMap = domainMap;
 
 load.loader = function (opt, callback) {
 var error = callback || function (e) { throw e; }, url;
@@ -200,19 +194,29 @@
 // First, map the host
 host = (this.domainMap && this.domainMap[host]) || host;
 
-var result = {
-host: host
-};
-
-if (this.validators.https.test(host)) {
-result.protocol = 'https';
-} else if (this.validators.http.test(host)) {
-result.protocol = 'http';
-} else {
-result = undefined;
+if (this.testHost('https', host)) {
+return {host: host, protocol: 'https'};
+} else if (this.testHost('http', host)) {
+return {host: host, protocol: 'http'};
 }
+return undefined;
+};
 
-return result;
+/**
+ * Test host against the list of allowed domains based on the protocol
+ * @param {string} protocol
+ * @param {string} host
+ * @returns {boolean}
+ */
+VegaWrapper.prototype.testHost = function testHost(protocol, host) {
+if (!this.validators[protocol]) {
+if (this.domains[protocol]) {
+this.validators[protocol] = makeValidator(this.domains[protocol], 
protocol === 'https' || protocol === 'http');
+} else {
+return false;
+}
+}
+return this.validators[protocol].test(host);
 };
 
 /**this
@@ -241,7 +245,7 @@
 case 'https':
 if (!this.isTrusted) {
 throw new Error('HTTP and HTTPS protocols are not supported 
for untrusted graphs.\n' +
-'Use wikiraw:, wikiapi:, wikirest:, and wikirawupload: 
protocols.\n' +
+'Use wikiraw:, wikiapi:, wikirest:, wikirawupload:, and 
other protocols.\n' +
 'See 
https://www.mediawiki.org/wiki/Extension:Graph#External_data');
 }
 // keep the original URL
@@ -275,6 +279,7 @@
 // Uses mediawiki api, and extract the content after the request
 // Query value must be a valid MediaWiki title string, but we only 
ensure
 // there is no pipe symbol, the rest is handlered by the api.
+urlParts.pathname = decodeURIComponent(urlParts.pathname)
 if (!/^\/[^|]+$/.test(urlParts.pathname)) {
 throw new Error('wikiraw: invalid title');
 }
@@ -284,7 +289,7 @@
 action: 'query',
 prop: 'revisions',
 rvprop: 'content',
-titles: decodeURIComponent(urlParts.pathname.substring(1))
+titles: urlParts.pathname.substring(1)
 };
 urlParts.pathname = '/w/api.php';
 urlParts.protocol = sanitizedHost.protocol;
@@ -318,6 +323,9 @@
 // Get geo shapes data from OSM database by supplying Wikidata IDs
 // https://maps.wikimedia.org/shape?ids=Q16,Q30
 this._validateExternalService(urlParts, sanitizedHost, opt.url);
+if (!urlParts.query || !urlParts.query.ids) {
+throw new Error('geoshape: missing ids parameter in: ' + 
opt.url);
+}
 // the query object is not modified
 urlParts.pathname = '/shape';
 break;
@@ -339,7 +347,7 @@
 } else {
 urlParts.protocol = sanitizedHost.protocol;
 }
-if (!this.validators[protocol].test(urlParts.host)) {
+if (!this.testHost(protocol, urlParts.host)) {
 throw new Error(protocol + ': URL must either be relative (' + 
protocol + '///...), or use one of the allowed hosts: ' + url);
 }
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie52cde6ed480c74b186a45e9959e87782ca72fa7
Gerrit-PatchSet: 1
Gerrit-Project: 

[MediaWiki-commits] [Gerrit] jsub: Strip trailing comments from jsubrc and embedded options - change (labs/toollabs)

2016-06-21 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: jsub: Strip trailing comments from jsubrc and embedded options
..

jsub: Strip trailing comments from jsubrc and embedded options

Update regex used to extract options from ~/.jsubrc and embedded
comments to strip trailing inline comments. The updated regex more
closely matches the prior perl jsub parsing behavior.

Bug: T138178
Change-Id: Ifbb2a62fc5bf192defae32c9f6146aacc83431a4
---
M jobutils/bin/jsub
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/61/295361/1

diff --git a/jobutils/bin/jsub b/jobutils/bin/jsub
index e00d9d4..88817d1 100755
--- a/jobutils/bin/jsub
+++ b/jobutils/bin/jsub
@@ -475,7 +475,7 @@
 'JOBUTILS_JSUBRC', os.path.join(homedir(), '.jsubrc'))
 if os.path.exists(jsubrc):
 args = []
-pat = re.compile(r'^(?P-[a-z]+)(?:\s+(?P.+)|\s*)$')
+pat = re.compile(r'^(?P-[a-z]+)(?:\s+(?P[^#\s]+))?')
 with open(jsubrc, 'r') as fh:
 for line in fh:
 m = pat.match(line)
@@ -513,7 +513,7 @@
 This mostly matches the behavior of SGE's qsub for non-binary programs.
 See '-C prefix_string' in `man qsub` for more ugly details.
 """
-pat = re.compile(r'\s*(?P-[a-z]+)(?:\s+(?P.+)|\s*)')
+pat = re.compile(r'\s*(?P-[a-z]+)(?:\s+(?P[^#\s]+))?')
 args = []
 with open(namespace.program, 'r') as fh:
 for line in read_script_comments(fh):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifbb2a62fc5bf192defae32c9f6146aacc83431a4
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] Only score the top 15 results per query source - change (wikimedia...discernatron)

2016-06-21 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Only score the top 15 results per query source
..

Only score the top 15 results per query source

After some analysis (thanks Trey!) on the current scores we have
determined that providing the top 15 results, rather than the top 25,
from each source gives sufficient data for scoring. This reduces the
maximum number of results a user must score from 80 to 48, which will
hopefully make things easier on graders.

Change-Id: I620a8e1f7290c4690910ab5fc9c16322aa3bf2df
---
M src/RelevanceScoring/RelevanceScoringProvider.php
M src/RelevanceScoring/Repository/ResultsRepository.php
M tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php
M tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php
4 files changed, 26 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/discernatron 
refs/changes/62/295362/1

diff --git a/src/RelevanceScoring/RelevanceScoringProvider.php 
b/src/RelevanceScoring/RelevanceScoringProvider.php
index 139fa73..19b94e7 100644
--- a/src/RelevanceScoring/RelevanceScoringProvider.php
+++ b/src/RelevanceScoring/RelevanceScoringProvider.php
@@ -75,7 +75,10 @@
 return new Repository\QueriesRepository($app['db']);
 };
 $app['search.repository.results'] = function () use ($app) {
-$repo = new Repository\ResultsRepository($app['db']);
+$repo = new Repository\ResultsRepository(
+$app['db'],
+$app['search.importer_limit']
+);
 $repo->setLogger($app['search.logger']);
 
 return $repo;
@@ -97,7 +100,7 @@
 
 private function registerImporter(Application $app)
 {
-$app['search.importer_limit'] = 25;
+$app['search.importer_limit'] = 15;
 $app['search.importer.bing'] = function () use ($app) {
 return new HtmlResultGetter(
 $app['guzzle'],
diff --git a/src/RelevanceScoring/Repository/ResultsRepository.php 
b/src/RelevanceScoring/Repository/ResultsRepository.php
index 6d0f6d5..13a5de0 100644
--- a/src/RelevanceScoring/Repository/ResultsRepository.php
+++ b/src/RelevanceScoring/Repository/ResultsRepository.php
@@ -19,9 +19,17 @@
 /** @var Connection */
 private $db;
 
-public function __construct(Connection $db)
+/** @var int The maximum position returned for scoring */
+private $maxPosition;
+
+/**
+ * @param Connection $db
+ * @param int$maxPosition The maximum position returned for scoring
+ */
+public function __construct(Connection $db, $maxPosition)
 {
 $this->db = $db;
+$this->maxPosition = $maxPosition;
 $this->logger = new NullLogger();
 }
 
@@ -115,19 +123,24 @@
   FROM results r
   JOIN (SELECT results_id, MAX(snippet_score) as snippet_score
   FROM results_sources
- WHERE query_id = ?
+ WHERE query_id = :queryId
+   AND position <= :maxPosition
  GROUP BY results_id
) r_s_max
 ON r.id = r_s_max.results_id
   JOIN results_sources r_s
 ON r_s.results_id = r_s_max.results_id
AND r_s.snippet_score = r_s_max.snippet_score
-   AND r_s.query_id = ?
- WHERE r.query_id = ?
+   AND r_s.query_id = :queryId
+   AND r_s.position <= :maxPosition
+ WHERE r.query_id = :queryId
  GROUP BY r.id
  ORDER BY r.id DESC
 EOD;
-$results = $this->db->fetchAll($sql, [$queryId, $queryId, $queryId]);
+$results = $this->db->fetchAll($sql, [
+'queryId' => $queryId,
+'maxPosition' => $this->maxPosition,
+]);
 if ($results === false) {
 return new None();
 }
diff --git a/tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php 
b/tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php
index 42145f2..8d527a1 100644
--- a/tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php
+++ b/tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php
@@ -69,7 +69,7 @@
  */
 protected function genResult(User $user, $queryId, array $results)
 {
-$repo = new ResultsRepository($this->db);
+$repo = new ResultsRepository($this->db, 15);
 
 return $repo->storeResults($user, $queryId, $results);
 }
diff --git a/tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php 
b/tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php
index f23fe61..8738c2a 100644
--- a/tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php
+++ b/tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php
@@ -10,7 +10,7 @@
 public function testStoreResults()
 {
 $user = $this->genTestUser();
-$repo = new ResultsRepository($this->db);
+$repo = new ResultsRepository($this->db, 15);
 $queryId = null;
 

[MediaWiki-commits] [Gerrit] Deploy Compact Language Links as default (Stage 1) - change (operations/mediawiki-config)

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

Change subject: Deploy Compact Language Links as default (Stage 1)
..


Deploy Compact Language Links as default (Stage 1)

Beta feature is replaced by a user preference that is enabled by
default in the following sites:
* Wikiversity
* Wikivoyage

Bug: T136677
Change-Id: I87a1561e36684381c21cc295e6a936422770c703
---
M wmf-config/InitialiseSettings.php
1 file changed, 12 insertions(+), 10 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index fb0b71b..1365e64 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12635,6 +12635,18 @@
'testwiki' => false,
'test2wiki' => false,
'nonbetafeatures' => false,
+   'wikiversity' => false,
+   'wikivoyage' => false,
+],
+
+// Whether Compact Links is enabled for new accounts *by default*
+'wmgULSCompactLinksForNewAccounts' => [
+   'default' => false,
+],
+
+// Whether Compact Links is enabled for anonymous users *by default*
+'wmgULSCompactLinksEnableAnon' => [
+   'default' => false,
 ],
 
 //  BetaFeatures end ---
@@ -15953,16 +15965,6 @@
 
 'wmgULSEventLogging' => [
'default' => true,
-],
-
-// Whether Compact Links is enabled for new accounts *by default*
-'wmgULSCompactLinksForNewAccounts' => [
-   'default' => false,
-],
-
-// Whether Compact Links is enabled for anonymous users *by default*
-'wmgULSCompactLinksEnableAnon' => [
-   'default' => false,
 ],
 
 'wmgWikibaseCachePrefix' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I87a1561e36684381c21cc295e6a936422770c703
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Added scap3 config - change (mediawiki...deploy)

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

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

Change subject: Added scap3 config
..

Added scap3 config

Change-Id: I3266d2a8cc96183a5a68ab07889a6b342b7219ac
---
A scap/scap.cfg
A scap/target-canary
A scap/targets
A scap/targets-betacluster
4 files changed, 26 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/graphoid/deploy 
refs/changes/58/295358/1

diff --git a/scap/scap.cfg b/scap/scap.cfg
new file mode 100644
index 000..baff8bb
--- /dev/null
+++ b/scap/scap.cfg
@@ -0,0 +1,20 @@
+[global]
+git_repo: graphoid/deploy
+git_deploy_dir: /srv/deployment
+git_repo_user: deploy-service
+ssh_user: deploy-service
+server_groups: canary, default
+canary_dsh_targets: target-canary
+dsh_targets: targets
+git_submodules: True
+service_name: graphoid
+service_port: 19000
+lock_file: /tmp/scap.graphoid.lock
+
+[wmnet]
+git_server: tin.eqiad.wmnet
+
+# [deployment-prep.eqiad.wmflabs]
+# git_server: deployment-tin.deployment-prep.eqiad.wmflabs
+# server_groups: default
+# dsh_targets: targets-betacluster
diff --git a/scap/target-canary b/scap/target-canary
new file mode 100644
index 000..49e9dd7
--- /dev/null
+++ b/scap/target-canary
@@ -0,0 +1 @@
+scb2001.codfw.wmnet
diff --git a/scap/targets b/scap/targets
new file mode 100644
index 000..0cd7f5f
--- /dev/null
+++ b/scap/targets
@@ -0,0 +1,4 @@
+scb1001.eqiad.wmnet
+scb1002.eqiad.wmnet
+scb2001.codfw.wmnet
+scb2002.codfw.wmnet
diff --git a/scap/targets-betacluster b/scap/targets-betacluster
new file mode 100644
index 000..29d91ac
--- /dev/null
+++ b/scap/targets-betacluster
@@ -0,0 +1 @@
+deployment-graphoid.deployment-prep.eqiad.wmflabs

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3266d2a8cc96183a5a68ab07889a6b342b7219ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/graphoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Yurik 

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


[MediaWiki-commits] [Gerrit] Version 0.7.2 - change (mediawiki...ApprovedRevs)

2016-06-21 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

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

Change subject: Version 0.7.2
..

Version 0.7.2

Change-Id: I8860f31bbeb7262c0281af39bd4d389d1728ec2c
---
M ApprovedRevs.php
M README
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ApprovedRevs 
refs/changes/60/295360/1

diff --git a/ApprovedRevs.php b/ApprovedRevs.php
index 6506cf3..56d6553 100644
--- a/ApprovedRevs.php
+++ b/ApprovedRevs.php
@@ -9,7 +9,7 @@
  * @author Yaron Koren
  */
 
-define( 'APPROVED_REVS_VERSION', '0.7.1' );
+define( 'APPROVED_REVS_VERSION', '0.7.2' );
 
 // credits
 $wgExtensionCredits['other'][] = array(
diff --git a/README b/README
index 90a7126..bbb6e7f 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 Approved Revs Extension
 
-Version 0.7.1
+Version 0.7.2
 Yaron Koren
 
 This is free software licensed under the GNU General Public License. Please

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8860f31bbeb7262c0281af39bd4d389d1728ec2c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApprovedRevs
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] jsub: Update jsubrc and embedded options parsing - change (labs/toollabs)

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

Change subject: jsub: Update jsubrc and embedded options parsing
..


jsub: Update jsubrc and embedded options parsing

Update regex used to extract options from ~/.jsubrc and embedded
comments to strip trailing inline comments and allow uppercase flags.
The updated regex more closely matches the prior perl jsub parsing
behavior.

Bug: T138178
Change-Id: Ifbb2a62fc5bf192defae32c9f6146aacc83431a4
---
M jobutils/bin/jsub
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/jobutils/bin/jsub b/jobutils/bin/jsub
index e00d9d4..888434d 100755
--- a/jobutils/bin/jsub
+++ b/jobutils/bin/jsub
@@ -475,7 +475,7 @@
 'JOBUTILS_JSUBRC', os.path.join(homedir(), '.jsubrc'))
 if os.path.exists(jsubrc):
 args = []
-pat = re.compile(r'^(?P-[a-z]+)(?:\s+(?P.+)|\s*)$')
+pat = re.compile(r'^(?P-[a-zA-Z]+)(?:\s+(?P[^#\s]+))?')
 with open(jsubrc, 'r') as fh:
 for line in fh:
 m = pat.match(line)
@@ -513,7 +513,7 @@
 This mostly matches the behavior of SGE's qsub for non-binary programs.
 See '-C prefix_string' in `man qsub` for more ugly details.
 """
-pat = re.compile(r'\s*(?P-[a-z]+)(?:\s+(?P.+)|\s*)')
+pat = re.compile(r'\s*(?P-[a-zA-Z]+)(?:\s+(?P[^#\s]+))?')
 args = []
 with open(namespace.program, 'r') as fh:
 for line in read_script_comments(fh):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifbb2a62fc5bf192defae32c9f6146aacc83431a4
Gerrit-PatchSet: 2
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Coren 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Rush 
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] Simplify node class comparison in converter - change (VisualEditor/VisualEditor)

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

Change subject: Simplify node class comparison in converter
..


Simplify node class comparison in converter

Change-Id: Id333bce0a3fee11f7161ccafa858607cf4a81fec
---
M src/dm/ve.dm.Converter.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/dm/ve.dm.Converter.js b/src/dm/ve.dm.Converter.js
index 9699e7b..81aeb1c 100644
--- a/src/dm/ve.dm.Converter.js
+++ b/src/dm/ve.dm.Converter.js
@@ -615,7 +615,7 @@
type = ve.dm.LinearData.static.getType( data[ i ] );
if ( type ) {
itemClass = modelRegistry.lookup( type ) || 
ve.dm.AlienNode;
-   if ( !( itemClass.prototype === 
targetClass.prototype || itemClass.prototype instanceof targetClass ) ) {
+   if ( !( itemClass === targetClass || 
itemClass.prototype instanceof targetClass ) ) {
return false;
}
} else {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id333bce0a3fee11f7161ccafa858607cf4a81fec
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add new MW appservers to the scap DSH list. - change (operations/puppet)

2016-06-21 Thread Elukey (Code Review)
Elukey has submitted this change and it was merged.

Change subject: Add new MW appservers to the scap DSH list.
..


Add new MW appservers to the scap DSH list.

mw1274.eqiad.wmnet
mw1283.eqiad.wmnet
mw1284.eqiad.wmnet
mw1285.eqiad.wmnet
mw1286.eqiad.wmnet
mw2243.codfw.wmnet

Change-Id: I6c56bf67f2c53f2922b159f0a578a5a5894e5ca1
---
M modules/scap/files/dsh/group/mediawiki-installation
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/modules/scap/files/dsh/group/mediawiki-installation 
b/modules/scap/files/dsh/group/mediawiki-installation
index 211e6d5..0daa0a9 100644
--- a/modules/scap/files/dsh/group/mediawiki-installation
+++ b/modules/scap/files/dsh/group/mediawiki-installation
@@ -219,6 +219,7 @@
 mw1271.eqiad.wmnet
 mw1272.eqiad.wmnet
 mw1273.eqiad.wmnet
+mw1274.eqiad.wmnet
 mw1275.eqiad.wmnet
 mw1276.eqiad.wmnet
 mw1277.eqiad.wmnet
@@ -227,6 +228,10 @@
 mw1280.eqiad.wmnet
 mw1281.eqiad.wmnet
 mw1282.eqiad.wmnet
+mw1283.eqiad.wmnet
+mw1284.eqiad.wmnet
+mw1285.eqiad.wmnet
+mw1286.eqiad.wmnet
 mw1291.eqiad.wmnet
 mw1299.eqiad.wmnet
 
@@ -414,6 +419,7 @@
 mw2240.codfw.wmnet
 mw2241.codfw.wmnet
 mw2242.codfw.wmnet
+mw2243.codfw.wmnet
 mw2244.codfw.wmnet
 mw2245.codfw.wmnet
 mw2247.codfw.wmnet

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

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

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


[MediaWiki-commits] [Gerrit] Simplify node class comparison in converter - change (VisualEditor/VisualEditor)

2016-06-21 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Simplify node class comparison in converter
..

Simplify node class comparison in converter

Change-Id: Id333bce0a3fee11f7161ccafa858607cf4a81fec
---
M src/dm/ve.dm.Converter.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/55/295355/1

diff --git a/src/dm/ve.dm.Converter.js b/src/dm/ve.dm.Converter.js
index 9699e7b..81aeb1c 100644
--- a/src/dm/ve.dm.Converter.js
+++ b/src/dm/ve.dm.Converter.js
@@ -615,7 +615,7 @@
type = ve.dm.LinearData.static.getType( data[ i ] );
if ( type ) {
itemClass = modelRegistry.lookup( type ) || 
ve.dm.AlienNode;
-   if ( !( itemClass.prototype === 
targetClass.prototype || itemClass.prototype instanceof targetClass ) ) {
+   if ( !( itemClass === targetClass || 
itemClass.prototype instanceof targetClass ) ) {
return false;
}
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id333bce0a3fee11f7161ccafa858607cf4a81fec
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
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] Allow Message::newFromSpecifier to handle ApiMessages - change (mediawiki/core)

2016-06-21 Thread Anomie (Code Review)
Anomie has uploaded a new change for review.

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

Change subject: Allow Message::newFromSpecifier to handle ApiMessages
..

Allow Message::newFromSpecifier to handle ApiMessages

Instead of constructing a new Message from the Message as
a MessageSpecifier, just clone the existing Message which will preserve
subclass data.

Also, make use of this to simplify the logic in ApiBase::parseMsg().

Change-Id: I9545acb8da752c0c21e16d8b1d37d8802fcb329d
---
M includes/Message.php
M includes/api/ApiBase.php
M tests/phpunit/includes/MessageTest.php
3 files changed, 28 insertions(+), 17 deletions(-)


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

diff --git a/includes/Message.php b/includes/Message.php
index 712d3f1..d0325d7 100644
--- a/includes/Message.php
+++ b/includes/Message.php
@@ -402,8 +402,8 @@
$value = array_shift( $params );
}
 
-   if ( $value instanceof RawMessage ) {
-   $message = new RawMessage( $value->getKey(), 
$value->getParams() );
+   if ( $value instanceof Message ) { // Message, RawMessage, 
ApiMessage, etc
+   $message = clone( $value );
} elseif ( $value instanceof MessageSpecifier ) {
$message = new Message( $value );
} elseif ( is_string( $value ) ) {
diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php
index 639f6be..3795cdc 100644
--- a/includes/api/ApiBase.php
+++ b/includes/api/ApiBase.php
@@ -2143,32 +2143,38 @@
 
/**
 * Return the error message related to a certain array
-* @param array $error Element of a getUserPermissionsErrors()-style 
array
+* @param array|string|MessageSpecifier $error Element of a 
getUserPermissionsErrors()-style array
 * @return array('code' => code, 'info' => info)
 */
public function parseMsg( $error ) {
-   $error = (array)$error; // It seems strings sometimes make 
their way in here
-   $key = array_shift( $error );
-
-   // Check whether the error array was nested
-   // array( array( ,  ), array( , 
 ) )
-   if ( is_array( $key ) ) {
-   $error = $key;
-   $key = array_shift( $error );
+   // Check whether someone passed the whole array, instead of one 
element as
+   // documented. This breaks if it's actually an array of 
fallback keys, but
+   // that's long-standing misbehavior introduced in r87627 to 
incorrectly
+   // fix T30797.
+   if ( is_array( $error ) ) {
+   $first = reset( $error );
+   if ( is_array( $first ) ) {
+   wfDebug( __METHOD__ . ' was passed an array of 
arrays. ' . wfGetAllCallers( 5 ) );
+   $error = $first;
+   }
}
 
-   if ( $key instanceof IApiMessage ) {
+   $msg = Message::newFromSpecifier( $error );
+
+   if ( $msg instanceof IApiMessage ) {
return [
-   'code' => $key->getApiCode(),
-   'info' => $key->inLanguage( 'en' 
)->useDatabase( false )->text(),
-   'data' => $key->getApiData()
+   'code' => $msg->getApiCode(),
+   'info' => $msg->inLanguage( 'en' 
)->useDatabase( false )->text(),
+   'data' => $msg->getApiData()
];
}
 
+   $key = $msg->getKey();
if ( isset( self::$messageMap[$key] ) ) {
+   $params = $msg->getParams();
return [
-   'code' => wfMsgReplaceArgs( 
self::$messageMap[$key]['code'], $error ),
-   'info' => wfMsgReplaceArgs( 
self::$messageMap[$key]['info'], $error )
+   'code' => wfMsgReplaceArgs( 
self::$messageMap[$key]['code'], $params ),
+   'info' => wfMsgReplaceArgs( 
self::$messageMap[$key]['info'], $params )
];
}
 
diff --git a/tests/phpunit/includes/MessageTest.php 
b/tests/phpunit/includes/MessageTest.php
index 8aa1361..c4f3fb1 100644
--- a/tests/phpunit/includes/MessageTest.php
+++ b/tests/phpunit/includes/MessageTest.php
@@ -589,6 +589,10 @@
public function testNewFromSpecifier( $value, $expectedText ) {
$message = Message::newFromSpecifier( $value );
$this->assertInstanceOf( Message::class, $message );
+   if ( $value instanceof Message ) {
+   $this->assertInstanceOf( get_class( 

[MediaWiki-commits] [Gerrit] Deploy Graphoid with Scap3 - change (operations/puppet)

2016-06-21 Thread Gehel (Code Review)
Gehel has submitted this change and it was merged.

Change subject: Deploy Graphoid with Scap3
..


Deploy Graphoid with Scap3

Change-Id: Ic741c7e339a8f038ba9c08faa62360a070b254a0
---
M hieradata/common/role/deployment.yaml
M hieradata/common/scap/server.yaml
M modules/graphoid/manifests/init.pp
3 files changed, 2 insertions(+), 5 deletions(-)

Approvals:
  Gehel: Looks good to me, approved
  Mobrovac: Looks good to me, but someone else must approve
  Yurik: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/hieradata/common/role/deployment.yaml 
b/hieradata/common/role/deployment.yaml
index 5b92a1e..94f5135 100644
--- a/hieradata/common/role/deployment.yaml
+++ b/hieradata/common/role/deployment.yaml
@@ -44,10 +44,6 @@
 service_name: zotero
   zotero/translators:
 upstream: 
https://gerrit.wikimedia.org/r/mediawiki/services/zotero/translators
-  graphoid/deploy:
-upstream: https://gerrit.wikimedia.org/r/mediawiki/services/graphoid/deploy
-service_name: graphoid
-checkout_submodules: true
   rcstream/rcstream:
 upstream: https://gerrit.wikimedia.org/r/mediawiki/services/rcstream
 service_name: rcstream
diff --git a/hieradata/common/scap/server.yaml 
b/hieradata/common/scap/server.yaml
index 5387b08..c9579c0 100644
--- a/hieradata/common/scap/server.yaml
+++ b/hieradata/common/scap/server.yaml
@@ -55,8 +55,8 @@
   mobileapps/deploy: {}
 
   kartotherian/deploy: {}
-
   tilerator/deploy: {}
+  graphoid/deploy: {}
 
   # cxserver is the ContentTranslation server.
   cxserver/deploy:
diff --git a/modules/graphoid/manifests/init.pp 
b/modules/graphoid/manifests/init.pp
index c00bd24..652f526 100644
--- a/modules/graphoid/manifests/init.pp
+++ b/modules/graphoid/manifests/init.pp
@@ -48,6 +48,7 @@
 },
 has_spec=> true,
 healthcheck_url => '',
+deployment  => 'scap3',
 }
 
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic741c7e339a8f038ba9c08faa62360a070b254a0
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Thcipriani 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Version 0.7.2 - change (mediawiki...ApprovedRevs)

2016-06-21 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Version 0.7.2
..


Version 0.7.2

Change-Id: I8860f31bbeb7262c0281af39bd4d389d1728ec2c
---
M ApprovedRevs.php
M README
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/ApprovedRevs.php b/ApprovedRevs.php
index 6506cf3..56d6553 100644
--- a/ApprovedRevs.php
+++ b/ApprovedRevs.php
@@ -9,7 +9,7 @@
  * @author Yaron Koren
  */
 
-define( 'APPROVED_REVS_VERSION', '0.7.1' );
+define( 'APPROVED_REVS_VERSION', '0.7.2' );
 
 // credits
 $wgExtensionCredits['other'][] = array(
diff --git a/README b/README
index 90a7126..bbb6e7f 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 Approved Revs Extension
 
-Version 0.7.1
+Version 0.7.2
 Yaron Koren
 
 This is free software licensed under the GNU General Public License. Please

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8860f31bbeb7262c0281af39bd4d389d1728ec2c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApprovedRevs
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] Configuration for new elasticsearch servers in eqiad. - change (operations/puppet)

2016-06-21 Thread Gehel (Code Review)
Gehel has submitted this change and it was merged.

Change subject: Configuration for new elasticsearch servers in eqiad.
..


Configuration for new elasticsearch servers in eqiad.

Only elastic1032 is configured in site.pp. Let's check first on a single server
that the installation works and replicate to the 15 others afterward.

Changed regex.yaml and now use more stupid regex to improve readability.

Change-Id: I5ef95b53dcfd79fd0eee7bd245feee210b7cd8f8
---
M hieradata/regex.yaml
M hieradata/role/eqiad/elasticsearch/server.yaml
M manifests/site.pp
3 files changed, 42 insertions(+), 12 deletions(-)

Approvals:
  Gehel: Looks good to me, approved
  DCausse: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml
index 813672e..34ea221 100644
--- a/hieradata/regex.yaml
+++ b/hieradata/regex.yaml
@@ -1,60 +1,65 @@
 es_codfw_rack_a5:
-  __regex: !ruby/regexp /^elastic200[1-3]\.codfw\.wmnet$/
+  __regex: !ruby/regexp /^elastic20(01|02|03)\.codfw\.wmnet$/
   elasticsearch::rack: A5
   elasticsearch::row:  A
 
 es_codfw_rack_a8:
-  __regex: !ruby/regexp /^elastic200[4-6]\.codfw\.wmnet$/
+  __regex: !ruby/regexp /^elastic20(04|05|06)\.codfw\.wmnet$/
   elasticsearch::rack: A8
   elasticsearch::row:  A
 
 es_codfw_rack_b5:
-  __regex: !ruby/regexp /^elastic200[7-9]\.codfw\.wmnet$/
+  __regex: !ruby/regexp /^elastic20(07|08|09)\.codfw\.wmnet$/
   elasticsearch::rack: B5
   elasticsearch::row:  B
 
 es_codfw_rack_b8:
-  __regex: !ruby/regexp /^elastic201[0-2]\.codfw\.wmnet$/
+  __regex: !ruby/regexp /^elastic20(10|11|12)\.codfw\.wmnet$/
   elasticsearch::rack: B8
   elasticsearch::row:  B
 
 es_codfw_rack_c1:
-  __regex: !ruby/regexp /^elastic201[3-5]\.codfw\.wmnet$/
+  __regex: !ruby/regexp /^elastic20(13|14|15)\.codfw\.wmnet$/
   elasticsearch::rack: C1
   elasticsearch::row:  C
 
 es_codfw_rack_c5:
-  __regex: !ruby/regexp /^elastic201[6-8]\.codfw\.wmnet$/
+  __regex: !ruby/regexp /^elastic20(16|17|18)\.codfw\.wmnet$/
   elasticsearch::rack: C5
   elasticsearch::row:  C
 
 es_codfw_rack_d1:
-  __regex: !ruby/regexp /^elastic20(1[9]|2[0-1])\.codfw\.wmnet$/
+  __regex: !ruby/regexp /^elastic20(19|20|21)\.codfw\.wmnet$/
   elasticsearch::rack: D1
   elasticsearch::row:  D
 
 es_codfw_rack_d5:
-  __regex: !ruby/regexp /^elastic202[2-4]\.codfw\.wmnet$/
+  __regex: !ruby/regexp /^elastic20(22|23|24)\.codfw\.wmnet$/
   elasticsearch::rack: D5
   elasticsearch::row:  D
 
 es_eqiad_rack_a3:
-  __regex: !ruby/regexp /^elastic10(0[0-4]|30|31)\.eqiad\.wmnet$/
+  __regex: !ruby/regexp 
/^elastic10(01|02|03|04|30|31|32|33|34|35)\.eqiad\.wmnet$/
   elasticsearch::rack: A3
   elasticsearch::row:  A
 
+es_eqiad_rack_b3:
+  __regex: !ruby/regexp /^elastic10(36|37|38|39)\.eqiad\.wmnet$/
+  elasticsearch::rack: B3
+  elasticsearch::row:  B
+
 es_eqiad_rack_c5:
-  __regex: !ruby/regexp /^elastic10(0[7-9]|1[0-2])\.eqiad\.wmnet$/
+  __regex: !ruby/regexp 
/^elastic10(07|08|09|10|11|12|40|41|42|43)\.eqiad\.wmnet$/
   elasticsearch::rack: C5
   elasticsearch::row:  C
 
 es_eqiad_rack_d3:
-  __regex: !ruby/regexp /^elastic10(1[3-9]|2[0-2])\.eqiad\.wmnet$/
+  __regex: !ruby/regexp 
/^elastic10(13|14|15|16|17|18|19|20|21|22)\.eqiad\.wmnet$/
   elasticsearch::rack: D3
   elasticsearch::row:  D
 
 es_eqiad_rack_d4:
-  __regex: !ruby/regexp /^elastic10(2[3-9]|05|06)\.eqiad\.wmnet$/
+  __regex: !ruby/regexp /^elastic10(05|06|23|24|25|26|27|28|29)\.eqiad\.wmnet$/
   elasticsearch::rack: D4
   elasticsearch::row:  D
 
diff --git a/hieradata/role/eqiad/elasticsearch/server.yaml 
b/hieradata/role/eqiad/elasticsearch/server.yaml
index 5507891..a343e20 100644
--- a/hieradata/role/eqiad/elasticsearch/server.yaml
+++ b/hieradata/role/eqiad/elasticsearch/server.yaml
@@ -43,7 +43,24 @@
   - elastic1029.eqiad.wmnet
   - elastic1030.eqiad.wmnet
   - elastic1031.eqiad.wmnet
+  - elastic1032.eqiad.wmnet
+  - elastic1033.eqiad.wmnet
+  - elastic1034.eqiad.wmnet
+  - elastic1035.eqiad.wmnet
+  - elastic1036.eqiad.wmnet
+  - elastic1037.eqiad.wmnet
+  - elastic1038.eqiad.wmnet
+  - elastic1039.eqiad.wmnet
+  - elastic1040.eqiad.wmnet
+  - elastic1041.eqiad.wmnet
+  - elastic1042.eqiad.wmnet
+  - elastic1043.eqiad.wmnet
+  - elastic1044.eqiad.wmnet
+  - elastic1045.eqiad.wmnet
+  - elastic1046.eqiad.wmnet
+  - elastic1047.eqiad.wmnet
 
+# TODO at what point do we need to update this number?
 elasticsearch::expected_nodes: 31
 
 # We should be able to run "OK" with 24 servers.
diff --git a/manifests/site.pp b/manifests/site.pp
index 0b53d3f..75982cd 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -959,6 +959,14 @@
 include standard
 }
 
+# Let's start by installing a single new node, add the others in a second step
+node 'elastic1032.eqiad.wmnet' {
+role elasticsearch::server
+include base::firewall
+include standard
+}
+
+
 node 

[MediaWiki-commits] [Gerrit] Hygiene: remove redundant lint suppression - change (apps...wikipedia)

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

Change subject: Hygiene: remove redundant lint suppression
..


Hygiene: remove redundant lint suppression

Android Studio v2.1.2 no longer seems to incorrectly lint Preference
styles. Remove the suppressions.

Change-Id: I0729a2fdd6b45deab81bf5b37f74bb96dd0409d9
---
M app/src/main/res/xml/developer_preferences.xml
1 file changed, 1 insertion(+), 15 deletions(-)

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



diff --git a/app/src/main/res/xml/developer_preferences.xml 
b/app/src/main/res/xml/developer_preferences.xml
index 7c20c1f..93cdc2e 100644
--- a/app/src/main/res/xml/developer_preferences.xml
+++ b/app/src/main/res/xml/developer_preferences.xml
@@ -20,19 +20,16 @@
 android:key="@string/preference_key_use_restbase"
 android:title="@string/preference_key_use_restbase" />
 
-
 
 
-
 
 
-
 
 
-
 
 
-
 
 
-
 
 
-
 
 
-
 
 
-
 
 
-
 
 
-
 
 
-
 
 
 
-
 
 
-
+
 
 
-
 https://gerrit.wikimedia.org/r/294845
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] Only score the top 15 results per query source - change (wikimedia...discernatron)

2016-06-21 Thread EBernhardson (Code Review)
EBernhardson has submitted this change and it was merged.

Change subject: Only score the top 15 results per query source
..


Only score the top 15 results per query source

After some analysis (thanks Trey!) on the current scores we have
determined that providing the top 15 results, rather than the top 25,
from each source gives sufficient data for scoring. This reduces the
maximum number of results a user must score from 80 to 48, which will
hopefully make things easier on graders.

Change-Id: I620a8e1f7290c4690910ab5fc9c16322aa3bf2df
---
M src/RelevanceScoring/RelevanceScoringProvider.php
M src/RelevanceScoring/Repository/ResultsRepository.php
M tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php
M tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php
4 files changed, 26 insertions(+), 10 deletions(-)

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



diff --git a/src/RelevanceScoring/RelevanceScoringProvider.php 
b/src/RelevanceScoring/RelevanceScoringProvider.php
index 139fa73..19b94e7 100644
--- a/src/RelevanceScoring/RelevanceScoringProvider.php
+++ b/src/RelevanceScoring/RelevanceScoringProvider.php
@@ -75,7 +75,10 @@
 return new Repository\QueriesRepository($app['db']);
 };
 $app['search.repository.results'] = function () use ($app) {
-$repo = new Repository\ResultsRepository($app['db']);
+$repo = new Repository\ResultsRepository(
+$app['db'],
+$app['search.importer_limit']
+);
 $repo->setLogger($app['search.logger']);
 
 return $repo;
@@ -97,7 +100,7 @@
 
 private function registerImporter(Application $app)
 {
-$app['search.importer_limit'] = 25;
+$app['search.importer_limit'] = 15;
 $app['search.importer.bing'] = function () use ($app) {
 return new HtmlResultGetter(
 $app['guzzle'],
diff --git a/src/RelevanceScoring/Repository/ResultsRepository.php 
b/src/RelevanceScoring/Repository/ResultsRepository.php
index 6d0f6d5..13a5de0 100644
--- a/src/RelevanceScoring/Repository/ResultsRepository.php
+++ b/src/RelevanceScoring/Repository/ResultsRepository.php
@@ -19,9 +19,17 @@
 /** @var Connection */
 private $db;
 
-public function __construct(Connection $db)
+/** @var int The maximum position returned for scoring */
+private $maxPosition;
+
+/**
+ * @param Connection $db
+ * @param int$maxPosition The maximum position returned for scoring
+ */
+public function __construct(Connection $db, $maxPosition)
 {
 $this->db = $db;
+$this->maxPosition = $maxPosition;
 $this->logger = new NullLogger();
 }
 
@@ -115,19 +123,24 @@
   FROM results r
   JOIN (SELECT results_id, MAX(snippet_score) as snippet_score
   FROM results_sources
- WHERE query_id = ?
+ WHERE query_id = :queryId
+   AND position <= :maxPosition
  GROUP BY results_id
) r_s_max
 ON r.id = r_s_max.results_id
   JOIN results_sources r_s
 ON r_s.results_id = r_s_max.results_id
AND r_s.snippet_score = r_s_max.snippet_score
-   AND r_s.query_id = ?
- WHERE r.query_id = ?
+   AND r_s.query_id = :queryId
+   AND r_s.position <= :maxPosition
+ WHERE r.query_id = :queryId
  GROUP BY r.id
  ORDER BY r.id DESC
 EOD;
-$results = $this->db->fetchAll($sql, [$queryId, $queryId, $queryId]);
+$results = $this->db->fetchAll($sql, [
+'queryId' => $queryId,
+'maxPosition' => $this->maxPosition,
+]);
 if ($results === false) {
 return new None();
 }
diff --git a/tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php 
b/tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php
index 42145f2..8d527a1 100644
--- a/tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php
+++ b/tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php
@@ -69,7 +69,7 @@
  */
 protected function genResult(User $user, $queryId, array $results)
 {
-$repo = new ResultsRepository($this->db);
+$repo = new ResultsRepository($this->db, 15);
 
 return $repo->storeResults($user, $queryId, $results);
 }
diff --git a/tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php 
b/tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php
index f23fe61..8738c2a 100644
--- a/tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php
+++ b/tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php
@@ -10,7 +10,7 @@
 public function testStoreResults()
 {
 $user = $this->genTestUser();
-$repo = new ResultsRepository($this->db);
+$repo = new ResultsRepository($this->db, 15);
 $queryId = null;
 $this->db->transactional(function () use ($repo, $user, &$queryId) {
 $queryId 

[MediaWiki-commits] [Gerrit] installer: Allow specifying where LocalSettings.php should b... - change (mediawiki/core)

2016-06-21 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: installer: Allow specifying where LocalSettings.php should be 
saved
..

installer: Allow specifying where LocalSettings.php should be saved

This allows software packages to specify where the LocalSettings.php
file should be saved to when the user is downloading it from the web
installer.

Bug: T123151
Change-Id: I06ded602be9aac0a10773e9d85c4d1585a70933b
---
M includes/installer/WebInstaller.php
M includes/installer/WebInstallerComplete.php
M includes/installer/i18n/en.json
M includes/installer/i18n/qqq.json
4 files changed, 25 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/52/295352/1

diff --git a/includes/installer/WebInstaller.php 
b/includes/installer/WebInstaller.php
index 4c4e6b7..c08212e 100644
--- a/includes/installer/WebInstaller.php
+++ b/includes/installer/WebInstaller.php
@@ -1157,6 +1157,20 @@
}
 
/**
+* If the software package wants the LocalSettings.php file
+* to be placed in a specific location, override this function
+* (see mw-config/overrides/README) to return the path of
+* where the file should be saved, or false for a generic
+* "in the base of your install"
+*
+* @since 1.27
+* @return string|bool
+*/
+   public function getLocalSettingsLocation() {
+   return false;
+   }
+
+   /**
 * @return bool
 */
public function envCheckPath() {
diff --git a/includes/installer/WebInstallerComplete.php 
b/includes/installer/WebInstallerComplete.php
index 11a1833..456058e 100644
--- a/includes/installer/WebInstallerComplete.php
+++ b/includes/installer/WebInstallerComplete.php
@@ -37,13 +37,20 @@
 
$this->startForm();
$this->parent->disableLinkPopups();
+   $location = $this->parent->getLocalSettingsLocation();
+   $msg = 'config-install-done';
+   if ( $location !== false ) {
+   // config-install-done-path
+   $msg .= '-path';
+   }
$this->addHTML(
$this->parent->getInfoBox(
-   wfMessage( 'config-install-done',
+   wfMessage( $msg,
$lsUrl,
$this->getVar( 'wgServer' ) .
$this->getVar( 'wgScriptPath' ) . 
'/index.php',
-   ''
+   '',
+   $location ?: ''
)->plain(), 'tick-32.png'
)
);
diff --git a/includes/installer/i18n/en.json b/includes/installer/i18n/en.json
index 2b7886a..79383f3 100644
--- a/includes/installer/i18n/en.json
+++ b/includes/installer/i18n/en.json
@@ -298,6 +298,7 @@
"config-install-extension-tables": "Creating tables for enabled 
extensions",
"config-install-mainpage-failed": "Could not insert main page: $1",
"config-install-done": "Congratulations!\nYou have 
installed MediaWiki.\n\nThe installer has generated a 
LocalSettings.php file.\nIt contains all your 
configuration.\n\nYou will need to download it and put it in the base of your 
wiki installation (the same directory as index.php). The download should have 
started automatically.\n\nIf the download was not offered, or if you cancelled 
it, you can restart the download by clicking the link 
below:\n\n$3\n\nNote: If you do not do this now, this 
generated configuration file will not be available to you later if you exit the 
installation without downloading it.\n\nWhen that has been done, you can 
[$2 enter your wiki].",
+   "config-install-done-path": "Congratulations!\nYou 
have installed MediaWiki.\n\nThe installer has generated a 
LocalSettings.php file.\nIt contains all your 
configuration.\n\nYou will need to download it and put it at $4. 
The download should have started automatically.\n\nIf the download was not 
offered, or if you cancelled it, you can restart the download by clicking the 
link below:\n\n$3\n\nNote: If you do not do this now, this 
generated configuration file will not be available to you later if you exit the 
installation without downloading it.\n\nWhen that has been done, you can 
[$2 enter your wiki].",
"config-download-localsettings": "Download 
LocalSettings.php",
"config-help": "help",
"config-help-tooltip": "click to expand",
diff --git a/includes/installer/i18n/qqq.json b/includes/installer/i18n/qqq.json
index 66a24c0..69a6830 100644
--- a/includes/installer/i18n/qqq.json
+++ b/includes/installer/i18n/qqq.json
@@ -316,6 +316,7 @@

[MediaWiki-commits] [Gerrit] Apply variant C most read UI tweaks - change (apps...wikipedia)

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

Change subject: Apply variant C most read UI tweaks
..


Apply variant C most read UI tweaks

https://app.zeplin.io/project.html#pid=575030de30a17087229662e6=5756ffc19bf6204842c64ebf

Bug: T129082
Change-Id: I5a25213007c600be2882b38b3de425ca2c3c555f
---
M app/src/main/java/org/wikipedia/feed/mostread/MostReadCardView.java
M app/src/main/java/org/wikipedia/feed/mostread/MostReadListCard.java
M app/src/main/java/org/wikipedia/feed/view/CardHeaderView.java
M app/src/main/java/org/wikipedia/util/ResourceUtil.java
A app/src/main/res/drawable/ic_most_read.xml
M app/src/main/res/layout/view_card_header.xml
M app/src/main/res/values/strings_no_translate.xml
M app/src/test/java/org/wikipedia/feed/mostread/MostReadClientTest.java
8 files changed, 56 insertions(+), 22 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/feed/mostread/MostReadCardView.java 
b/app/src/main/java/org/wikipedia/feed/mostread/MostReadCardView.java
index 081bc9b..fcb67d0 100644
--- a/app/src/main/java/org/wikipedia/feed/mostread/MostReadCardView.java
+++ b/app/src/main/java/org/wikipedia/feed/mostread/MostReadCardView.java
@@ -3,11 +3,13 @@
 import android.content.Context;
 import android.support.annotation.NonNull;
 
+import org.wikipedia.R;
 import org.wikipedia.feed.demo.IntegerListCard;
 import org.wikipedia.feed.view.CardFooterView;
 import org.wikipedia.feed.view.CardHeaderView;
 import org.wikipedia.feed.view.ListCardItemView;
 import org.wikipedia.feed.view.ListCardView;
+import org.wikipedia.util.ResourceUtil;
 import org.wikipedia.views.DefaultViewHolder;
 
 import java.util.List;
@@ -26,7 +28,8 @@
 private void header(@NonNull MostReadListCard card) {
 CardHeaderView header = new CardHeaderView(getContext())
 .setTitle(card.title())
-.setSubtitle(card.subtitle());
+.setSubtitle(card.subtitle())
+.setImage(ResourceUtil.uri(getContext(), 
R.drawable.ic_most_read));
 header(header);
 }
 
diff --git 
a/app/src/main/java/org/wikipedia/feed/mostread/MostReadListCard.java 
b/app/src/main/java/org/wikipedia/feed/mostread/MostReadListCard.java
index 212d769..723cea5 100644
--- a/app/src/main/java/org/wikipedia/feed/mostread/MostReadListCard.java
+++ b/app/src/main/java/org/wikipedia/feed/mostread/MostReadListCard.java
@@ -26,21 +26,23 @@
 }
 
 @NonNull @Override public String title() {
-return getString(R.string.most_read_list_card_title, date());
+return getString(R.string.most_read_list_card_title);
 }
 
 @Nullable @Override public String subtitle() {
-return date();
+// todo: consider allowing TWN date formats. It would be useful to 
have but might be
+//   difficult for translators to write correct format specifiers 
without being able to
+//   test them. We should investigate localization support in date 
libraries such as
+//   Joda-Time and how TWN solves this classic problem.
+DateFormat dateFormat = 
android.text.format.DateFormat.getDateFormat(context());
+return dateFormat.format(articles.date());
 }
 
 @Nullable @Override public String footer() {
-// todo: the mocks show a more terse date used here but this will 
probably require TWN
-//   support. We should investigate localization support in date 
libraries such as
-//   Joda-Time and how TWN solves this classic problem.
-return getString(R.string.most_read_list_card_footer, date());
+return getString(R.string.most_read_list_card_footer);
 }
 
-@VisibleForTesting @NonNull Date getDate() {
+@VisibleForTesting @NonNull Date date() {
 return articles.date();
 }
 
@@ -50,14 +52,6 @@
 cards.add(new MostReadItemCard(article));
 }
 return cards.subList(0, Math.min(cards.size(), MAX_SIZE));
-}
-
-@NonNull private String date() {
-// todo: consider allowing TWN date formats. It would be useful to 
have but might be
-//   difficult for translators to write correct format specifiers 
without being able to
-//   test them.
-DateFormat dateFormat = 
android.text.format.DateFormat.getDateFormat(context());
-return dateFormat.format(articles.date());
 }
 
 @NonNull private String getString(@StringRes int id, @Nullable Object... 
formatArgs) {
diff --git a/app/src/main/java/org/wikipedia/feed/view/CardHeaderView.java 
b/app/src/main/java/org/wikipedia/feed/view/CardHeaderView.java
index a590420..acc2884 100644
--- a/app/src/main/java/org/wikipedia/feed/view/CardHeaderView.java
+++ b/app/src/main/java/org/wikipedia/feed/view/CardHeaderView.java
@@ -26,7 +26,7 @@
 

[MediaWiki-commits] [Gerrit] Add new MW appservers to the scap DSH list. - change (operations/puppet)

2016-06-21 Thread Elukey (Code Review)
Elukey has uploaded a new change for review.

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

Change subject: Add new MW appservers to the scap DSH list.
..

Add new MW appservers to the scap DSH list.

mw1274.eqiad.wmnet
mw1283.eqiad.wmnet
mw1284.eqiad.wmnet
mw1285.eqiad.wmnet
mw1286.eqiad.wmnet
mw2243.codfw.wmnet

Change-Id: I6c56bf67f2c53f2922b159f0a578a5a5894e5ca1
---
M modules/scap/files/dsh/group/mediawiki-installation
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/53/295353/1

diff --git a/modules/scap/files/dsh/group/mediawiki-installation 
b/modules/scap/files/dsh/group/mediawiki-installation
index 211e6d5..0daa0a9 100644
--- a/modules/scap/files/dsh/group/mediawiki-installation
+++ b/modules/scap/files/dsh/group/mediawiki-installation
@@ -219,6 +219,7 @@
 mw1271.eqiad.wmnet
 mw1272.eqiad.wmnet
 mw1273.eqiad.wmnet
+mw1274.eqiad.wmnet
 mw1275.eqiad.wmnet
 mw1276.eqiad.wmnet
 mw1277.eqiad.wmnet
@@ -227,6 +228,10 @@
 mw1280.eqiad.wmnet
 mw1281.eqiad.wmnet
 mw1282.eqiad.wmnet
+mw1283.eqiad.wmnet
+mw1284.eqiad.wmnet
+mw1285.eqiad.wmnet
+mw1286.eqiad.wmnet
 mw1291.eqiad.wmnet
 mw1299.eqiad.wmnet
 
@@ -414,6 +419,7 @@
 mw2240.codfw.wmnet
 mw2241.codfw.wmnet
 mw2242.codfw.wmnet
+mw2243.codfw.wmnet
 mw2244.codfw.wmnet
 mw2245.codfw.wmnet
 mw2247.codfw.wmnet

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

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

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


[MediaWiki-commits] [Gerrit] Hygiene: move less often used dev settings down - change (apps...wikipedia)

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

Change subject: Hygiene: move less often used dev settings down
..


Hygiene: move less often used dev settings down

Change-Id: I568e5aabf053118c1d9aed0b74e82719c6a9416a
---
M app/src/main/res/xml/developer_preferences.xml
1 file changed, 25 insertions(+), 26 deletions(-)

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



diff --git a/app/src/main/res/xml/developer_preferences.xml 
b/app/src/main/res/xml/developer_preferences.xml
index 93cdc2e..77fd264 100644
--- a/app/src/main/res/xml/developer_preferences.xml
+++ b/app/src/main/res/xml/developer_preferences.xml
@@ -56,31 +56,6 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
@@ -191,4 +190,4 @@
 
 
 
-
+
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I568e5aabf053118c1d9aed0b74e82719c6a9416a
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
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: 20b9301..c2281a2 - change (mediawiki/extensions)

2016-06-21 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 20b9301..c2281a2
..

Syncronize VisualEditor: 20b9301..c2281a2

Change-Id: Ibe2e8589989067f3adfdaf9ce522370fcbac7dc2
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/54/295354/1

diff --git a/VisualEditor b/VisualEditor
index 20b9301..c2281a2 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 20b93019a0d5fde0590d8759f3ab0d944a03d319
+Subproject commit c2281a2a8c5a5e7c1a4a328f4b48e8faeacf2ab1

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe2e8589989067f3adfdaf9ce522370fcbac7dc2
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] Syncronize VisualEditor: 20b9301..c2281a2 - change (mediawiki/extensions)

2016-06-21 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 20b9301..c2281a2
..


Syncronize VisualEditor: 20b9301..c2281a2

Change-Id: Ibe2e8589989067f3adfdaf9ce522370fcbac7dc2
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index 20b9301..c2281a2 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 20b93019a0d5fde0590d8759f3ab0d944a03d319
+Subproject commit c2281a2a8c5a5e7c1a4a328f4b48e8faeacf2ab1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe2e8589989067f3adfdaf9ce522370fcbac7dc2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] openldap: enable the memberof overlay - change (operations/puppet)

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

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

Change subject: openldap: enable the memberof overlay
..

openldap: enable the memberof overlay

This enables the reverse group membership maintenance overlay.  Groups
need to be redefined after this option is enabled for this to take
effect.

Change-Id: Iab5db64ffb904420f68e23b5b817327b3a429155
---
M modules/openldap/templates/slapd.erb
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/57/295357/1

diff --git a/modules/openldap/templates/slapd.erb 
b/modules/openldap/templates/slapd.erb
index e21c963..c4ac85f 100644
--- a/modules/openldap/templates/slapd.erb
+++ b/modules/openldap/templates/slapd.erb
@@ -86,6 +86,7 @@
 auditlog /var/lib/ldap/slapd-audit.log
 
 overlay deref
+overlay memberof
 
 ###
 ## Password policy (default is to store passwords in plaintext)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab5db64ffb904420f68e23b5b817327b3a429155
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis 

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


[MediaWiki-commits] [Gerrit] Add a node-type index - change (VisualEditor/VisualEditor)

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

Change subject: Add a node-type index
..


Add a node-type index

Bug: T135950
Change-Id: I51ae4491c26851f9a590825bff962c917bc77ee1
---
M src/dm/ve.dm.Document.js
1 file changed, 87 insertions(+), 6 deletions(-)

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



diff --git a/src/dm/ve.dm.Document.js b/src/dm/ve.dm.Document.js
index 28f0ccb..8b34f45 100644
--- a/src/dm/ve.dm.Document.js
+++ b/src/dm/ve.dm.Document.js
@@ -50,6 +50,7 @@
// Properties
this.parentDocument = parentDocument;
this.completeHistory = [];
+   this.nodesByType = {};
 
if ( data instanceof ve.dm.ElementLinearData ) {
// Pre-split ElementLinearData
@@ -306,6 +307,7 @@
// The end state is stack = [ [this.documentNode] [ array, of, its, 
children ] ]
// so attach all nodes in stack[1] to the root node
ve.batchSplice( this.documentNode, 0, 0, currentStack );
+   this.updateNodesByType( [ this.documentNode ], [] );
 
doc.buildingNodeTree = false;
 };
@@ -954,16 +956,19 @@
  * @return {ve.dm.Node[]} Array containing the rebuilt/inserted nodes
  */
 ve.dm.Document.prototype.rebuildNodes = function ( parent, index, numNodes, 
offset, newLength ) {
-   var // Get a slice of the document where it's been changed
-   data = this.data.sliceObject( offset, offset + newLength ),
+   // Get a slice of the document where it's been changed
+   var data = this.data.sliceObject( offset, offset + newLength ),
// Build document fragment from data
fragment = new this.constructor( data, this.htmlDocument, this 
),
// Get generated child nodes from the document fragment
-   nodes = fragment.getDocumentNode().getChildren();
-   // Replace nodes in the model tree
-   ve.batchSplice( parent, index, numNodes, nodes );
+   addedNodes = fragment.getDocumentNode().getChildren(),
+   // Replace nodes in the model tree
+   removedNodes = ve.batchSplice( parent, index, numNodes, 
addedNodes );
+
+   this.updateNodesByType( addedNodes, removedNodes );
+
// Return inserted nodes
-   return nodes;
+   return addedNodes;
 };
 
 /**
@@ -981,6 +986,82 @@
 };
 
 /**
+ * Update the nodes-by-type index
+ *
+ * @param {ve.dm.Node[]} addedNodes Added nodes
+ * @param {ve.dm.Node[]} removedNodes Removed nodes
+ */
+ve.dm.Document.prototype.updateNodesByType = function ( addedNodes, 
removedNodes ) {
+   var doc = this;
+
+   function remove( node ) {
+   var type = node.getType(),
+   nodes = doc.nodesByType[ type ] || [],
+   index = nodes.indexOf( node );
+
+   if ( index !== -1 ) {
+   nodes.splice( index, 1 );
+   if ( !nodes.length ) {
+   delete doc.nodesByType[ type ];
+   }
+   }
+   }
+
+   function add( node ) {
+   var type = node.getType(),
+   nodes = doc.nodesByType[ type ] = doc.nodesByType[ type 
] || [];
+
+   nodes.push( node );
+   }
+
+   function traverse( nodes, action ) {
+   nodes.forEach( function ( node ) {
+   if ( node.hasChildren() ) {
+   node.traverse( action );
+   }
+   action( node );
+   } );
+   }
+
+   traverse( removedNodes, remove );
+   traverse( addedNodes, add );
+};
+
+/**
+ * Get all nodes in the tree for a specific type
+ *
+ * If a string type is passed only nodes of that exact type will be returned,
+ * if a node class is passed, all sub types will be matched.
+ *
+ * String type matching will be faster than class matching.
+ *
+ * @param {string|Function} type Node type name or node constructor
+ * @param {boolean} sort Sort nodes by document order
+ * @return {ve.dm.Node[]} Nodes of a specific type
+ */
+ve.dm.Document.prototype.getNodesByType = function ( type, sort ) {
+   var t, nodeType,
+   nodes = [];
+   if ( type instanceof Function ) {
+   for ( t in this.nodesByType ) {
+   nodeType = ve.dm.nodeFactory.lookup( t );
+   if ( nodeType === type || nodeType.prototype instanceof 
type ) {
+   nodes = nodes.concat( this.getNodesByType( t ) 
);
+   }
+   }
+   } else {
+   nodes = this.nodesByType[ type ];
+   }
+
+   if ( sort ) {
+   nodes.sort( function ( a, b ) {
+   return a.getOffset() - b.getOffset();
+   } );
+   }
+   return nodes;
+};
+
+/**
  * Fix up data so it can safely be inserted 

[MediaWiki-commits] [Gerrit] Don't resample audio with ffmpeg2theora, it's unreliable - change (mediawiki...TimedMediaHandler)

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

Change subject: Don't resample audio with ffmpeg2theora, it's unreliable
..


Don't resample audio with ffmpeg2theora, it's unreliable

A/V sync can drift badly over time when resampling audio with
ffmpeg2theora, such as 48k -> 44.1 kHz. Just let audio through
with its source rate for .ogv output for now to avoid this.

Bug: T135581
Change-Id: I0183f2e13e8615ba4f28bc7315530304deba7837
---
M WebVideoTranscode/WebVideoTranscode.php
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/WebVideoTranscode/WebVideoTranscode.php 
b/WebVideoTranscode/WebVideoTranscode.php
index 010e21c..dcf5a72 100644
--- a/WebVideoTranscode/WebVideoTranscode.php
+++ b/WebVideoTranscode/WebVideoTranscode.php
@@ -87,7 +87,6 @@
'videoBitrate'   => '160',
'framerate'  => '15',
'audioQuality'   => '-1',
-   'samplerate' => '44100',
'channels'   => '2',
'noUpscaling'=> 'true',
'twopass'=> 'false', // 
will be overridden by $wgTmhTheoraTwoPassEncoding
@@ -102,7 +101,6 @@
'maxSize'=> '426x240',
'videoBitrate'   => '512',
'audioQuality'   => '0',
-   'samplerate' => '44100',
'channels'   => '2',
'noUpscaling'=> 'true',
'twopass'=> 'false', // 
will be overridden by $wgTmhTheoraTwoPassEncoding
@@ -117,7 +115,6 @@
'maxSize'=> '640x360',
'videoBitrate'   => '1024',
'audioQuality'   => '1',
-   'samplerate' => '44100',
'channels'   => '2',
'noUpscaling'=> 'true',
'twopass'=> 'false', // 
will be overridden by $wgTmhTheoraTwoPassEncoding
@@ -132,7 +129,6 @@
'maxSize'=> '854x480',
'videoBitrate'   => '2048',
'audioQuality'   => '2',
-   'samplerate' => '44100',
'channels'   => '2',
'noUpscaling'=> 'true',
'twopass'=> 'false', // 
will be overridden by $wgTmhTheoraTwoPassEncoding

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0183f2e13e8615ba4f28bc7315530304deba7837
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Version 0.6.1 from ShoutWiki - change (mediawiki...SoftwareVersion)

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

Change subject: Version 0.6.1 from ShoutWiki
..


Version 0.6.1 from ShoutWiki

The PHP entry point is no more, use wfLoadExtension( 'SoftwareVersion' ) instead

Change-Id: I1fad3a8586e7506e649c73a5490eaad3c5082581
---
A ShoutWikiSoftwareVersion.class.php
D SoftwareVersion.php
A extension.json
3 files changed, 81 insertions(+), 70 deletions(-)

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



diff --git a/ShoutWikiSoftwareVersion.class.php 
b/ShoutWikiSoftwareVersion.class.php
new file mode 100644
index 000..60a6c90
--- /dev/null
+++ b/ShoutWikiSoftwareVersion.class.php
@@ -0,0 +1,61 @@
+
+ * @copyright Copyright © 2009-2016 Jack Phoenix
+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
+ */
+
+class ShoutWikiSoftwareVersion {
+
+   /**
+* Adds ShoutWiki component into Special:Version and sets MW's version 
to $wgVersion
+*
+* @param array $software Array of software information
+* @return bool
+*/
+   public static function addShoutWikiInfo( &$software ) {
+   global $wgVersion, $IP;
+
+   // Set MW version to $wgVersion
+   $software['[https://www.mediawiki.org/ MediaWiki]'] = 
$wgVersion;
+
+   // This is ugly, or at least uglier than in the past, because 
it wouldn't
+   // work anymore on my local machine.
+   // First, we do a "svn info $IP", then JSON-encode the result, 
and explode
+   // along newlines and use PHP's array access to access the 
revision number
+   // and last changed date, which will be added to the version 
table.
+   //
+   // Why is this so ugly? Because svn info returns a string, 
instead of a
+   // sane array that we could easily manipulate.
+   //
+   // We also strip out the English words from the svn info 
output, so the
+   // final output that an end-user viewing Special:Version sees 
is something
+   // like "r1811 (2012-05-16 00:31:45 +0300)".
+   if ( !wfIsWindows() ) {
+   $svnInfo = wfShellExec( '/usr/bin/svn info ' . $IP, 
$error );
+   $newline = "\n";
+   } else {
+   // why yes, I'm hardcoding my TortoiseSVN's 
installation path here
+   $svnInfo = wfShellExec( '"C:\Program 
Files\TortoiseSVN\bin\svn.exe" info ' . $IP, $error );
+   $newline = "\r\n";
+   }
+
+   $json = json_encode( $svnInfo );
+   $exploded = explode( $newline, $svnInfo );
+
+   // Add ShoutWiki component (revision number and last changed 
date)
+   $software['[http://www.shoutwiki.com/ ShoutWiki]'] =
+   str_replace( 'Revision: ', 'r', $exploded[6] ) /* 
Revision */ .
+   ' (' .
+   str_replace( 'Last Changed Date: ', '', preg_replace( 
'/ \(.*\)/', '', $exploded[11] ) ) ./* Last Changed Date */
+   ')';
+
+   return true;
+   }
+
+}
\ No newline at end of file
diff --git a/SoftwareVersion.php b/SoftwareVersion.php
deleted file mode 100644
index 6e21fbb..000
--- a/SoftwareVersion.php
+++ /dev/null
@@ -1,70 +0,0 @@
-
- * @copyright Copyright © 2009-2010 Jack Phoenix
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
- */
-
-if ( !defined( 'MEDIAWIKI' ) ) {
-   die( "This is not a valid entry point.\n" );
-}
-
-// Extension credits that will show up on Special:Version
-$wgExtensionCredits['other'][] = array(
-   'name' => 'SoftwareVersion',
-   'author' => 'Jack Phoenix',
-   'version' => '0.4',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:SoftwareVersion',
-   'description' => 'Customizes [[Special:Version]] for ShoutWiki',
-);
-
-// Our hooked function
-$wgHooks['SoftwareInfo'][] = 'efAddShoutWikiInfo';
-
-/**
- * Adds ShoutWiki component into Special:Version and sets MW's version to 
$wgVersion
- *
- * @param $software Array: array of software information
- * @return Boolean: true
- */
-function efAddShoutWikiInfo( &$software ) {
-   global $wgVersion, $IP;
-
-   // Set MW version to $wgVersion
-   $software['[http://www.mediawiki.org/ MediaWiki]'] = $wgVersion;
-
-   // Add ShoutWiki component (release branch name) and its revision number
-   $software['[http://www.shoutwiki.com/ ShoutWiki]'] = efGetSvnURL( $IP ) 
. ' (r' . SpecialVersion::getSvnRevision( $IP ) . ')';
-
-   return true;
-}
-
-// Gets the name of the release for Special:Version's "ShoutWiki" column
-// Copied from Wikia's SpecialVersion.php and modified
-function efGetSvnURL( $dir ) {
-   // 

[MediaWiki-commits] [Gerrit] Temporary IP Cap Lift on es.wiki and commons - change (operations/mediawiki-config)

2016-06-21 Thread Urbanecm (Code Review)
Urbanecm has uploaded a new change for review.

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

Change subject: Temporary IP Cap Lift on es.wiki and commons
..

Temporary IP Cap Lift on es.wiki and commons

Bug: T138322
Change-Id: I5ac38cba6659a7fb5570053f890963ceb30c600c
---
M wmf-config/throttle.php
1 file changed, 21 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index 1ba3ff1..e7f3ee6 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -69,6 +69,27 @@
'dbname' => ['eswiki', 'commonswiki'],
'value'  => 40 // 30 expected
 ];
+$wmgThrottlingExceptions[] = [ // T138322
+   'from'   => '2016-06-21T13:00 -5:00',
+   'to' => '2016-06-21T16:00 -5:00',
+   'IP' => '186.3.110.63',
+   'dbname' => ['eswiki', 'commonswiki'],
+   'value'  => 50 // 40 expected
+];
+$wmgThrottlingExceptions[] = [ // T138322
+   'from'   => '2016-06-30T13:00 -5:00',
+   'to' => '2016-06-30T16:00 -5:00',
+   'IP' => '186.3.110.63',
+   'dbname' => ['eswiki', 'commonswiki'],
+   'value'  => 60 // 50 expected
+];
+$wmgThrottlingExceptions[] = [ // T138322
+   'from'   => '2016-07-06T13:00 -5:00',
+   'to' => '2016-07-06T16:00 -5:00',
+   'IP' => '181.39.163.9',
+   'dbname' => ['eswiki', 'commonswiki'],
+   'value'  => 40 // 30 expected
+];
 $wgExtensionFunctions[] = function() {
global $wmgThrottlingExceptions, $wgDBname, $wgRequest;
 

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

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

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


[MediaWiki-commits] [Gerrit] Temporary IP Cap Lift on es.wiki and commons - change (operations/mediawiki-config)

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

Change subject: Temporary IP Cap Lift on es.wiki and commons
..


Temporary IP Cap Lift on es.wiki and commons

Bug: T138322
Change-Id: I5ac38cba6659a7fb5570053f890963ceb30c600c
---
M wmf-config/throttle.php
1 file changed, 21 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index 1ba3ff1..e7f3ee6 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -69,6 +69,27 @@
'dbname' => ['eswiki', 'commonswiki'],
'value'  => 40 // 30 expected
 ];
+$wmgThrottlingExceptions[] = [ // T138322
+   'from'   => '2016-06-21T13:00 -5:00',
+   'to' => '2016-06-21T16:00 -5:00',
+   'IP' => '186.3.110.63',
+   'dbname' => ['eswiki', 'commonswiki'],
+   'value'  => 50 // 40 expected
+];
+$wmgThrottlingExceptions[] = [ // T138322
+   'from'   => '2016-06-30T13:00 -5:00',
+   'to' => '2016-06-30T16:00 -5:00',
+   'IP' => '186.3.110.63',
+   'dbname' => ['eswiki', 'commonswiki'],
+   'value'  => 60 // 50 expected
+];
+$wmgThrottlingExceptions[] = [ // T138322
+   'from'   => '2016-07-06T13:00 -5:00',
+   'to' => '2016-07-06T16:00 -5:00',
+   'IP' => '181.39.163.9',
+   'dbname' => ['eswiki', 'commonswiki'],
+   'value'  => 40 // 30 expected
+];
 $wgExtensionFunctions[] = function() {
global $wmgThrottlingExceptions, $wgDBname, $wgRequest;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ac38cba6659a7fb5570053f890963ceb30c600c
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Urbanecm 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Postgresql: init database with Puppet - change (operations/puppet)

2016-06-21 Thread Gehel (Code Review)
Gehel has submitted this change and it was merged.

Change subject: Postgresql: init database with Puppet
..


Postgresql: init database with Puppet

Database is initialized by postgresql package, but if we move the data
directory somewhere else, it needs to be initialized.

Bug: T138092
Change-Id: If7240e6d8ca20b5bbe11a4f411f43d7773433f00
---
M modules/postgresql/manifests/master.pp
1 file changed, 12 insertions(+), 0 deletions(-)

Approvals:
  Gehel: Looks good to me, approved
  Alexandros Kosiaris: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/modules/postgresql/manifests/master.pp 
b/modules/postgresql/manifests/master.pp
index 148a67c..5a273ed 100644
--- a/modules/postgresql/manifests/master.pp
+++ b/modules/postgresql/manifests/master.pp
@@ -43,6 +43,8 @@
 $root_dir='/var/lib/postgresql',
 ) {
 
+$data_dir = "${root_dir}/${pgversion}/main"
+
 class { 'postgresql::server':
 ensure=> $ensure,
 pgversion => $pgversion,
@@ -58,4 +60,14 @@
 content => template('postgresql/master.conf.erb'),
 require => Class['postgresql::server'],
 }
+
+if $ensure == 'present' {
+exec { 'pg-initdb':
+command => "/usr/lib/postgresql/${pgversion}/bin/initdb -D 
${data_dir}",
+user=> 'postgres',
+unless  => "/usr/bin/test -f ${data_dir}/PG_VERSION",
+require => Class['postgresql::server'],
+notify  => Exec['pgreload'],
+}
+}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If7240e6d8ca20b5bbe11a4f411f43d7773433f00
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Gehel 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Minor cleanup, readme - change (mediawiki...graphoid)

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

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

Change subject: Minor cleanup, readme
..

Minor cleanup, readme

Change-Id: I115b6f4783575ebcf57ac05efff3b2dd4662e738
---
M README.md
M package.json
2 files changed, 10 insertions(+), 82 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/graphoid 
refs/changes/64/295364/1

diff --git a/README.md b/README.md
index c062ff1..14c0835 100644
--- a/README.md
+++ b/README.md
@@ -1,83 +1,13 @@
-# service-template-node [![Build 
Status](https://travis-ci.org/wikimedia/service-template-node.svg?branch=master)](https://travis-ci.org/wikimedia/service-template-node)
+# graphoid
 
-Template for creating MediaWiki Services in Node.js
+Wikimedia nodejs service to create Vega-based static images on the server
 
 ## Getting Started
 
-### Installation
+### Quick start
 
-First, clone the repository
-
-```
-git clone https://github.com/wikimedia/service-template-node.git
-```
-
-Install the dependencies
-
-```
-cd service-template-node
-npm install
-```
-
-You are now ready to get to work!
-
-* Inspect/modify/configure `app.js`
-* Add routes by placing files in `routes/` (look at the files there for 
examples)
-
-You can also read [the documentation](doc/).
-
-### Running the examples
-
-The template is a fully-working example, so you may try it right away. To
-start the server hosting the REST API, simply run (inside the repo's directory)
-
-```
-npm start
-```
-
-This starts an HTTP server listening on `localhost:6927`. There are several
-routes you may query (with a browser, or `curl` and friends):
-
-* `http://localhost:6927/_info/`
-* `http://localhost:6927/_info/name`
-* `http://localhost:6927/_info/version`
-* `http://localhost:6927/_info/home`
-* `http://localhost:6927/{domain}/v1/siteinfo{/prop}`
-* `http://localhost:6927/{domain}/v1/page/{title}`
-* `http://localhost:6927/{domain}/v1/page/{title}/lead`
-* `http://localhost:6927/ex/err/array`
-* `http://localhost:6927/ex/err/file`
-* `http://localhost:6927/ex/err/manual/error`
-* `http://localhost:6927/ex/err/manual/deny`
-* `http://localhost:6927/ex/err/auth`
-
-### Tests
-
-The template also includes a test suite a small set of executable tests. To 
fire
-them up, simply run:
-
-```
-npm test
-```
-
-If you haven't changed anything in the code (and you have a working Internet
-connection), you should see all the tests passing. As testing most of the code
-is an important aspect of service development, there is also a bundled tool
-reporting the percentage of code covered. Start it with:
-
-```
-npm run-script coverage
-```
-
-### Troubleshooting
-
-In a lot of cases when there is an issue with node it helps to recreate the
-`node_modules` directory:
-
-```
-rm -r node_modules
-npm install
-```
-
-Enjoy!
-
+* Install canvas dependencies as described at 
https://www.npmjs.com/package/canvas
+** For Ubuntu, that's `sudo apt-get install libcairo2-dev libjpeg8-dev 
libpango1.0-dev libgif-dev build-essential g++`
+* Clone repo
+* npm install
+* npm start
diff --git a/package.json b/package.json
index 95e017a..65296f6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "graphoid",
-  "version": "0.1.9",
+  "version": "0.1.10",
   "description": "Renders vega graphs from mediawiki pages",
   "main": "./app.js",
   "scripts": {
@@ -24,9 +24,7 @@
 "Dan Andreescu "
   ],
   "license": "Apache-2.0",
-  "bugs": {
-"url": "https://phabricator.wikimedia.org/tag/service-template-node/;
-  },
+  "bugs": "https://phabricator.wikimedia.org/tag/service-template-node/;,
   "homepage": "https://www.mediawiki.org/wiki/Extension:Graph;,
   "dependencies": {
 "bluebird": "^3.3.5",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I115b6f4783575ebcf57ac05efff3b2dd4662e738
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/graphoid
Gerrit-Branch: master
Gerrit-Owner: Yurik 

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


[MediaWiki-commits] [Gerrit] Updated to latest graph2 lib - change (mediawiki...Graph)

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

Change subject: Updated to latest graph2 lib
..


Updated to latest graph2 lib

Change-Id: Ie52cde6ed480c74b186a45e9959e87782ca72fa7
---
M lib/graph2.compiled.js
1 file changed, 30 insertions(+), 22 deletions(-)

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



diff --git a/lib/graph2.compiled.js b/lib/graph2.compiled.js
index bfe1214..e46cfcb 100644
--- a/lib/graph2.compiled.js
+++ b/lib/graph2.compiled.js
@@ -112,7 +112,7 @@
 }
 };
 return new RegExp(
-(allowSubdomains ? '^([^@/:]*\.)?(' : '^(') +
+(allowSubdomains ? '^([^@/:]*\\.)?(' : '^(') +
 domains
 .map(function (s) {
 return s.replace('.', '\\.');
@@ -145,18 +145,12 @@
 var self = this;
 self.isTrusted = isTrusted;
 self.domains = domains;
+self.domainMap = domainMap;
 self.logger = logger;
 self.objExtender = objExtender;
 self.parseUrl = parseUrl;
 self.formatUrl = formatUrl;
-
 self.validators = {};
-Object.keys(domains).map(function(protocol) {
-// Only allow subdomains for https & http. Other protocols must be 
exact match.
-self.validators[protocol] = makeValidator(domains[protocol], protocol 
=== 'https' || protocol === 'http');
-});
-
-self.domainMap = domainMap;
 
 load.loader = function (opt, callback) {
 var error = callback || function (e) { throw e; }, url;
@@ -200,19 +194,29 @@
 // First, map the host
 host = (this.domainMap && this.domainMap[host]) || host;
 
-var result = {
-host: host
-};
-
-if (this.validators.https.test(host)) {
-result.protocol = 'https';
-} else if (this.validators.http.test(host)) {
-result.protocol = 'http';
-} else {
-result = undefined;
+if (this.testHost('https', host)) {
+return {host: host, protocol: 'https'};
+} else if (this.testHost('http', host)) {
+return {host: host, protocol: 'http'};
 }
+return undefined;
+};
 
-return result;
+/**
+ * Test host against the list of allowed domains based on the protocol
+ * @param {string} protocol
+ * @param {string} host
+ * @returns {boolean}
+ */
+VegaWrapper.prototype.testHost = function testHost(protocol, host) {
+if (!this.validators[protocol]) {
+if (this.domains[protocol]) {
+this.validators[protocol] = makeValidator(this.domains[protocol], 
protocol === 'https' || protocol === 'http');
+} else {
+return false;
+}
+}
+return this.validators[protocol].test(host);
 };
 
 /**this
@@ -241,7 +245,7 @@
 case 'https':
 if (!this.isTrusted) {
 throw new Error('HTTP and HTTPS protocols are not supported 
for untrusted graphs.\n' +
-'Use wikiraw:, wikiapi:, wikirest:, and wikirawupload: 
protocols.\n' +
+'Use wikiraw:, wikiapi:, wikirest:, wikirawupload:, and 
other protocols.\n' +
 'See 
https://www.mediawiki.org/wiki/Extension:Graph#External_data');
 }
 // keep the original URL
@@ -275,6 +279,7 @@
 // Uses mediawiki api, and extract the content after the request
 // Query value must be a valid MediaWiki title string, but we only 
ensure
 // there is no pipe symbol, the rest is handlered by the api.
+urlParts.pathname = decodeURIComponent(urlParts.pathname)
 if (!/^\/[^|]+$/.test(urlParts.pathname)) {
 throw new Error('wikiraw: invalid title');
 }
@@ -284,7 +289,7 @@
 action: 'query',
 prop: 'revisions',
 rvprop: 'content',
-titles: decodeURIComponent(urlParts.pathname.substring(1))
+titles: urlParts.pathname.substring(1)
 };
 urlParts.pathname = '/w/api.php';
 urlParts.protocol = sanitizedHost.protocol;
@@ -318,6 +323,9 @@
 // Get geo shapes data from OSM database by supplying Wikidata IDs
 // https://maps.wikimedia.org/shape?ids=Q16,Q30
 this._validateExternalService(urlParts, sanitizedHost, opt.url);
+if (!urlParts.query || !urlParts.query.ids) {
+throw new Error('geoshape: missing ids parameter in: ' + 
opt.url);
+}
 // the query object is not modified
 urlParts.pathname = '/shape';
 break;
@@ -339,7 +347,7 @@
 } else {
 urlParts.protocol = sanitizedHost.protocol;
 }
-if (!this.validators[protocol].test(urlParts.host)) {
+if (!this.testHost(protocol, urlParts.host)) {
 throw new Error(protocol + ': URL must either be relative (' + 
protocol + '///...), or use one of the allowed hosts: ' + url);
 }
 };

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] Update graphoid to 15ed3f4 - change (mediawiki...deploy)

2016-06-21 Thread Yurik (Code Review)
Yurik has submitted this change and it was merged.

Change subject: Update graphoid to 15ed3f4
..


Update graphoid to 15ed3f4

List of changes:
15ed3f4 Minor cleanup, readme
xxx Update node module dependencies

Change-Id: I8d8d9df855aa206624ea76fb0a4b66ab0448bfe1
---
R node_modules/accepts/LICENSE
R node_modules/accepts/index.js
R node_modules/accepts/node_modules/negotiator/LICENSE
R node_modules/accepts/node_modules/negotiator/index.js
R node_modules/accepts/node_modules/negotiator/lib/charset.js
R node_modules/accepts/node_modules/negotiator/lib/encoding.js
R node_modules/accepts/node_modules/negotiator/lib/language.js
R node_modules/accepts/node_modules/negotiator/lib/mediaType.js
R node_modules/accepts/node_modules/negotiator/package.json
R node_modules/accepts/package.json
M node_modules/bluebird/js/browser/bluebird.core.js
M node_modules/bluebird/js/browser/bluebird.core.min.js
M node_modules/bluebird/js/browser/bluebird.js
M node_modules/bluebird/js/browser/bluebird.min.js
M node_modules/bluebird/js/release/map.js
M node_modules/bluebird/js/release/promise.js
M node_modules/bluebird/js/release/thenables.js
M node_modules/bluebird/js/release/using.js
M node_modules/bluebird/package.json
M node_modules/body-parser/index.js
M node_modules/body-parser/lib/read.js
M node_modules/body-parser/lib/types/json.js
M node_modules/body-parser/lib/types/raw.js
M node_modules/body-parser/lib/types/text.js
M node_modules/body-parser/lib/types/urlencoded.js
M node_modules/body-parser/node_modules/bytes/index.js
M node_modules/body-parser/node_modules/bytes/package.json
D node_modules/body-parser/node_modules/http-errors/index.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits_browser.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/package.json
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/test.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/LICENSE
D 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/index.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/package.json
D node_modules/body-parser/node_modules/qs/.eslintignore
D node_modules/body-parser/node_modules/qs/.eslintrc
D node_modules/body-parser/node_modules/qs/.npmignore
D node_modules/body-parser/node_modules/qs/.travis.yml
D node_modules/body-parser/node_modules/qs/LICENSE
D node_modules/body-parser/node_modules/qs/bower.json
D node_modules/body-parser/node_modules/qs/component.json
D node_modules/body-parser/node_modules/qs/dist/qs.js
D node_modules/body-parser/node_modules/qs/lib/parse.js
D node_modules/body-parser/node_modules/qs/lib/stringify.js
D node_modules/body-parser/node_modules/qs/lib/utils.js
D node_modules/body-parser/node_modules/qs/package.json
D node_modules/body-parser/node_modules/qs/test/parse.js
D node_modules/body-parser/node_modules/qs/test/stringify.js
M node_modules/body-parser/node_modules/raw-body/LICENSE
M node_modules/body-parser/node_modules/raw-body/index.js
M node_modules/body-parser/node_modules/raw-body/package.json
M node_modules/body-parser/package.json
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/wrappy/package.json
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/wrappy/test/basic.js
M node_modules/canvas/build/Release/canvas.node
M node_modules/canvas/build/Release/obj.target/canvas.node
M node_modules/canvas/build/Release/obj.target/canvas/src/Canvas.o
M node_modules/canvas/build/Release/obj.target/canvas/src/CanvasGradient.o
M 
node_modules/canvas/build/Release/obj.target/canvas/src/CanvasRenderingContext2d.o
M node_modules/canvas/build/Release/obj.target/canvas/src/Image.o
M node_modules/canvas/build/Release/obj.target/canvas/src/ImageData.o
M node_modules/canvas/package.json
M node_modules/canvas/src/CanvasRenderingContext2d.cc
M node_modules/canvas/src/CanvasRenderingContext2d.h

[MediaWiki-commits] [Gerrit] Updated to latest graph2 lib - change (mediawiki...Graph)

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

Change subject: Updated to latest graph2 lib
..


Updated to latest graph2 lib

Change-Id: Ie52cde6ed480c74b186a45e9959e87782ca72fa7
---
M lib/graph2.compiled.js
1 file changed, 30 insertions(+), 22 deletions(-)

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



diff --git a/lib/graph2.compiled.js b/lib/graph2.compiled.js
index bfe1214..e46cfcb 100644
--- a/lib/graph2.compiled.js
+++ b/lib/graph2.compiled.js
@@ -112,7 +112,7 @@
 }
 };
 return new RegExp(
-(allowSubdomains ? '^([^@/:]*\.)?(' : '^(') +
+(allowSubdomains ? '^([^@/:]*\\.)?(' : '^(') +
 domains
 .map(function (s) {
 return s.replace('.', '\\.');
@@ -145,18 +145,12 @@
 var self = this;
 self.isTrusted = isTrusted;
 self.domains = domains;
+self.domainMap = domainMap;
 self.logger = logger;
 self.objExtender = objExtender;
 self.parseUrl = parseUrl;
 self.formatUrl = formatUrl;
-
 self.validators = {};
-Object.keys(domains).map(function(protocol) {
-// Only allow subdomains for https & http. Other protocols must be 
exact match.
-self.validators[protocol] = makeValidator(domains[protocol], protocol 
=== 'https' || protocol === 'http');
-});
-
-self.domainMap = domainMap;
 
 load.loader = function (opt, callback) {
 var error = callback || function (e) { throw e; }, url;
@@ -200,19 +194,29 @@
 // First, map the host
 host = (this.domainMap && this.domainMap[host]) || host;
 
-var result = {
-host: host
-};
-
-if (this.validators.https.test(host)) {
-result.protocol = 'https';
-} else if (this.validators.http.test(host)) {
-result.protocol = 'http';
-} else {
-result = undefined;
+if (this.testHost('https', host)) {
+return {host: host, protocol: 'https'};
+} else if (this.testHost('http', host)) {
+return {host: host, protocol: 'http'};
 }
+return undefined;
+};
 
-return result;
+/**
+ * Test host against the list of allowed domains based on the protocol
+ * @param {string} protocol
+ * @param {string} host
+ * @returns {boolean}
+ */
+VegaWrapper.prototype.testHost = function testHost(protocol, host) {
+if (!this.validators[protocol]) {
+if (this.domains[protocol]) {
+this.validators[protocol] = makeValidator(this.domains[protocol], 
protocol === 'https' || protocol === 'http');
+} else {
+return false;
+}
+}
+return this.validators[protocol].test(host);
 };
 
 /**this
@@ -241,7 +245,7 @@
 case 'https':
 if (!this.isTrusted) {
 throw new Error('HTTP and HTTPS protocols are not supported 
for untrusted graphs.\n' +
-'Use wikiraw:, wikiapi:, wikirest:, and wikirawupload: 
protocols.\n' +
+'Use wikiraw:, wikiapi:, wikirest:, wikirawupload:, and 
other protocols.\n' +
 'See 
https://www.mediawiki.org/wiki/Extension:Graph#External_data');
 }
 // keep the original URL
@@ -275,6 +279,7 @@
 // Uses mediawiki api, and extract the content after the request
 // Query value must be a valid MediaWiki title string, but we only 
ensure
 // there is no pipe symbol, the rest is handlered by the api.
+urlParts.pathname = decodeURIComponent(urlParts.pathname)
 if (!/^\/[^|]+$/.test(urlParts.pathname)) {
 throw new Error('wikiraw: invalid title');
 }
@@ -284,7 +289,7 @@
 action: 'query',
 prop: 'revisions',
 rvprop: 'content',
-titles: decodeURIComponent(urlParts.pathname.substring(1))
+titles: urlParts.pathname.substring(1)
 };
 urlParts.pathname = '/w/api.php';
 urlParts.protocol = sanitizedHost.protocol;
@@ -318,6 +323,9 @@
 // Get geo shapes data from OSM database by supplying Wikidata IDs
 // https://maps.wikimedia.org/shape?ids=Q16,Q30
 this._validateExternalService(urlParts, sanitizedHost, opt.url);
+if (!urlParts.query || !urlParts.query.ids) {
+throw new Error('geoshape: missing ids parameter in: ' + 
opt.url);
+}
 // the query object is not modified
 urlParts.pathname = '/shape';
 break;
@@ -339,7 +347,7 @@
 } else {
 urlParts.protocol = sanitizedHost.protocol;
 }
-if (!this.validators[protocol].test(urlParts.host)) {
+if (!this.testHost(protocol, urlParts.host)) {
 throw new Error(protocol + ': URL must either be relative (' + 
protocol + '///...), or use one of the allowed hosts: ' + url);
 }
 };

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] varnish: burn more cpu/mem on better gzip compression - change (operations/puppet)

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

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

Change subject: varnish: burn more cpu/mem on better gzip compression
..

varnish: burn more cpu/mem on better gzip compression

This raises gzip_level and gzip_memlevel from 6/8 (default) to 8/9.  We have
CPU cycles to waste, and this can slightly reduce cache object storage sizes
and transferred bytes to clients.  Level 8 is what Cloudflare also uses, as 9
doesn't buy much for the potential big bump in CPU waste.  They also use a
hacked zlib that is faster and open source, we could package that if we see a
significant need in the future (e.g. if more applayer leaves compression to
varnish).

Did some preliminary manual testing and everything looks fine.

Will need to salt a runtime change of these parameters via
varnishadm as well, as the diff here only affects the setting for
future daemon restarts.

Change-Id: I305bbe4ac599b6def50691f20fd2da61d7feff05
---
M modules/varnish/templates/initscripts/varnish.systemd.erb
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/72/295372/1

diff --git a/modules/varnish/templates/initscripts/varnish.systemd.erb 
b/modules/varnish/templates/initscripts/varnish.systemd.erb
index 9cd8ec3..f43524a 100644
--- a/modules/varnish/templates/initscripts/varnish.systemd.erb
+++ b/modules/varnish/templates/initscripts/varnish.systemd.erb
@@ -40,6 +40,8 @@
 -p listen_depth=4096 -p session_max=20 -p vcc_err_unref=off \
 -p nuke_limit=300 \
 -p http_req_size=24576 \
+-p gzip_level=8 \
+-p gzip_memlevel=9 \
 <%= @runtime_params -%> \
 <%= @extraopts -%> \
 <% if @vcl_config.fetch("enable_geoiplookup", false) -%>-p 
cc_command=${CC_COMMAND}<% end %>

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

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

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


[MediaWiki-commits] [Gerrit] Update graphoid to 15ed3f4 - change (mediawiki...deploy)

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

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

Change subject: Update graphoid to 15ed3f4
..

Update graphoid to 15ed3f4

List of changes:
15ed3f4 Minor cleanup, readme
xxx Update node module dependencies

Change-Id: I8d8d9df855aa206624ea76fb0a4b66ab0448bfe1
---
R node_modules/accepts/LICENSE
R node_modules/accepts/index.js
R node_modules/accepts/node_modules/negotiator/LICENSE
R node_modules/accepts/node_modules/negotiator/index.js
R node_modules/accepts/node_modules/negotiator/lib/charset.js
R node_modules/accepts/node_modules/negotiator/lib/encoding.js
R node_modules/accepts/node_modules/negotiator/lib/language.js
R node_modules/accepts/node_modules/negotiator/lib/mediaType.js
R node_modules/accepts/node_modules/negotiator/package.json
R node_modules/accepts/package.json
M node_modules/bluebird/js/browser/bluebird.core.js
M node_modules/bluebird/js/browser/bluebird.core.min.js
M node_modules/bluebird/js/browser/bluebird.js
M node_modules/bluebird/js/browser/bluebird.min.js
M node_modules/bluebird/js/release/map.js
M node_modules/bluebird/js/release/promise.js
M node_modules/bluebird/js/release/thenables.js
M node_modules/bluebird/js/release/using.js
M node_modules/bluebird/package.json
M node_modules/body-parser/index.js
M node_modules/body-parser/lib/read.js
M node_modules/body-parser/lib/types/json.js
M node_modules/body-parser/lib/types/raw.js
M node_modules/body-parser/lib/types/text.js
M node_modules/body-parser/lib/types/urlencoded.js
M node_modules/body-parser/node_modules/bytes/index.js
M node_modules/body-parser/node_modules/bytes/package.json
D node_modules/body-parser/node_modules/http-errors/index.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits_browser.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/package.json
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/test.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/LICENSE
D 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/index.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/package.json
D node_modules/body-parser/node_modules/qs/.eslintignore
D node_modules/body-parser/node_modules/qs/.eslintrc
D node_modules/body-parser/node_modules/qs/.npmignore
D node_modules/body-parser/node_modules/qs/.travis.yml
D node_modules/body-parser/node_modules/qs/LICENSE
D node_modules/body-parser/node_modules/qs/bower.json
D node_modules/body-parser/node_modules/qs/component.json
D node_modules/body-parser/node_modules/qs/dist/qs.js
D node_modules/body-parser/node_modules/qs/lib/parse.js
D node_modules/body-parser/node_modules/qs/lib/stringify.js
D node_modules/body-parser/node_modules/qs/lib/utils.js
D node_modules/body-parser/node_modules/qs/package.json
D node_modules/body-parser/node_modules/qs/test/parse.js
D node_modules/body-parser/node_modules/qs/test/stringify.js
M node_modules/body-parser/node_modules/raw-body/LICENSE
M node_modules/body-parser/node_modules/raw-body/index.js
M node_modules/body-parser/node_modules/raw-body/package.json
M node_modules/body-parser/package.json
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/wrappy/package.json
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/wrappy/test/basic.js
M node_modules/canvas/build/Release/canvas.node
M node_modules/canvas/build/Release/obj.target/canvas.node
M node_modules/canvas/build/Release/obj.target/canvas/src/Canvas.o
M node_modules/canvas/build/Release/obj.target/canvas/src/CanvasGradient.o
M 
node_modules/canvas/build/Release/obj.target/canvas/src/CanvasRenderingContext2d.o
M node_modules/canvas/build/Release/obj.target/canvas/src/Image.o
M node_modules/canvas/build/Release/obj.target/canvas/src/ImageData.o
M node_modules/canvas/package.json
M node_modules/canvas/src/CanvasRenderingContext2d.cc
M 

[MediaWiki-commits] [Gerrit] Don't reimport existing headers - change (mediawiki...Flow)

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

Change subject: Don't reimport existing headers
..


Don't reimport existing headers

maintenance/FlowRestoreLQT.php will restore LQT board content,
causing new revisions. The DB source store (or even the filebased
source store, should it exist there) would not be able to find
these headers since they won't match the already imported header.

Instead of using the unreliable source store id, let's just use
the already known workflow id...

Bug: T119509
Change-Id: I881910977a8826ca5a389c1eb832844ece4dbb93
---
M includes/Import/Importer.php
M includes/Import/LiquidThreadsApi/Objects.php
2 files changed, 11 insertions(+), 3 deletions(-)

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



diff --git a/includes/Import/Importer.php b/includes/Import/Importer.php
index 8604297..1cff2fa 100644
--- a/includes/Import/Importer.php
+++ b/includes/Import/Importer.php
@@ -640,7 +640,15 @@
return;
}
 
-   $existingId = $pageState->getImportedId( $importHeader );
+   /*
+* We don't need $pageState->getImportedId( $importHeader ) 
here, there
+* can only be 1 header per workflow and we already know the 
workflow,
+* might as well query it from the workflow instead of using 
the id from
+* the source store.
+* reason I prefer not to use source store is that a header 
import is
+* incomplete (it doesn't import full history, just the last 
revision.
+*/
+   $existingId = $pageState->boardWorkflow->getId();
if ( $existingId && $pageState->getTopRevision( 'Header', 
$existingId ) ) {
$pageState->logger->info( 'header previously imported' 
);
return;
diff --git a/includes/Import/LiquidThreadsApi/Objects.php 
b/includes/Import/LiquidThreadsApi/Objects.php
index 0eca7fc..7f92f4c 100644
--- a/includes/Import/LiquidThreadsApi/Objects.php
+++ b/includes/Import/LiquidThreadsApi/Objects.php
@@ -310,7 +310,7 @@
 
 class ImportRevision implements IObjectRevision {
/** @var IImportObject **/
-   protected $parentObject;
+   protected $parent;
 
/** @var array **/
protected $apiResponse;
@@ -420,7 +420,7 @@
 // Represents a revision the script makes on its own behalf, using a script 
user
 class ScriptedImportRevision implements IObjectRevision {
/** @var IImportObject **/
-   protected $parentObject;
+   protected $parent;
 
/** @var User */
protected $destinationScriptUser;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I881910977a8826ca5a389c1eb832844ece4dbb93
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Matthias Mullie 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] New jobutils release - change (labs/toollabs)

2016-06-21 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: New jobutils release
..

New jobutils release

Change-Id: I18652f60d0967f6a1d14df5dcb6f66733a1fe9e2
---
M debian/changelog
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/63/295363/1

diff --git a/debian/changelog b/debian/changelog
index fecd471..b0fce7c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+toollabs (1.14) unstable; urgency=medium
+
+  * Update jsubrc and embedded options parsing
+
+ -- Bryan Davis   Tue, 21 June 2016 16:38:00 +
+
 toollabs (1.13) unstable; urgency=medium
 
   * Validate jsub '-l release=...' values

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I18652f60d0967f6a1d14df5dcb6f66733a1fe9e2
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] T96195: Remove node 0.8 support - change (mediawiki...parsoid)

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

Change subject: T96195: Remove node 0.8 support
..


T96195: Remove node 0.8 support

Change-Id: I8a2282df96ec06fc3e4d706d731a63d7d6dbf365
---
M .travis.yml
M HISTORY.md
M bin/server.js
M lib/api/apiUtils.js
M package.json
5 files changed, 4 insertions(+), 15 deletions(-)

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



diff --git a/.travis.yml b/.travis.yml
index 75e4993..f4e00f1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,18 +1,12 @@
 language: node_js
 
 node_js:
-# Your days are numbered.
-- "0.8"
 # Current production value.
 - "0.10.25"
 # Aspiring contender. See T119228.
 - "4.3.0"
 # From the nvm docs, "this installs the latest version of node".
 - "node"
-
-before_install:
-- NODE_VERSION=$(node -e 
'console.log(process.version.replace(/[.][0-9]+$/, ""))')
-- if [ "v0.8" = "$NODE_VERSION" ]; then npm install -g npm@2.7.3 ; fi
 
 script: travis_wait npm run-script coverage && (npm run-script coveralls || 
exit 0)
 
diff --git a/HISTORY.md b/HISTORY.md
index 76bd87c..08299d1 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -9,6 +9,7 @@
   * T125419: Fix selser issues serializing first table row
   * T114413: Provide HTML2HTML endpoint in Parsoid
   * T137406: Emit |- between thead/tbody/tfoot
+  * T96195: Remove node 0.8 support
 
 0.5.1 / 2015-05-02
 ==
diff --git a/bin/server.js b/bin/server.js
index 2a38f83..eae5e22 100755
--- a/bin/server.js
+++ b/bin/server.js
@@ -228,8 +228,7 @@
 
// Enable heap dumps in /tmp on kill -USR2.
// See https://github.com/bnoordhuis/node-heapdump/
-   // For node 0.6/0.8: npm install heapdump@0.1.0
-   // For 0.10: npm install heapdump
+   // npm install heapdump
process.on('SIGUSR2', function() {
var heapdump = require('heapdump');
processLogger.log("warning", "SIGUSR2 received! Writing 
snapshot.");
diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js
index d64b383..57f8454 100644
--- a/lib/api/apiUtils.js
+++ b/lib/api/apiUtils.js
@@ -4,7 +4,6 @@
 var cluster = require('cluster');
 var domino = require('domino');
 var util = require('util');
-var semver = require('semver');
 var qs = require('querystring');
 
 var Diff = require('../utils/Diff.js').Diff;
@@ -154,9 +153,6 @@
};
 };
 
-// Cluster support was very experimental and missing methods in v0.8.x
-var sufficientNodeVersion = semver.gte(process.version, '0.10.0');
-
 /**
  * @method
  * @param {Promise} p
@@ -170,7 +166,7 @@
(res.locals.oldid ? '?oldid=' + res.locals.oldid : '')
);
return new Promise(function(resolve, reject) {
-   if (cluster.isMaster || !sufficientNodeVersion) {
+   if (cluster.isMaster) {
return p.then(resolve, reject);
}
// Notify the cluster master that a request has started
diff --git a/package.json b/package.json
index 1aea493..6152301 100644
--- a/package.json
+++ b/package.json
@@ -49,7 +49,6 @@
   },
   "scripts": {
 "lint": "npm run dump-tokenizer && npm run jscs && npm run jshint",
-"no-0.8": "node -e 'process.exit(/v0[.][0-8][.]/.test(process.version) ? 0 
: 1)' || (npm run nsp && npm run lint)",
 "start": "node bin/server.js",
 "jshint": "jshint bin lib tests tools core-upgrade.js",
 "jscs": "jscs bin lib tests tools core-upgrade.js",
@@ -58,7 +57,7 @@
 "mocha": "mocha --opts tests/mocha/mocha.opts tests/mocha",
 "parserTests": "node bin/parserTests.js --wt2html --wt2wt --html2wt 
--html2html --selser --no-color --quiet --blacklist",
 "roundtrip": "node bin/roundtrip-test.js 'Barack Obama' && node 
bin/roundtrip-test.js 'Parkour'",
-"test": "npm run no-0.8 && npm run parserTests && npm run mocha",
+"test": "npm run nsp && npm run lint && npm run parserTests && npm run 
mocha",
 "cover-mocha": "istanbul cover _mocha --dir ./coverage/mocha --  --opts 
tests/mocha/mocha.opts tests/mocha",
 "cover-parserTests": "istanbul cover bin/parserTests.js --dir 
./coverage/parserTests -- --wt2html --wt2wt --html2wt --html2html --selser 
--no-color --quiet --blacklist",
 "coverage": "npm run cover-mocha && npm run cover-parserTests && istanbul 
report",

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

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

___
MediaWiki-commits 

  1   2   >