[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove Varnishkafka APT pinning

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

Change subject: Remove Varnishkafka APT pinning
..


Remove Varnishkafka APT pinning

Bug: T150660
Change-Id: If49fd22de7037ee3d2fbd2b50161a6b2a59ff421
---
M modules/role/manifests/cache/kafka.pp
1 file changed, 0 insertions(+), 11 deletions(-)

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



diff --git a/modules/role/manifests/cache/kafka.pp 
b/modules/role/manifests/cache/kafka.pp
index 2e67ad4..4a7891b 100644
--- a/modules/role/manifests/cache/kafka.pp
+++ b/modules/role/manifests/cache/kafka.pp
@@ -7,17 +7,6 @@
 # NOTE: This is used by inheriting classes role::cache::kafka::*
 $kafka_brokers = $kafka_config['brokers']['array']
 
-apt::pin { 'varnishkafka':
-ensure   => 'absent',
-pin  => '',
-priority => '',
-}
-
-# Make the Varnishkafka class depend on APT pinning. We want to ensure
-# varnishkafka is not apt-get installed before the pinning file is
-# created/removed.
-Apt::Pin['varnishkafka'] -> Class['Varnishkafka']
-
 # Make sure varnishes are configured and started for the first time
 # before the instances as well, or they fail to start initially...
 Service <| tag == 'varnish_instance' |> -> Varnishkafka::Instance <| |>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If49fd22de7037ee3d2fbd2b50161a6b2a59ff421
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Elukey 
Gerrit-Reviewer: Ema 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: admin: create group striker-admins, add bd808

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

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

Change subject: admin: create group striker-admins, add bd808
..

admin: create group striker-admins, add bd808

Create a new admin group called "striker-admins".

Technically this would be "striker-users" if it doesn't
need sudo/privileges line, "-admins" if it needs some
specific commands with sudo and "-roots" if "ALL ALL"
is requested.

Add the new group in the existing yaml file in Hiera
matching the role striker::web.

Add user bd808 into the group to give him access to host
californium, the only user of the striker role.

Bug: T151424
Change-Id: I1fb88e858120d8dcce311fb59ebcad33952d890f
---
M hieradata/role/common/striker/web.yaml
M modules/admin/data/data.yaml
2 files changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/hieradata/role/common/striker/web.yaml 
b/hieradata/role/common/striker/web.yaml
index f9bc316..f1e44ec 100644
--- a/hieradata/role/common/striker/web.yaml
+++ b/hieradata/role/common/striker/web.yaml
@@ -2,6 +2,9 @@
 memcached::ip: 127.0.0.1
 nginx::variant: light
 
+admin::groups:
+  - striker-admins
+
 striker::apache::server_name: toolsadmin.wikimedia.org
 striker::apache::docroot: /srv/deployment/striker/deploy/public_html
 striker::apache::servers:
diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 7d4ef8d..1b609e5 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -580,7 +580,10 @@
  'ALL = NOPASSWD: /bin/systemctl restart zookeeper.service',
  'ALL = NOPASSWD: /bin/systemctl mask zookeeper.service',
  'ALL = NOPASSWD: /bin/systemctl unmask zookeeper.service']
-
+  striker-admins:
+description: Group of Striker admins (T151424)
+gid: 789
+members: [bd808]
 users:
   rush:
 ensure: present

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Alignment and editor positioning corrections for multipart t...

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

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

Change subject: Alignment and editor positioning corrections for multipart 
templates
..

Alignment and editor positioning corrections for multipart templates

When source template has fragments and some hidden(or height 0)
the alignment calculation and positioning of editor were going wrong.

Example articles: Tasmanian Devil (en->he), Samuel L. Jackson (en->*)

Change-Id: Iabea86f7ce30f136eae37dd7a3c32e1e1ba5f0bb
---
M modules/tools/ext.cx.tools.template.editor.js
M modules/tools/ext.cx.tools.template.js
M modules/translation/ext.cx.translation.aligner.js
M modules/ui/styles/mw.cx.ui.TranslationView.less
4 files changed, 113 insertions(+), 57 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/20/323120/1

diff --git a/modules/tools/ext.cx.tools.template.editor.js 
b/modules/tools/ext.cx.tools.template.editor.js
index 9eed7d2..01bcb98 100644
--- a/modules/tools/ext.cx.tools.template.editor.js
+++ b/modules/tools/ext.cx.tools.template.editor.js
@@ -40,21 +40,13 @@
 * Initialize the template editor
 */
TemplateEditor.prototype.init = function () {
-   var sourceId, self = this;
+   var self = this;
 
this.$sourceTemplateContainer = this.buildSourceFormContainer();
this.$targetTemplateContainer = this.buildTargetFormContainer();
 
-   if ( this.targetTemplate.options.inline ) {
-   this.targetTemplate.$parentSection = 
this.targetTemplate.$template.parents( '[data-source]' );
-   sourceId = this.targetTemplate.$parentSection.data( 
'source' );
-   this.sourceTemplate.$parentSection = $( 
document.getElementById( sourceId ) );
-   this.sourceTemplate.$parentSection.after( 
this.$sourceTemplateContainer );
-   this.targetTemplate.$parentSection.after( 
this.$targetTemplateContainer );
-   } else {
-   this.sourceTemplate.$template.after( 
this.$sourceTemplateContainer );
-   this.targetTemplate.$template.after( 
this.$targetTemplateContainer );
-   }
+   this.sourceTemplate.getEditorContainer().after( 
this.$sourceTemplateContainer );
+   this.targetTemplate.getEditorContainer().after( 
this.$targetTemplateContainer );
 
this.sourceTemplate.init().then( function () {
self.buildSourceTemplateForm();
@@ -497,14 +489,8 @@
 * Show the editor.
 */
TemplateEditor.prototype.show = function () {
-
-   if ( this.targetTemplate.options.inline ) {
-   this.targetTemplate.$parentSection.hide();
-   this.sourceTemplate.$parentSection.hide();
-   } else {
-   this.targetTemplate.$template.hide();
-   this.sourceTemplate.$template.hide();
-   }
+   this.targetTemplate.hide();
+   this.sourceTemplate.hide();
 
this.$sourceTemplateContainer.show();
this.$targetTemplateContainer.show();
@@ -527,13 +513,8 @@
this.$sourceTemplateContainer.hide();
this.$targetTemplateContainer.hide();
 
-   if ( this.targetTemplate.options.inline ) {
-   this.targetTemplate.$parentSection.show();
-   this.sourceTemplate.$parentSection.show();
-   } else {
-   this.targetTemplate.$template.show();
-   this.sourceTemplate.$template.show();
-   }
+   this.targetTemplate.show();
+   this.sourceTemplate.show();
 
};
 
diff --git a/modules/tools/ext.cx.tools.template.js 
b/modules/tools/ext.cx.tools.template.js
index 53c49e0..875350b 100644
--- a/modules/tools/ext.cx.tools.template.js
+++ b/modules/tools/ext.cx.tools.template.js
@@ -162,13 +162,17 @@
 * @return {jQuery}
 */
Template.static.getTemplateDef = function ( $template ) {
-   var $sourceTemplate = $( [] );
+   var aboutAttr,
+   $sourceTemplate = $( [] );
 
if ( !$template ) {
return $sourceTemplate;
}
 
-   mw.cx.Template.static.getFragments( $template ).each( function 
( index, fragment ) {
+   aboutAttr = $template.attr( 'about' ) ||
+   mw.cx.getSourceSection( $template.data( 'source' ) 
).attr( 'about' );
+
+   $( '[about="' + aboutAttr + '"]' ).each( function ( index, 
fragment ) {
var $fragment = $( fragment );
 
if (
@@ -203,34 +207,81 @@
};
 
/**

[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[master]: Replace $.parseJSON by JSON.parse

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

Change subject: Replace $.parseJSON by JSON.parse
..


Replace $.parseJSON by JSON.parse

$.parseJSON gets deprecated in jQuery 3.0:
https://jquery.com/upgrade-guide/3.0/#deprecated-jquery-parsejson

Change-Id: I871d88b6fd2517656704186433d2bbcbcba7e990
---
M resources/transports/mw.FormDataTransport.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/transports/mw.FormDataTransport.js 
b/resources/transports/mw.FormDataTransport.js
index eeea391..86d8cba 100644
--- a/resources/transports/mw.FormDataTransport.js
+++ b/resources/transports/mw.FormDataTransport.js
@@ -420,7 +420,7 @@
var response;
 
try {
-   response = $.parseJSON( evt.target.responseText );
+   response = JSON.parse( evt.target.responseText );
} catch ( e ) {
if ( window.console ) {
// Let's check what caused this, too.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I871d88b6fd2517656704186433d2bbcbcba7e990
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1052 for maintenance

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

Change subject: db-eqiad.php: Depool db1052 for maintenance
..


db-eqiad.php: Depool db1052 for maintenance

We are planning to use db1052 as a temporary master for the
new sanitarium host, and we need to depool it to import its
tablespace to db1095.

Bug: T150960
Change-Id: I67702ee216afe25ac75f1cd1f9fd5012c0b58d6a
---
M wmf-config/db-eqiad.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index ddc2472..0fdbe12 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -94,7 +94,7 @@
 'sectionLoads' => [
's1' => [
'db1057' => 0,   # 2.8TB  96GB, master
-   'db1052' => 1  , # 2.8TB  96GB, api, old master
+#  'db1052' => 1  , # 2.8TB  96GB, api, old master #Temporary 
master for db1095 - new sanitarium #T150960
'db1051' => 50,  # 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1055' => 50,  # 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1065' => 50,  # 2.8TB 160GB, api
@@ -266,7 +266,7 @@
'api' => [
'db1065' => 1,
'db1066' => 1,
-   'db1052' => 1,
+#  'db1052' => 1,
],
],
's2' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I67702ee216afe25ac75f1cd1f9fd5012c0b58d6a
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
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/vagrant[master]: Update Contenttranslation role

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

Change subject: Update Contenttranslation role
..


Update Contenttranslation role

* Properly migrate to service-runner.
* Removed obsolete experimental flag.

Bug: T149880
Change-Id: Ie284f3e3abec0b9727f70ed5ea8182360edcbcd9
---
M puppet/hieradata/common.yaml
M puppet/modules/contenttranslation/manifests/cxserver.pp
M puppet/modules/contenttranslation/manifests/init.pp
D puppet/modules/contenttranslation/templates/cxserver.conf.erb
M puppet/modules/contenttranslation/templates/cxserver.config.yaml.erb
5 files changed, 24 insertions(+), 106 deletions(-)

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



diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
index a2e889f..02badb6 100644
--- a/puppet/hieradata/common.yaml
+++ b/puppet/hieradata/common.yaml
@@ -33,7 +33,6 @@
 changeprop::port: 7272
 
 contenttranslation::dir: 
"%{hiera('mediawiki::dir')}/extensions/ContentTranslation"
-contenttranslation::cxserver::dir: "%{hiera('mwv::services_dir')}/cxserver"
 contenttranslation::view_template: 
"//$1%{hiera('mediawiki::multiwiki::base_domain')}%{::port_fragment}/wiki/$2"
 contenttranslation::action_template: 
"//$1%{hiera('mediawiki::multiwiki::base_domain')}%{::port_fragment}/w/index.php?title=$2"
 contenttranslation::api_template: 
"//$1%{hiera('mediawiki::multiwiki::base_domain')}%{::port_fragment}/w/api.php"
@@ -44,7 +43,6 @@
 contenttranslation::database_password: "%{hiera('mysql::root_password')}"
 contenttranslation::eventlogging: false
 contenttranslation::betafeature: false
-contenttranslation::experimental: false
 contenttranslation::intarget: false
 contenttranslation::namespace: 'Main'
 contenttranslation::suggestions: true
@@ -56,18 +54,11 @@
 
 contenttranslation::cxserver::dir: "%{hiera('mwv::services_dir')}/cxserver"
 contenttranslation::cxserver::port: 8090
-contenttranslation::cxserver::proxy: 'null'
-contenttranslation::cxserver::log: /vagrant/logs
-contenttranslation::cxserver::allow_cors: '*'
 contenttranslation::cxserver::apertium: 'http://apertium.wmflabs.org'
-contenttranslation::cxserver::yandex: 'https://translate.yandex.net'
-contenttranslation::cxserver::yandex_key: 'null'
-contenttranslation::cxserver::youdao: 
'https://fanyi.youdao.com/paidapi/fanyiapi'
-contenttranslation::cxserver::youdao_key: 'null'
-contenttranslation::cxserver::secure: 'false'
-contenttranslation::cxserver::ssl_key: 'null'
-contenttranslation::cxserver::cert: 'null'
-contenttranslation::cxserver::workers: 2
+contenttranslation::cxserver::yandex_url: 'https://translate.yandex.net'
+contenttranslation::cxserver::yandex_api_key: 'null'
+contenttranslation::cxserver::youdao_url: 
'https://fanyi.youdao.com/paidapi/fanyiapi'
+contenttranslation::cxserver::youdao_api_key: 'null'
 
 crm::dir: "%{hiera('mwv::services_dir')}/org.wikimedia.civicrm"
 crm::site_name: "crm%{hiera('mwv::tld')}"
diff --git a/puppet/modules/contenttranslation/manifests/cxserver.pp 
b/puppet/modules/contenttranslation/manifests/cxserver.pp
index 0b5cdc7..e3f09a7 100644
--- a/puppet/modules/contenttranslation/manifests/cxserver.pp
+++ b/puppet/modules/contenttranslation/manifests/cxserver.pp
@@ -7,60 +7,33 @@
 #
 # == Parameters
 #
-# [*dir*]
-#   The directory in which to install cxserver.
-#   Defaults to /srv/cxserver.
-#
 # [*port*]
 #   The port the cxserver should listen on.
 #   Defaults to 8090.
 #
-# [*proxy*]
-#   Forward proxy to use when connecting to machine translation services.
-#   Defaults to 'null' for no proxy.
-#
-# [*log*]
-#   Log directory.
-#   Defaults to 'log'.
-#
-# [*allow_cors*]
-#   Hosts for CORS. Defaults to '*'.
+# [*dir*]
+#   The directory in which to install cxserver.
+#   Defaults to /srv/cxserver.
 #
 # [*apertium*]
 #   The url for the apertium machine translation service.
 #   Defaults to '//apertium.wmflabs.org'
 #
-# [*yandex*]
+# [*yandex_url*]
 #   The url for the yandex machine translation service.
 #   Defaults to 'https://translate.yandex.net'
 #
-# [*yandex_key*]
+# [*yandex_api_key*]
 #   Api key for yandex translation service.
 #   Defaults to 'null'.
 #
-# [*youdao*]
+# [*youdao_url*]
 #   The url for the youdao machine translation service.
 #   Defaults to 'https://fanyi.youdao.com/paidapi/fanyiapi'
 #
-# [*youdao_key*]
+# [*youdao_api_key*]
 #   Api key for youdao translation service.
 #   Defaults to 'null'.
-#
-# [*secure*]
-#   Whether or not to run cxserver on https.
-#   Defaults to 'false'.
-#
-# [*ssl_key*]
-#   Path to ssl key file.
-#   Defaults to 'null'.
-#
-# [*cert*]
-#   Path to cert file.
-#   Defaults to 'null'.
-#
-# [*workers*]
-#   Number of workers to spawn when starting cxserver.
-#   Defaults to 2.
 #
 # == Example
 #
@@ -75,44 +48,19 @@
 #   and include entries for the settings you want to override.
 #
 class contenttranslation::cxserver(
-$dir,
 $port,
-$proxy,
-$log,
-

[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[master]: Replace $.parseJSON by JSON.parse

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

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

Change subject: Replace $.parseJSON by JSON.parse
..

Replace $.parseJSON by JSON.parse

$.parseJSON gets deprecated in jQuery 3.0:
https://jquery.com/upgrade-guide/3.0/#deprecated-jquery-parsejson

Change-Id: I871d88b6fd2517656704186433d2bbcbcba7e990
---
M resources/transports/mw.FormDataTransport.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/resources/transports/mw.FormDataTransport.js 
b/resources/transports/mw.FormDataTransport.js
index eeea391..86d8cba 100644
--- a/resources/transports/mw.FormDataTransport.js
+++ b/resources/transports/mw.FormDataTransport.js
@@ -420,7 +420,7 @@
var response;
 
try {
-   response = $.parseJSON( evt.target.responseText );
+   response = JSON.parse( evt.target.responseText );
} catch ( e ) {
if ( window.console ) {
// Let's check what caused this, too.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I871d88b6fd2517656704186433d2bbcbcba7e990
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Fomafix 

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


[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Fix line height in help dialog

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

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

Change subject: Fix line height in help dialog
..

Fix line height in help dialog

Change-Id: I6827bc57d3372eaa6080bf7aaa351fdcf8b2d38e
---
M modules/ext.RevisionSlider.css
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RevisionSlider 
refs/changes/09/322909/1

diff --git a/modules/ext.RevisionSlider.css b/modules/ext.RevisionSlider.css
index 299fa04..7813b9b 100644
--- a/modules/ext.RevisionSlider.css
+++ b/modules/ext.RevisionSlider.css
@@ -299,6 +299,7 @@
 
 .mw-revslider-help-dialog-text {
font-size: 14px;
+   line-height: 1.5;
 }
 
 .mw-revslider-show-help {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6827bc57d3372eaa6080bf7aaa351fdcf8b2d38e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RevisionSlider
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] mediawiki...parsoid[master]: Normalize all extension options, not just native

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

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

Change subject: Normalize all extension options, not just native
..

Normalize all extension options, not just native

 * Follow up to 8d11541f and, I guess, ad23e214 where this was
   introduced.

 * Rt found a gallery on ruwiki:Пермь like this,

   

   where the entities are problematic.

 * The removed escaping while serializing is because these attributes in
   data-mw are ostensibly wikitext already.

Change-Id: I1336a8391efb5191c9e254142a9ea6d1a5b0cad1
---
M lib/html2wt/WikitextSerializer.js
M lib/wt2html/tt/ExtensionHandler.js
M tests/parserTests-blacklist.js
3 files changed, 6 insertions(+), 33 deletions(-)


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

diff --git a/lib/html2wt/WikitextSerializer.js 
b/lib/html2wt/WikitextSerializer.js
index c0cfb08..c7d97fc 100644
--- a/lib/html2wt/WikitextSerializer.js
+++ b/lib/html2wt/WikitextSerializer.js
@@ -238,7 +238,7 @@
[ 'typeof', /(^|\s)mw:[^\s]+/g ],
 ]);
 
-WSP._serializeAttributes = Promise.method(function(node, token) {
+WSP._serializeAttributes = Promise.method(function(node, token, isWt) {
var attribs = token.attribs;
 
var out = [];
@@ -300,7 +300,7 @@
// in 
pegTokenizer.pegjs:generic_newline_attribute
kk = kk.replace(/^data-x-/i, '');
if (vv.length > 0) {
-   if (!vInfo.fromsrc) {
+   if (!vInfo.fromsrc && !isWt) {
// Escape HTML entities
vv = Util.escapeEntities(vv);
}
@@ -666,7 +666,7 @@
extTok.addAttribute('typeof', type);
}
 
-   return this._serializeAttributes(node, extTok).then(function(attrStr) {
+   return this._serializeAttributes(node, extTok, 
true).then(function(attrStr) {
var src = '<' + extName ;
if (attrStr) {
src += ' ' + attrStr;
diff --git a/lib/wt2html/tt/ExtensionHandler.js 
b/lib/wt2html/tt/ExtensionHandler.js
index 4328f33..8b70ac8 100644
--- a/lib/wt2html/tt/ExtensionHandler.js
+++ b/lib/wt2html/tt/ExtensionHandler.js
@@ -118,9 +118,11 @@
var cacheKey = token.dataAttribs.src;
var cachedExpansion = env.extensionCache[cacheKey];
 
+   var options = token.getAttribute('options');
+   token.setAttribute('options', normalizeExtOptions(options));
+
if (nativeExt && nativeExt.tokenHandler) {
// No caching for native extensions for now.
-   token.setAttribute('options', 
normalizeExtOptions(token.getAttribute('options')));
nativeExt.tokenHandler(this.manager, this.options, token, cb);
} else if (cachedExpansion) {
// cache hit. Reuse extension expansion.
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 446bd2d..653e501 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -362,9 +362,7 @@
 add("wt2wt", "Ref: 8. transclusion wikitext has lower precedence", "A 
foo {{echo| B C}}\n\n");
 add("wt2wt", "Ref: 9. unclosed comments should not leak out of ref-body", "A 
foo  B C\n");
 add("wt2wt", "Ref: 10. Unclosed HTML tags should not leak out of ref-body", "A 
 foo  B C\n\n");
-add("wt2wt", "Ref: 19. ref-tags with identical name encodings should get 
identical indexes", "1 foo 2 \n\n");
 add("wt2wt", "References: 9. Generate missing references list at the end", "A 
foo\nB bar\n\n");
-add("wt2wt", "Entities in ref name", "hi\n");
 add("wt2wt", "Trailing newlines in a deep dom-subtree that ends a wikitext 
line should be migrated out", 
"{|\n|foo\n\nbar\n|}\n\n{|\n|foo\n|}");
 add("wt2wt", "Empty TD followed by TD with tpl-generated attribute", 
"{|\n|-\n|\n| {{echo|style='color:red'}} |foo\n|}");
 add("wt2wt", "Improperly nested inline or quotes tags with whitespace in 
between", " x \n''' ''x''' ''\n");
@@ -586,9 +584,7 @@
 add("html2html", "nowiki inside link inside heading (bug 18295)", " xyz
 \n");
 add("html2html", "new support for bdi element (bug 31817)", "ולדימיר לנין (ברוסית: Владимир Ленин, 24 
באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.\n");
 add("html2html", "Ref: 8. transclusion wikitext has lower precedence", "A [1] B C}}\n↑  foo {{echo|");
-add("html2html", "Ref: 19. ref-tags with identical name encodings should get 
identical indexes", "1 [1] 2 [2]\n\n↑  foo↑  ");
 add("html2html", "References: 9. Generate missing references list at the end", 
"A [1] B [inexistent 
1]\n↑  foo\n↑  bar");
-add("html2html", "Entities in ref name", "[1]\n↑  hi");
 add("html2html", "Empty LI and TR nodes should not be stripped from top-level 

[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Fix line height in help dialog

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

Change subject: Fix line height in help dialog
..


Fix line height in help dialog

Change-Id: I6827bc57d3372eaa6080bf7aaa351fdcf8b2d38e
---
M modules/ext.RevisionSlider.css
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/ext.RevisionSlider.css b/modules/ext.RevisionSlider.css
index 299fa04..7813b9b 100644
--- a/modules/ext.RevisionSlider.css
+++ b/modules/ext.RevisionSlider.css
@@ -299,6 +299,7 @@
 
 .mw-revslider-help-dialog-text {
font-size: 14px;
+   line-height: 1.5;
 }
 
 .mw-revslider-show-help {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6827bc57d3372eaa6080bf7aaa351fdcf8b2d38e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RevisionSlider
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: WMDE-Fisch 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: wmfkeystonehooks: Maintain project page on wikitech

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

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

Change subject: wmfkeystonehooks:  Maintain project page on wikitech
..

wmfkeystonehooks:  Maintain project page on wikitech

WIP

Bug: T150091
Change-Id: I3a42e3eb117da789a9f960d5b495cdd75fdc00fe
---
M modules/openstack/files/liberty/keystone/wmfkeystonehooks/wmfkeystonehooks.py
M modules/openstack/files/liberty/nova/wikistatus/pageeditor.py
M modules/openstack/manifests/keystone/hooks.pp
M modules/openstack/manifests/keystone/service.pp
M modules/openstack/templates/liberty/keystone/keystone.conf.erb
M modules/openstack/templates/mitaka/keystone/keystone.conf.erb
M modules/role/manifests/labs/openstack/keystone.pp
7 files changed, 238 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/17/323117/1

diff --git 
a/modules/openstack/files/liberty/keystone/wmfkeystonehooks/wmfkeystonehooks.py 
b/modules/openstack/files/liberty/keystone/wmfkeystonehooks/wmfkeystonehooks.py
index 2faef51..f1975df 100644
--- 
a/modules/openstack/files/liberty/keystone/wmfkeystonehooks/wmfkeystonehooks.py
+++ 
b/modules/openstack/files/liberty/keystone/wmfkeystonehooks/wmfkeystonehooks.py
@@ -16,6 +16,8 @@
 from keystone.common import dependency
 from keystone import exception
 
+from wikistatus import pageeditor
+
 from oslo_log import log as logging
 from oslo_config import cfg
 from oslo_messaging.notify import notifier
@@ -39,7 +41,10 @@
default='projectadmin',
help='Name of project-local admin role'),
 cfg.MultiStrOpt('wmf_keystone_eventtype_whitelist',
-default=['identity.project.deleted', 
'identity.project.created'],
+default=['identity.project.deleted',
+ 'identity.project.created',
+ 'identity.role_assignment.created',
+ 'identity.role_assignment.deleted'],
 help='Event types to always handle.'),
 cfg.MultiStrOpt('wmf_keystone_eventtype_blacklist',
 default=[],
@@ -58,13 +63,19 @@
 """Notifier class which handles extra project creation/deletion bits
 """
 def __init__(self, conf, topics, transport, version=1.0):
-pass
+self.page_editor = pageeditor.PageEditor()
 
 def _on_project_delete(self, project_id):
 LOG.warning("Beginning wmf hooks for project deletion: %s" % 
project_id)
 
-def _on_project_create(self, project_id):
+resource_name = project_id
+self.page_editor.edit_page("", resource_name, True)
 
+def _on_role_updated(self, project_id):
+LOG.warning("Beginning wmf hooks for project update: %s" % project_id)
+self._update_project_page(project_id)
+
+def _on_project_create(self, project_id):
 LOG.warning("Beginning wmf hooks for project creation: %s" % 
project_id)
 
 rolelist = self.role_api.list_roles()
@@ -92,6 +103,26 @@
  project_id,
  
roledict[CONF.observer_role_name])
 
+self._update_project_page(project_id)
+
+def _update_project_page(self, project_id):
+# Create wikitech project page
+resource_name = project_id
+template_param_dict = {}
+template_param_dict['Resource Type'] = 'project'
+template_param_dict['Project Name'] = project_id
+admins = 
self.assignment_api.list_role_assignments_for_role(CONF.admin_role_name)
+members = 
self.assignment_api.list_role_assignments_for_role(CONF.user_role_name)
+template_param_dict['Admins'] = ",".join(["User:%s" % user for user in 
admins])
+template_param_dict['Members'] = ",".join(["User:%s" % user for user 
in members])
+
+fields_string = ""
+for key in template_param_dict:
+fields_string += "\n|%s=%s" % (key, template_param_dict[key])
+
+self.page_editor.edit_page(fields_string, resource_name, False,
+   template='Nova Resource')
+
 def notify(self, context, message, priority, retry=False):
 event_type = message.get('event_type')
 
@@ -101,6 +132,10 @@
 if event_type == 'identity.project.created':
 self._on_project_create(message['payload']['resource_info'])
 
+if (event_type == 'identity.role_assignment.created' or
+event_type == 'identity.role_assignment.deleted'):
+self._on_role_updated(message['payload']['project'])
+
 # Eventually this will be used to update project resource pages:
 if event_type in CONF.wmf_keystone_eventtype_blacklist:
 return
diff --git a/modules/openstack/files/liberty/nova/wikistatus/pageeditor.py 
b/modules/openstack/files/liberty/nova/wikistatus/pageeditor.py
index 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Require ::openstack before the common role

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

Change subject: Require ::openstack before the common role
..


Require ::openstack before the common role

That should get openstack::version in scope

Change-Id: I5ae7b13c3ecd33ed50dec8f8003f0664964f7903
---
M modules/role/manifests/labs/openstack/nova/common.pp
1 file changed, 2 insertions(+), 7 deletions(-)

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



diff --git a/modules/role/manifests/labs/openstack/nova/common.pp 
b/modules/role/manifests/labs/openstack/nova/common.pp
index 276c0ad..24bcf34 100644
--- a/modules/role/manifests/labs/openstack/nova/common.pp
+++ b/modules/role/manifests/labs/openstack/nova/common.pp
@@ -1,6 +1,7 @@
 class role::labs::openstack::nova::common {
-
+require openstack
 include passwords::misc::scripts
+include ::openstack::nova::hooks
 
 $novaconfig_pre   = hiera_hash('novaconfig', {})
 $keystoneconfig   = hiera_hash('keystoneconfig', {})
@@ -27,11 +28,5 @@
 class { '::openstack::common':
 novaconfig   => $novaconfig,
 wikitechstatusconfig => $wikitechstatusconfig,
-openstack_version=> hiera('openstack::version'),
-}
-
-class { '::openstack::nova::hooks':
-openstack_version => hiera('openstack::version'),
 }
 }
-

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

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

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


[MediaWiki-commits] [Gerrit] operations...otrs[master]: Update Templates for 5.0.13 version

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

Change subject: Update Templates for 5.0.13 version
..


Update Templates for 5.0.13 version

Pull the various changes for 5.0.13 from upstream
Update the package version to reflect that as well

Bug: T147331
Change-Id: I6023ba981e3e48b54dc7f59ff7f369f724e91c7e
---
M 
packages/WikimediaTemplates/Custom/Kernel/Output/HTML/Templates/Standard/AgentDashboardUserOnline.tt
M 
packages/WikimediaTemplates/Custom/Kernel/Output/HTML/Templates/Standard/AgentTicketZoom.tt
M packages/WikimediaTemplates/WikimediaTemplates.sopm
3 files changed, 65 insertions(+), 19 deletions(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git 
a/packages/WikimediaTemplates/Custom/Kernel/Output/HTML/Templates/Standard/AgentDashboardUserOnline.tt
 
b/packages/WikimediaTemplates/Custom/Kernel/Output/HTML/Templates/Standard/AgentDashboardUserOnline.tt
index fe5662e..ae4147f 100644
--- 
a/packages/WikimediaTemplates/Custom/Kernel/Output/HTML/Templates/Standard/AgentDashboardUserOnline.tt
+++ 
b/packages/WikimediaTemplates/Custom/Kernel/Output/HTML/Templates/Standard/AgentDashboardUserOnline.tt
@@ -15,13 +15,13 @@
 
 [% WRAPPER JSOnDocumentComplete %]
 //
 
[% Translate(Data.Priority) | html %]

-[% Data.Hook %][% Data.TicketNumber %] — [% Data.Title | html %] +[% Data.Hook %][%


[MediaWiki-commits] [Gerrit] mediawiki...Gadgets[REL1_28]: Implement support for 'hidden' feature in MediaWikiGadgetsDe...

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

Change subject: Implement support for 'hidden' feature in 
MediaWikiGadgetsDefinitionRepo
..


Implement support for 'hidden' feature in MediaWikiGadgetsDefinitionRepo

Follows-up 152484566, which added support for it in Gadgets 2.0, but
it's easy enough to make it work in existing definitions as well.

That way, people can stop using 'rights=hidden' hacks.

Bug: T33150
Change-Id: Idd6944a9ad38279e117c1a02a4b5fd0343455ba0
(cherry picked from commit 27a0ca656837156490edc016371de2cde2d1fcfd)
---
M includes/MediaWikiGadgetsDefinitionRepo.php
M tests/phpunit/GadgetTest.php
2 files changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/includes/MediaWikiGadgetsDefinitionRepo.php 
b/includes/MediaWikiGadgetsDefinitionRepo.php
index dbb3ae8..9ce192b 100644
--- a/includes/MediaWikiGadgetsDefinitionRepo.php
+++ b/includes/MediaWikiGadgetsDefinitionRepo.php
@@ -202,6 +202,9 @@
case 'rights':
$info['requiredRights'] = $params;
break;
+   case 'hidden':
+   $info['hidden'] = true;
+   break;
case 'skins':
$info['requiredSkins'] = $params;
break;
diff --git a/tests/phpunit/GadgetTest.php b/tests/phpunit/GadgetTest.php
index a327a2a..789082c 100644
--- a/tests/phpunit/GadgetTest.php
+++ b/tests/phpunit/GadgetTest.php
@@ -132,6 +132,17 @@
$this->assertEquals( $mType, $this->getModule( $g )->getType(), 
"Module: $message" );
}
 
+   public function testIsHidden() {
+   $g = $this->create( '* foo[hidden]|bar.js' );
+   $this->assertTrue( $g->isHidden() );
+
+   $g = $this->create( '* foo[ResourceLoader|hidden]|bar.js' );
+   $this->assertTrue( $g->isHidden() );
+
+   $g = $this->create( '* foo[ResourceLoader]|bar.js' );
+   $this->assertFalse( $g->isHidden() );
+   }
+
public function testPreferences() {
$prefs = array();
$repo = TestingAccessWrapper::newFromObject( new 
MediaWikiGadgetsDefinitionRepo() );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idd6944a9ad38279e117c1a02a4b5fd0343455ba0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: REL1_28
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: CODFW: Add partman entries for prometheus200[3-4] Bug: T151338

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

Change subject: CODFW: Add partman entries for prometheus200[3-4] Bug: T151338
..


CODFW: Add partman entries for prometheus200[3-4]
Bug: T151338

Change-Id: I127f0e20f0a665ec0bb618f162e43323cac24d9b
---
M modules/install_server/files/autoinstall/netboot.cfg
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index ccd17fd..10e253d 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -129,6 +129,7 @@
 poolcounter1001) echo partman/flat.cfg virtual.cfg ;; \
 poolcounter1002) echo partman/raid1-lvm-ext4-srv.cfg ;; \
 prometheus[12]00[12]) echo partman/lvm-ext-srv.cfg virtual.cfg;; \
+prometheus200[3-4]) echo partman/prometheus.cfg;; \
 puppetmaster[12]00[1-2]) echo partman/raid1-lvm.cfg;;\
 pybal-test200[1-3]) echo partman/flat.cfg virtual.cfg;; \
 rdb100[1-6]) echo partman/mw.cfg ;; \

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I127f0e20f0a665ec0bb618f162e43323cac24d9b
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Papaul 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: API: Fix lntcategories parameter

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

Change subject: API: Fix lntcategories parameter
..


API: Fix lntcategories parameter

* Treat it as an array in all cases
* Make the default value all categories
* Rename from category to categories

Bug: T151288
Change-Id: I5c0c341112894c5a7ec3aaebb6ac9085353f55bd
---
M i18n/en.json
M i18n/qqq.json
M includes/ApiQueryLintErrors.php
3 files changed, 11 insertions(+), 13 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 66bd5fa..1771ae3 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -29,7 +29,7 @@
"linker-page-title-edit": "$1 ($2)",
"linker-page-edit": "edit",
"apihelp-query+linterrors-description": "Get a list of lint errors",
-   "apihelp-query+linterrors-param-category": "Category of lint errors",
+   "apihelp-query+linterrors-param-categories": "Categories of lint 
errors",
"apihelp-query+linterrors-param-limit": "Number of results to query",
"apihelp-query+linterrors-param-from": "Lint ID to start querying from",
"apihelp-query+linterrors-param-namespace": "Only include lint errors 
from the specified namespaces",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 07d511a..564034f 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -31,7 +31,7 @@
"linker-page-title-edit": "Used in a table cell. $1 is a link to the 
page, $2 is a link to edit that page, the link text is 
{{msg-mw|linker-page-edit}}",
"linker-page-edit": "Link text for edit link in 
{{msg-mw|linker-page-title-edit}} and 
{{msg-mw|linker-page-title-edit-template}}\n{{Identical|Edit}}",
"apihelp-query+linterrors-description": 
"{{doc-apihelp-description|query+linterrors}}",
-   "apihelp-query+linterrors-param-category": 
"{{doc-apihelp-param|query+linterrors|category}}",
+   "apihelp-query+linterrors-param-categories": 
"{{doc-apihelp-param|query+linterrors|categories}}",
"apihelp-query+linterrors-param-limit": 
"{{doc-apihelp-param|query+linterrors|limit}}",
"apihelp-query+linterrors-param-from": 
"{{doc-apihelp-param|query+linterrors|from}}",
"apihelp-query+linterrors-param-namespace": 
"{{doc-apihelp-param|query+linterrors|namespace}}",
diff --git a/includes/ApiQueryLintErrors.php b/includes/ApiQueryLintErrors.php
index 795a614..a305eb1 100644
--- a/includes/ApiQueryLintErrors.php
+++ b/includes/ApiQueryLintErrors.php
@@ -36,14 +36,9 @@
$categoryMgr = new CategoryManager();
 
$this->addTables( 'linter' );
-   if ( $params['category'] !== null ) {
-   $this->addWhereFld( 'linter_cat', 
$categoryMgr->getCategoryId( $params['category'] ) );
-   } else {
-   // Limit only to enabled categories (there might be 
others in the DB)
-   $this->addWhereFld( 'linter_cat', array_values( 
$categoryMgr->getCategoryIds(
-   $categoryMgr->getVisibleCategories()
-   ) ) );
-   }
+   $this->addWhereFld( 'linter_cat', array_values( 
$categoryMgr->getCategoryIds(
+   $params['categories']
+   ) ) );
$db = $this->getDB();
if ( $params['from'] !== null ) {
$this->addWhere( 'linter_id >= ' . $db->addQuotes( 
$params['from'] ) );
@@ -94,10 +89,13 @@
}
 
public function getAllowedParams() {
+   $visibleCats = ( new CategoryManager() 
)->getVisibleCategories();
return [
-   'category' => [
-   ApiBase::PARAM_TYPE => ( new CategoryManager() 
)->getVisibleCategories(),
+   'categories' => [
+   ApiBase::PARAM_TYPE => $visibleCats,
ApiBase::PARAM_ISMULTI => true,
+   // Default is to show all categories
+   ApiBase::PARAM_DFLT => implode( '|', 
$visibleCats ),
],
'limit' => [
ApiBase::PARAM_DFLT => 10,
@@ -118,7 +116,7 @@
 
public function getExamplesMessages() {
return [
-   'action=query=linterrors=obsolete-tag' 
=>
+   
'action=query=linterrors=obsolete-tag' =>
'apihelp-query+linterrors-example-1',
];
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5c0c341112894c5a7ec3aaebb6ac9085353f55bd
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Linter
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: API: Fix up action=record-lint's getAllowedParams()

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

Change subject: API: Fix up action=record-lint's getAllowedParams()
..


API: Fix up action=record-lint's getAllowedParams()

Since this module is internal, it doesn't really matter, but it cleans
up the output on api.php?modules=record-lint.

Bug: T151285
Change-Id: I859a2780d6ed1918cc81101e9e2c2cd348a2390a
---
M includes/ApiRecordLint.php
1 file changed, 12 insertions(+), 3 deletions(-)

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



diff --git a/includes/ApiRecordLint.php b/includes/ApiRecordLint.php
index c2255fe..6857fff 100644
--- a/includes/ApiRecordLint.php
+++ b/includes/ApiRecordLint.php
@@ -83,9 +83,18 @@
 
public function getAllowedParams() {
return [
-   'data' => 'string',
-   'page' => 'string',
-   'revision' => 'int',
+   'data' => [
+   ApiBase::PARAM_TYPE => 'string',
+   ApiBase::PARAM_REQUIRED => true,
+   ],
+   'page' => [
+   ApiBase::PARAM_TYPE => 'string',
+   ApiBase::PARAM_REQUIRED => true,
+   ],
+   'revision' => [
+   ApiBase::PARAM_TYPE => 'integer',
+   ApiBase::PARAM_REQUIRED => true,
+   ],
];
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I859a2780d6ed1918cc81101e9e2c2cd348a2390a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Linter
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Brian Wolff 
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...Linter[master]: LintErrorsPager: Set explicit output format on some messages

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

Change subject: LintErrorsPager: Set explicit output format on some messages
..


LintErrorsPager: Set explicit output format on some messages

Bug: T151283
Change-Id: Ic52bc11a6aacf7f5bb23d9273fa0bf2a27e0cfc4
---
M includes/LintErrorsPager.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/LintErrorsPager.php b/includes/LintErrorsPager.php
index 4c0fd86..ae241a2 100644
--- a/includes/LintErrorsPager.php
+++ b/includes/LintErrorsPager.php
@@ -130,13 +130,13 @@
 
public function getFieldNames() {
$names = [
-   'title' => $this->msg( 'linter-pager-title' ),
+   'title' => $this->msg( 'linter-pager-title' )->text(),
];
if ( $this->category !== 'fostered' ) {
// TODO: don't hardcode list of stuff with no 
parameters...?
-   $names['details'] = $this->msg( 
"linter-pager-{$this->category}-details" );
+   $names['details'] = $this->msg( 
"linter-pager-{$this->category}-details" )->text();
}
-   $names['template'] = $this->msg( "linter-pager-template" );
+   $names['template'] = $this->msg( "linter-pager-template" 
)->text();
return $names;
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic52bc11a6aacf7f5bb23d9273fa0bf2a27e0cfc4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Linter
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: SpecialLintErrors: Implement getSubpagesForPrefixSearch()

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

Change subject: SpecialLintErrors: Implement getSubpagesForPrefixSearch()
..


SpecialLintErrors: Implement getSubpagesForPrefixSearch()

Test plan:
Type "Special:LintErrors/" into the search box, and see that the
autocomplete dropdowns include the subpages for individual error
categories.

Bug: T151289
Change-Id: I919e0e51a3b956f275f9a372b2f2844002972ea7
---
M includes/SpecialLintErrors.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/includes/SpecialLintErrors.php b/includes/SpecialLintErrors.php
index 16c289a..78ecb6f 100644
--- a/includes/SpecialLintErrors.php
+++ b/includes/SpecialLintErrors.php
@@ -77,4 +77,8 @@
return 'maintenance';
}
 
+   protected function getSubpagesForPrefixSearch() {
+   return ( new CategoryManager() )->getVisibleCategories();
+   }
+
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I919e0e51a3b956f275f9a372b2f2844002972ea7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Linter
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Brian Wolff 
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...Linter[master]: Hardcode category ids

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

Change subject: Hardcode category ids
..


Hardcode category ids

Instead of having a complex auto-increment category manager that had
additional caching, just hardcode the (currently 6) ids for each
category, which allows us to simplify a lot of code.

If Parsoid sends a lint error in a category that we don't know about, it
is silently dropped.

Bug: T151287
Change-Id: Ice6edf1b7985390aa0c1c410d357bc565bb69108
---
M includes/ApiQueryLintErrors.php
M includes/ApiRecordLint.php
M includes/CategoryManager.php
M includes/Database.php
M includes/Hooks.php
M includes/LintErrorsPager.php
M includes/SpecialLintErrors.php
D lint_categories.sql
M linter.sql
9 files changed, 49 insertions(+), 133 deletions(-)

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



diff --git a/includes/ApiQueryLintErrors.php b/includes/ApiQueryLintErrors.php
index 89dfde4..795a614 100644
--- a/includes/ApiQueryLintErrors.php
+++ b/includes/ApiQueryLintErrors.php
@@ -33,7 +33,7 @@
 
public function execute() {
$params = $this->extractRequestParams();
-   $categoryMgr = CategoryManager::getInstance();
+   $categoryMgr = new CategoryManager();
 
$this->addTables( 'linter' );
if ( $params['category'] !== null ) {
@@ -41,7 +41,7 @@
} else {
// Limit only to enabled categories (there might be 
others in the DB)
$this->addWhereFld( 'linter_cat', array_values( 
$categoryMgr->getCategoryIds(
-   $categoryMgr->getCategories()
+   $categoryMgr->getVisibleCategories()
) ) );
}
$db = $this->getDB();
@@ -96,7 +96,7 @@
public function getAllowedParams() {
return [
'category' => [
-   ApiBase::PARAM_TYPE => 
CategoryManager::getInstance()->getCategories(),
+   ApiBase::PARAM_TYPE => ( new CategoryManager() 
)->getVisibleCategories(),
ApiBase::PARAM_ISMULTI => true,
],
'limit' => [
diff --git a/includes/ApiRecordLint.php b/includes/ApiRecordLint.php
index 99e7fff..c2255fe 100644
--- a/includes/ApiRecordLint.php
+++ b/includes/ApiRecordLint.php
@@ -57,7 +57,11 @@
) {
$this->dieUsage( 'Invalid, non-existent, or outdated 
title', 'invalid-title' );
}
+   $categoryMgr = new CategoryManager();
foreach ( $data as $info ) {
+   if ( !$categoryMgr->isKnownCategory( $info['type'] ) ) {
+   continue;
+   }
$info['params']['location'] = array_slice( 
$info['dsr'], 0, 2 );
if ( isset( $info['templateInfo'] ) && 
$info['templateInfo'] ) {
$info['params']['templateInfo'] = 
$info['templateInfo'];
diff --git a/includes/CategoryManager.php b/includes/CategoryManager.php
index 6045e01..97c30c9 100644
--- a/includes/CategoryManager.php
+++ b/includes/CategoryManager.php
@@ -20,73 +20,54 @@
 
 namespace MediaWiki\Linter;
 
-use MediaWiki\MediaWikiServices;
-
 /**
  * Functions for lint error categories
  */
 class CategoryManager {
 
/**
-* @var array|bool
+* Map of category names to their hardcoded
+* numerical ids for use in the database
+*
+* @var int[]
 */
-   private $map;
+   private $categoryIds = [
+   'fostered' => 1,
+   'obsolete-tag' => 2,
+   'bogus-image-options' => 3,
+   'missing-end-tag' => 4,
+   'stripped-tag' => 5,
+   'self-closed-tag' => 6,
+   ];
+
/**
-* @var \BagOStuff
+* Categories that are configure to be displayed to users
+*
+* @return string[]
 */
-   private $cache;
-   /**
-* @var string
-*/
-   private $cacheKey;
-
-   private function __construct() {
-   $this->cache = 
MediaWikiServices::getInstance()->getLocalServerObjectCache();
-   $this->cacheKey = $this->cache->makeKey( 'linter', 'categories' 
);
-   }
-
-   public static function getInstance() {
-   static $self;
-   if ( !$self ) {
-   $self = new self();
-   }
-
-   return $self;
-   }
-
-   public function getCategories() {
+   public function getVisibleCategories() {
global $wgLinterCategories;
return array_keys( array_filter( $wgLinterCategories ) );
}
 
/**
-* @see getCategoryId
+

[MediaWiki-commits] [Gerrit] mediawiki...Gadgets[REL1_28]: Implement support for 'hidden' feature in MediaWikiGadgetsDe...

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

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

Change subject: Implement support for 'hidden' feature in 
MediaWikiGadgetsDefinitionRepo
..

Implement support for 'hidden' feature in MediaWikiGadgetsDefinitionRepo

Follows-up 152484566, which added support for it in Gadgets 2.0, but
it's easy enough to make it work in existing definitions as well.

That way, people can stop using 'rights=hidden' hacks.

Bug: T33150
Change-Id: Idd6944a9ad38279e117c1a02a4b5fd0343455ba0
(cherry picked from commit 27a0ca656837156490edc016371de2cde2d1fcfd)
---
M includes/MediaWikiGadgetsDefinitionRepo.php
M tests/phpunit/GadgetTest.php
2 files changed, 14 insertions(+), 0 deletions(-)


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

diff --git a/includes/MediaWikiGadgetsDefinitionRepo.php 
b/includes/MediaWikiGadgetsDefinitionRepo.php
index dbb3ae8..9ce192b 100644
--- a/includes/MediaWikiGadgetsDefinitionRepo.php
+++ b/includes/MediaWikiGadgetsDefinitionRepo.php
@@ -202,6 +202,9 @@
case 'rights':
$info['requiredRights'] = $params;
break;
+   case 'hidden':
+   $info['hidden'] = true;
+   break;
case 'skins':
$info['requiredSkins'] = $params;
break;
diff --git a/tests/phpunit/GadgetTest.php b/tests/phpunit/GadgetTest.php
index a327a2a..789082c 100644
--- a/tests/phpunit/GadgetTest.php
+++ b/tests/phpunit/GadgetTest.php
@@ -132,6 +132,17 @@
$this->assertEquals( $mType, $this->getModule( $g )->getType(), 
"Module: $message" );
}
 
+   public function testIsHidden() {
+   $g = $this->create( '* foo[hidden]|bar.js' );
+   $this->assertTrue( $g->isHidden() );
+
+   $g = $this->create( '* foo[ResourceLoader|hidden]|bar.js' );
+   $this->assertTrue( $g->isHidden() );
+
+   $g = $this->create( '* foo[ResourceLoader]|bar.js' );
+   $this->assertFalse( $g->isHidden() );
+   }
+
public function testPreferences() {
$prefs = array();
$repo = TestingAccessWrapper::newFromObject( new 
MediaWikiGadgetsDefinitionRepo() );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd6944a9ad38279e117c1a02a4b5fd0343455ba0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: REL1_28
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: actions: Fix typo in ViewAction.php doc comment

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

Change subject: actions: Fix typo in ViewAction.php doc comment
..


actions: Fix typo in ViewAction.php doc comment

Change-Id: I26a48db06ea18b1c04a0aadc7cfe86b40af8f4b3
---
M includes/actions/ViewAction.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/actions/ViewAction.php b/includes/actions/ViewAction.php
index 4a7f623..0ba964f 100644
--- a/includes/actions/ViewAction.php
+++ b/includes/actions/ViewAction.php
@@ -26,7 +26,7 @@
 /**
  * An action that views article content
  *
- * This is a wrapper that will call Article::render().
+ * This is a wrapper that will call Article::view().
  *
  * @ingroup Actions
  */

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: SpecialBannerLoader: reduce s-maxage on caught exception

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

Change subject: SpecialBannerLoader: reduce s-maxage on caught exception
..


SpecialBannerLoader: reduce s-maxage on caught exception

Bug: T151418
Change-Id: Ife88332be3da95edfb3741b8af7fd9c2ab7c926f
---
M README
M extension.json
M special/SpecialBannerLoader.php
3 files changed, 31 insertions(+), 7 deletions(-)

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



diff --git a/README b/README
index 8acd140..29eabe6 100644
--- a/README
+++ b/README
@@ -111,9 +111,15 @@
   used, and that subpage will contain a short explanation.
   Default: false
 
-* $wgNoticeBannerMaxAge: Server-side banner cache timeout in seconds
+* $wgNoticeBannerMaxAge: Server-side banner cache timeout, in seconds, for
+  anonymous users.
   Default: 600
 
+* $wgNoticeBannerReducedMaxAge: Reduced server-side banner cache timeout, in
+  seconds, for anonymous users, when SpecialBannerLoader catches an exception.
+  We lower the expiry in the hope that the error will go away the next time 
this
+  resource is requested.
+
 * $wgNoticeUseTranslateExtension: Whether to use the Translation extension for
   banner message translation
   Default: false
diff --git a/extension.json b/extension.json
index 553a463..140a9db 100644
--- a/extension.json
+++ b/extension.json
@@ -436,6 +436,7 @@
"NoticeHideUrls": [],
"CentralNoticeHideBannersP3P": false,
"NoticeBannerMaxAge": 600,
+   "NoticeBannerReducedMaxAge": 120,
"NoticeUseTranslateExtension": false,
"NoticeUseLanguageConversion": false,
"NoticeProtectGroup": "sysop",
diff --git a/special/SpecialBannerLoader.php b/special/SpecialBannerLoader.php
index 7265ef0..d015448 100644
--- a/special/SpecialBannerLoader.php
+++ b/special/SpecialBannerLoader.php
@@ -9,6 +9,9 @@
 */
const CAMPAIGN_STALENESS_LEEWAY = 900;
 
+   const MAX_CACHE_NORMAL = 0;
+   const MAX_CACHE_REDUCED = 1;
+
/** @var string Name of the chosen banner */
public $bannerName;
/** @var string Name of the campaign that the banner belongs to.*/
@@ -22,24 +25,28 @@
}
 
function execute( $par ) {
-   $this->sendHeaders();
+
$this->getOutput()->disable();
 
try {
$this->getParams();
$out = $this->getJsNotice( $this->bannerName );
+   $cacheResponse = self::MAX_CACHE_NORMAL;
 
} catch ( EmptyBannerException $e ) {
$out = "mw.centralNotice.handleBannerLoaderError( 
'Empty banner' );";
+   $cacheResponse = self::MAX_CACHE_REDUCED;
 
} catch ( Exception $e ) {
$msg = $e->getMessage();
$msgParamStr = $msg ? " '{$msg}' " : '';
$out = 
"mw.centralNotice.handleBannerLoaderError({$msgParamStr});";
+   $cacheResponse = self::MAX_CACHE_REDUCED;
 
wfDebugLog( 'CentralNotice', $msg );
}
 
+   $this->sendHeaders( $cacheResponse );
echo $out;
}
 
@@ -73,17 +80,27 @@
 
/**
 * Generate the HTTP response headers for the banner file
+* @param cacheResponse int If the response will be cached, use the 
normal
+*   cache time ($wgNoticeBannerMaxAge) or the reduced time
+*   ($wgNoticeBannerReducedMaxAge).
 */
-   function sendHeaders() {
-   global $wgJsMimeType, $wgNoticeBannerMaxAge;
+   function sendHeaders( $cacheResponse = self::MAX_CACHE_NORMAL ) {
+   global $wgJsMimeType, $wgNoticeBannerMaxAge, 
$wgNoticeBannerReducedMaxAge;
 
header( "Content-type: $wgJsMimeType; charset=utf-8" );
 
if ( !$this->getUser()->isLoggedIn() ) {
-   // Public users get cached
-   header( "Cache-Control: public, 
s-maxage={$wgNoticeBannerMaxAge}, max-age=0" );
+
+   // This header tells our front-end caches to retain the 
content for
+   // $sMaxAge seconds.
+   $sMaxAge = ( $cacheResponse === self::MAX_CACHE_NORMAL 
) ?
+   $wgNoticeBannerMaxAge : 
$wgNoticeBannerReducedMaxAge;
+
+   header( "Cache-Control: public, s-maxage={$sMaxAge}, 
max-age=0" );
} else {
-   // Private users do not (we have to emit this because 
we've disabled output)
+   // Private users do not get cached (we have to emit 
this because
+   // we've disabled output)
+   // TODO Couldn't we cache for theses users? See T149873
   

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove beta::config

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

Change subject: Remove beta::config
..


Remove beta::config

Mostly unsused, just one use which is now inline

Bug: T86644
Change-Id: I30b185a4c4046521835d91bf08ac9b7bbd0de13f
---
M modules/beta/manifests/autoupdater.pp
D modules/beta/manifests/config.pp
2 files changed, 1 insertion(+), 20 deletions(-)

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



diff --git a/modules/beta/manifests/autoupdater.pp 
b/modules/beta/manifests/autoupdater.pp
index 6d141ff..585c3d9 100644
--- a/modules/beta/manifests/autoupdater.pp
+++ b/modules/beta/manifests/autoupdater.pp
@@ -4,10 +4,9 @@
 # cluster. This is the lame way to automatically pull any code merged in master
 # branches.
 class beta::autoupdater {
-include ::beta::config
 require scap::scripts
 
-$stage_dir = $::beta::config::scap_stage_dir
+$stage_dir = '/srv/mediawiki-staging'
 
 # Parsoid JavaScript dependencies are updated on beta via npm
 package { 'npm':
diff --git a/modules/beta/manifests/config.pp b/modules/beta/manifests/config.pp
deleted file mode 100644
index 1f2466d..000
--- a/modules/beta/manifests/config.pp
+++ /dev/null
@@ -1,18 +0,0 @@
-# == Class: beta::config
-#
-# Shared configuration for beta classes
-#
-class beta::config {
-$bastion_ip = '10.68.21.205'  # IP address of deployment-tin
-
-# Networks to allow for rsync
-$rsync_networks = [
-'10.68.16.0/21',  # labs-eqiad
-]
-
-# Directory where files to be scap'ed are staged
-$scap_stage_dir = '/srv/mediawiki-staging'
-
-# Directory where scap'ed files will be placed
-$scap_deploy_dir = '/srv/mediawiki'
-}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I30b185a4c4046521835d91bf08ac9b7bbd0de13f
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...GettingStarted[master]: Remove use of deprecated "json" module

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

Change subject: Remove use of deprecated "json" module
..


Remove use of deprecated "json" module

Depends-On: I8280faf1cbcd876ead2dafae4347b7d46e3e2acb
Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e
---
M extension.json
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index 462bea0..10039b5 100644
--- a/extension.json
+++ b/extension.json
@@ -132,7 +132,6 @@
"dependencies": [
"mediawiki.action.view.postEdit",
"jquery.cookie",
-   "json",
"mediawiki.Title",
"mediawiki.user"
]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GettingStarted
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Phuedx 
Gerrit-Reviewer: Swalling 
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...UploadWizard[master]: Remove use of deprecated "json" module

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

Change subject: Remove use of deprecated "json" module
..


Remove use of deprecated "json" module

Depends-On: I8280faf1cbcd876ead2dafae4347b7d46e3e2acb
Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e
---
M extension.json
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extension.json b/extension.json
index 0733835..bdb3505 100644
--- a/extension.json
+++ b/extension.json
@@ -147,7 +147,6 @@
],
"dependencies": [
"uw.base",
-   "json",
"es5-shim",
"oojs"
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Bartosz Dziewoński 
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...UniversalLanguageSelector[master]: Remove use of deprecated "json" module

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

Change subject: Remove use of deprecated "json" module
..


Remove use of deprecated "json" module

Depends-On: I8280faf1cbcd876ead2dafae4347b7d46e3e2acb
Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e
---
M extension.json
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index b262368..f5a21e0 100644
--- a/extension.json
+++ b/extension.json
@@ -129,7 +129,6 @@
"ext.uls.geoclient": {
"scripts": "js/ext.uls.geoclient.js",
"dependencies": [
-   "json",
"mediawiki.cookie"
],
"localBasePath": "resources",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Gadgets[master]: Implement support for 'hidden' feature in MediaWikiGadgetsDe...

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

Change subject: Implement support for 'hidden' feature in 
MediaWikiGadgetsDefinitionRepo
..


Implement support for 'hidden' feature in MediaWikiGadgetsDefinitionRepo

Follows-up 152484566, which added support for it in Gadgets 2.0, but
it's easy enough to make it work in existing definitions as well.

That way, people can stop using 'rights=hidden' hacks.

Bug: T33150
Change-Id: Idd6944a9ad38279e117c1a02a4b5fd0343455ba0
---
M includes/MediaWikiGadgetsDefinitionRepo.php
M tests/phpunit/GadgetTest.php
2 files changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/includes/MediaWikiGadgetsDefinitionRepo.php 
b/includes/MediaWikiGadgetsDefinitionRepo.php
index 5539b5d..66216e0 100644
--- a/includes/MediaWikiGadgetsDefinitionRepo.php
+++ b/includes/MediaWikiGadgetsDefinitionRepo.php
@@ -202,6 +202,9 @@
case 'rights':
$info['requiredRights'] = $params;
break;
+   case 'hidden':
+   $info['hidden'] = true;
+   break;
case 'skins':
$info['requiredSkins'] = $params;
break;
diff --git a/tests/phpunit/GadgetTest.php b/tests/phpunit/GadgetTest.php
index ddc8a7e..6643e9b 100644
--- a/tests/phpunit/GadgetTest.php
+++ b/tests/phpunit/GadgetTest.php
@@ -130,6 +130,17 @@
$this->assertEquals( $mType, $this->getModule( $g )->getType(), 
"Module: $message" );
}
 
+   public function testIsHidden() {
+   $g = $this->create( '* foo[hidden]|bar.js' );
+   $this->assertTrue( $g->isHidden() );
+
+   $g = $this->create( '* foo[ResourceLoader|hidden]|bar.js' );
+   $this->assertTrue( $g->isHidden() );
+
+   $g = $this->create( '* foo[ResourceLoader]|bar.js' );
+   $this->assertFalse( $g->isHidden() );
+   }
+
public function testPreferences() {
$prefs = array();
$repo = TestingAccessWrapper::newFromObject( new 
MediaWikiGadgetsDefinitionRepo() );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idd6944a9ad38279e117c1a02a4b5fd0343455ba0
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Helder.wiki 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MaxSem 
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...CentralNotice[master]: Remove use of deprecated "json" module

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

Change subject: Remove use of deprecated "json" module
..


Remove use of deprecated "json" module

Depends-On: I8280faf1cbcd876ead2dafae4347b7d46e3e2acb
Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e
---
M extension.json
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/extension.json b/extension.json
index 553a463..b69c585 100644
--- a/extension.json
+++ b/extension.json
@@ -116,8 +116,7 @@
"ext.centralNotice.adminUi": {
"dependencies": [
"jquery.ui.datepicker",
-   "jquery.ui.multiselect",
-   "json"
+   "jquery.ui.multiselect"
],
"scripts": "infrastructure/centralnotice.js",
"styles": [
@@ -263,7 +262,6 @@
"ext.centralNotice.geoIP",
"ext.centralNotice.kvStore",
"jquery.cookie",
-   "json",
"mediawiki.Uri"
],
"targets": [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
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...EventLogging[master]: Remove use of deprecated "json" module

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

Change subject: Remove use of deprecated "json" module
..


Remove use of deprecated "json" module

Depends-On: I8280faf1cbcd876ead2dafae4347b7d46e3e2acb
Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e
---
M extension.json
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index 8507d9a..e43a6a6 100644
--- a/extension.json
+++ b/extension.json
@@ -69,7 +69,6 @@
"modules/ext.eventLogging.debug.js"
],
"dependencies": [
-   "json",
"ext.eventLogging.subscriber",
"user.options"
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove JSON polyfill, deprecate 'json' module

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

Change subject: Remove JSON polyfill, deprecate 'json' module
..


Remove JSON polyfill, deprecate 'json' module

All A-graded browsers now supports JSON so skip the
JSON polyfill. Krinkle investigated the current
status for 3 months on Wikimedia traffic (T141344#2784065)
with support being nearly 100%.

Bug: T141344
Change-Id: I8280faf1cbcd876ead2dafae4347b7d46e3e2acb
---
M Gruntfile.js
M resources/Resources.php
D resources/lib/json2/json2.js
D resources/src/json-skip.js
M resources/src/startup.js
5 files changed, 11 insertions(+), 533 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
index b38bc9a..f35d3b2 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -33,7 +33,6 @@
// Skip functions aren't even parseable
'!resources/src/dom-level2-skip.js',
'!resources/src/es5-skip.js',
-   '!resources/src/json-skip.js',
'!resources/src/mediawiki.hidpi-skip.js'
]
},
diff --git a/resources/Resources.php b/resources/Resources.php
index e619771..3cf5ed5 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -334,7 +334,6 @@
'message' => 'Please use "mediawiki.storage" instead.',
],
'scripts' => 'resources/lib/jquery/jquery.jStorage.js',
-   'dependencies' => 'json',
],
'jquery.suggestions' => [
'scripts' => 'resources/src/jquery/jquery.suggestions.js',
@@ -738,10 +737,10 @@
 
/* json2 */
 
+   // Deprecated since MediaWiki 1.29.0
'json' => [
-   'scripts' => 'resources/lib/json2/json2.js',
+   'deprecated' => 'Use of the "json" MediaWiki module is 
deprecated since MediaWiki 1.29.0',
'targets' => [ 'desktop', 'mobile' ],
-   'skipFunction' => 'resources/src/json-skip.js',
],
 
/* Moment.js */
@@ -926,7 +925,6 @@
'dom-level2-shim',
'mediawiki.api',
'mediawiki.api.edit',
-   'json',
],
'targets' => [ 'desktop', 'mobile' ],
],
@@ -1109,7 +1107,6 @@
'dependencies' => [
'jquery.byteLength',
'mediawiki.RegExp',
-   'json',
],
'targets' => [ 'desktop', 'mobile' ],
],
@@ -2353,7 +2350,6 @@
'targets' => [ 'desktop', 'mobile' ],
'dependencies' => [
'es5-shim',
-   'json',
],
],
 
diff --git a/resources/lib/json2/json2.js b/resources/lib/json2/json2.js
deleted file mode 100644
index 5838457..000
--- a/resources/lib/json2/json2.js
+++ /dev/null
@@ -1,519 +0,0 @@
-/*
-json2.js
-2015-05-03
-
-Public Domain.
-
-NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
-
-See http://www.JSON.org/js.html
-
-
-This code should be minified before deployment.
-See http://javascript.crockford.com/jsmin.html
-
-USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
-NOT CONTROL.
-
-
-This file creates a global JSON object containing two methods: stringify
-and parse. This file is provides the ES5 JSON capability to ES3 systems.
-If a project might run on IE8 or earlier, then this file should be 
included.
-This file does nothing on ES5 systems.
-
-JSON.stringify(value, replacer, space)
-value   any JavaScript value, usually an object or array.
-
-replaceran optional parameter that determines how object
-values are stringified for objects. It can be a
-function or an array of strings.
-
-space   an optional parameter that specifies the indentation
-of nested structures. If it is omitted, the text will
-be packed without extra whitespace. If it is a number,
-it will specify the number of spaces to indent at each
-level. If it is a string (such as '\t' or ''),
-it contains the characters used to indent at each 
level.
-
-This method produces a JSON text from a JavaScript value.
-
-When an object value is found, if the object contains a toJSON
-method, its toJSON method will be called and the result will be
-stringified. A toJSON method does not serialize: it returns the
-value represented 

[MediaWiki-commits] [Gerrit] mediawiki...NavigationTiming[master]: Remove use of deprecated "json" module

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

Change subject: Remove use of deprecated "json" module
..


Remove use of deprecated "json" module

Depends-On: I8280faf1cbcd876ead2dafae4347b7d46e3e2acb
Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e
---
M extension.json
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index 512e8c3..11db92e 100644
--- a/extension.json
+++ b/extension.json
@@ -26,7 +26,6 @@
"dependencies": [
"schema.NavigationTiming",
"schema.SaveTiming",
-   "json",
"jquery.cookie"
],
"targets": [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I02242885ef98ad4fb008dac623518b4d4f4b922e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/NavigationTiming
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[wmf/1.29.0-wmf.3]: visibilitychange: Remove tracking

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

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

Change subject: visibilitychange: Remove tracking
..

visibilitychange: Remove tracking

Follows-up b20df90. Research for T146510 is concluded.
See also 9532593ec in mediawiki/extensions/NavigationTiming.

Change-Id: Ieb25fb329e4dd20e716eff9fcf202afd6196e5a6
(cherry picked from commit f24304ed11af5c2423f81853fc2834f9bbd3a1f5)
---
M extension.json
D modules/ext.wikimediaEvents.visibilitychange.js
2 files changed, 0 insertions(+), 81 deletions(-)


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

diff --git a/extension.json b/extension.json
index ec2551b..a33d0b1 100644
--- a/extension.json
+++ b/extension.json
@@ -132,7 +132,6 @@
"ext.wikimediaEvents.statsd.js",
"ext.wikimediaEvents.kartographer.js",
"ext.wikimediaEvents.rlfeature.js",
-   "ext.wikimediaEvents.visibilitychange.js",
"ext.wikimediaEvents.searchSatisfaction.js",
"ext.wikimediaEvents.geoFeatures.js"
],
diff --git a/modules/ext.wikimediaEvents.visibilitychange.js 
b/modules/ext.wikimediaEvents.visibilitychange.js
deleted file mode 100644
index 8378a4d..000
--- a/modules/ext.wikimediaEvents.visibilitychange.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*!
- * Track hiding and showing of pages to help investigate performance 
regressions
- * that may be the result of the browser intentionally lowering the load 
priority
- * of a page that is  in a background tab or hidden window.
- *
- * - All page loads in the sample will record one of 'supported' or 
'unsupported'.
- * - A subset of 'supported' may also record 'vendor' and/or 'hidden'.
- * - Each event will only be recorded at most once from a single page view.
- * - 'hidden' is recorded if document.hidden was true at any point before
- *   window.onload and mwLoadEnd. Once these are both done, visibility changes
- *   are ignored.
- *
- * Inspiration:
- * - https://github.com/SOASTA/boomerang/blob/d49b90d6d1/boomerang.js
- * - https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
- *
- * Supported browsers per MDN:
- * - Chrome 13+
- * - Firefox 18+
- * - MSIE 10
- * - Opera 12.10
- * - Safari 7+
- */
-( function ( mw ) {
-   var hidden, vendor, eventName, mwLoadEnd,
-   tracked = {};
-
-   function trackOnce( state ) {
-   if ( tracked[ state ] !== true ) {
-   tracked[ state ] = true;
-   mw.track( 'counter.mw.js.visibility.' + state, 1 );
-   }
-
-   }
-
-   function changeHandler() {
-   if ( !( mwLoadEnd && document.readyState === 'complete' ) ) {
-   trackOnce( 'hidden' );
-   }
-   }
-
-   // Filter: Sample 1 in 1000 page views
-   if ( !mw.eventLog.inSample( 1000 ) ) {
-   return;
-   }
-
-   if ( typeof document.hidden !== 'undefined' ) {
-   hidden = 'hidden';
-   eventName = 'visibilitychange';
-   } else if ( typeof document.mozHidden !== 'undefined' ) {
-   hidden = 'mozHidden';
-   eventName = 'mozvisibilitychange';
-   vendor = true;
-   } else if ( typeof document.msHidden !== 'undefined' ) {
-   hidden = 'msHidden';
-   eventName = 'msvisibilitychange';
-   vendor = true;
-   } else if ( typeof document.webkitHidden !== 'undefined' ) {
-   hidden = 'webkitHidden';
-   eventName = 'webkitvisibilitychange';
-   vendor = true;
-   } else {
-   trackOnce( 'unsupported' );
-   return;
-   }
-
-   document.addEventListener( eventName, changeHandler, false );
-   // Initial value
-   if ( document[ hidden ] === true ) {
-   trackOnce( 'hidden' );
-   }
-   trackOnce( 'supported' );
-   if ( vendor ) {
-   trackOnce( 'vendor' );
-   }
-   mw.hook( 'resourceloader.loadEnd' ).add( function () {
-   mwLoadEnd = true;
-   } );
-
-}( mediaWiki ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb25fb329e4dd20e716eff9fcf202afd6196e5a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: wmf/1.29.0-wmf.3
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: CODFW: Add partman entries for prometheus200[3-4] Bug: T151338

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

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

Change subject: CODFW: Add partman entries for prometheus200[3-4] Bug: T151338
..

CODFW: Add partman entries for prometheus200[3-4]
Bug: T151338

Change-Id: I127f0e20f0a665ec0bb618f162e43323cac24d9b
---
M modules/install_server/files/autoinstall/netboot.cfg
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/14/323114/1

diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index ccd17fd..10e253d 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -129,6 +129,7 @@
 poolcounter1001) echo partman/flat.cfg virtual.cfg ;; \
 poolcounter1002) echo partman/raid1-lvm-ext4-srv.cfg ;; \
 prometheus[12]00[12]) echo partman/lvm-ext-srv.cfg virtual.cfg;; \
+prometheus200[3-4]) echo partman/prometheus.cfg;; \
 puppetmaster[12]00[1-2]) echo partman/raid1-lvm.cfg;;\
 pybal-test200[1-3]) echo partman/flat.cfg virtual.cfg;; \
 rdb100[1-6]) echo partman/mw.cfg ;; \

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Include ::openstack in the common role

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

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

Change subject: Include ::openstack in the common role
..

Include ::openstack in the common role

That should get openstack::version in scope

Change-Id: I5ae7b13c3ecd33ed50dec8f8003f0664964f7903
---
M modules/role/manifests/labs/openstack/nova/common.pp
1 file changed, 2 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/13/323113/1

diff --git a/modules/role/manifests/labs/openstack/nova/common.pp 
b/modules/role/manifests/labs/openstack/nova/common.pp
index 276c0ad..40f8560 100644
--- a/modules/role/manifests/labs/openstack/nova/common.pp
+++ b/modules/role/manifests/labs/openstack/nova/common.pp
@@ -1,6 +1,8 @@
 class role::labs::openstack::nova::common {
 
+include ::openstack
 include passwords::misc::scripts
+include ::openstack::nova::hooks
 
 $novaconfig_pre   = hiera_hash('novaconfig', {})
 $keystoneconfig   = hiera_hash('keystoneconfig', {})
@@ -27,11 +29,6 @@
 class { '::openstack::common':
 novaconfig   => $novaconfig,
 wikitechstatusconfig => $wikitechstatusconfig,
-openstack_version=> hiera('openstack::version'),
-}
-
-class { '::openstack::nova::hooks':
-openstack_version => hiera('openstack::version'),
 }
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Consistency tweaks in preparation for translatewiki

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

Change subject: Consistency tweaks in preparation for translatewiki
..


Consistency tweaks in preparation for translatewiki

* Shorten description message
* Change desc message key to default

Change-Id: I875448215a478eb8e287b0b5366783c7b7d97ab8
---
M extension.json
M i18n/en.json
M i18n/qqq.json
3 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/extension.json b/extension.json
index 8598f8e..17194ca 100644
--- a/extension.json
+++ b/extension.json
@@ -5,7 +5,7 @@
"The Wikidata team"
],
"url": "https://www.mediawiki.org/wiki/Extension:WikibaseLexeme;,
-   "descriptionmsg": "wikibase-lexeme-desc",
+   "descriptionmsg": "wikibaselexeme-desc",
"license-name": "GPL-2.0+",
"type": "Wikibase",
"load_composer_autoloader": true,
diff --git a/i18n/en.json b/i18n/en.json
index 2f800f8..7feb549 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -2,7 +2,7 @@
"@metadata": {
"authors": []
},
-   "wikibase-lexeme-desc": "Extension to handle lexeme entity type.",
+   "wikibaselexeme-desc": "Handle lexeme entity type",
"special-newlexeme": "Create a new lexeme",
"wikibase-newlexeme-fieldset": "Create a new lexeme",
"wikibase-newentity-lemma": "Lemma",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index cc71c35..0e91556 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -2,7 +2,7 @@
"@metadata": {
"authors": []
},
-   "wikibase-lexeme-desc": 
"{{desc|name=WikibaseLexeme|url=https://www.mediawiki.org/wiki/Extension:WikibaseLexeme}};,
+   "wikibaselexeme-desc": 
"{{desc|name=WikibaseLexeme|url=https://www.mediawiki.org/wiki/Extension:WikibaseLexeme}};,
"special-newlexeme": "Title of Special:NewLexeme",
"wikibase-newlexeme-fieldset": "Title of the form in Special:NewLexeme",
"wikibase-newentity-lemma": "Name for \"Lemma\"",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I875448215a478eb8e287b0b5366783c7b7d97ab8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: WMDE-leszek 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: CODFW: ADD DHCP entries for prometheus200[3-4] Bug: T151338

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

Change subject: CODFW: ADD DHCP entries for prometheus200[3-4] Bug: T151338
..


CODFW: ADD DHCP entries for prometheus200[3-4]
Bug: T151338

Change-Id: I223b9f91df3f3369f1683b9cd4ed25318c177d4a
---
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
1 file changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index c8968b9..b4e76df 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -5631,6 +5631,16 @@
 fixed-address praseodymium.eqiad.wmnet;
 }
 
+host prometheus2003 {
+hardware ethernet 18:66:DA:7F:19:80;
+fixed-address prometheus2003.codfw.wmnet;
+}
+
+host prometheus2004 {
+hardware ethernet 18:66:DA:7F:20:93;
+fixed-address prometheus2004.codfw.wmnet;
+}
+
 host promethium {
 hardware ethernet 90:B1:1C:2D:6F:0C;
 fixed-address promethium.eqiad.wmflabs;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I223b9f91df3f3369f1683b9cd4ed25318c177d4a
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Papaul 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: actions: Fix typo in ViewAction.php doc comment

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

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

Change subject: actions: Fix typo in ViewAction.php doc comment
..

actions: Fix typo in ViewAction.php doc comment

Change-Id: I26a48db06ea18b1c04a0aadc7cfe86b40af8f4b3
---
M includes/actions/ViewAction.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/12/323112/1

diff --git a/includes/actions/ViewAction.php b/includes/actions/ViewAction.php
index 4a7f623..0ba964f 100644
--- a/includes/actions/ViewAction.php
+++ b/includes/actions/ViewAction.php
@@ -26,7 +26,7 @@
 /**
  * An action that views article content
  *
- * This is a wrapper that will call Article::render().
+ * This is a wrapper that will call Article::view().
  *
  * @ingroup Actions
  */

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Use 'exception' channel in logstash, kill 'exception-json'

2016-11-22 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Use 'exception' channel in logstash, kill 'exception-json'
..

Use 'exception' channel in logstash, kill 'exception-json'

Bug: T136849
Change-Id: I36b73528ca66da5138e7ac7110ab4505a466
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 523dde3..ec465f8 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -4564,8 +4564,7 @@
'es-hit' => 'debug',
'EventBus' => [ 'logstash' => false ], // T150106, temporarily 
disable to logstash (bd808)
'EventLogging' => 'debug',
-   'exception' => [ 'logstash' => false ],
-   'exception-json' => 'debug',
+   'exception' => 'debug',
'exec' => 'debug',
'ExternalStoreDB' => 'debug',
'fatal' => 'debug',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I36b73528ca66da5138e7ac7110ab4505a466
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: install_server: add prometheus partman

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

Change subject: install_server: add prometheus partman
..


install_server: add prometheus partman

Inspired by graphite-dmcache.cfg

Bug: T151338
Change-Id: I047b122910ed3632d8389626c9fcc092807f14da
---
A modules/install_server/files/autoinstall/partman/prometheus.cfg
1 file changed, 88 insertions(+), 0 deletions(-)

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



diff --git a/modules/install_server/files/autoinstall/partman/prometheus.cfg 
b/modules/install_server/files/autoinstall/partman/prometheus.cfg
new file mode 100644
index 000..1aab662
--- /dev/null
+++ b/modules/install_server/files/autoinstall/partman/prometheus.cfg
@@ -0,0 +1,88 @@
+# use LVM and dm-cache to speed up read/write to spinning HDDs
+
+# expected hardware:
+# * /dev/sda: SSD raid1
+# * /dev/sdb: spinning raid10
+
+# * layout:
+#   - /boot: ext4 on ssd, no lvm
+#   - sdb: single partition to host one PV
+#   - two VGs: vg-data (PV: sda+sdb) and vg-sys (PV: sda)
+#   - swap: vg-sys 1GB
+#   - /: vg-sys 40GB
+
+d-ipartman-auto/method string  lvm
+d-ipartman-md/device_remove_md boolean true
+d-ipartman-lvm/device_remove_lvm   boolean true
+
+# order is important, if not specified partitions get created on the first disk
+d-ipartman-auto/disk   string  /dev/sda /dev/sdb
+
+d-ipartman-auto/choose_recipe  lvm
+
+# Define physical partitions:
+# regular partitions and partitions used in VGs first
+# then LVs
+d-ipartman-auto/expert_recipe  string  \
+   lvm ::  \
+   100 300 100 ext4\
+   $primary{ } \
+   $bootable{ }\
+   method{ format }\
+   format{ }   \
+   use_filesystem{ }   \
+   filesystem{ ext4 }  \
+   mountpoint{ /boot } \
+   device{ /dev/sda }  \
+   .   \
+   4 4 4 ext4  \
+   $defaultignore{ }   \
+   $primary{ } \
+   method{ lvm }   \
+   device{ /dev/sda }  \
+   vg_name{ vg-sys }   \
+   .   \
+   10 30 10 ext4   \
+   $primary{ } \
+   $defaultignore{ }   \
+   method{ keep }  \
+   device{ /dev/sda }  \
+   .   \
+   50 300 -1 ext4  \
+   $defaultignore{ }   \
+   $primary{ } \
+   method{ lvm }   \
+   device{ /dev/sdb }  \
+   vg_name{ vg-data }  \
+   .   \
+   1000 1000 1000 linux-swap   \
+   method{ swap }  \
+   $lvmok{ }   \
+   format{ }   \
+   in_vg{ vg-sys } \
+   lv_name{ swap } \
+   .   \
+   4 4 4 ext4  \
+   $lvmok{ }   \
+   method{ format }\
+   format{ }   \
+   use_filesystem{ }   \
+   filesystem{ ext4 }  \
+   mountpoint{ / } \
+   in_vg{ vg-sys } \
+   lv_name{ root } \
+   .
+
+d-ipartman-md/confirm  boolean true
+d-ipartman-md/confirm_nooverwrite  boolean true
+d-ipartman/confirm_write_new_label boolean true
+d-ipartman/choose_partitionselect  finish
+d-ipartman/confirm boolean true
+d-ipartman/confirm_nooverwrite boolean true
+
+d-ipartman-auto-lvm/guided_sizestring  80%
+d-ipartman-lvm/confirm boolean true
+d-ipartman-lvm/confirm_nooverwrite boolean true
+
+# do not prompt for 'no filesystem on partition'
+d-ipartman-basicmethods/method_onlyboolean false

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I047b122910ed3632d8389626c9fcc092807f14da
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi 

[MediaWiki-commits] [Gerrit] operations/dns[master]: CODFW: Add prod DNS for prometheus200[3-4] Bug: T151338

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

Change subject: CODFW: Add prod DNS for prometheus200[3-4] Bug: T151338
..


CODFW: Add prod DNS for prometheus200[3-4]
Bug: T151338

Change-Id: I631f65fe2fc98d2373a326cedf22f86cc0126dde
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 8273539..f69472d 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -2571,6 +2571,7 @@
 142 1H IN PTR   es2017.codfw.wmnet.
 143 1H IN PTR   conf2001.codfw.wmnet.
 144 1H IN PTR   maps2001.codfw.wmnet.
+145 1H IN PTR   prometheus2003.codfw.wmnet.
 
 $ORIGIN 1.192.{{ zonename }}.
 1   1H IN PTR   lvs2001.codfw.wmnet.
@@ -2777,6 +2778,7 @@
 186 1H IN PTR   restbase2010-a.codfw.wmnet.
 187 1H IN PTR   restbase2010-b.codfw.wmnet.
 188 1H IN PTR   restbase2010-c.codfw.wmnet.
+189 1H IN PTR   prometheus2004.codfw.wmnet.
 
 $ORIGIN 17.192.{{ zonename }}.
 1   1H IN PTR   vl2018-eth1.lvs2001.codfw.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index 77bbd0c..8a9ede5 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -2619,6 +2619,8 @@
 1H  IN  2620:0:860:102:10:192:16:181
 prometheus2002  1H  IN A10.192.16.182 ; VM on the ganeti01.svc.codfw.wmnet 
cluster
 1H  IN  2620:0:860:102:10:192:16:182
+prometheus2003   1H IN A10.192.0.145
+prometheus2004   1H IN A10.192.16.189
 puppetmaster2001 1H IN A10.192.0.27
 puppetmaster2001 1H IN  2620:0:860:101:10:192:0:27
 puppetmaster2002 1H IN A10.192.48.66

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I631f65fe2fc98d2373a326cedf22f86cc0126dde
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Papaul 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Add "Lowest" ORES sensitivity

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

Change subject: Add "Lowest" ORES sensitivity
..


Add "Lowest" ORES sensitivity

Bug: T150224
Change-Id: I9c344429736acd2009510542e3ffd5ed56366b5c
---
M extension.json
M i18n/en.json
M i18n/qqq.json
3 files changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extension.json b/extension.json
index 9a20026..71419d5 100644
--- a/extension.json
+++ b/extension.json
@@ -140,6 +140,7 @@
}
},
"OresDamagingThresholds": {
+   "softest": 0.90,
"soft": 0.70,
"hard": 0.50
},
diff --git a/i18n/en.json b/i18n/en.json
index 0684de4..97d7906 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -9,6 +9,7 @@
"ores-damaging-hard": "High (flags more edits)",
"ores-damaging-letter": "r",
"ores-damaging-soft": "Low (flags fewer edits)",
+   "ores-damaging-softest": "Lowest (flags least edits possible)",
"ores-damaging-title": "This edit needs review",
"ores-damaging-legend": "This edit may be damaging and should be 
reviewed ([[:mw:Special:MyLanguage/ORES review tool|more info]])",
"ores-help-damaging-pref": "This threshold determines how sensitive 
ORES is when flagging edits needing review",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 15ca1ad..7ccb230 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -9,9 +9,10 @@
"ores-beta-feature-message": "Title of ORES section in beta features 
page.",
"ores-desc": "Extension summary.",
"ores-damaging-filter": "Label to toggle filtering on ORES data. 
Parameters:\n* $1 - Action to be performed by toggling. Can be either 'show' or 
'hide'.",
-   "ores-damaging-hard": "Name of \"Hard\" threshold\n\nBasically, when 
you set a threshold too soft, you give it a high number, so less edits will be 
flagged for review but the chance of them being vandalism is higher. On the 
other hand, when you set it too hard, it flags more edits. So you might catch 
all vandalism, but proportion of vandalism would be less, and you see more 
false positives (edits that are flagged for review but are completely okay).",
+   "ores-damaging-hard": "Name of \"Hard\" threshold\n\nBasically, when 
you set a threshold to soft, you give it a high number, so less edits will be 
flagged for review but the chance of them being vandalism is higher. On the 
other hand, when you set it to hard, it flags more edits. So you might catch 
all vandalism, but proportion of vandalism would be less, and you see more 
false positives (edits that are flagged for review but are completely okay). By 
using softest sensitivity, you only see edits that are very likely to be 
vandalism.",
"ores-damaging-letter": "Single letter for tagging possibly damaging 
recent changes.",
-   "ores-damaging-soft": "Name of \"Soft\" threshold\n\nBasically, when 
you set a threshold too soft, you give it a high number, so less edits will be 
flagged for review but the chance of them being vandalism is higher. On the 
other hand, when you set it too hard, it flags more edits. So you might catch 
all vandalism, but proportion of vandalism would be less, and you see more 
false positives (edits that are flagged for review but they are completely 
okay).",
+   "ores-damaging-soft": "Name of \"Soft\" threshold\n\nBasically, when 
you set a threshold to soft, you give it a high number, so less edits will be 
flagged for review but the chance of them being vandalism is higher. On the 
other hand, when you set it to hard, it flags more edits. So you might catch 
all vandalism, but proportion of vandalism would be less, and you see more 
false positives (edits that are flagged for review but they are completely 
okay). By using softest sensitivity, you only see edits that are very likely to 
be vandalism.",
+   "ores-damaging-softest": "Name of \"Softest\" threshold\n\nBasically, 
when you set a threshold to soft, you give it a high number, so less edits will 
be flagged for review but the chance of them being vandalism is higher. On the 
other hand, when you set it to hard, it flags more edits. So you might catch 
all vandalism, but proportion of vandalism would be less, and you see more 
false positives (edits that are flagged for review but they are completely 
okay). By using softest sensitivity, you only see edits that are very likely to 
be vandalism.",
"ores-damaging-title": "Tooltip for damaging risk icon.",
"ores-damaging-legend": "Legend for damaging risk icon.",
"ores-help-damaging-pref": "Help text for \"ORES sensitivity\" in 
preferences",

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Crappy workaround for zip / postal_code mismatch

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

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

Change subject: Crappy workaround for zip / postal_code mismatch
..

Crappy workaround for zip / postal_code mismatch

We really should change the underlying data field name to postal_code
(see https://gerrit.wikimedia.org/r/320267) but that seems too scary
to do right before Big English starts.

Bug: T151416
Change-Id: I1a6767b19ea78458bf41dcace3c6e5b62b46e02b
---
M modules/validate_input.js
1 file changed, 10 insertions(+), 2 deletions(-)


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

diff --git a/modules/validate_input.js b/modules/validate_input.js
index 9ad39a3..adc7860 100644
--- a/modules/validate_input.js
+++ b/modules/validate_input.js
@@ -81,7 +81,7 @@
 
function clearError( field ) {
$( '#' + field ).removeClass( 'errorHighlight' );
-   $( '#' + field + 'Msg' )
+   $( terribleErrorMessageIdWorkaround( field ) )
.removeClass( 'errorMsg' )
.addClass( 'errorMsgHide' );
}
@@ -89,12 +89,20 @@
function setError( field, message ) {
errorsPresent = true;
$( '#' + field ).addClass( 'errorHighlight' );
-   $( '#' + field + 'Msg' )
+   $( terribleErrorMessageIdWorkaround( field ) )
.removeClass( 'errorMsgHide' )
.addClass( 'errorMsg' )
.text( message );
}
 
+   // FIXME: Tear this band-aid off and finish 
https://gerrit.wikimedia.org/r/320267
+   function terribleErrorMessageIdWorkaround( fieldKey ) {
+   if ( fieldKey === 'zip' ) {
+   fieldKey = 'postal_code'
+   }
+   return '#' + fieldKey + 'Msg';
+   }
+
function isEmpty( field, value ) {
return !$.trim( value ) ||
value === mediaWiki.msg( 'donate_interface-donor-' + 
field );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a6767b19ea78458bf41dcace3c6e5b62b46e02b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: varnish: remove chash director leftovers

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

Change subject: varnish: remove chash director leftovers
..


varnish: remove chash director leftovers

Bug: T150660
Change-Id: I9b04b8c15707802d283a8402289d5f33d104c224
---
M modules/varnish/templates/vcl/directors.vcl.tpl.erb
M modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
2 files changed, 2 insertions(+), 34 deletions(-)

Approvals:
  Ema: Looks good to me, but someone else must approve
  BBlack: Verified; Looks good to me, approved



diff --git a/modules/varnish/templates/vcl/directors.vcl.tpl.erb 
b/modules/varnish/templates/vcl/directors.vcl.tpl.erb
index 4b90524..feadcdf 100644
--- a/modules/varnish/templates/vcl/directors.vcl.tpl.erb
+++ b/modules/varnish/templates/vcl/directors.vcl.tpl.erb
@@ -1,16 +1,3 @@
-<%
-# Calculates number of director-level retries necessary for chash to hit all
-# "n" backends with probability percentage "p", given they're randomly-mixed
-# into an array considerably larger in size than "n".  This is an
-# overestimation in that it assumes an infinite array, but the values still
-# come out reasonably small compared to doing anything based on our actual
-# weight*num_backends.
-# Blame _joe_ for the math! :)
-def chash_def_retries(p, n)
-return n if n == 1
-   return ((Math.log10(100 - p) - 2) / (Math.log10(n - 1) - 
Math.log10(n))).ceil
-end
--%>
 
 <% @directors.keys.sort.each do |director_name|
 director = @directors[director_name]
diff --git a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
index b00eea1..ec72982 100644
--- a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
@@ -22,22 +22,6 @@
 
 include "errorpage.inc.vcl";
 
-<%
-# Calculates number of director-level retries necessary for chash to hit all
-# "n" backends with probability percentage "p", given they're randomly-mixed
-# into an array considerably larger in size than "n".  This is an
-# overestimation in that it assumes an infinite array, but the values still
-# come out reasonably small compared to doing anything based on our actual
-# weight*num_backends.
-# Blame _joe_ for the math! :)
-def chash_def_retries(p, n)
-   x = n - 1
-   if (x <= 0)
-   return n
-   end
-   return ((Math.log10(100 - p) - 2) / (Math.log10(x) - 
Math.log10(n))).ceil
-end
--%>
 
 # ACLs
 
@@ -92,7 +76,7 @@
 # @varnish_directors = {
 # 'director name' => {
 # 'dynamic'  => 'yes', # or 'no', required
-# 'type' => 'chash', # required
+# 'type' => 'vslp', # required
 # 'dc'   => 'eqiad', # required if dynamic==yes
 # 'service'  => 'foo',   # required if dynamic==yes
 # 'backends' => [ "backend1", "backend2" ], # required: array or 
single value
@@ -111,7 +95,7 @@
 # the director name into the backend host's "backend" name as well, but so far
 # we have no cases where this is necessary! (whereas we do have cases of
 # duplicate backend hosts where the options are always identical, for
-# chashed-vs-random cache backends)
+# vslp-vs-random cache backends)
 #
 
 # Puppet-generated the Backend host definitions, regardless of 'dynamic'
@@ -163,9 +147,6 @@
 <% else -%>
 new <%= director_name %> = directors.<%= director['type'] %>();
 <% end %>
-<% if director['type'] == 'chash' -%>
-   .retries = <%= chash_def_retries(99, backends.size) %>;
-<% end -%>
 <%
backends.each do |backend|
name = 'be_' + backend.gsub(/[-.]/, '_')

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

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

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


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

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

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

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

Update VE core submodule to master (f4d2cd2)

New changes:
d68bd23 DiffDialog: Use surface dialog manager for diff window
d68fe24 VisualDiff: Replace whitespace detection with wordbreak detection
dd65a44 VisualDiffs: Only show unchanged content adjacent to changed content
7f70f64 Fix some edge cases with adding classes to nodes in diff
f4d2cd2 Follow-up d68bd23: No need to list ve.ui.DiffDialog twice in 
modules.json

Change-Id: I6f46f3d14ad81e4efdde0c970a3102e577b12772
---
M lib/ve
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/lib/ve b/lib/ve
index 0ef16f0..f4d2cd2 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit 0ef16f0a88e01aa6cab5d2953368cabf6fce383f
+Subproject commit f4d2cd2465aca0f8f166454e797993e8b1331900

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: One more explicit lookup for openstack_version

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

Change subject: One more explicit lookup for openstack_version
..


One more explicit lookup for openstack_version

Change-Id: Ic52bb82ce977b52e8d528ac20e5a5b52dc53c955
---
M modules/role/manifests/labs/openstack/nova/common.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/role/manifests/labs/openstack/nova/common.pp 
b/modules/role/manifests/labs/openstack/nova/common.pp
index 9b96603..276c0ad 100644
--- a/modules/role/manifests/labs/openstack/nova/common.pp
+++ b/modules/role/manifests/labs/openstack/nova/common.pp
@@ -27,6 +27,7 @@
 class { '::openstack::common':
 novaconfig   => $novaconfig,
 wikitechstatusconfig => $wikitechstatusconfig,
+openstack_version=> hiera('openstack::version'),
 }
 
 class { '::openstack::nova::hooks':

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: CODFW: ADD DHCP entries for prometheus200[3-4] Bug: T151338

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

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

Change subject: CODFW: ADD DHCP entries for prometheus200[3-4] Bug: T151338
..

CODFW: ADD DHCP entries for prometheus200[3-4]
Bug: T151338

Change-Id: I223b9f91df3f3369f1683b9cd4ed25318c177d4a
---
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/08/323108/1

diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index c8968b9..b4e76df 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -5631,6 +5631,16 @@
 fixed-address praseodymium.eqiad.wmnet;
 }
 
+host prometheus2003 {
+hardware ethernet 18:66:DA:7F:19:80;
+fixed-address prometheus2003.codfw.wmnet;
+}
+
+host prometheus2004 {
+hardware ethernet 18:66:DA:7F:20:93;
+fixed-address prometheus2004.codfw.wmnet;
+}
+
 host promethium {
 hardware ethernet 90:B1:1C:2D:6F:0C;
 fixed-address promethium.eqiad.wmflabs;

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Follow-up d68bd23: No need to list ve.ui.DiffDialog twice in...

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

Change subject: Follow-up d68bd23: No need to list ve.ui.DiffDialog twice in 
modules.json
..


Follow-up d68bd23: No need to list ve.ui.DiffDialog twice in modules.json

Change-Id: I41d147c7e2759e4180d83e4ebdef3a714a6501a5
---
M build/modules.json
M demos/ve/desktop.html
M demos/ve/mobile.html
M tests/index.html
4 files changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/build/modules.json b/build/modules.json
index 08b3e84..d50d6ba 100644
--- a/build/modules.json
+++ b/build/modules.json
@@ -491,7 +491,6 @@
"src/ui/dialogs/ve.ui.NodeDialog.js",
"src/ui/dialogs/ve.ui.ToolbarDialog.js",
"src/ui/dialogs/ve.ui.CommandHelpDialog.js",
-   "src/ui/dialogs/ve.ui.DiffDialog.js",
"src/ui/dialogs/ve.ui.FindAndReplaceDialog.js",
"src/ui/dialogs/ve.ui.ProgressDialog.js",
"src/ui/dialogs/ve.ui.SpecialCharacterDialog.js",
diff --git a/demos/ve/desktop.html b/demos/ve/desktop.html
index 68ac975..7b88b5d 100644
--- a/demos/ve/desktop.html
+++ b/demos/ve/desktop.html
@@ -438,7 +438,6 @@



-   



diff --git a/demos/ve/mobile.html b/demos/ve/mobile.html
index 7c3e972..4168a23 100644
--- a/demos/ve/mobile.html
+++ b/demos/ve/mobile.html
@@ -436,7 +436,6 @@



-   



diff --git a/tests/index.html b/tests/index.html
index d30a649..bbc90f8 100644
--- a/tests/index.html
+++ b/tests/index.html
@@ -358,7 +358,6 @@



-   




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I41d147c7e2759e4180d83e4ebdef3a714a6501a5
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: One more explicit lookup for openstack_version

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

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

Change subject: One more explicit lookup for openstack_version
..

One more explicit lookup for openstack_version

Change-Id: Ic52bb82ce977b52e8d528ac20e5a5b52dc53c955
---
M modules/role/manifests/labs/openstack/nova/common.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/07/323107/1

diff --git a/modules/role/manifests/labs/openstack/nova/common.pp 
b/modules/role/manifests/labs/openstack/nova/common.pp
index 9b96603..0472244 100644
--- a/modules/role/manifests/labs/openstack/nova/common.pp
+++ b/modules/role/manifests/labs/openstack/nova/common.pp
@@ -27,6 +27,7 @@
 class { '::openstack::common':
 novaconfig   => $novaconfig,
 wikitechstatusconfig => $wikitechstatusconfig,
+openstack_version => hiera('openstack::version'),
 }
 
 class { '::openstack::nova::hooks':

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "Set openstack::version explicitly, everywhere"

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

Change subject: Revert "Set openstack::version explicitly, everywhere"
..


Revert "Set openstack::version explicitly, everywhere"

This reverts commit 52b94cf4a7a782d810c479a6ae6da765ec1ef10e.

Change-Id: Id5db39dbe4f318cde1bdffb91c91b0dbac45d2f5
---
M hieradata/common.yaml
A hieradata/common/openstack.yaml
2 files changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/hieradata/common.yaml b/hieradata/common.yaml
index db940b1..96523d7 100644
--- a/hieradata/common.yaml
+++ b/hieradata/common.yaml
@@ -434,5 +434,3 @@
 id: 2002
 
 deployment_server: tin.eqiad.wmnet
-
-openstack::version: 'liberty'
diff --git a/hieradata/common/openstack.yaml b/hieradata/common/openstack.yaml
new file mode 100644
index 000..22b71fd
--- /dev/null
+++ b/hieradata/common/openstack.yaml
@@ -0,0 +1 @@
+openstack::version: 'liberty'

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[wmf/1.29.0-wmf.3]: Follow-up I63ab27cb: Get rid of notices tool when there are ...

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

Change subject: Follow-up I63ab27cb: Get rid of notices tool when there are no 
notices
..


Follow-up I63ab27cb: Get rid of notices tool when there are no notices

Bug: T151423
Change-Id: I3dd9d2cbfb1fa536490eb8b4b7d630e9c6cfdd48
(cherry picked from commit b89a6ee463ddb315c2b8192b8920ac5fbe64c388)
---
M modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
index 7de42cd..6a63322 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
@@ -93,7 +93,7 @@
this.popup.$body.append( this.$items );
 
if ( !count ) {
-   this.$element = $( [] );
+   this.destroy();
}
 };
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3dd9d2cbfb1fa536490eb8b4b7d630e9c6cfdd48
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.29.0-wmf.3
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "Set openstack::version explicitly, everywhere"

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

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

Change subject: Revert "Set openstack::version explicitly, everywhere"
..

Revert "Set openstack::version explicitly, everywhere"

This reverts commit 52b94cf4a7a782d810c479a6ae6da765ec1ef10e.

Change-Id: Id5db39dbe4f318cde1bdffb91c91b0dbac45d2f5
---
M hieradata/common.yaml
A hieradata/common/openstack.yaml
2 files changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/06/323106/1

diff --git a/hieradata/common.yaml b/hieradata/common.yaml
index db940b1..96523d7 100644
--- a/hieradata/common.yaml
+++ b/hieradata/common.yaml
@@ -434,5 +434,3 @@
 id: 2002
 
 deployment_server: tin.eqiad.wmnet
-
-openstack::version: 'liberty'
diff --git a/hieradata/common/openstack.yaml b/hieradata/common/openstack.yaml
new file mode 100644
index 000..22b71fd
--- /dev/null
+++ b/hieradata/common/openstack.yaml
@@ -0,0 +1 @@
+openstack::version: 'liberty'

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Set openstack::version explicitly, everywhere

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

Change subject: Set openstack::version explicitly, everywhere
..


Set openstack::version explicitly, everywhere

Change-Id: Ifa87ac5dc6924fe3fd3154ea0fbf447fed06ec84
---
M hieradata/common.yaml
D hieradata/common/openstack.yaml
2 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/hieradata/common.yaml b/hieradata/common.yaml
index 96523d7..db940b1 100644
--- a/hieradata/common.yaml
+++ b/hieradata/common.yaml
@@ -434,3 +434,5 @@
 id: 2002
 
 deployment_server: tin.eqiad.wmnet
+
+openstack::version: 'liberty'
diff --git a/hieradata/common/openstack.yaml b/hieradata/common/openstack.yaml
deleted file mode 100644
index 22b71fd..000
--- a/hieradata/common/openstack.yaml
+++ /dev/null
@@ -1 +0,0 @@
-openstack::version: 'liberty'

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Set openstack::version explicitly, everywhere

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

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

Change subject: Set openstack::version explicitly, everywhere
..

Set openstack::version explicitly, everywhere

Change-Id: Ifa87ac5dc6924fe3fd3154ea0fbf447fed06ec84
---
M hieradata/codfw.yaml
D hieradata/common/openstack.yaml
M hieradata/eqiad.yaml
3 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/05/323105/1

diff --git a/hieradata/codfw.yaml b/hieradata/codfw.yaml
index 5a35271..2f3610d 100644
--- a/hieradata/codfw.yaml
+++ b/hieradata/codfw.yaml
@@ -54,3 +54,5 @@
 prometheus_nodes:
   - prometheus2001.codfw.wmnet
   - prometheus2002.codfw.wmnet
+
+openstack::version: 'liberty'
diff --git a/hieradata/common/openstack.yaml b/hieradata/common/openstack.yaml
deleted file mode 100644
index 22b71fd..000
--- a/hieradata/common/openstack.yaml
+++ /dev/null
@@ -1 +0,0 @@
-openstack::version: 'liberty'
diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index 212275b..8d649f7 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -183,3 +183,5 @@
 prometheus_nodes:
 - prometheus1001.eqiad.wmnet
 - prometheus1002.eqiad.wmnet
+
+openstack::version: 'liberty'

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

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

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: CODFW: Add prod DNS for prometheus200[3-4] Bug: T151338

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

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

Change subject: CODFW: Add prod DNS for prometheus200[3-4] Bug: T151338
..

CODFW: Add prod DNS for prometheus200[3-4]
Bug: T151338

Change-Id: I631f65fe2fc98d2373a326cedf22f86cc0126dde
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/04/323104/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 8273539..f69472d 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -2571,6 +2571,7 @@
 142 1H IN PTR   es2017.codfw.wmnet.
 143 1H IN PTR   conf2001.codfw.wmnet.
 144 1H IN PTR   maps2001.codfw.wmnet.
+145 1H IN PTR   prometheus2003.codfw.wmnet.
 
 $ORIGIN 1.192.{{ zonename }}.
 1   1H IN PTR   lvs2001.codfw.wmnet.
@@ -2777,6 +2778,7 @@
 186 1H IN PTR   restbase2010-a.codfw.wmnet.
 187 1H IN PTR   restbase2010-b.codfw.wmnet.
 188 1H IN PTR   restbase2010-c.codfw.wmnet.
+189 1H IN PTR   prometheus2004.codfw.wmnet.
 
 $ORIGIN 17.192.{{ zonename }}.
 1   1H IN PTR   vl2018-eth1.lvs2001.codfw.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index 77bbd0c..8a9ede5 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -2619,6 +2619,8 @@
 1H  IN  2620:0:860:102:10:192:16:181
 prometheus2002  1H  IN A10.192.16.182 ; VM on the ganeti01.svc.codfw.wmnet 
cluster
 1H  IN  2620:0:860:102:10:192:16:182
+prometheus2003   1H IN A10.192.0.145
+prometheus2004   1H IN A10.192.16.189
 puppetmaster2001 1H IN A10.192.0.27
 puppetmaster2001 1H IN  2620:0:860:101:10:192:0:27
 puppetmaster2002 1H IN A10.192.48.66

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I631f65fe2fc98d2373a326cedf22f86cc0126dde
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Papaul 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[wmf/1.29.0-wmf.3]: Move around code that sets up edit notices to ensure it runs...

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

Change subject: Move around code that sets up edit notices to ensure it runs 
after we receive the notices to display
..


Move around code that sets up edit notices to ensure it runs after we receive 
the notices to display

Bug: T151236
Change-Id: I63ab27cb236169f300295b2ed4c88e01048092e7
(cherry picked from commit 16e294fba71c5a9db3f5ec842550751d21c45d32)
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
M modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
2 files changed, 43 insertions(+), 30 deletions(-)

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



diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
index 8f7a20b..61c0e23 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -1392,6 +1392,7 @@
if ( this.welcomeDialogPromise ) {
this.welcomeDialogPromise
.always( function () {
+   var noticesTool;
// Pop out the notices when the welcome dialog 
is closed
if (
target.switched &&
@@ -1399,7 +1400,9 @@
) {

target.actionsToolbar.tools.editModeSource.getPopup().toggle( true );
} else {
-   
target.actionsToolbar.tools.notices.getPopup().toggle( true );
+   noticesTool = 
target.actionsToolbar.tools.notices;
+   noticesTool.setNotices( 
target.getEditNotices() );
+   noticesTool.getPopup().toggle( true );
}
} );
}
diff --git a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
index 92aa978..7de42cd 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
@@ -40,36 +40,13 @@
  * @param {Object} [config]
  */
 ve.ui.MWNoticesPopupTool = function VeUiMWNoticesPopupTool( toolGroup, config 
) {
-   var tool = this,
-   items = toolGroup.getToolbar().getTarget().getEditNotices(),
-   count = items.length,
-   title = ve.msg(
-   'visualeditor-editnotices-tool',
-   mw.language.convertNumber( count )
-   );
-
// Parent constructor
-   ve.ui.MWNoticesPopupTool.super.call( this, title, toolGroup, config );
-
-   // Properties
-   this.$items = $( '' ).addClass( 've-ui-mwNoticesPopupTool-items' );
-
-   // Initialization
-   items.forEach( function ( itemHtml ) {
-   var $node = $( '' )
-   .addClass( 've-ui-mwNoticesPopupTool-item' )
-   .append( $.parseHTML( itemHtml ) );
-
-   $node.find( 'a' ).attr( 'target', '_blank' );
-
-   tool.$items.append( $node );
-   } );
-
-   this.popup.$body.append( this.$items );
-
-   if ( !count ) {
-   this.$element = $( [] );
-   }
+   ve.ui.MWNoticesPopupTool.super.call(
+   this,
+   ve.msg( 'visualeditor-editnotices-tooltip' ),
+   toolGroup,
+   config
+   );
 };
 
 /* Inheritance */
@@ -88,6 +65,39 @@
 /* Methods */
 
 /**
+ * Set notices to display.
+ *
+ * @param {string[]} notices
+ */
+ve.ui.MWNoticesPopupTool.prototype.setNotices = function ( notices ) {
+   var tool = this,
+   count = notices.length;
+
+   this.popup.setLabel( ve.msg(
+   'visualeditor-editnotices-tool',
+   mw.language.convertNumber( count )
+   ) );
+
+   this.$items = $( '' ).addClass( 've-ui-mwNoticesPopupTool-items' );
+
+   notices.forEach( function ( itemHtml ) {
+   var $node = $( '' )
+   .addClass( 've-ui-mwNoticesPopupTool-item' )
+   .append( $.parseHTML( itemHtml ) );
+
+   $node.find( 'a' ).attr( 'target', '_blank' );
+
+   tool.$items.append( $node );
+   } );
+
+   this.popup.$body.append( this.$items );
+
+   if ( !count ) {
+   this.$element = $( [] );
+   }
+};
+
+/**
  * Get the tool title.
  *
  * @inheritdoc

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I63ab27cb236169f300295b2ed4c88e01048092e7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.29.0-wmf.3
Gerrit-Owner: 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Explicit hiera lookup for openstack_version

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

Change subject: Explicit hiera lookup for openstack_version
..


Explicit hiera lookup for openstack_version

In just this one place, because it seems to need it.

Change-Id: I1d4644a733292696eeb83ac75f01e8c1e13fb299
---
M modules/role/manifests/labs/openstack/nova/common.pp
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/modules/role/manifests/labs/openstack/nova/common.pp 
b/modules/role/manifests/labs/openstack/nova/common.pp
index ef0fbb6..9b96603 100644
--- a/modules/role/manifests/labs/openstack/nova/common.pp
+++ b/modules/role/manifests/labs/openstack/nova/common.pp
@@ -1,7 +1,6 @@
 class role::labs::openstack::nova::common {
 
 include passwords::misc::scripts
-include ::openstack::nova::hooks
 
 $novaconfig_pre   = hiera_hash('novaconfig', {})
 $keystoneconfig   = hiera_hash('keystoneconfig', {})
@@ -29,5 +28,9 @@
 novaconfig   => $novaconfig,
 wikitechstatusconfig => $wikitechstatusconfig,
 }
+
+class { '::openstack::nova::hooks':
+openstack_version => hiera('openstack::version'),
+}
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[wmf/1.29.0-wmf.3]: Follow-up I63ab27cb: Get rid of notices tool when there are ...

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

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

Change subject: Follow-up I63ab27cb: Get rid of notices tool when there are no 
notices
..

Follow-up I63ab27cb: Get rid of notices tool when there are no notices

Bug: T151423
Change-Id: I3dd9d2cbfb1fa536490eb8b4b7d630e9c6cfdd48
(cherry picked from commit b89a6ee463ddb315c2b8192b8920ac5fbe64c388)
---
M modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
index 7de42cd..6a63322 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
@@ -93,7 +93,7 @@
this.popup.$body.append( this.$items );
 
if ( !count ) {
-   this.$element = $( [] );
+   this.destroy();
}
 };
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3dd9d2cbfb1fa536490eb8b4b7d630e9c6cfdd48
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.29.0-wmf.3
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Alex Monk 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Explicit hiera lookup for openstack_version

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

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

Change subject: Explicit hiera lookup for openstack_version
..

Explicit hiera lookup for openstack_version

In just this one place, because it seems to need it.

Change-Id: I1d4644a733292696eeb83ac75f01e8c1e13fb299
---
M modules/role/manifests/labs/openstack/nova/common.pp
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/02/323102/1

diff --git a/modules/role/manifests/labs/openstack/nova/common.pp 
b/modules/role/manifests/labs/openstack/nova/common.pp
index ef0fbb6..9b96603 100644
--- a/modules/role/manifests/labs/openstack/nova/common.pp
+++ b/modules/role/manifests/labs/openstack/nova/common.pp
@@ -1,7 +1,6 @@
 class role::labs::openstack::nova::common {
 
 include passwords::misc::scripts
-include ::openstack::nova::hooks
 
 $novaconfig_pre   = hiera_hash('novaconfig', {})
 $keystoneconfig   = hiera_hash('keystoneconfig', {})
@@ -29,5 +28,9 @@
 novaconfig   => $novaconfig,
 wikitechstatusconfig => $wikitechstatusconfig,
 }
+
+class { '::openstack::nova::hooks':
+openstack_version => hiera('openstack::version'),
+}
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove some redundant includes of openstack::nova::hooks

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

Change subject: Remove some redundant includes of openstack::nova::hooks
..


Remove some redundant includes of openstack::nova::hooks

Change-Id: I87fefc562c2809783762a4d98fc5500ee94799a9
---
M modules/role/manifests/labs/openstack/nova/common.pp
M modules/role/manifests/labs/openstack/nova/controller.pp
M modules/role/manifests/labs/openstack/nova/network.pp
3 files changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/modules/role/manifests/labs/openstack/nova/common.pp 
b/modules/role/manifests/labs/openstack/nova/common.pp
index ec935f5..ef0fbb6 100644
--- a/modules/role/manifests/labs/openstack/nova/common.pp
+++ b/modules/role/manifests/labs/openstack/nova/common.pp
@@ -1,7 +1,7 @@
 class role::labs::openstack::nova::common {
 
 include passwords::misc::scripts
-include openstack::nova::hooks
+include ::openstack::nova::hooks
 
 $novaconfig_pre   = hiera_hash('novaconfig', {})
 $keystoneconfig   = hiera_hash('keystoneconfig', {})
diff --git a/modules/role/manifests/labs/openstack/nova/controller.pp 
b/modules/role/manifests/labs/openstack/nova/controller.pp
index 0092787..fac3a14 100644
--- a/modules/role/manifests/labs/openstack/nova/controller.pp
+++ b/modules/role/manifests/labs/openstack/nova/controller.pp
@@ -3,7 +3,6 @@
 system::role { $name: }
 
 require openstack
-include openstack::nova::hooks
 include role::labs::openstack::glance::server
 include role::labs::openstack::keystone::server
 include ::openstack::nova::conductor
diff --git a/modules/role/manifests/labs/openstack/nova/network.pp 
b/modules/role/manifests/labs/openstack/nova/network.pp
index 35b0389..96d6468 100644
--- a/modules/role/manifests/labs/openstack/nova/network.pp
+++ b/modules/role/manifests/labs/openstack/nova/network.pp
@@ -2,7 +2,6 @@
 
 require openstack
 system::role { $name: }
-include openstack::nova::hooks
 include role::labs::openstack::nova::common
 $novaconfig = $role::labs::openstack::nova::common::novaconfig
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove some redundant includes of openstack::nova::hooks

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

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

Change subject: Remove some redundant includes of openstack::nova::hooks
..

Remove some redundant includes of openstack::nova::hooks

Change-Id: I87fefc562c2809783762a4d98fc5500ee94799a9
---
M modules/role/manifests/labs/openstack/nova/common.pp
M modules/role/manifests/labs/openstack/nova/controller.pp
M modules/role/manifests/labs/openstack/nova/network.pp
3 files changed, 1 insertion(+), 3 deletions(-)


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

diff --git a/modules/role/manifests/labs/openstack/nova/common.pp 
b/modules/role/manifests/labs/openstack/nova/common.pp
index ec935f5..ef0fbb6 100644
--- a/modules/role/manifests/labs/openstack/nova/common.pp
+++ b/modules/role/manifests/labs/openstack/nova/common.pp
@@ -1,7 +1,7 @@
 class role::labs::openstack::nova::common {
 
 include passwords::misc::scripts
-include openstack::nova::hooks
+include ::openstack::nova::hooks
 
 $novaconfig_pre   = hiera_hash('novaconfig', {})
 $keystoneconfig   = hiera_hash('keystoneconfig', {})
diff --git a/modules/role/manifests/labs/openstack/nova/controller.pp 
b/modules/role/manifests/labs/openstack/nova/controller.pp
index 0092787..fac3a14 100644
--- a/modules/role/manifests/labs/openstack/nova/controller.pp
+++ b/modules/role/manifests/labs/openstack/nova/controller.pp
@@ -3,7 +3,6 @@
 system::role { $name: }
 
 require openstack
-include openstack::nova::hooks
 include role::labs::openstack::glance::server
 include role::labs::openstack::keystone::server
 include ::openstack::nova::conductor
diff --git a/modules/role/manifests/labs/openstack/nova/network.pp 
b/modules/role/manifests/labs/openstack/nova/network.pp
index 35b0389..96d6468 100644
--- a/modules/role/manifests/labs/openstack/nova/network.pp
+++ b/modules/role/manifests/labs/openstack/nova/network.pp
@@ -2,7 +2,6 @@
 
 require openstack
 system::role { $name: }
-include openstack::nova::hooks
 include role::labs::openstack::nova::common
 $novaconfig = $role::labs::openstack::nova::common::novaconfig
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove passwordreset capture feature

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

Change subject: Remove passwordreset capture feature
..


Remove passwordreset capture feature

If anyone wants such a thing, they can make their own extension.

I asked stewards, and they said they don't use this.

See also T32636 / 9de2bfd1fe

Bug: T150930
Change-Id: I3ab5962dba668e5d628e55ad0c0feae471d82b5e
---
M RELEASE-NOTES-1.29
M includes/api/ApiResetPassword.php
M includes/api/i18n/en.json
M includes/api/i18n/qqq.json
M includes/auth/TemporaryPasswordAuthenticationRequest.php
M includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php
M includes/specials/SpecialPasswordReset.php
M includes/user/PasswordReset.php
M includes/user/User.php
M languages/i18n/en.json
M languages/i18n/qqq.json
M 
tests/phpunit/includes/auth/TemporaryPasswordPrimaryAuthenticationProviderTest.php
M tests/phpunit/includes/user/PasswordResetTest.php
13 files changed, 26 insertions(+), 134 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index 3a7cde9..23c34df 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -12,6 +12,8 @@
   determines whether to set a cookie when a user is autoblocked. Doing so means
   that a blocked user, even after logging out and moving to a new IP address,
   will still be blocked.
+* The resetpassword right and associated password reset capture feature has
+  been removed.
 
 === New features in 1.29 ===
 * (T5233) A cookie can now be set when a user is autoblocked, to track that 
user if
@@ -32,6 +34,7 @@
   action=createaccount, action=linkaccount, and action=changeauthenticationdata
   in the query string is now an error. They should be submitted in the POST
   body instead.
+* The capture option for action=resetpassword has been removed
 
 === Action API internal changes in 1.29 ===
 
diff --git a/includes/api/ApiResetPassword.php 
b/includes/api/ApiResetPassword.php
index 042ad69..2d7f5df 100644
--- a/includes/api/ApiResetPassword.php
+++ b/includes/api/ApiResetPassword.php
@@ -65,13 +65,13 @@
 
$passwordReset = new PasswordReset( $this->getConfig(), 
AuthManager::singleton() );
 
-   $status = $passwordReset->isAllowed( $this->getUser(), 
$params['capture'] );
+   $status = $passwordReset->isAllowed( $this->getUser() );
if ( !$status->isOK() ) {
$this->dieStatus( Status::wrap( $status ) );
}
 
$status = $passwordReset->execute(
-   $this->getUser(), $params['user'], $params['email'], 
$params['capture']
+   $this->getUser(), $params['user'], $params['email']
);
if ( !$status->isOK() ) {
$status->value = null;
@@ -80,12 +80,6 @@
 
$result = $this->getResult();
$result->addValue( [ 'resetpassword' ], 'status', 'success' );
-   if ( $params['capture'] ) {
-   $passwords = $status->getValue() ?: [];
-   ApiResult::setArrayType( $passwords, 'kvp', 'user' );
-   ApiResult::setIndexedTagName( $passwords, 'p' );
-   $result->addValue( [ 'resetpassword' ], 'passwords', 
$passwords );
-   }
}
 
public function isWriteMode() {
@@ -111,7 +105,6 @@
'email' => [
ApiBase::PARAM_TYPE => 'string',
],
-   'capture' => false,
];
 
$resetRoutes = $this->getConfig()->get( 'PasswordResetRoutes' );
diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json
index 0f184d9..05eb8cc 100644
--- a/includes/api/i18n/en.json
+++ b/includes/api/i18n/en.json
@@ -1307,7 +1307,6 @@
"apihelp-resetpassword-description-noroutes": "No password reset routes 
are available.\n\nEnable routes in 
[[mw:Manual:$wgPasswordResetRoutes|$wgPasswordResetRoutes]] to use 
this module.",
"apihelp-resetpassword-param-user": "User being reset.",
"apihelp-resetpassword-param-email": "Email address of the user being 
reset.",
-   "apihelp-resetpassword-param-capture": "Return the temporary passwords 
that were sent. Requires the passwordreset user right.",
"apihelp-resetpassword-example-user": "Send a password reset email to 
user Example.",
"apihelp-resetpassword-example-email": "Send a password reset email for 
all users with email address u...@example.com.",
 
diff --git a/includes/api/i18n/qqq.json b/includes/api/i18n/qqq.json
index f7c750e..929487b 100644
--- a/includes/api/i18n/qqq.json
+++ b/includes/api/i18n/qqq.json
@@ -1220,7 +1220,6 @@
"apihelp-resetpassword-description-noroutes": 
"{{doc-apihelp-description|resetpassword|info=This message is used when no 
known 

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Follow-up I63ab27cb: Get rid of notices tool when there are ...

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

Change subject: Follow-up I63ab27cb: Get rid of notices tool when there are no 
notices
..


Follow-up I63ab27cb: Get rid of notices tool when there are no notices

Bug: T151423
Change-Id: I3dd9d2cbfb1fa536490eb8b4b7d630e9c6cfdd48
---
M modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
index 7de42cd..6a63322 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
@@ -93,7 +93,7 @@
this.popup.$body.append( this.$items );
 
if ( !count ) {
-   this.$element = $( [] );
+   this.destroy();
}
 };
 

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

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

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


[MediaWiki-commits] [Gerrit] labs...deploy[master]: Bump striker submodule

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

Change subject: Bump striker submodule
..


Bump striker submodule

Change-Id: Ibe3fdbfc15c64705f72a08eeb91bf7eda2bcc248
---
M striker
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/striker b/striker
index 52bc0f1..232247d 16
--- a/striker
+++ b/striker
@@ -1 +1 @@
-Subproject commit 52bc0f1d92a6f5bbd4ebadc5284eb8bdeb034409
+Subproject commit 232247da354bfab343371f0f276c3fb393530a74

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe3fdbfc15c64705f72a08eeb91bf7eda2bcc248
Gerrit-PatchSet: 1
Gerrit-Project: labs/striker/deploy
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs...deploy[master]: Bump striker submodule

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

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

Change subject: Bump striker submodule
..

Bump striker submodule

Change-Id: Ibe3fdbfc15c64705f72a08eeb91bf7eda2bcc248
---
M striker
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker/deploy 
refs/changes/00/323100/1

diff --git a/striker b/striker
index 52bc0f1..232247d 16
--- a/striker
+++ b/striker
@@ -1 +1 @@
-Subproject commit 52bc0f1d92a6f5bbd4ebadc5284eb8bdeb034409
+Subproject commit 232247da354bfab343371f0f276c3fb393530a74

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe3fdbfc15c64705f72a08eeb91bf7eda2bcc248
Gerrit-PatchSet: 1
Gerrit-Project: labs/striker/deploy
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] mediawiki/core[master]: Revert "Warn when a log context accidentally overrides a log...

2016-11-22 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Revert "Warn when a log context accidentally overrides a log 
processor"
..

Revert "Warn when a log context accidentally overrides a log processor"

This reverts commit 057b870b47a56fa8e7e056df02c2334d2273caea.

Bug: T145133
Change-Id: I31caee865cd60c785126478ac75c9aefce78eaaf
---
M includes/debug/logger/monolog/WikiProcessor.php
1 file changed, 1 insertion(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/99/323099/1

diff --git a/includes/debug/logger/monolog/WikiProcessor.php 
b/includes/debug/logger/monolog/WikiProcessor.php
index 81e1e14..ad939a0 100644
--- a/includes/debug/logger/monolog/WikiProcessor.php
+++ b/includes/debug/logger/monolog/WikiProcessor.php
@@ -29,17 +29,6 @@
  * @copyright © 2013 Bryan Davis and Wikimedia Foundation.
  */
 class WikiProcessor {
-   /** @var array Keys which should not be used in log context */
-   protected $reservedKeys = [
-   // from 
monolog:src/Monolog/Formatter/LogstashFormatter.php#L71-L88
-   'message', 'channel', 'level', 'type',
-   // from WebProcessor
-   'url', 'ip', 'http_method', 'server', 'referrer',
-   // from WikiProcessor
-   'host', 'wiki', 'reqId', 'mwversion',
-   // from config magic
-   'normalized_message',
-   ];
 
/**
 * @param array $record
@@ -47,15 +36,6 @@
 */
public function __invoke( array $record ) {
global $wgVersion;
-
-   // some log aggregators such as Logstash will merge the log 
context into the main
-   // metadata and end up overwriting the data coming from 
processors
-   foreach ( $this->reservedKeys as $key ) {
-   if ( isset( $record['context'][$key] ) ) {
-   wfLogWarning( __METHOD__ . ": '$key' key 
overwritten in log context." );
-   }
-   }
-
$record['extra'] = array_merge(
$record['extra'],
[
@@ -67,4 +47,5 @@
);
return $record;
}
+
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I31caee865cd60c785126478ac75c9aefce78eaaf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Openstack: move wikistatus settings into hiera

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

Change subject: Openstack:  move wikistatus settings into hiera
..


Openstack:  move wikistatus settings into hiera

Change-Id: Iceef20e8ddbf8f396ece6beb43ed814a2f74158d
---
M hieradata/eqiad.yaml
M modules/openstack/manifests/common.pp
M modules/openstack/templates/liberty/nova/nova.conf.erb
M modules/openstack/templates/mitaka/nova/nova.conf.erb
M modules/role/manifests/labs/openstack/nova/common.pp
5 files changed, 25 insertions(+), 29 deletions(-)

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



diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index 8c53f2e..212275b 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -134,6 +134,13 @@
 - labvirt1012
 - labvirt1013
 
+wikitechstatusconfig:
+  host: 'wikitech.wikimedia.org'
+  domain: 'labs'
+  page_prefix: 'Nova_Resource:'
+  region: 'eqiad'
+  dns_domain: 'eqiad.wmflabs'
+
 keystoneconfig:
   auth_port: '35357'
   auth_protocol: 'http'
diff --git a/modules/openstack/manifests/common.pp 
b/modules/openstack/manifests/common.pp
index 69b62ef..a893c18 100644
--- a/modules/openstack/manifests/common.pp
+++ b/modules/openstack/manifests/common.pp
@@ -1,13 +1,7 @@
 # common packages and config for openstack
 class openstack::common(
 $novaconfig,
-$instance_status_wiki_host,
-$instance_status_wiki_domain,
-$instance_status_wiki_page_prefix,
-$instance_status_wiki_region,
-$instance_status_dns_domain,
-$instance_status_wiki_user,
-$instance_status_wiki_pass,
+$wikitechstatusconfig,
 $openstack_version=$::openstack::version,
 ) {
 
diff --git a/modules/openstack/templates/liberty/nova/nova.conf.erb 
b/modules/openstack/templates/liberty/nova/nova.conf.erb
index 206444d..a84cafb 100644
--- a/modules/openstack/templates/liberty/nova/nova.conf.erb
+++ b/modules/openstack/templates/liberty/nova/nova.conf.erb
@@ -80,13 +80,13 @@
 notification_driver=wikistatus
 notify_on_state_change=vm_state
 
-wiki_host=<%= @instance_status_wiki_host %>
-wiki_domain=<%= @instance_status_wiki_domain %>
-wiki_page_prefix=<%= @instance_status_wiki_page_prefix %>
-wiki_instance_region=<%= @instance_status_wiki_region %>
-wiki_login=<%= @instance_status_wiki_user %>
-wiki_password=<%= @instance_status_wiki_pass %>
-wiki_instance_dns_domain=<%= @instance_status_dns_domain %>
+wiki_host=<%= @wikitechstatusconfig["host"] %>
+wiki_domain=<%= @wikitechstatusconfig["domain"] %>
+wiki_page_prefix=<%= @wikitechstatusconfig["page_prefix"] %>
+wiki_instance_region=<%= @wikitechstatusconfig["region"] %>
+wiki_login=<%= @wikitechstatusconfig["user"] %>
+wiki_password=<%= @wikitechstatusconfig["pass"] %>
+wiki_instance_dns_domain=<%= @wikitechstatusconfig["dns_domain"] %>
 
 # Designate things:
 notification_driver = messagingv2
diff --git a/modules/openstack/templates/mitaka/nova/nova.conf.erb 
b/modules/openstack/templates/mitaka/nova/nova.conf.erb
index 0d778a4..71c3a16 100644
--- a/modules/openstack/templates/mitaka/nova/nova.conf.erb
+++ b/modules/openstack/templates/mitaka/nova/nova.conf.erb
@@ -79,13 +79,13 @@
 notification_driver=wikistatus
 notify_on_state_change=vm_state
 
-wiki_host=<%= @instance_status_wiki_host %>
-wiki_domain=<%= @instance_status_wiki_domain %>
-wiki_page_prefix=<%= @instance_status_wiki_page_prefix %>
-wiki_instance_region=<%= @instance_status_wiki_region %>
-wiki_login=<%= @instance_status_wiki_user %>
-wiki_password=<%= @instance_status_wiki_pass %>
-wiki_instance_dns_domain=<%= @instance_status_dns_domain %>
+wiki_host=<%= @wikitechstatusconfig["host"] %>
+wiki_domain=<%= @wikitechstatusconfig["domain"] %>
+wiki_page_prefix=<%= @wikitechstatusconfig["page_prefix"] %>
+wiki_instance_region=<%= @wikitechstatusconfig["region"] %>
+wiki_login=<%= @wikitechstatusconfig["user"] %>
+wiki_password=<%= @wikitechstatusconfig["pass"] %>
+wiki_instance_dns_domain=<%= @wikitechstatusconfig["dns_domain"] %>
 
 # Designate things:
 notification_driver = messagingv2
diff --git a/modules/role/manifests/labs/openstack/nova/common.pp 
b/modules/role/manifests/labs/openstack/nova/common.pp
index 26ce916..ec935f5 100644
--- a/modules/role/manifests/labs/openstack/nova/common.pp
+++ b/modules/role/manifests/labs/openstack/nova/common.pp
@@ -5,6 +5,7 @@
 
 $novaconfig_pre   = hiera_hash('novaconfig', {})
 $keystoneconfig   = hiera_hash('keystoneconfig', {})
+$wikitechstatusconfig = hiera_hash('wikitechstatusconfig', 
{})
 
 $keystone_host= hiera('labs_keystone_host')
 $nova_controller  = hiera('labs_nova_controller')
@@ -25,14 +26,8 @@
 $novaconfig = deep_merge($novaconfig_pre, $extra_novaconfig)
 
 class { '::openstack::common':
-novaconfig  

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Fix for generating WMF Labs families.

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

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

Change subject: Fix for generating WMF Labs families.
..

Fix for generating WMF Labs families.

Also creation of family with interwikis on Travis.

Bug: T151372
Change-Id: Iefe1ccee01468586706780796c80e267c1a3b543
---
M .travis.yml
M generate_family_file.py
2 files changed, 14 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/98/323098/1

diff --git a/.travis.yml b/.travis.yml
index 9d46272..ca5e14b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -61,10 +61,10 @@
 
   - python pwb.py generate_family_file 'https://wiki.musicbrainz.org/' 
musicbrainz 'n'
   - if [[ $FAMILY == 'wpbeta' ]]; then
-  python -m generate_family_file 
'http://'$LANGUAGE'.wikipedia.beta.wmflabs.org/' 'wpbeta' 'n' ;
+  python -m generate_family_file 
'http://'$LANGUAGE'.wikipedia.beta.wmflabs.org/' 'wpbeta' 'y' ;
 fi
   - if [[ $FAMILY == 'wsbeta' ]]; then
-  python -m generate_family_file 
'http://'$LANGUAGE'.wikisource.beta.wmflabs.org/' 'wsbeta' 'n' ;
+  python -m generate_family_file 
'http://'$LANGUAGE'.wikisource.beta.wmflabs.org/' 'wsbeta' 'y' ;
 fi
 
   - python -W error::UserWarning -m generate_user_files -dir:~/.pywikibot/ 
-family:$FAMILY -lang:$LANGUAGE -v -user:"$PYWIKIBOT2_USERNAME"
diff --git a/generate_family_file.py b/generate_family_file.py
index 5505b69..cd1caa7 100755
--- a/generate_family_file.py
+++ b/generate_family_file.py
@@ -64,7 +64,7 @@
 print("Generating family file from %s" % self.base_url)
 
 w = Wiki(self.base_url)
-self.wikis[w.iwpath] = w
+self.wikis[w.lang] = w
 print()
 print("==")
 print("api url: %s" % w.api)
@@ -122,9 +122,9 @@
 print("Loading wikis... ")
 for lang in self.langs:
 print("  * %s... " % (lang[u'prefix']), end="")
-if lang[u'url'] not in self.wikis:
+if lang['prefix'] not in self.wikis:
 try:
-self.wikis[lang[u'url']] = Wiki(lang[u'url'])
+self.wikis[lang['prefix']] = Wiki(lang['url'])
 print("downloaded")
 except Exception as e:
 print(e)
@@ -167,38 +167,37 @@
 self.langs = {
 """.lstrip() % {'url': self.base_url, 'name': self.name})
 
-for w in self.wikis.values():
+for k, w in self.wikis.items():
 f.write("'%(lang)s': '%(hostname)s',\n"
-% {'lang': w.lang, 'hostname': urlparse(w.server).netloc})
+% {'lang': k, 'hostname': urlparse(w.server).netloc})
 
 f.write("}\n\n")
-
 f.write("def scriptpath(self, code):\n")
 f.write("return {\n")
 
-for w in self.wikis.values():
+for k, w in self.wikis.items():
 f.write("'%(lang)s': '%(path)s',\n"
-% {'lang': w.lang, 'path': w.scriptpath})
+% {'lang': k, 'path': w.scriptpath})
 f.write("}[code]\n")
 f.write("\n")
 
 f.write("@deprecated('APISite.version()')\n")
 f.write("def version(self, code):\n")
 f.write("return {\n")
-for w in self.wikis.values():
+for k, w in self.wikis.items():
 if w.version is None:
-f.write("'%(lang)s': None,\n" % {'lang': w.lang})
+f.write("'%(lang)s': None,\n" % {'lang': k})
 else:
 f.write("'%(lang)s': u'%(ver)s',\n"
-% {'lang': w.lang, 'ver': w.version})
+% {'lang': k, 'ver': w.version})
 f.write("}[code]\n")
 
 f.write("\n")
 f.write("def protocol(self, code):\n")
 f.write("return {\n")
-for w in self.wikis.values():
+for k, w in self.wikis.items():
 f.write("'%(lang)s': u'%(protocol)s',\n"
-% {'lang': w.lang, 'protocol': urlparse(w.server).scheme})
+% {'lang': k, 'protocol': urlparse(w.server).scheme})
 f.write("}[code]\n")
 
 

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

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

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


[MediaWiki-commits] [Gerrit] labs/private[master]: wikitechstatusconfig: Add some dummy entries

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

Change subject: wikitechstatusconfig: Add some dummy entries
..


wikitechstatusconfig: Add some dummy entries

Change-Id: If33195ef42b3487e390c72903531ae3b2873dfc8
---
M hieradata/eqiad.yaml
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index 3aec9d3..54dc3a5 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -11,6 +11,10 @@
 ldap_user_pass: 'ueThe7moh7Hah'
 ldap_proxyagent_pass: 'Eche0ieng8UaNoo'
 
+wikitechstatusconfig:
+  user: 'fakebotname'
+  pass: 'dummy'
+
 keystoneconfig:
 ldap_user_pass: 'ueThe7moh7Hah'
 ldap_proxyagent_pass: 'Eche0ieng8UaNoo'

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Respect oldid parameter in NWE

2016-11-22 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Respect oldid parameter in NWE
..

Respect oldid parameter in NWE

Change-Id: I5a6388f50cc432421343974eb9f721f5e5a94d93
---
M ApiVisualEditor.php
1 file changed, 10 insertions(+), 5 deletions(-)


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

diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index 648fa22..0ff5f49 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -232,9 +232,9 @@
} elseif ( $params['paction'] === 
'wikitext' ) {
$apiParams = [
'action' => 'query',
-   'titles' => 
$title->getPrefixedDBkey(),
+   'revids' => $oldid,
'prop' => 'revisions',
-   'rvprop' => 'content'
+   'rvprop' => 
'content|ids'
];
 
if ( isset( $params['section'] 
) ) {
@@ -252,9 +252,14 @@
$api->execute();
$result = 
$api->getResult()->getResultData();
$pid = $title->getArticleID();
-   $content = isset( 
$result['query']['pages'][$pid]['revisions']['0']['content'] ) ?
-   
$result['query']['pages'][$pid]['revisions']['0']['content'] :
-   false;
+   $content = false;
+   if ( isset( 
$result['query']['pages'][$pid]['revisions'] ) ) {
+   foreach ( 
$result['query']['pages'][$pid]['revisions'] as $revArr ) {
+   if ( 
$revArr['revid'] === $oldid ) {
+   
$content = $revArr['content'];
+   }
+   }
+   }
if ( $content === false ) {
$this->dieUsage( 'Error 
contacting the document server', 'docserver' );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a6388f50cc432421343974eb9f721f5e5a94d93
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] labs/private[master]: wikitechstatusconfig: Add some dummy entries

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

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

Change subject: wikitechstatusconfig: Add some dummy entries
..

wikitechstatusconfig: Add some dummy entries

Change-Id: If33195ef42b3487e390c72903531ae3b2873dfc8
---
M hieradata/eqiad.yaml
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/private 
refs/changes/96/323096/1

diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index 3aec9d3..54dc3a5 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -11,6 +11,10 @@
 ldap_user_pass: 'ueThe7moh7Hah'
 ldap_proxyagent_pass: 'Eche0ieng8UaNoo'
 
+wikitechstatusconfig:
+  user: 'fakebotname'
+  pass: 'dummy'
+
 keystoneconfig:
 ldap_user_pass: 'ueThe7moh7Hah'
 ldap_proxyagent_pass: 'Eche0ieng8UaNoo'

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Openstack: move wikistatus settings into hiera

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

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

Change subject: Openstack:  move wikistatus settings into hiera
..

Openstack:  move wikistatus settings into hiera

Change-Id: Iceef20e8ddbf8f396ece6beb43ed814a2f74158d
---
M hieradata/eqiad.yaml
M modules/openstack/manifests/common.pp
M modules/openstack/templates/liberty/nova/nova.conf.erb
M modules/openstack/templates/mitaka/nova/nova.conf.erb
M modules/role/manifests/labs/openstack/nova/common.pp
5 files changed, 24 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/95/323095/1

diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index 8c53f2e..212275b 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -134,6 +134,13 @@
 - labvirt1012
 - labvirt1013
 
+wikitechstatusconfig:
+  host: 'wikitech.wikimedia.org'
+  domain: 'labs'
+  page_prefix: 'Nova_Resource:'
+  region: 'eqiad'
+  dns_domain: 'eqiad.wmflabs'
+
 keystoneconfig:
   auth_port: '35357'
   auth_protocol: 'http'
diff --git a/modules/openstack/manifests/common.pp 
b/modules/openstack/manifests/common.pp
index 69b62ef..a893c18 100644
--- a/modules/openstack/manifests/common.pp
+++ b/modules/openstack/manifests/common.pp
@@ -1,13 +1,7 @@
 # common packages and config for openstack
 class openstack::common(
 $novaconfig,
-$instance_status_wiki_host,
-$instance_status_wiki_domain,
-$instance_status_wiki_page_prefix,
-$instance_status_wiki_region,
-$instance_status_dns_domain,
-$instance_status_wiki_user,
-$instance_status_wiki_pass,
+$wikitechstatusconfig,
 $openstack_version=$::openstack::version,
 ) {
 
diff --git a/modules/openstack/templates/liberty/nova/nova.conf.erb 
b/modules/openstack/templates/liberty/nova/nova.conf.erb
index 206444d..a84cafb 100644
--- a/modules/openstack/templates/liberty/nova/nova.conf.erb
+++ b/modules/openstack/templates/liberty/nova/nova.conf.erb
@@ -80,13 +80,13 @@
 notification_driver=wikistatus
 notify_on_state_change=vm_state
 
-wiki_host=<%= @instance_status_wiki_host %>
-wiki_domain=<%= @instance_status_wiki_domain %>
-wiki_page_prefix=<%= @instance_status_wiki_page_prefix %>
-wiki_instance_region=<%= @instance_status_wiki_region %>
-wiki_login=<%= @instance_status_wiki_user %>
-wiki_password=<%= @instance_status_wiki_pass %>
-wiki_instance_dns_domain=<%= @instance_status_dns_domain %>
+wiki_host=<%= @wikitechstatusconfig["host"] %>
+wiki_domain=<%= @wikitechstatusconfig["domain"] %>
+wiki_page_prefix=<%= @wikitechstatusconfig["page_prefix"] %>
+wiki_instance_region=<%= @wikitechstatusconfig["region"] %>
+wiki_login=<%= @wikitechstatusconfig["user"] %>
+wiki_password=<%= @wikitechstatusconfig["pass"] %>
+wiki_instance_dns_domain=<%= @wikitechstatusconfig["dns_domain"] %>
 
 # Designate things:
 notification_driver = messagingv2
diff --git a/modules/openstack/templates/mitaka/nova/nova.conf.erb 
b/modules/openstack/templates/mitaka/nova/nova.conf.erb
index 0d778a4..71c3a16 100644
--- a/modules/openstack/templates/mitaka/nova/nova.conf.erb
+++ b/modules/openstack/templates/mitaka/nova/nova.conf.erb
@@ -79,13 +79,13 @@
 notification_driver=wikistatus
 notify_on_state_change=vm_state
 
-wiki_host=<%= @instance_status_wiki_host %>
-wiki_domain=<%= @instance_status_wiki_domain %>
-wiki_page_prefix=<%= @instance_status_wiki_page_prefix %>
-wiki_instance_region=<%= @instance_status_wiki_region %>
-wiki_login=<%= @instance_status_wiki_user %>
-wiki_password=<%= @instance_status_wiki_pass %>
-wiki_instance_dns_domain=<%= @instance_status_dns_domain %>
+wiki_host=<%= @wikitechstatusconfig["host"] %>
+wiki_domain=<%= @wikitechstatusconfig["domain"] %>
+wiki_page_prefix=<%= @wikitechstatusconfig["page_prefix"] %>
+wiki_instance_region=<%= @wikitechstatusconfig["region"] %>
+wiki_login=<%= @wikitechstatusconfig["user"] %>
+wiki_password=<%= @wikitechstatusconfig["pass"] %>
+wiki_instance_dns_domain=<%= @wikitechstatusconfig["dns_domain"] %>
 
 # Designate things:
 notification_driver = messagingv2
diff --git a/modules/role/manifests/labs/openstack/nova/common.pp 
b/modules/role/manifests/labs/openstack/nova/common.pp
index 26ce916..9522d91 100644
--- a/modules/role/manifests/labs/openstack/nova/common.pp
+++ b/modules/role/manifests/labs/openstack/nova/common.pp
@@ -5,6 +5,7 @@
 
 $novaconfig_pre   = hiera_hash('novaconfig', {})
 $keystoneconfig   = hiera_hash('keystoneconfig', {})
+$wikitechstatusconfig = hiera_hash('wikitechstatusconfig', 
{})
 
 $keystone_host= hiera('labs_keystone_host')
 $nova_controller  = hiera('labs_nova_controller')
@@ -26,13 +27,7 @@
 
 class { '::openstack::common':
 novaconfig   => 

[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Fixed drilldown handling of 'Datetime' type to match 'Date'

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

Change subject: Fixed drilldown handling of 'Datetime' type to match 'Date'
..


Fixed drilldown handling of 'Datetime' type to match 'Date'

Change-Id: I5065aa0bf8ee2fff3b2fd7b5e1ca09aba8e4dc09
---
M drilldown/CargoAppliedFilter.php
M drilldown/CargoFilter.php
M drilldown/CargoFilterValue.php
M drilldown/CargoSpecialDrilldown.php
4 files changed, 18 insertions(+), 17 deletions(-)

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



diff --git a/drilldown/CargoAppliedFilter.php b/drilldown/CargoAppliedFilter.php
index a52e926..fdcc9b9 100644
--- a/drilldown/CargoAppliedFilter.php
+++ b/drilldown/CargoAppliedFilter.php
@@ -112,15 +112,7 @@
$checkNullOrEmptySql = ( $cdb->getType() == 
'postgres' ? '' : "$value_field = '' OR ") .
"$value_field IS NULL";
$sql .= "($checkNullOrEmptySql) ";
-   } elseif ( $fv->is_numeric ) {
-   if ( $fv->lower_limit && $fv->upper_limit ) {
-   $sql .= "($value_field >= 
{$fv->lower_limit} AND $value_field <= {$fv->upper_limit}) ";
-   } elseif ( $fv->lower_limit ) {
-   $sql .= "$value_field > 
{$fv->lower_limit} ";
-   } elseif ( $fv->upper_limit ) {
-   $sql .= "$value_field < 
{$fv->upper_limit} ";
-   }
-   } elseif ( $this->filter->fieldDescription->mType == 
'Date' ) {
+   } elseif ( $this->filter->fieldDescription->mType == 
'Date' || $this->filter->fieldDescription->mType == 'Datetime' ) {
$date_field = $this->filter->name;
if ( $fv->time_period == 'day' ) {
$sql .= "YEAR($date_field) = 
{$fv->year} AND MONTH($date_field) = {$fv->month} "
@@ -133,6 +125,14 @@
$sql .= "YEAR($date_field) >= 
{$fv->year} ";
$sql .= "AND YEAR($date_field) <= 
{$fv->end_year} ";
}
+   } elseif ( $fv->is_numeric ) {
+   if ( $fv->lower_limit && $fv->upper_limit ) {
+   $sql .= "($value_field >= 
{$fv->lower_limit} AND $value_field <= {$fv->upper_limit}) ";
+   } elseif ( $fv->lower_limit ) {
+   $sql .= "$value_field > 
{$fv->lower_limit} ";
+   } elseif ( $fv->upper_limit ) {
+   $sql .= "$value_field < 
{$fv->upper_limit} ";
+   }
} else {
$value = $fv->text;
$sql .= "$value_field = '{$cdb->strencode( 
$value )}'";
diff --git a/drilldown/CargoFilter.php b/drilldown/CargoFilter.php
index e5c7192..d86ca35 100644
--- a/drilldown/CargoFilter.php
+++ b/drilldown/CargoFilter.php
@@ -42,7 +42,7 @@
 */
function getTimePeriod( $fullTextSearchTerm, $appliedFilters ) {
// If it's not a date field, return null.
-   if ( $this->fieldDescription->mType != 'Date' ) {
+   if ( !in_array( $this->fieldDescription->mType, array( 'Date', 
'Datetime' ) ) ) {
return null;
}
 
diff --git a/drilldown/CargoFilterValue.php b/drilldown/CargoFilterValue.php
index 2097807..c637d8c 100644
--- a/drilldown/CargoFilterValue.php
+++ b/drilldown/CargoFilterValue.php
@@ -37,8 +37,8 @@
} elseif ( $fv->text == ' other' ) {
$fv->is_other = true;
}
-   // set other fields, if it's a date or number range
-   if ( $filter != null && $filter->fieldDescription->mType == 
'Date' ) {
+   // Set other fields, if it's a date or number range.
+   if ( $filter != null && in_array( 
$filter->fieldDescription->mType, array( 'Date', 'Datetime' ) ) ) {
// @TODO - this should ideally be handled via query
// string arrays - and this code merged in with
// date-range handling - instead of just doing string
diff --git a/drilldown/CargoSpecialDrilldown.php 
b/drilldown/CargoSpecialDrilldown.php
index 59806ac..aa40ea7 100644
--- a/drilldown/CargoSpecialDrilldown.php
+++ b/drilldown/CargoSpecialDrilldown.php
@@ -433,9 +433,10 @@
}
return $this->printFilterLine( $af->filter->name, true, 
true, $results_line );
}
-   // add 'Other' and 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: phabricator: Move mysql hostnames to hiera

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

Change subject: phabricator: Move mysql hostnames to hiera
..


phabricator: Move mysql hostnames to hiera

One question:  Do we have a mysql m3-slave in codfw? the hostname
m3-slave.codfw.wmnet does not resolve

Change-Id: Ie4c9e2eb49eec827ac05fb79f8f3b0bf4b745ff6
---
M hieradata/role/codfw/phabricator/main.yaml
M hieradata/role/eqiad/phabricator/main.yaml
M modules/role/manifests/phabricator/main.pp
3 files changed, 9 insertions(+), 2 deletions(-)

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



diff --git a/hieradata/role/codfw/phabricator/main.yaml 
b/hieradata/role/codfw/phabricator/main.yaml
index 0101616..7da17b1 100644
--- a/hieradata/role/codfw/phabricator/main.yaml
+++ b/hieradata/role/codfw/phabricator/main.yaml
@@ -6,3 +6,7 @@
 phabricator::vcs::listen_addresses:
   - "10.192.32.149"
   - "[2620:0:860:103:10:192:32:149]"
+
+phabricator::mysql::master: "m3-master.eqiad.wmnet"
+# todo: replace with a codfw slave (do we have a phab db server in codfw?)
+phabricator::mysql::slave: "m3-slave.eqiad.wmnet"
diff --git a/hieradata/role/eqiad/phabricator/main.yaml 
b/hieradata/role/eqiad/phabricator/main.yaml
index fe11da0..d641774 100644
--- a/hieradata/role/eqiad/phabricator/main.yaml
+++ b/hieradata/role/eqiad/phabricator/main.yaml
@@ -17,3 +17,6 @@
 
 phabricator::vcs::address::v4: "10.64.32.186"
 phabricator::vcs::address::v6: "2620:0:861:103:10:64:32:186"
+
+phabricator::mysql::master: "m3-master.eqiad.wmnet"
+phabricator::mysql::slave: "m3-slave.eqiad.wmnet"
diff --git a/modules/role/manifests/phabricator/main.pp 
b/modules/role/manifests/phabricator/main.pp
index b215aad..e461112 100644
--- a/modules/role/manifests/phabricator/main.pp
+++ b/modules/role/manifests/phabricator/main.pp
@@ -21,8 +21,8 @@
 $cache_misc_nodes = hiera('cache::misc::nodes', [])
 $domain = 'phabricator.wikimedia.org'
 $altdom = 'phab.wmfusercontent.org'
-$mysql_host = 'm3-master.eqiad.wmnet'
-$mysql_slave = 'm3-slave.eqiad.wmnet'
+$mysql_host = hiera('phabricator::mysql::master', 'localhost')
+$mysql_slave = hiera('phabricator::mysql::slave', 'localhost')
 $phab_root_dir = '/srv/phab'
 $deploy_target = 'phabricator/deployment'
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4c9e2eb49eec827ac05fb79f8f3b0bf4b745ff6
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: 20after4 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Let gallery dialog handle unprefixed filenames

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

Change subject: Let gallery dialog handle unprefixed filenames
..


Let gallery dialog handle unprefixed filenames

The namespace prefix before image filenames is optional
in galleries, but the API requires it. If the prefix is
omitted, add the file namespace prefix.

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

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



diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
index ddb0506..e65c32e 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
@@ -261,7 +261,7 @@
var titlesString, title, titleText, imageTitles, mode,
caption, widths, heights, perrow,
showFilename, classes, styles,
-   pageTitle, namespace, namespacesWithSubpages,
+   pageTitle, namespace, namespacesWithSubpages, 
namespaceIds,
dialog = this,
attributes = this.selectedNode && 
this.selectedNode.getAttribute( 'mw' ).attrs;
 
@@ -271,6 +271,7 @@
pageTitle = mw.config.get( 'wgTitle' );
namespace = mw.config.get( 'wgNamespaceNumber' );
namespacesWithSubpages = mw.config.get( 
'wgVisualEditorConfig' ).namespacesWithSubpages;
+   namespaceIds = mw.config.get( 'wgNamespaceIds' );
 
if ( namespacesWithSubpages[ namespace ] ) {
pageTitle = pageTitle.slice( 
pageTitle.lastIndexOf( '/' ) + 1 );
@@ -294,7 +295,10 @@
 
// Ignore any empty lines
if ( matches ) {
-   title = 
mw.Title.newFromText( matches[ 1 ] );
+   // The "File:" prefix 
is optional in wikitext galleries. This will add
+   // the prefix if there 
is no prefix, but won't change an existing
+   // prefix (e.g. 
"Category:")
+   title = 
mw.Title.newFromText( matches[ 1 ], namespaceIds.file );
// Ignore any invalid 
titles
// (which will result 
in title being null)
if ( title ) {

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: openstack: split nova.pp into one class per file (autoload l...

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

Change subject: openstack: split nova.pp into one class per file (autoload 
layout)
..


openstack: split nova.pp into one class per file (autoload layout)

All this does is split the file into one file per class,
instead of multiple classes in a single file.

None of the class names or content are changed.

It will fix warnings about not being in the correct layout.

Bug: T93645
Change-Id: I3a4ed74c2daf612ffc39aa9b8c367b04c69fdcb3
---
D modules/role/manifests/labs/openstack/nova.pp
A modules/role/manifests/labs/openstack/nova/api.pp
A modules/role/manifests/labs/openstack/nova/common.pp
A modules/role/manifests/labs/openstack/nova/compute.pp
A modules/role/manifests/labs/openstack/nova/controller.pp
A modules/role/manifests/labs/openstack/nova/manager.pp
A modules/role/manifests/labs/openstack/nova/network.pp
A modules/role/manifests/labs/openstack/nova/network/bonding.pp
8 files changed, 412 insertions(+), 412 deletions(-)

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



diff --git a/modules/role/manifests/labs/openstack/nova.pp 
b/modules/role/manifests/labs/openstack/nova.pp
deleted file mode 100644
index 919f31c..000
--- a/modules/role/manifests/labs/openstack/nova.pp
+++ /dev/null
@@ -1,412 +0,0 @@
-class role::labs::openstack::nova::common {
-
-include passwords::misc::scripts
-include openstack::nova::hooks
-
-$novaconfig_pre   = hiera_hash('novaconfig', {})
-$keystoneconfig   = hiera_hash('keystoneconfig', {})
-
-$keystone_host= hiera('labs_keystone_host')
-$nova_controller  = hiera('labs_nova_controller')
-$nova_api_host= hiera('labs_nova_api_host')
-$network_host = hiera('labs_nova_network_host')
-$status_wiki_host_master  = hiera('status_wiki_host_master')
-
-$extra_novaconfig = {
-bind_ip=> ipresolve($keystone_host,4),
-keystone_auth_host => $keystoneconfig['auth_host'],
-keystone_auth_port => $keystoneconfig['auth_port'],
-keystone_admin_token   => $keystoneconfig['admin_token'],
-keystone_auth_protocol => $keystoneconfig['auth_protocol'],
-auth_uri   => "http://${nova_controller}:5000;,
-api_ip => ipresolve($nova_api_host,4),
-controller_address => ipresolve($nova_controller,4),
-}
-$novaconfig = deep_merge($novaconfig_pre, $extra_novaconfig)
-
-class { '::openstack::common':
-novaconfig   => $novaconfig,
-instance_status_wiki_host=> $status_wiki_host_master,
-instance_status_wiki_domain  => 'labs',
-instance_status_wiki_page_prefix => 'Nova_Resource:',
-instance_status_wiki_region  => $::site,
-instance_status_dns_domain   => "${::site}.wmflabs",
-instance_status_wiki_user=> 
$passwords::misc::scripts::wikinotifier_user,
-instance_status_wiki_pass=> 
$passwords::misc::scripts::wikinotifier_pass,
-}
-}
-
-# This is the wikitech UI
-class role::labs::openstack::nova::manager {
-system::role { $name: }
-include ::nutcracker::monitoring
-include ::mediawiki::packages::php5
-include ::mediawiki::packages::math
-include ::mediawiki::packages::tex
-include ::mediawiki::cgroup
-include ::scap::scripts
-
-include role::labs::openstack::nova::common
-$novaconfig = $role::labs::openstack::nova::common::novaconfig
-
-case $::realm {
-'production': {
-$sitename = 'wikitech.wikimedia.org'
-$certificate = $sitename
-sslcert::certificate { $sitename: }
-$cert_type = ''
-}
-'labtest': {
-$sitename = 'labtestwikitech.wikimedia.org'
-$certificate = 'labtestwikitech'
-letsencrypt::cert::integrated { $certificate:
-subjects   => $sitename,
-puppet_svc => 'apache2',
-system_svc => 'apache2',
-}
-$cert_type = '_letsencrypt'
-}
-default: {
-notify {"unknown realm ${::realm}; https cert will not be 
installed.":}
-$cert_type = ''
-}
-}
-
-monitoring::service { 'https':
-description   => 'HTTPS',
-check_command => "check_ssl_http${cert_type}!${sitename}",
-}
-
-$ssl_settings = ssl_ciphersuite('apache', 'compat', true)
-
-ferm::service { 'wikitech_http':
-proto => 'tcp',
-port  => '80',
-}
-
-ferm::service { 'wikitech_https':
-proto => 'tcp',
-port  => '443',
-}
-
-ferm::service { 'deployment-ssh':
-proto  => 'tcp',
-port   => '22',
-srange => 

[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Use mw.Map#get instead of mw.Map#values

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

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

Change subject: Use mw.Map#get instead of mw.Map#values
..

Use mw.Map#get instead of mw.Map#values

Change-Id: Ifbc7f3e40190f678d6d9dad41fc161334b9b12c2
---
M modules/ext.RevisionSlider.SliderView.js
M modules/ext.RevisionSlider.init.js
2 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RevisionSlider 
refs/changes/94/323094/1

diff --git a/modules/ext.RevisionSlider.SliderView.js 
b/modules/ext.RevisionSlider.SliderView.js
index 56b9e03..38de177 100644
--- a/modules/ext.RevisionSlider.SliderView.js
+++ b/modules/ext.RevisionSlider.SliderView.js
@@ -263,7 +263,7 @@
$container.html( $slider );
 
this.slide( Math.floor( ( 
this.pointerNewer.getPosition() - 1 ) / this.slider.getRevisionsPerWindow() ), 
0 );
-   this.diffPage.replaceState( 
mw.config.values.extRevisionSliderOldRev, 
mw.config.values.extRevisionSliderNewRev, this );
+   this.diffPage.replaceState( mw.config.get( 
'extRevisionSliderOldRev' ), mw.config.get( 'extRevisionSliderNewRev' ), this );
this.diffPage.initOnPopState( this );
},
 
@@ -388,7 +388,7 @@
 * @return {jQuery}
 */
getOldRevElement: function ( $revs ) {
-   return $revs.find( 
'div.mw-revslider-revision[data-revid="' + 
mw.config.values.extRevisionSliderOldRev + '"]' );
+   return $revs.find( 
'div.mw-revslider-revision[data-revid="' + mw.config.get( 
'extRevisionSliderOldRev' ) + '"]' );
},
 
/**
@@ -398,7 +398,7 @@
 * @return {jQuery}
 */
getNewRevElement: function ( $revs ) {
-   return $revs.find( 
'div.mw-revslider-revision[data-revid="' + 
mw.config.values.extRevisionSliderNewRev + '"]' );
+   return $revs.find( 
'div.mw-revslider-revision[data-revid="' + mw.config.get( 
'extRevisionSliderNewRev' ) + '"]' );
},
 
/**
diff --git a/modules/ext.RevisionSlider.init.js 
b/modules/ext.RevisionSlider.init.js
index 18f0fab..da61cc1 100644
--- a/modules/ext.RevisionSlider.init.js
+++ b/modules/ext.RevisionSlider.init.js
@@ -10,12 +10,12 @@
api = new mw.libs.revisionSlider.Api( 
mw.util.wikiScript( 'api' ) );
 
mw.track( 'counter.MediaWiki.RevisionSlider.event.init' 
);
-   mw.libs.revisionSlider.userOffset = 
mw.user.options.values.timecorrection ? 
mw.user.options.values.timecorrection.split( '|' )[ 1 ] : 
mw.config.values.extRevisionSliderTimeOffset;
+   mw.libs.revisionSlider.userOffset = 
mw.user.options.get( 'timecorrection' ) ? mw.user.options.get( 'timecorrection' 
).split( '|' )[ 1 ] : mw.config.get( 'extRevisionSliderTimeOffset' );
 
mw.libs.revisionSlider.HelpDialog.init();
 
api.fetchRevisionData( mw.config.get( 'wgPageName' ), {
-   startId: 
mw.config.values.extRevisionSliderNewRev,
+   startId: mw.config.get( 
'extRevisionSliderNewRev' ),
limit: 
mw.libs.revisionSlider.calculateRevisionsPerWindow( 160, 16 )
} ).then( function ( data ) {
var revs,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifbc7f3e40190f678d6d9dad41fc161334b9b12c2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RevisionSlider
Gerrit-Branch: master
Gerrit-Owner: Addshore 

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Follow-up d68bd23: No need to list ve.ui.DiffDialog twice in...

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

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

Change subject: Follow-up d68bd23: No need to list ve.ui.DiffDialog twice in 
modules.json
..

Follow-up d68bd23: No need to list ve.ui.DiffDialog twice in modules.json

Change-Id: I41d147c7e2759e4180d83e4ebdef3a714a6501a5
---
M build/modules.json
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/93/323093/1

diff --git a/build/modules.json b/build/modules.json
index 08b3e84..d50d6ba 100644
--- a/build/modules.json
+++ b/build/modules.json
@@ -491,7 +491,6 @@
"src/ui/dialogs/ve.ui.NodeDialog.js",
"src/ui/dialogs/ve.ui.ToolbarDialog.js",
"src/ui/dialogs/ve.ui.CommandHelpDialog.js",
-   "src/ui/dialogs/ve.ui.DiffDialog.js",
"src/ui/dialogs/ve.ui.FindAndReplaceDialog.js",
"src/ui/dialogs/ve.ui.ProgressDialog.js",
"src/ui/dialogs/ve.ui.SpecialCharacterDialog.js",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Move MimeAnalyzer params to ServiceWiring

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

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

Change subject: Move MimeAnalyzer params to ServiceWiring
..

Move MimeAnalyzer params to ServiceWiring

Change-Id: Ic3df489cd8f4af2c0de39aaac3140ace107d4bf4
---
M includes/MimeMagic.php
M includes/ServiceWiring.php
2 files changed, 56 insertions(+), 64 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/89/323089/2

diff --git a/includes/MimeMagic.php b/includes/MimeMagic.php
index 79218ab..e2cb843 100644
--- a/includes/MimeMagic.php
+++ b/includes/MimeMagic.php
@@ -18,71 +18,19 @@
  * @file
  */
 use MediaWiki\MediaWikiServices;
-use MediaWiki\Logger\LoggerFactory;
 
+/**
+ * @deprecated since 1.29
+ * MimeAnalyzer should be used instead of MimeMagic
+ */
 class MimeMagic extends MimeAnalyzer {
/**
 * Get an instance of this class
 * @return MimeMagic
-* @deprecated since 1.28
+* @deprecated since 1.28 get a MimeAnalyzer instance form 
MediaWikiServices
 */
public static function singleton() {
+   // XXX: We know that the MimeAnalyzer is currently an instance 
of MimeMagic
return MediaWikiServices::getInstance()->getMimeAnalyzer();
-   }
-
-   /**
-* @param array $params
-* @param Config $mainConfig
-* @return array
-*/
-   public static function applyDefaultParameters( array $params, Config 
$mainConfig ) {
-   $logger = LoggerFactory::getInstance( 'Mime' );
-   $params += [
-   'typeFile' => $mainConfig->get( 'MimeTypeFile' ),
-   'infoFile' => $mainConfig->get( 'MimeInfoFile' ),
-   'xmlTypes' => $mainConfig->get( 'XMLMimeTypes' ),
-   'guessCallback' =>
-   function ( $mimeAnalyzer, &$head, &$tail, 
$file, &$mime ) use ( $logger ) {
-   // Also test DjVu
-   $deja = new DjVuImage( $file );
-   if ( $deja->isValid() ) {
-   $logger->info( __METHOD__ . ": 
detected $file as image/vnd.djvu\n" );
-   $mime = 'image/vnd.djvu';
-
-   return;
-   }
-   // Some strings by reference for 
performance - assuming well-behaved hooks
-   Hooks::run(
-   'MimeMagicGuessFromContent',
-   [ $mimeAnalyzer, &$head, 
&$tail, $file, &$mime ]
-   );
-   },
-   'extCallback' => function ( $mimeAnalyzer, $ext, &$mime 
) {
-   // Media handling extensions can improve the 
MIME detected
-   Hooks::run( 'MimeMagicImproveFromExtension', [ 
$mimeAnalyzer, $ext, &$mime ] );
-   },
-   'initCallback' => function ( $mimeAnalyzer ) {
-   // Allow media handling extensions adding 
MIME-types and MIME-info
-   Hooks::run( 'MimeMagicInit', [ $mimeAnalyzer ] 
);
-   },
-   'logger' => $logger
-   ];
-
-   if ( $params['infoFile'] === 'includes/mime.info' ) {
-   $params['infoFile'] = __DIR__ . "/libs/mime/mime.info";
-   }
-
-   if ( $params['typeFile'] === 'includes/mime.types' ) {
-   $params['typeFile'] = __DIR__ . "/libs/mime/mime.types";
-   }
-
-   $detectorCmd = $mainConfig->get( 'MimeDetectorCommand' );
-   if ( $detectorCmd ) {
-   $params['detectCallback'] = function ( $file ) use ( 
$detectorCmd ) {
-   return wfShellExec( "$detectorCmd " . 
wfEscapeShellArg( $file ) );
-   };
-   }
-
-   return $params;
}
 }
diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php
index c2197a6..6881023 100644
--- a/includes/ServiceWiring.php
+++ b/includes/ServiceWiring.php
@@ -214,12 +214,56 @@
},
 
'MimeAnalyzer' => function( MediaWikiServices $services ) {
-   return new MimeMagic(
-   MimeMagic::applyDefaultParameters(
-   [],
-   $services->getMainConfig()
-   )
-   );
+   $logger = LoggerFactory::getInstance( 'Mime' );
+   $mainConfig = $services->getMainConfig();
+   $params = [
+   

[MediaWiki-commits] [Gerrit] operations/puppet[production]: site.pp: db1052's binlog changed to ROW

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

Change subject: site.pp: db1052's binlog changed to ROW
..


site.pp: db1052's binlog changed to ROW

In order to set up the new sanitarium db1052 will need
to get its binary logs changed to ROW based replication

Bug: T150960
Change-Id: Ie356db914aafdd4b1ccab4df60c07a7707e3ff8c
---
M manifests/site.pp
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 09784ee..a8ceef7 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -429,12 +429,20 @@
 }
 }
 
-node /^db10(51|52|55|65|66|72|73|80|83|89)\.eqiad\.wmnet/ {
+node /^db10(51|55|65|66|72|73|80|83|89)\.eqiad\.wmnet/ {
 class { 'role::mariadb::core':
 shard => 's1',
 }
 }
 
+# Testing row-based replication to sanitarium2 (T150960)
+node 'db1052.eqiad.wmnet' {
+class { 'role::mariadb::core':
+shard => 's1',
+binlog_format => 'ROW',
+}
+}
+
 # s1 (enwiki) core production dbs on codfw
 # codfw master
 node 'db2016.codfw.wmnet' {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie356db914aafdd4b1ccab4df60c07a7707e3ff8c
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Volans 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: enable instance restbase2011-c.codfw.wmnet

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

Change subject: enable instance restbase2011-c.codfw.wmnet
..


enable instance restbase2011-c.codfw.wmnet

Bug: T151086
Change-Id: I1e2e0726aaff7c888775cbe2ca3f56df0deaa188
---
M hieradata/hosts/restbase2011.yaml
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/hieradata/hosts/restbase2011.yaml 
b/hieradata/hosts/restbase2011.yaml
index b31804e..8d93393 100644
--- a/hieradata/hosts/restbase2011.yaml
+++ b/hieradata/hosts/restbase2011.yaml
@@ -10,8 +10,8 @@
 listen_address: 10.192.32.153
 rpc_address: 10.192.32.153
 rpc_interface: eth0
-#  c:
-#jmx_port: 7191
-#listen_address: 10.192.32.154
-#rpc_address: 10.192.32.154
-#rpc_interface: eth0
+  c:
+jmx_port: 7191
+listen_address: 10.192.32.154
+rpc_address: 10.192.32.154
+rpc_interface: eth0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1e2e0726aaff7c888775cbe2ca3f56df0deaa188
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Eevans 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Eevans 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Get GenderCache from MediaWikiServices

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

Change subject: Get GenderCache from MediaWikiServices
..


Get GenderCache from MediaWikiServices

Change-Id: I752a65d93ec49ea6c44306eb18a6641ef86f7b5c
---
M includes/api/ApiPageSet.php
M includes/api/ApiQueryAllPages.php
M includes/parser/CoreParserFunctions.php
M tests/phpunit/includes/cache/GenderCacheTest.php
4 files changed, 13 insertions(+), 8 deletions(-)

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



diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php
index 46c57b8..1a509c5 100644
--- a/includes/api/ApiPageSet.php
+++ b/includes/api/ApiPageSet.php
@@ -23,6 +23,7 @@
  *
  * @file
  */
+use MediaWiki\MediaWikiServices;
 
 /**
  * This class contains a list of pages that the client has requested.
@@ -915,7 +916,7 @@
}
 
// Get gender information
-   $genderCache = GenderCache::singleton();
+   $genderCache = 
MediaWikiServices::getInstance()->getGenderCache();
$genderCache->doQuery( $usernames, __METHOD__ );
}
 
@@ -1197,7 +1198,7 @@
}
}
// Get gender information
-   $genderCache = GenderCache::singleton();
+   $genderCache = 
MediaWikiServices::getInstance()->getGenderCache();
$genderCache->doQuery( $usernames, __METHOD__ );
 
return $linkBatch;
diff --git a/includes/api/ApiQueryAllPages.php 
b/includes/api/ApiQueryAllPages.php
index 0ce1939..6a0f124 100644
--- a/includes/api/ApiQueryAllPages.php
+++ b/includes/api/ApiQueryAllPages.php
@@ -23,6 +23,7 @@
  *
  * @file
  */
+use MediaWiki\MediaWikiServices;
 
 /**
  * Query module to enumerate all available pages.
@@ -206,7 +207,7 @@
foreach ( $res as $row ) {
$users[] = $row->page_title;
}
-   GenderCache::singleton()->doQuery( $users, __METHOD__ );
+   
MediaWikiServices::getInstance()->getGenderCache()->doQuery( $users, __METHOD__ 
);
$res->rewind(); // reset
}
 
diff --git a/includes/parser/CoreParserFunctions.php 
b/includes/parser/CoreParserFunctions.php
index 01cce02..4c82dda 100644
--- a/includes/parser/CoreParserFunctions.php
+++ b/includes/parser/CoreParserFunctions.php
@@ -20,6 +20,7 @@
  * @file
  * @ingroup Parser
  */
+use MediaWiki\MediaWikiServices;
 
 /**
  * Various core parser functions, registered in Parser::firstCallInit()
@@ -346,10 +347,11 @@
 
// check parameter, or use the ParserOptions if in interface 
message
$user = User::newFromName( $username );
+   $genderCache = 
MediaWikiServices::getInstance()->getGenderCache();
if ( $user ) {
-   $gender = GenderCache::singleton()->getGenderOf( $user, 
__METHOD__ );
+   $gender = $genderCache->getGenderOf( $user, __METHOD__ 
);
} elseif ( $username === '' && 
$parser->getOptions()->getInterfaceMessage() ) {
-   $gender = GenderCache::singleton()->getGenderOf( 
$parser->getOptions()->getUser(), __METHOD__ );
+   $gender = $genderCache->getGenderOf( 
$parser->getOptions()->getUser(), __METHOD__ );
}
$ret = $parser->getFunctionLang()->gender( $gender, $forms );
return $ret;
diff --git a/tests/phpunit/includes/cache/GenderCacheTest.php 
b/tests/phpunit/includes/cache/GenderCacheTest.php
index 9c723c0..e5bb237 100644
--- a/tests/phpunit/includes/cache/GenderCacheTest.php
+++ b/tests/phpunit/includes/cache/GenderCacheTest.php
@@ -1,4 +1,5 @@
 getGenderCache();
$username = isset( self::$nameMap[$userKey] ) ? 
self::$nameMap[$userKey] : $userKey;
$gender = $genderCache->getGenderOf( $username );
$this->assertEquals( $gender, $expectedGender, "GenderCache 
normal" );
@@ -53,7 +54,7 @@
 */
public function testUserObjects( $userKey, $expectedGender ) {
$username = isset( self::$nameMap[$userKey] ) ? 
self::$nameMap[$userKey] : $userKey;
-   $genderCache = GenderCache::singleton();
+   $genderCache = 
MediaWikiServices::getInstance()->getGenderCache();
$gender = $genderCache->getGenderOf( $username );
$this->assertEquals( $gender, $expectedGender, "GenderCache 
normal" );
}
@@ -79,7 +80,7 @@
 */
public function testStripSubpages( $userKey, $expectedGender ) {
$username = isset( self::$nameMap[$userKey] ) ? 
self::$nameMap[$userKey] : $userKey;
-   $genderCache = GenderCache::singleton();
+   $genderCache = 
MediaWikiServices::getInstance()->getGenderCache();
$gender 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Phab: Remove pointless variable assignment

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

Change subject: Phab: Remove pointless variable assignment
..


Phab: Remove pointless variable assignment

Change-Id: Ic2451c273307ff424796e55870b2cce9f55eca40
---
M modules/role/manifests/phabricator/main.pp
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/modules/role/manifests/phabricator/main.pp 
b/modules/role/manifests/phabricator/main.pp
index cd7ea43..b215aad 100644
--- a/modules/role/manifests/phabricator/main.pp
+++ b/modules/role/manifests/phabricator/main.pp
@@ -181,7 +181,6 @@
 }
 include exim4::ganglia
 
-$emailbotcert = $passwords::phabricator::emailbot_cert
 class { '::phabricator::mailrelay':
 default => {
 security => 'users',
@@ -196,12 +195,11 @@
 domains => 'markmonitor.com,wikimedia.org',
 procurement => 
'cdw.com,cyrusone.com,dasher.com,dell.com,globalsign.com,optiv.com,unitedlayer.com,us.ntt.net,wikimedia.org,zayo.com',
 },
-
 phab_bot=> {
 root_dir=> '/srv/phab/phabricator/',
 username=> 'emailbot',
 host=> "https://${domain}/api/;,
-certificate => $emailbotcert,
+certificate => $passwords::phabricator::emailbot_cert,
 },
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2451c273307ff424796e55870b2cce9f55eca40
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix case of getMimeAnalyzer in MimeMagic class

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

Change subject: Fix case of getMimeAnalyzer in MimeMagic class
..


Fix case of getMimeAnalyzer in MimeMagic class

Change-Id: Ieab23102d25395f50bfcfb79450494250b7b22e8
---
M includes/MimeMagic.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/MimeMagic.php b/includes/MimeMagic.php
index c03bce7..79218ab 100644
--- a/includes/MimeMagic.php
+++ b/includes/MimeMagic.php
@@ -27,7 +27,7 @@
 * @deprecated since 1.28
 */
public static function singleton() {
-   return MediaWikiServices::getInstance()->getMIMEAnalyzer();
+   return MediaWikiServices::getInstance()->getMimeAnalyzer();
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieab23102d25395f50bfcfb79450494250b7b22e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Added script to export redirects

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

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

Change subject: Added script to export redirects
..

Added script to export redirects

Change-Id: I82abe58905c5caa097bc0e1c20da19034cc833ed
---
A maintenance/exportRedirects.php
1 file changed, 73 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/92/323092/1

diff --git a/maintenance/exportRedirects.php b/maintenance/exportRedirects.php
new file mode 100644
index 000..53f090a
--- /dev/null
+++ b/maintenance/exportRedirects.php
@@ -0,0 +1,73 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Maintenance
+ * @author Petr Pchelko 
+ */
+
+require_once __DIR__ . '/Maintenance.php';
+
+/**
+ * Maintenance script to dump revision restrictions, one JSON object per batch
+ * and line.
+ *
+ * @ingroup Maintenance
+ */
+class ExportRedirects extends Maintenance {
+
+   public function __construct() {
+   parent::__construct();
+   $this->addDescription( 'Dump page deletions, one batch at a 
time' );
+$this->addOption( 'start_page_id', 'Start from this page_id' );
+   $this->addOption( 'limit', 'Limit the batch size to this 
value.' );
+   }
+
+   public function execute() {
+   // Delay for replication lag. Not really.
+   // wfWaitForSlaves();
+
+$start_page_id = $this->getOption( 'start_page_id' );
+   $limit = intval( $this->getOption( 'limit', 100 ) );
+
+   do {
+   $dbr = $this->getDB( DB_SLAVE, 'vslow' );
+   $sql = "SELECT page.page_id, page.page_namespace, 
page.page_title, page.page_latest, redirect.rd_namespace, redirect.rd_title " .
+"FROM page RIGHT JOIN redirect ON page.page_id = 
redirect.rd_from ";
+
+   if ( !is_null( $start_page_id ) ) {
+$escaped_page_id = $dbr->addQuotes( $start_page_id );
+   $sql = $sql . "WHERE redirect.rd_from >= 
{$escaped_page_id} ";
+   }
+   $sql = $sql . "ORDER BY rd_from LIMIT {$limit}";
+
+   $batchResult = $dbr->query( $sql );
+   $rows = [];
+   foreach ( $batchResult as $row ) {
+   $rows[] = $row;
+$start_page_id = $row->page_id;
+   }
+   // Emit one JSON object per line.
+   $this->output( json_encode( $rows ) . "\n" );
+   } while ( count( $rows ) );
+   }
+}
+
+$maintClass = "ExportRedirects";
+require_once RUN_MAINTENANCE_IF_MAIN;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Follow-up I63ab27cb: Get rid of notices tool when there are ...

2016-11-22 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Follow-up I63ab27cb: Get rid of notices tool when there are no 
notices
..

Follow-up I63ab27cb: Get rid of notices tool when there are no notices

Change-Id: I3dd9d2cbfb1fa536490eb8b4b7d630e9c6cfdd48
---
M modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
index 7de42cd..6a63322 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
@@ -93,7 +93,7 @@
this.popup.$body.append( this.$items );
 
if ( !count ) {
-   this.$element = $( [] );
+   this.destroy();
}
 };
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3dd9d2cbfb1fa536490eb8b4b7d630e9c6cfdd48
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: build: Bump jsonlint devDependency to latest

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

Change subject: build: Bump jsonlint devDependency to latest
..


build: Bump jsonlint devDependency to latest

 grunt-jsonlint   1.0.7  →  1.1.0

We can't bump the karma/qunit modules due to issues with our CI.

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

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



diff --git a/package.json b/package.json
index 0e841f8..99e752c 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,7 @@
 "grunt-contrib-copy": "1.0.0",
 "grunt-contrib-watch": "1.0.0",
 "grunt-eslint": "19.0.0",
-"grunt-jsonlint": "1.0.7",
+"grunt-jsonlint": "1.1.0",
 "grunt-karma": "2.0.0",
 "grunt-stylelint": "0.6.0",
 "karma": "1.1.0",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15595df8b30a8ef4ddb6471acdd8d4da4f4afabc
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Let gallery dialog handle unprefixed filenames

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

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

Change subject: Let gallery dialog handle unprefixed filenames
..

Let gallery dialog handle unprefixed filenames

The namespace prefix before image filenames is optional
in galleries, but the API requires it. If the prefix is
omitted, add the file namespace prefix (but if a
different prefix is given, don't change it).

Change-Id: I3d126550c2ad2e84454122f92307ba4bc943780b
---
M modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
1 file changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
index ddb0506..695b35b 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
@@ -261,7 +261,7 @@
var titlesString, title, titleText, imageTitles, mode,
caption, widths, heights, perrow,
showFilename, classes, styles,
-   pageTitle, namespace, namespacesWithSubpages,
+   pageTitle, namespace, namespacesWithSubpages, 
namespaceIds,
dialog = this,
attributes = this.selectedNode && 
this.selectedNode.getAttribute( 'mw' ).attrs;
 
@@ -271,6 +271,7 @@
pageTitle = mw.config.get( 'wgTitle' );
namespace = mw.config.get( 'wgNamespaceNumber' );
namespacesWithSubpages = mw.config.get( 
'wgVisualEditorConfig' ).namespacesWithSubpages;
+   namespaceIds = mw.config.get( 'wgNamespaceIds' );
 
if ( namespacesWithSubpages[ namespace ] ) {
pageTitle = pageTitle.slice( 
pageTitle.lastIndexOf( '/' ) + 1 );
@@ -295,6 +296,10 @@
// Ignore any empty lines
if ( matches ) {
title = 
mw.Title.newFromText( matches[ 1 ] );
+   // The "File:" prefix 
is optional in wikitext galleries
+   if ( 
title.getNamespaceId() === namespaceIds[ '' ] ) {
+   title = 
mw.Title.newFromText( matches[ 1 ], namespaceIds.file );
+   }
// Ignore any invalid 
titles
// (which will result 
in title being null)
if ( title ) {

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Fix EmailAuth beta cluster enabling hack

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

Change subject: Fix EmailAuth beta cluster enabling hack
..


Fix EmailAuth beta cluster enabling hack

Real names are disabled; use an email address tag instead.

Bug: T151015
Change-Id: I562fd14ade64e657990f1936e1a3f5ee8749a461
---
M wmf-config/CommonSettings-labs.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index bb1306c..81a4d78 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -378,7 +378,7 @@
$user, &$verificationRequired, &$formMessage,
&$subjectMessage, &$bodyMessage
) {
-   if ( preg_match( '/EmailAuth$/', $user->getRealName() ) ) {
+   if ( preg_match( '/\+emailauth@/', $user->getEmail() ) ) {
$verificationRequired = true;
return false;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I562fd14ade64e657990f1936e1a3f5ee8749a461
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs/striker[master]: Allow uppercase in diffusion repo names

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

Change subject: Allow uppercase in diffusion repo names
..


Allow uppercase in diffusion repo names

The prior assumption that repo names will only ever be in lower case is
invalid. See https://phabricator.wikimedia.org/diffusion/LTZB/ as an
example.

Bug: T151409
Change-Id: I44f0701330e40b7ea1ec8ba31746e8d0da2429be
---
M striker/tools/urls.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/striker/tools/urls.py b/striker/tools/urls.py
index 2ceaf90..9062c3d 100644
--- a/striker/tools/urls.py
+++ b/striker/tools/urls.py
@@ -22,7 +22,7 @@
 
 
 TOOL = r'(?P[_a-z][-0-9_a-z]*)'
-REPO = r'(?P[_a-z][-0-9_a-z]*)'
+REPO = r'(?P[_a-zA-Z][-0-9_a-zA-Z]*)'
 
 urlpatterns = [
 urls.url(r'^$', 'striker.tools.views.index', name='index'),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I44f0701330e40b7ea1ec8ba31746e8d0da2429be
Gerrit-PatchSet: 1
Gerrit-Project: labs/striker
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Merlijn van Deen 
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] operations/puppet[production]: Phabricator: conf_env resources need phabricator package ins...

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

Change subject: Phabricator: conf_env resources need phabricator package 
installed
..


Phabricator: conf_env resources need phabricator package installed

This fixes a dependency problem discovered on labs:

Puppet run fails on labs when the phabricator package hasn't been
installed already. This worked in production because it wasn't a
fresh install from scratch.

Change-Id: I5db6a85579f20d944f31b2e88ad75b2bab5a2dac
---
M modules/phabricator/manifests/conf_env.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/phabricator/manifests/conf_env.pp 
b/modules/phabricator/manifests/conf_env.pp
index 9f9a003..9904fee 100644
--- a/modules/phabricator/manifests/conf_env.pp
+++ b/modules/phabricator/manifests/conf_env.pp
@@ -16,5 +16,6 @@
 group   => $group,
 mode=> '0640',
 content => template('phabricator/local.json.erb'),
+require => [Package[$phabricator::deploy_target]],
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5db6a85579f20d944f31b2e88ad75b2bab5a2dac
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: 20after4 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs/striker[master]: Allow uppercase in diffusion repo names

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

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

Change subject: Allow uppercase in diffusion repo names
..

Allow uppercase in diffusion repo names

The prior assumption that repo names will only ever be in lower case is
invalid. See https://phabricator.wikimedia.org/diffusion/LTZB/ as an
example.

Bug: T151409
Change-Id: I44f0701330e40b7ea1ec8ba31746e8d0da2429be
---
M striker/tools/urls.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/88/323088/1

diff --git a/striker/tools/urls.py b/striker/tools/urls.py
index 2ceaf90..9062c3d 100644
--- a/striker/tools/urls.py
+++ b/striker/tools/urls.py
@@ -22,7 +22,7 @@
 
 
 TOOL = r'(?P[_a-z][-0-9_a-z]*)'
-REPO = r'(?P[_a-z][-0-9_a-z]*)'
+REPO = r'(?P[_a-zA-Z][-0-9_a-zA-Z]*)'
 
 urlpatterns = [
 urls.url(r'^$', 'striker.tools.views.index', name='index'),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I44f0701330e40b7ea1ec8ba31746e8d0da2429be
Gerrit-PatchSet: 1
Gerrit-Project: labs/striker
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] mediawiki...mobileapps[master]: Hygiene: add model for news sites

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

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

Change subject: Hygiene: add model for news sites
..

Hygiene: add model for news sites

Bug: T148444
Change-Id: I6dd6ec2f97d8688518907ef31af8654f83545109
---
M etc/feed/news-sites.js
M lib/feed/news.js
2 files changed, 52 insertions(+), 29 deletions(-)


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

diff --git a/etc/feed/news-sites.js b/etc/feed/news-sites.js
index 42a52eb..9ac4505 100644
--- a/etc/feed/news-sites.js
+++ b/etc/feed/news-sites.js
@@ -1,30 +1,53 @@
 /**
- * A hash map of (Wikipedia site) languages codes to objects with
- * information to control how to get news items for this particular
- * Wikipedia site.
- * The object consists of a title and a selector.
- * 1) The title is the page title used to scrape the news items from.
- * 2) The selector is used to query news headlines, usually found in the
- *first 'ul' but there are exceptions, often because the first 
- *contains template instructions instead of the actual news items,
- *or instead of a  Parsoid uses a . This selector should
- *not include specific categories like deaths, sports, etc.
+ * @private {!string} _title
+ * @private {!string} _headlineSelector
+ */
+class NewsSite {
+/**
+ * @param {!string} title
+ * @param {!string} headlineSelector
+ */
+constructor(title, headlineSelector) {
+this._title = title;
+this._headlineSelector = headlineSelector;
+}
+
+/**
+ * @return {!string} News source wiki portal or template title to scrape
+ *   data from
+ */
+title() {
+return this._title;
+}
+
+/**
+ * @return {!string} Query selector for news headline containers (not
+ *   specific categories like deaths, sports, etc)
+ */
+headlineSelector() {
+return this._headlineSelector;
+}
+}
+
+/**
+ * @type {{Object.}} A map of Wikipedia site languages codes
+ * to NewsSites
  */
 module.exports = {
-da: {title: 'Skabelon:Forside_aktuelle_begivenheder', headlineSelector: 
'div > li'},
-de: {title: 'Wikipedia:Hauptseite/Aktuelles', headlineSelector: 'li'},
-el: {title: 'Πύλη:Τρέχοντα_γεγονότα/Επικεφαλίδες', headlineSelector: 'li'},
-en: {title: 'Template:In_the_news', headlineSelector: 'ul[id^=mw] li'},
-es: {title: 'Portal:Actualidad',
-headlineSelector: 'table:not(.infobox) > tbody > tr > td > dl + 
ul:nth-of-type(1) > li'},
-fi: {title: 'Malline:Uutisissa', headlineSelector: 'body > ul > li'},
-fr: {title: 'Modèle:Accueil_actualité', headlineSelector: 'div ul[id^=mw] 
> li'},
-he: {title: 'תבנית:חדשות_ואקטואליה', headlineSelector: 'body > ul > li'},
-ko: {title: '틀:새로_들어온_소식', headlineSelector: 'body > ul > li'},
-no: {title: 'Mal:Aktuelt', headlineSelector: 'ul > li'},
-pl: {title: 'Szablon:Aktualności', headlineSelector: 'ul:last-of-type > 
li'},
-pt: {title: 'Portal:Eventos_atuais', headlineSelector: 'div > ul > li'},
-ru: {title: 'Шаблон:Актуальные_события', headlineSelector: 'body > ul > 
li'},
-sv: {title: 'Portal:Huvudsida/Aktuella händelser', headlineSelector: 'body 
> ul > li'},
-vi: {title: 'Bản_mẫu:Tin_tức', headlineSelector: 'ul > li'}
-};
+en: new NewsSite('Template:In_the_news', 'ul[id^=mw] li'),
+da: new NewsSite('Skabelon:Forside_aktuelle_begivenheder', 'div > li'),
+de: new NewsSite('Wikipedia:Hauptseite/Aktuelles', 'li'),
+el: new NewsSite('Πύλη:Τρέχοντα_γεγονότα/Επικεφαλίδες', 'li'),
+es: new NewsSite('Portal:Actualidad',
+'table:not(.infobox) > tbody > tr > td > dl + ul:nth-of-type(1) > li'),
+fi: new NewsSite('Malline:Uutisissa', 'body > ul > li'),
+fr: new NewsSite('Modèle:Accueil_actualité', 'div ul[id^=mw] > li'),
+he: new NewsSite('תבנית:חדשות_ואקטואליה', 'body > ul > li'),
+ko: new NewsSite('틀:새로_들어온_소식', 'body > ul > li'),
+no: new NewsSite('Mal:Aktuelt', 'ul > li'),
+pl: new NewsSite('Szablon:Aktualności', 'ul:last-of-type > li'),
+pt: new NewsSite('Portal:Eventos_atuais', 'div > ul > li'),
+ru: new NewsSite('Шаблон:Актуальные_события', 'body > ul > li'),
+sv: new NewsSite('Portal:Huvudsida/Aktuella händelser', 'body > ul > li'),
+vi: new NewsSite('Bản_mẫu:Tin_tức', 'ul > li')
+};
\ No newline at end of file
diff --git a/lib/feed/news.js b/lib/feed/news.js
index 2ba805c..83fc8aa 100644
--- a/lib/feed/news.js
+++ b/lib/feed/news.js
@@ -53,11 +53,11 @@
 });
 }
 
-req.params.title = NEWS_TEMPLATES[lang].title;
+req.params.title = NEWS_TEMPLATES[lang].title();
 return parsoid.getParsoidHtml(app, req)
 .then(function (response) {
 const headlines = domino.createDocument(response.body)
-

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: WIP: Update: add news headline topic property

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

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

Change subject: WIP: Update: add news headline topic property
..

WIP: Update: add news headline topic property

todo: tests :]

Bug: T148444
Change-Id: I6cd0b7081a9ba06a58732efba7922029f66c84cf
---
M etc/feed/news-sites.js
M lib/feed/news.js
M spec.yaml
M test/features/news/news.js
4 files changed, 52 insertions(+), 19 deletions(-)


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

diff --git a/etc/feed/news-sites.js b/etc/feed/news-sites.js
index 9ac4505..6e8e582 100644
--- a/etc/feed/news-sites.js
+++ b/etc/feed/news-sites.js
@@ -6,10 +6,12 @@
 /**
  * @param {!string} title
  * @param {!string} headlineSelector
+ * @param {!string} topicAnchorSelector
  */
-constructor(title, headlineSelector) {
+constructor(title, headlineSelector, topicAnchorSelector) {
 this._title = title;
 this._headlineSelector = headlineSelector;
+this._topicAnchorSelector = topicAnchorSelector;
 }
 
 /**
@@ -27,27 +29,50 @@
 headlineSelector() {
 return this._headlineSelector;
 }
+
+/**
+ * @return {!string} Query selector for news headline subject links; this
+ *   selector should be used on a headline element
+ */
+topicAnchorSelector() {
+return this._topicAnchorSelector;
+}
 }
+
+const TOPIC_SELECTOR_LINK = 'a:nth-of-type(1)';
+const TOPIC_SELECTOR_BOLD_LINK = 'b:nth-of-type(1) a';
 
 /**
  * @type {{Object.}} A map of Wikipedia site languages codes
  * to NewsSites
  */
 module.exports = {
-en: new NewsSite('Template:In_the_news', 'ul[id^=mw] li'),
-da: new NewsSite('Skabelon:Forside_aktuelle_begivenheder', 'div > li'),
-de: new NewsSite('Wikipedia:Hauptseite/Aktuelles', 'li'),
-el: new NewsSite('Πύλη:Τρέχοντα_γεγονότα/Επικεφαλίδες', 'li'),
+en: new NewsSite('Template:In_the_news', 'ul[id^=mw] li',
+TOPIC_SELECTOR_BOLD_LINK),
+da: new NewsSite('Skabelon:Forside_aktuelle_begivenheder', 'div > li',
+TOPIC_SELECTOR_BOLD_LINK),
+de: new NewsSite('Wikipedia:Hauptseite/Aktuelles', 'li',
+TOPIC_SELECTOR_LINK),
+el: new NewsSite('Πύλη:Τρέχοντα_γεγονότα/Επικεφαλίδες', 'li',
+TOPIC_SELECTOR_LINK),
 es: new NewsSite('Portal:Actualidad',
-'table:not(.infobox) > tbody > tr > td > dl + ul:nth-of-type(1) > li'),
-fi: new NewsSite('Malline:Uutisissa', 'body > ul > li'),
-fr: new NewsSite('Modèle:Accueil_actualité', 'div ul[id^=mw] > li'),
-he: new NewsSite('תבנית:חדשות_ואקטואליה', 'body > ul > li'),
-ko: new NewsSite('틀:새로_들어온_소식', 'body > ul > li'),
-no: new NewsSite('Mal:Aktuelt', 'ul > li'),
-pl: new NewsSite('Szablon:Aktualności', 'ul:last-of-type > li'),
-pt: new NewsSite('Portal:Eventos_atuais', 'div > ul > li'),
-ru: new NewsSite('Шаблон:Актуальные_события', 'body > ul > li'),
-sv: new NewsSite('Portal:Huvudsida/Aktuella händelser', 'body > ul > li'),
-vi: new NewsSite('Bản_mẫu:Tin_tức', 'ul > li')
+'table:not(.infobox) > tbody > tr > td > dl + ul:nth-of-type(1) > li',
+TOPIC_SELECTOR_LINK),
+fi: new NewsSite('Malline:Uutisissa', 'body > ul > li',
+TOPIC_SELECTOR_BOLD_LINK),
+fr: new NewsSite('Modèle:Accueil_actualité', 'div ul[id^=mw] > li',
+TOPIC_SELECTOR_BOLD_LINK),
+he: new NewsSite('תבנית:חדשות_ואקטואליה', 'body > ul > li',
+TOPIC_SELECTOR_LINK),
+ko: new NewsSite('틀:새로_들어온_소식', 'body > ul > li', 
TOPIC_SELECTOR_BOLD_LINK),
+no: new NewsSite('Mal:Aktuelt', 'ul > li', TOPIC_SELECTOR_BOLD_LINK),
+pl: new NewsSite('Szablon:Aktualności', 'ul:last-of-type > li',
+TOPIC_SELECTOR_BOLD_LINK),
+pt: new NewsSite('Portal:Eventos_atuais', 'div > ul > li',
+TOPIC_SELECTOR_BOLD_LINK),
+ru: new NewsSite('Шаблон:Актуальные_события', 'body > ul > li',
+TOPIC_SELECTOR_BOLD_LINK),
+sv: new NewsSite('Portal:Huvudsida/Aktuella händelser', 'body > ul > li',
+TOPIC_SELECTOR_BOLD_LINK),
+vi: new NewsSite('Bản_mẫu:Tin_tức', 'ul > li', TOPIC_SELECTOR_BOLD_LINK)
 };
\ No newline at end of file
diff --git a/lib/feed/news.js b/lib/feed/news.js
index 83fc8aa..e5e4221 100644
--- a/lib/feed/news.js
+++ b/lib/feed/news.js
@@ -15,7 +15,7 @@
 return href;
 }
 
-function constructStory(restbase_tpl, domain, storyHtml) {
+function constructStory(restbase_tpl, domain, lang, storyHtml) {
 const story = { links: [] };
 const linkTitles = [];
 
@@ -34,6 +34,10 @@
 });
 
 story.story = storyHtml.innerHTML;
+const topicAnchor = 
storyHtml.querySelector(NEWS_TEMPLATES[lang].topicAnchorSelector());
+if (topicAnchor) {
+story.title = topicAnchor.getAttribute('href');
+}
 return story;
 }
 
@@ -64,7 +68,7 @@
 };
 
 

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Update: move full headline selector into news-sites

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

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

Change subject: Update: move full headline selector into news-sites
..

Update: move full headline selector into news-sites

• Move complete selector logic into news-sites. Some of the selectors
  are now more specific but the usage of the selector is much simpler:
  it's just a selector to extract all the headlines

• Rename news "story" terminology to "headline". All the stories used
  are highlights and "headline" is slightly more accurate

• Fix selection for Danish Wikipedia to omit recently deceased

Bug: T148444
Change-Id: I02689eb7342dcb2c2f5bbfa0c164ff3a547a0858
---
M etc/feed/news-sites.js
M lib/feed/news.js
2 files changed, 25 insertions(+), 27 deletions(-)


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

diff --git a/etc/feed/news-sites.js b/etc/feed/news-sites.js
index 8ce95c0..42a52eb 100644
--- a/etc/feed/news-sites.js
+++ b/etc/feed/news-sites.js
@@ -4,28 +4,27 @@
  * Wikipedia site.
  * The object consists of a title and a selector.
  * 1) The title is the page title used to scrape the news items from.
- * 2) The selector is used to find a parent HTML element for  elements.
- *In most cases simply the first 'ul' suffices but there are exceptions,
- *often because the first  contains template instructions instead
- *of the actual news items, or instead of a  Parsoid uses a .
+ * 2) The selector is used to query news headlines, usually found in the
+ *first 'ul' but there are exceptions, often because the first 
+ *contains template instructions instead of the actual news items,
+ *or instead of a  Parsoid uses a . This selector should
+ *not include specific categories like deaths, sports, etc.
  */
-const NEWS_TEMPLATES = {
-en: {title: 'Template:In_the_news', selector: 'ul[id^=mw]'},
-
-da: {title: 'Skabelon:Forside_aktuelle_begivenheder', selector: 'div'},
-de: {title: 'Wikipedia:Hauptseite/Aktuelles', selector: 'ul'},
-el: {title: 'Πύλη:Τρέχοντα_γεγονότα/Επικεφαλίδες', selector: 'ul'},
-es: {title: 'Portal:Actualidad', selector: 'ul'},
-fi: {title: 'Malline:Uutisissa', selector: 'ul'},
-fr: {title: 'Modèle:Accueil_actualité', selector: 'ul[id^=mw]'},
-he: {title: 'תבנית:חדשות_ואקטואליה', selector: 'ul'},
-ko: {title: '틀:새로_들어온_소식', selector: 'ul'},
-no: {title: 'Mal:Aktuelt', selector: 'ul'},
-pl: {title: 'Szablon:Aktualności', selector: 'ul:last-of-type'},
-pt: {title: 'Portal:Eventos_atuais', selector: 'ul'},
-ru: {title: 'Шаблон:Актуальные_события', selector: 'ul'},
-sv: {title: 'Portal:Huvudsida/Aktuella händelser', selector: 'ul'},
-vi: {title: 'Bản_mẫu:Tin_tức', selector: 'ul'}
+module.exports = {
+da: {title: 'Skabelon:Forside_aktuelle_begivenheder', headlineSelector: 
'div > li'},
+de: {title: 'Wikipedia:Hauptseite/Aktuelles', headlineSelector: 'li'},
+el: {title: 'Πύλη:Τρέχοντα_γεγονότα/Επικεφαλίδες', headlineSelector: 'li'},
+en: {title: 'Template:In_the_news', headlineSelector: 'ul[id^=mw] li'},
+es: {title: 'Portal:Actualidad',
+headlineSelector: 'table:not(.infobox) > tbody > tr > td > dl + 
ul:nth-of-type(1) > li'},
+fi: {title: 'Malline:Uutisissa', headlineSelector: 'body > ul > li'},
+fr: {title: 'Modèle:Accueil_actualité', headlineSelector: 'div ul[id^=mw] 
> li'},
+he: {title: 'תבנית:חדשות_ואקטואליה', headlineSelector: 'body > ul > li'},
+ko: {title: '틀:새로_들어온_소식', headlineSelector: 'body > ul > li'},
+no: {title: 'Mal:Aktuelt', headlineSelector: 'ul > li'},
+pl: {title: 'Szablon:Aktualności', headlineSelector: 'ul:last-of-type > 
li'},
+pt: {title: 'Portal:Eventos_atuais', headlineSelector: 'div > ul > li'},
+ru: {title: 'Шаблон:Актуальные_события', headlineSelector: 'body > ul > 
li'},
+sv: {title: 'Portal:Huvudsida/Aktuella händelser', headlineSelector: 'body 
> ul > li'},
+vi: {title: 'Bản_mẫu:Tin_tức', headlineSelector: 'ul > li'}
 };
-
-module.exports = NEWS_TEMPLATES;
diff --git a/lib/feed/news.js b/lib/feed/news.js
index 40560aa..2ba805c 100644
--- a/lib/feed/news.js
+++ b/lib/feed/news.js
@@ -56,15 +56,14 @@
 req.params.title = NEWS_TEMPLATES[lang].title;
 return parsoid.getParsoidHtml(app, req)
 .then(function (response) {
-const stories = domino.createDocument(response.body)
-.querySelector(NEWS_TEMPLATES[lang].selector)
-.getElementsByTagName('li');
+const headlines = domino.createDocument(response.body)
+
.querySelectorAll(NEWS_TEMPLATES[lang].headlineSelector);
 const result = {
 payload: [],
 meta: { etag: parsoid.getRevisionFromEtag(response.headers) }
 };
 
-Array.prototype.forEach.call(stories, function(storyHtml) {
+

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T150213: Suppress logs for known unknown contentmodels

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

Change subject: T150213: Suppress logs for known unknown contentmodels
..


T150213: Suppress logs for known unknown contentmodels

Change-Id: Id3f321e698e2484f986aad5d3705653894f2eae0
---
M HISTORY.md
M lib/config/MWParserEnvironment.js
2 files changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/HISTORY.md b/HISTORY.md
index 0ca0fe5..4f5bf8b 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -3,6 +3,7 @@
 ==
 
   * T110910: Implement  extension natively inside Parsoid
+  * T150213: Suppress logs for known unknown contentmodels
 
 0.6.1 / 2016-11-14
 ==
diff --git a/lib/config/MWParserEnvironment.js 
b/lib/config/MWParserEnvironment.js
index e586dc2..8fe1188 100644
--- a/lib/config/MWParserEnvironment.js
+++ b/lib/config/MWParserEnvironment.js
@@ -738,7 +738,12 @@
  * Suppress warnings for these fallbacks to wikitext.
  */
 var whitelist = new Set([
+   'css',
+   'javascript',
'wikibase-item',
+   'wikibase-property',
+   'proofread-page',
+   'Scribunto',
 ]);
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id3f321e698e2484f986aad5d3705653894f2eae0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix case of getMimeAnalyzer in MimeMagic class

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

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

Change subject: Fix case of getMimeAnalyzer in MimeMagic class
..

Fix case of getMimeAnalyzer in MimeMagic class

Change-Id: Ieab23102d25395f50bfcfb79450494250b7b22e8
---
M includes/MimeMagic.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/84/323084/1

diff --git a/includes/MimeMagic.php b/includes/MimeMagic.php
index c03bce7..79218ab 100644
--- a/includes/MimeMagic.php
+++ b/includes/MimeMagic.php
@@ -27,7 +27,7 @@
 * @deprecated since 1.28
 */
public static function singleton() {
-   return MediaWikiServices::getInstance()->getMIMEAnalyzer();
+   return MediaWikiServices::getInstance()->getMimeAnalyzer();
}
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Get GenderCache from MediaWikiServices

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

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

Change subject: Get GenderCache from MediaWikiServices
..

Get GenderCache from MediaWikiServices

Change-Id: I752a65d93ec49ea6c44306eb18a6641ef86f7b5c
---
M includes/api/ApiPageSet.php
M includes/api/ApiQueryAllPages.php
M includes/parser/CoreParserFunctions.php
M tests/phpunit/includes/cache/GenderCacheTest.php
4 files changed, 13 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/75/323075/1

diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php
index 46c57b8..1a509c5 100644
--- a/includes/api/ApiPageSet.php
+++ b/includes/api/ApiPageSet.php
@@ -23,6 +23,7 @@
  *
  * @file
  */
+use MediaWiki\MediaWikiServices;
 
 /**
  * This class contains a list of pages that the client has requested.
@@ -915,7 +916,7 @@
}
 
// Get gender information
-   $genderCache = GenderCache::singleton();
+   $genderCache = 
MediaWikiServices::getInstance()->getGenderCache();
$genderCache->doQuery( $usernames, __METHOD__ );
}
 
@@ -1197,7 +1198,7 @@
}
}
// Get gender information
-   $genderCache = GenderCache::singleton();
+   $genderCache = 
MediaWikiServices::getInstance()->getGenderCache();
$genderCache->doQuery( $usernames, __METHOD__ );
 
return $linkBatch;
diff --git a/includes/api/ApiQueryAllPages.php 
b/includes/api/ApiQueryAllPages.php
index 0ce1939..6a0f124 100644
--- a/includes/api/ApiQueryAllPages.php
+++ b/includes/api/ApiQueryAllPages.php
@@ -23,6 +23,7 @@
  *
  * @file
  */
+use MediaWiki\MediaWikiServices;
 
 /**
  * Query module to enumerate all available pages.
@@ -206,7 +207,7 @@
foreach ( $res as $row ) {
$users[] = $row->page_title;
}
-   GenderCache::singleton()->doQuery( $users, __METHOD__ );
+   
MediaWikiServices::getInstance()->getGenderCache()->doQuery( $users, __METHOD__ 
);
$res->rewind(); // reset
}
 
diff --git a/includes/parser/CoreParserFunctions.php 
b/includes/parser/CoreParserFunctions.php
index 01cce02..4c82dda 100644
--- a/includes/parser/CoreParserFunctions.php
+++ b/includes/parser/CoreParserFunctions.php
@@ -20,6 +20,7 @@
  * @file
  * @ingroup Parser
  */
+use MediaWiki\MediaWikiServices;
 
 /**
  * Various core parser functions, registered in Parser::firstCallInit()
@@ -346,10 +347,11 @@
 
// check parameter, or use the ParserOptions if in interface 
message
$user = User::newFromName( $username );
+   $genderCache = 
MediaWikiServices::getInstance()->getGenderCache();
if ( $user ) {
-   $gender = GenderCache::singleton()->getGenderOf( $user, 
__METHOD__ );
+   $gender = $genderCache->getGenderOf( $user, __METHOD__ 
);
} elseif ( $username === '' && 
$parser->getOptions()->getInterfaceMessage() ) {
-   $gender = GenderCache::singleton()->getGenderOf( 
$parser->getOptions()->getUser(), __METHOD__ );
+   $gender = $genderCache->getGenderOf( 
$parser->getOptions()->getUser(), __METHOD__ );
}
$ret = $parser->getFunctionLang()->gender( $gender, $forms );
return $ret;
diff --git a/tests/phpunit/includes/cache/GenderCacheTest.php 
b/tests/phpunit/includes/cache/GenderCacheTest.php
index 9c723c0..e5bb237 100644
--- a/tests/phpunit/includes/cache/GenderCacheTest.php
+++ b/tests/phpunit/includes/cache/GenderCacheTest.php
@@ -1,4 +1,5 @@
 getGenderCache();
$username = isset( self::$nameMap[$userKey] ) ? 
self::$nameMap[$userKey] : $userKey;
$gender = $genderCache->getGenderOf( $username );
$this->assertEquals( $gender, $expectedGender, "GenderCache 
normal" );
@@ -53,7 +54,7 @@
 */
public function testUserObjects( $userKey, $expectedGender ) {
$username = isset( self::$nameMap[$userKey] ) ? 
self::$nameMap[$userKey] : $userKey;
-   $genderCache = GenderCache::singleton();
+   $genderCache = 
MediaWikiServices::getInstance()->getGenderCache();
$gender = $genderCache->getGenderOf( $username );
$this->assertEquals( $gender, $expectedGender, "GenderCache 
normal" );
}
@@ -79,7 +80,7 @@
 */
public function testStripSubpages( $userKey, $expectedGender ) {
$username = isset( self::$nameMap[$userKey] ) ? 
self::$nameMap[$userKey] : $userKey;
-   $genderCache = GenderCache::singleton();
+   $genderCache = 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use MediaWikiServices::getMainWANObjectCache in ServiceWiring

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

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

Change subject: Use MediaWikiServices::getMainWANObjectCache in ServiceWiring
..

Use MediaWikiServices::getMainWANObjectCache in ServiceWiring

Change-Id: I853c226114f846f121c5c23888b3ffa85e48b50a
---
M includes/ServiceWiring.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/76/323076/1

diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php
index c2197a6..b958cd4 100644
--- a/includes/ServiceWiring.php
+++ b/includes/ServiceWiring.php
@@ -96,7 +96,7 @@
$config = $services->getMainConfig();
return new ClassicInterwikiLookup(
$wgContLang,
-   ObjectCache::getMainWANInstance(),
+   $services->getMainWANObjectCache(),
$config->get( 'InterwikiExpiry' ),
$config->get( 'InterwikiCache' ),
$config->get( 'InterwikiScopes' ),
@@ -238,7 +238,7 @@
'LinkCache' => function( MediaWikiServices $services ) {
return new LinkCache(
$services->getTitleFormatter(),
-   ObjectCache::getMainWANInstance()
+   $services->getMainWANObjectCache()
);
},
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I853c226114f846f121c5c23888b3ffa85e48b50a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: init: Initialise 'active' property in mw.Target instead of s...

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

Change subject: init: Initialise 'active' property in mw.Target instead of 
subclass
..


init: Initialise 'active' property in mw.Target instead of subclass

This is set to 'true' in mw.Target#setupSurface(), but not initialised or
used there in that class.

It was previous initialised in an indirect subclass (DesktopArticleTarget).
Move this to the parent class instead for clarity.

Change-Id: Ie3e12d254aa4b689fdce64620e110164311bc60a
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
M modules/ve-mw/init/ve.init.mw.Target.js
2 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
index 8b412b2..d0445c8 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -34,7 +34,6 @@
// Properties
this.onBeforeUnloadFallback = null;
this.onUnloadHandler = this.onUnload.bind( this );
-   this.active = false;
this.activating = false;
this.deactivating = false;
this.edited = false;
diff --git a/modules/ve-mw/init/ve.init.mw.Target.js 
b/modules/ve-mw/init/ve.init.mw.Target.js
index 529afb7..4f6518b 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -18,6 +18,8 @@
// Parent constructor
ve.init.mw.Target.super.call( this, config );
 
+   this.active = false;
+
// Initialization
this.$element.addClass( 've-init-mw-target' );
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3e12d254aa4b689fdce64620e110164311bc60a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   3   4   >