[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Introduce ContentHandler on the Newsletter CustomEditpage

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

Change subject: Introduce ContentHandler on the Newsletter CustomEditpage
..


Introduce ContentHandler on the Newsletter CustomEditpage

* Added in the contenthandler model for Newsletter namespace.
* action=edit, now creates a Newsletter with the Newsletter Contentmodel.
* action=edit on an existing newsletter would redirect to the manage page.
* roll back a newsletter addition on failure to create a content page.

Bug: T138462
Change-Id: I89809a4ec1b524148199ff5d11ee4e96ae716919
---
M Newsletter.hooks.php
M extension.json
M i18n/en.json
M includes/Newsletter.php
M includes/NewsletterDb.php
M includes/NewsletterEditPage.php
M includes/NewsletterStore.php
A includes/content/NewsletterContent.php
A includes/content/NewsletterContentHandler.php
A includes/content/NewsletterDeletionUpdate.php
10 files changed, 694 insertions(+), 66 deletions(-)

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



diff --git a/Newsletter.hooks.php b/Newsletter.hooks.php
index 0f4f747..2410d69 100755
--- a/Newsletter.hooks.php
+++ b/Newsletter.hooks.php
@@ -129,14 +129,50 @@
return true;
}
 
+   /**
+* @param EditPage $editPage
+* @return bool
+*/
+   public static function onAlternateEdit( EditPage $editPage ) {
+   $out = $editPage->getContext()->getOutput();
+   $title = $editPage->getTitle();
+
+   if ( $title->inNamespace( NS_NEWSLETTER ) ) {
+   if ( $title->hasContentModel( 'NewsletterContent' ) ) {
+   $newsletter = Newsletter::newFromName( 
$title->getText() );
+   if ( $newsletter ) {
+   $title = SpecialPage::getTitleFor( 
'Newsletter', $newsletter->getId() . '/' . 'manage' );
+   $out->redirect( $title->getFullURL() );
+   }
+   }
+   return false;
+   }
+
+   return true;
+   }
+
+   /**
+* @param Article $article
+* @param User $user
+* @return bool
+* @throws ReadOnlyError
+*/
public static function onCustomEditor( Article $article, User $user ) {
+   $out = $article->getContext()->getOutput();
if ( !$article->getTitle()->inNamespace( NS_NEWSLETTER ) ) {
return true;
}
 
+   $newsletter = Newsletter::newFromName( 
$article->getTitle()->getText() );
+   if ( $newsletter ) {
+   // A newsletter exists in that title, lets redirect to 
manage page
+   $title = SpecialPage::getTitleFor( 'Newsletter', 
$newsletter->getId() . '/' .
+   'manage' );
+   $out->redirect( $title->getFullURL() );
+   }
+
$editPage = new NewsletterEditPage( $article->getContext() );
$editPage->edit();
-
return false;
}
 }
diff --git a/extension.json b/extension.json
index 775f2ee..740310f 100644
--- a/extension.json
+++ b/extension.json
@@ -63,6 +63,9 @@
"ExtensionMessagesFiles": {
"NewsletterAlias": "Newsletter.alias.php"
},
+   "ContentHandlers": {
+   "NewsletterContent": "NewsletterContentHandler"
+   },
"AutoloadClasses": {
"Newsletter": "includes/Newsletter.php",
"NewsletterDb": "includes/NewsletterDb.php",
@@ -78,6 +81,9 @@
"NewsletterTablePager": 
"includes/specials/pagers/NewsletterTablePager.php",
"ApiNewsletterManage": "includes/api/ApiNewsletterManage.php",
"ApiNewsletterSubscribe": 
"includes/api/ApiNewsletterSubscribe.php",
+   "NewsletterContent": "includes/content/NewsletterContent.php",
+   "NewsletterContentHandler": 
"includes/content/NewsletterContentHandler.php",
+   "NewsletterDeletionUpdate": 
"includes/content/NewsletterDeletionUpdate.php",
"EchoNewsletterUserLocator": 
"includes/Echo/EchoNewsletterUserLocator.php",
"EchoNewsletterFormatter": 
"includes/Echo/EchoNewsletterFormatter.php",
"BaseNewsletterPresentationModel": 
"includes/Echo/BaseNewsletterPresentationModel.php",
@@ -145,6 +151,9 @@
"UserMergeAccountFields": [
"NewsletterHooks::onUserMergeAccountFields"
],
+   "AlternateEdit": [
+   "NewsletterHooks::onAlternateEdit"
+   ],
"CustomEditor": [
"NewsletterHooks::onCustomEditor"
]
@@ -154,7 +163,8 @@
"id": 5500,

[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Some more minor renames

2016-10-24 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Some more minor renames
..

Some more minor renames

Change-Id: Ifb19692c39bc0fee172170ff131d26c51cae1f0b
---
M README
M composer.json
M i18n/dsb.json
M i18n/id.json
M i18n/lv.json
M i18n/tl.json
M i18n/zh-tw.json
M libs/ext.pf.js
8 files changed, 10 insertions(+), 9 deletions(-)


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

diff --git a/README b/README
index dd0e351..055252c 100644
--- a/README
+++ b/README
@@ -50,7 +50,7 @@
  https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
  https://lists.sourceforge.net/lists/listinfo/semediawiki-user
 
-If possible, please add "[SF]" at the beginning of the subject line, to
+If possible, please add "[PF]" at the beginning of the subject line, to
 clarify the subject matter.
 
 Bug reports should be submitted at the Wikimedia Phabricator site:
diff --git a/composer.json b/composer.json
index f9ee709..eed25c6 100644
--- a/composer.json
+++ b/composer.json
@@ -7,6 +7,7 @@
"Semantic Forms",
"forms",
"SF",
+   "PF",
"Wiki",
"MediaWiki"
],
diff --git a/i18n/dsb.json b/i18n/dsb.json
index dda5fd4..8dcadc3 100644
--- a/i18n/dsb.json
+++ b/i18n/dsb.json
@@ -5,7 +5,7 @@
]
},
"pageforms-desc": "Formulary za pśidawanje a wobźěłowanje semantiskich 
datow",
-   "specialpages-group-sf_group": "Semantiske formulary",
+   "specialpages-group-pf_group": "Semantiske formulary",
"createproperty": "Kakosć napóraś",
"pf-createproperty-with-name": "Kakosć napóraś: $1",
"pf_createproperty_linktoform": "Toś ta kakosć buźo k bokam wótkazowaś, 
kótarež wužywaju formular:",
diff --git a/i18n/id.json b/i18n/id.json
index 5ff1d51..2bda770 100644
--- a/i18n/id.json
+++ b/i18n/id.json
@@ -10,7 +10,7 @@
]
},
"pageforms-desc": "Formulir untuk menambahkan dan menyunting data 
semantik",
-   "specialpages-group-sf_group": "Semantic Forms",
+   "specialpages-group-pf_group": "Semantic Forms",
"createproperty": "Buat properti",
"pf_createproperty_linktoform": "Properti ini akan tertaut ke halaman 
yang menggunakan formulir:",
"pf_createproperty_allowedvalsinput": "Jika Anda ingin properti ini 
hanya diizinkan untuk memiliki suatu nilai tertentu, masukkan daftar nilai yang 
diizinkan, dipisahkan dengan koma (jika suatu nilai mengandung koma, ganti 
dengan \"\\,\"):",
diff --git a/i18n/lv.json b/i18n/lv.json
index 1becf49..8281aac 100644
--- a/i18n/lv.json
+++ b/i18n/lv.json
@@ -6,7 +6,7 @@
]
},
"pageforms-desc": "Formas semantisko datu pievienošanai un rediģēšanai",
-   "specialpages-group-sf_group": "Semantiskās formas",
+   "specialpages-group-pf_group": "Semantiskās formas",
"createproperty": "Izveidot īpašību",
"pf_createproperty_linktoform": "Šī īpašība norādīs uz lapām, kas 
izmanto formu:",
"pf_createproperty_allowedvalsinput": "Ja jūs gribiet, lai šī īpašība 
saturētu tikai noteiktas vērtības, ievadiet ar komatu atdalītu atļauto vērtību 
sarakstu (ja vērtība satur komatu, tad aizvietojiet to ar \"\\,\"):",
diff --git a/i18n/tl.json b/i18n/tl.json
index 30ae5f1..dad2f39 100644
--- a/i18n/tl.json
+++ b/i18n/tl.json
@@ -7,7 +7,7 @@
]
},
"pageforms-desc": "Mga pormularyo para sa paggawa ng mga dagdag at 
pagbabago sa dato hinggil sa kahulugan ng salita (semantiko)",
-   "specialpages-group-sf_group": "Mga Pormularyo ng Semantiko (hinggil sa 
kahulugan ng salita)",
+   "specialpages-group-pf_group": "Mga Pormularyo ng Semantiko (hinggil sa 
kahulugan ng salita)",
"createproperty": "Lumikha ng pag-aari",
"pf-createproperty-with-name": "Likhain ang ari-arian: $1",
"pf_createproperty_linktoform": "Ang pag-aaring ito ay kakawing patungo 
sa mga pahinang gumagamit ng pormularyong:",
diff --git a/i18n/zh-tw.json b/i18n/zh-tw.json
index 8d66f39..1598c72 100644
--- a/i18n/zh-tw.json
+++ b/i18n/zh-tw.json
@@ -6,8 +6,8 @@
},
"createproperty": "建立屬性",
"createform": "建立表單",
-   "sf-createform-with-name": "建立表單:$1",
-   "sf_createform_addelements": "新增元素",
-   "sf_createform_additembeforesave": "在您儲存之前,您必須新增至少一個模板或頁面章節到表單。",
+   "pf-createform-with-name": "建立表單:$1",
+   "pf_createform_addelements": "新增元素",
+   "pf_createform_additembeforesave": "在您儲存之前,您必須新增至少一個模板或頁面章節到表單。",
"createclass": "建立類別"
 }
diff --git a/libs/ext.pf.js b/libs/ext.pf.js
index 53b6c3a..f823216 100644
--- a/libs/ext.pf.js
+++ b/libs/ext.pf.js
@@ -13,7 +13,7 @@
'use strict';
/**
 *
-* Declares methods and properties that are available through the sf
+* Declares 

[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Add PageForms as a wmf extension

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

Change subject: Add PageForms as a wmf extension
..


Add PageForms as a wmf extension

SemanticForms is being renamed to PageForms.

SemanticForms can be removed once we have switched everything over to
PageForms

Bug: T147582
Change-Id: I4dc74071c52390e67460b69769945cea6ee67d8e
---
M make-wmf-branch/config.json
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/make-wmf-branch/config.json b/make-wmf-branch/config.json
index 4f38679..8cbdc26 100644
--- a/make-wmf-branch/config.json
+++ b/make-wmf-branch/config.json
@@ -91,6 +91,7 @@
"OpenStackManager",
"PagedTiffHandler",
"PageAssessments",
+   "PageForms",
"PageImages",
"PageTriage",
"ParserFunctions",
@@ -113,6 +114,7 @@
"Score",
"SearchExtraNS",
"SecurePoll",
+   "SemanticForms",
"ShortUrl",
"SiteMatrix",
"SpamBlacklist",
@@ -150,8 +152,7 @@
"WikimediaMessages",
"XAnalytics",
"ZeroBanner",
-   "ZeroPortal",
-   "SemanticForms"
+   "ZeroPortal"
],
"skins": [
"CologneBlue",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4dc74071c52390e67460b69769945cea6ee67d8e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: http2 concurrency: back to defaults

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

Change subject: http2 concurrency: back to defaults
..


http2 concurrency: back to defaults

Bug: T107749
Change-Id: I3c50fc3d7863fc85692bf0a930e5b48d5d2f3cd2
---
M modules/tlsproxy/templates/nginx.conf.erb
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/modules/tlsproxy/templates/nginx.conf.erb 
b/modules/tlsproxy/templates/nginx.conf.erb
index 36f15b2..d386d88 100644
--- a/modules/tlsproxy/templates/nginx.conf.erb
+++ b/modules/tlsproxy/templates/nginx.conf.erb
@@ -102,10 +102,6 @@
 ssl_dyn_rec_timeout 1s;   # cf patch default: 1s
 <% end -%>
 
-# limit http2 request-parallelism to 32.  Testing whether this affects
-# problems in T148917 .
-http2_max_concurrent_streams 32; # default 128
-
 # nginx's $http2 is either 'h2' or '' (empty string) for http/1
 # Map it to $h2 as a boolean string value '1' or '0' for use in headers
 map $http2 $h2 {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3c50fc3d7863fc85692bf0a930e5b48d5d2f3cd2
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Fix small typos in new preferences page

2016-10-24 Thread Deskana (Code Review)
Deskana has uploaded a new change for review.

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

Change subject: Fix small typos in new preferences page
..

Fix small typos in new preferences page

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


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

diff --git a/i18n/en.json b/i18n/en.json
index 08e5f50..baa7479 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -39,9 +39,9 @@
"prefs-completion": "Search completion",
"cirrussearch-pref-completion-section-desc": "Completion suggester",
"cirrussearch-pref-completion-section-legend": "The 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:CirrusSearch/CompletionSuggester
 completion suggester] is an algorithm for search suggestions with better typo 
correction and search relevance.",
-   "cirrussearch-completion-profile-fuzzy-pref-name": "Default 
(recommended).",
+   "cirrussearch-completion-profile-fuzzy-pref-name": "Default 
(recommended)",
"cirrussearch-completion-profile-fuzzy-pref-desc": "Corrects up to two 
typos. Resolves close redirects.",
-   "cirrussearch-completion-profile-fuzzy-subphrases-pref-name": "Suphrase 
matching (recommended for longer article titles)",
+   "cirrussearch-completion-profile-fuzzy-subphrases-pref-name": 
"Subphrase matching (recommended for longer article titles)",
"cirrussearch-completion-profile-fuzzy-subphrases-pref-desc": "Corrects 
up to two types. Resolves close redirects. Matches subphrase in titles.",
"cirrussearch-completion-profile-strict-pref-name": "Strict mode 
(advanced)",
"cirrussearch-completion-profile-strict-pref-desc": "No typo 
correction. No accent folding. Strict matching.",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f254bd781f7200b623c43a3c511fe569501b7a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Deskana 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: tlsproxy: http2: limit concurrency to 512 (was 64)

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

Change subject: tlsproxy: http2: limit concurrency to 512 (was 64)
..


tlsproxy: http2: limit concurrency to 512 (was 64)

Bug: T107749

Change-Id: I21ab71a4b6599a741b1ff48cf8a0c25b7526f568
---
M modules/tlsproxy/templates/nginx.conf.erb
1 file changed, 3 insertions(+), 4 deletions(-)

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



diff --git a/modules/tlsproxy/templates/nginx.conf.erb 
b/modules/tlsproxy/templates/nginx.conf.erb
index af7f5d4..90ab6e0 100644
--- a/modules/tlsproxy/templates/nginx.conf.erb
+++ b/modules/tlsproxy/templates/nginx.conf.erb
@@ -102,10 +102,9 @@
 ssl_dyn_rec_timeout 1s;   # cf patch default: 1s
 <% end -%>
 
-# limit http2 request-parallelism to 64.  This will slow down some pages
-# with large counts of sub-resources (e.g. large image categories with
-# thumbnails), but helps avoid pushing edge cases in our edge 
infastructure.
-http2_max_concurrent_streams 64; # default 128
+# limit http2 request-parallelism to 512.  Testing whether this affects
+# problems in T148917 .
+http2_max_concurrent_streams 512; # default 128
 
 # nginx's $http2 is either 'h2' or '' (empty string) for http/1
 # Map it to $h2 as a boolean string value '1' or '0' for use in headers

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Fix namespace configs and fix extension description

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

Change subject: Fix namespace configs and fix extension description
..


Fix namespace configs and fix extension description

Since we have renamed the extension, the namespaces are no longer defined
in SemanticMediaWiki so we define it extension side.

We can also use the namespaces config in extension registration to also
define it too.

Bug: T147582
Change-Id: Ibe5e1de68f748570e8d95b795b9849c58fe5f5ec
---
M PageForms.php
M extension.json
M includes/PF_Hooks.php
M languages/PF_Namespaces.php
4 files changed, 21 insertions(+), 14 deletions(-)

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



diff --git a/PageForms.php b/PageForms.php
index 2b09dd5..9514165 100644
--- a/PageForms.php
+++ b/PageForms.php
@@ -78,12 +78,6 @@
 
 define( 'PF_VERSION', '4.0' );
 
-// SMW defines these namespaces itself.
-if ( !defined( 'PF_NS_FORM' ) ) {
-   define( 'PF_NS_FORM', 106 );
-   define( 'PF_NS_FORM_TALK', 107 );
-}
-
 $GLOBALS['wgExtensionCredits']['specialpage'][] = array(
'path' => __FILE__,
'name' => 'Page Forms',
diff --git a/extension.json b/extension.json
index 10d1b6b..c2fa0ad 100644
--- a/extension.json
+++ b/extension.json
@@ -9,9 +9,23 @@
"..."
],
"url": "https://www.mediawiki.org/wiki/Extension:Page_Forms;,
-   "descriptionmsg": "PageForms-desc",
+   "descriptionmsg": "pageforms-desc",
"license-name": "GPL-2.0+",
"type": "specialpage",
+   "namespaces": [
+   {
+   "id": 106,
+   "constant": "PF_NS_FORM",
+   "name": "Form",
+   "conditional": true
+   },
+   {
+   "id": 107,
+   "constant": "PF_NS_FORM_TALK",
+   "name": "Form_talk",
+   "conditional": true
+   }
+   ],
"callback": "PFHooks::registerExtension",
"ExtensionFunctions": [
"PFHooks::initialize"
diff --git a/includes/PF_Hooks.php b/includes/PF_Hooks.php
index 93ee63a..287c2e2 100644
--- a/includes/PF_Hooks.php
+++ b/includes/PF_Hooks.php
@@ -18,12 +18,6 @@
 
define( 'PF_VERSION', '4.0' );
 
-   if ( !defined( 'PF_NS_FORM' ) ) {
-   // SMW defines these namespaces itself.
-   define( 'PF_NS_FORM', 106 );
-   define( 'PF_NS_FORM_TALK', 107 );
-   }
-
$GLOBALS['wgPageFormsIP'] = dirname( __DIR__ ) . '/../';
 
// Constants for special properties
diff --git a/languages/PF_Namespaces.php b/languages/PF_Namespaces.php
index 601244b..c8a1b51 100644
--- a/languages/PF_Namespaces.php
+++ b/languages/PF_Namespaces.php
@@ -12,9 +12,14 @@
  * @author Jeroen De Dauw < jeroended...@gmail.com >
  * @author Yaron Koren
  */
- 
+
 $namespaceNames = array();
 
+if ( !defined( 'PF_NS_FORM' ) ) {
+   define( 'PF_NS_FORM', 106 );
+   define( 'PF_NS_FORM_TALK', 107 );
+}
+
 /**
  * @author Meno25
  */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe5e1de68f748570e8d95b795b9849c58fe5f5ec
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs...heritage[master]: Harvest Wikidata item in es-ct (ca)

2016-10-24 Thread Code Review
Jean-Frédéric has uploaded a new change for review.

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

Change subject: Harvest Wikidata item in es-ct (ca)
..

Harvest Wikidata item in es-ct (ca)

Bug: T140795
Change-Id: Ie2b9903f497e4c37cad1b015326609660268dbdb
---
M erfgoedbot/monuments_config/es-ct_ca.json
M erfgoedbot/sql/fill_table_monuments_all.sql
2 files changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage 
refs/changes/38/317538/1

diff --git a/erfgoedbot/monuments_config/es-ct_ca.json 
b/erfgoedbot/monuments_config/es-ct_ca.json
index f3d28cd..f8731eb 100644
--- a/erfgoedbot/monuments_config/es-ct_ca.json
+++ b/erfgoedbot/monuments_config/es-ct_ca.json
@@ -102,6 +102,11 @@
 "dest": "registrant_url",
 "source": "idurl",
 "conv": "generateRegistrantUrl"
+},
+{
+"dest": "wd_item",
+"source": "wikidata",
+"check": "checkWD"
 }
 ]
 }
\ No newline at end of file
diff --git a/erfgoedbot/sql/fill_table_monuments_all.sql 
b/erfgoedbot/sql/fill_table_monuments_all.sql
index b549f5e..963334e 100644
--- a/erfgoedbot/sql/fill_table_monuments_all.sql
+++ b/erfgoedbot/sql/fill_table_monuments_all.sql
@@ -1207,7 +1207,7 @@
 /* Catalunya in Catalan */
 REPLACE INTO
   `monuments_all_tmp` (
-`country`, `lang`, `id`, `adm0`, `adm1`, `adm2`, `adm3`, `adm4`, `name`, 
`address`, `municipality`, `lat`, `lon`, `lat_int`, `lon_int`, `image`, 
`commonscat`, `source`, `changed`, `monument_article`, `registrant_url`
+`country`, `lang`, `id`, `adm0`, `adm1`, `adm2`, `adm3`, `adm4`, `name`, 
`address`, `municipality`, `lat`, `lon`, `lat_int`, `lon_int`, `image`, 
`commonscat`, `source`, `changed`, `monument_article`, `registrant_url`, 
`wd_item`
   ) SELECT
 'es' AS `country`,
 'ca' AS `lang`,
@@ -1229,7 +1229,8 @@
 `source` AS `source`,
 `changed` AS `changed`,
 `monument_article` AS `monument_article`,
-`registrant_url` AS `registrant_url`
+`registrant_url` AS `registrant_url`,
+`wd_item` AS `wd_item`
 FROM `monuments_es-ct_(ca)`;
 
 /* Galicia province (Spain) in Galician */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie2b9903f497e4c37cad1b015326609660268dbdb
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/heritage
Gerrit-Branch: master
Gerrit-Owner: Jean-Frédéric 

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


[MediaWiki-commits] [Gerrit] wikimedia...relevanceForge[master]: Calculate a bootstrapped confidence interval for engine scores

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

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

Change subject: Calculate a bootstrapped confidence interval for engine scores
..

Calculate a bootstrapped confidence interval for engine scores

Change-Id: I25fdab358fd4aed1a73bb1312df7ccc398a7499a
---
M engineScore.ini
M engineScore.py
2 files changed, 92 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/relevanceForge 
refs/changes/41/317541/1

diff --git a/engineScore.ini b/engineScore.ini
index 1586d14..b47dc55 100644
--- a/engineScore.ini
+++ b/engineScore.ini
@@ -10,6 +10,14 @@
 labHost = relforge-search.search.eqiad.wmflabs
 ; Note that when doing nDCG calculations the limit here must be >= the p value 
(default 20).
 searchCommand = cd /srv/mediawiki-vagrant && mwvagrant ssh -- mwscript 
extensions/CirrusSearch/maintenance/runSearch.php --wiki wiki --server 
en-wp-bm25-inclinks-relforge.wmflabs.org --fork 16 --limit 20
+; Generate a confidence interval. This can take a good amount of time depending
+; on the size. For example the ClickOrdering scorer with 2k queries and 9k
+; constraints takes ~51ms per round. With the default 10k samples thats a 
little
+; over 8 minutes on my laptop.
+confidence = true
+; Display a histogram of the samples generated for the confidence interval. Not
+; sure if useful for anything, but it's pretty to look at.
+ci_histogram = true
 
 ;; brute force optimization. requires scipy and matplotlib. This section
 ;; may be omitted to calculate the engine score a single time.
diff --git a/engineScore.py b/engineScore.py
index 694bdc1..b3ca42b 100755
--- a/engineScore.py
+++ b/engineScore.py
@@ -169,10 +169,19 @@
 for scorer in self.scorers:
 scorer.report()
 
+def prepare(self, results):
+data = []
+for scorer in self.scorers:
+try:
+data.append(scorer.prepare(results))
+except NotImplementedError:
+data.append(results)
+return data
+
 def engine_score(self, results):
 scores = []
-for scorer in self.scorers:
-score = scorer.engine_score(results)
+for scorer, data in zip(self.scorers, results):
+score = scorer.engine_score(data)
 if type(score) == EngineScoreSet:
 scores = scores + score.scores
 else:
@@ -215,8 +224,6 @@
 # generated, for a single user + query pair.
 clicks_and_hits = json.loads(encoded_clicks_and_hits)
 
-# Set ensures if multiple clicks generate the same constraints, we
-# only evaluate them once. But is that desired? Not sure...
 constraints = set()
 
 # The set of clicked page id's for this user + query
@@ -250,7 +257,7 @@
 return "Click > Skip Above, Skip Next"
 
 def report(self):
-print("Loaded ClickOrdering with %d queries with %d constraints" % (
+print("Loaded ClickOrdering with %d queries and %d constraints" % (
   len(self._constraints),
   sum([len(self._constraints[q]) for q in self._constraints])))
 
@@ -273,17 +280,13 @@
 in hits.
 """
 for page_id in hits:
-if type(page_id) != type(prefer) or type(page_id) != type(over):
-pprint.pprint(page_id)
-pprint.pprint(prefer)
-pprint.pprint(over)
 if page_id == prefer:
 return True
 if page_id == over:
 return False
 return False
 
-def engine_score(self, results):
+def prepare(self, results):
 query_agreements = []
 for query in results:
 hits = [int(r['docId']) for r in results[query]]
@@ -293,7 +296,10 @@
 if self._evaluate_constraint(prefer, over, hits):
 agreements += 1
 query_agreements.append(agreements / float(len(constraints)))
-return EngineScore(self.name(), sum(query_agreements) / 
len(query_agreements))
+return query_agreements
+
+def engine_score(self, results):
+return EngineScore(self.name(), sum(results) / len(results))
 
 
 # Discounted Cumulative Gain
@@ -429,7 +435,10 @@
 print("Expected %d queries, but %d were missing" % 
(len(self.dcg.dcgs), errors))
 
 scores.append(EngineScore(self.name(k), sum(ndcgs) / len(ndcgs)))
-return EngineScoreSet(scores)
+if len(scores) == 1:
+return scores[0]
+else:
+return EngineScoreSet(scores)
 
 
 # http://olivier.chapelle.cc/pub/err.pdf
@@ -490,7 +499,10 @@
 for k in self.k:
 total_err = sum([self._query_score(k, q, results[q]) for q in 
results])
 scores.append(EngineScore(self.name(k), total_err / len(results)))
-return EngineScoreSet(scores)
+

[MediaWiki-commits] [Gerrit] wikimedia...relevanceForge[master]: Potential new click based metric

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

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

Change subject: Potential new click based metric
..

Potential new click based metric

Our problem with the paul score, our only current click based metric, is
that bringing new (potentially better) results that the user has never
seen before into a result set can lead to a reduction in the score,
basically making something seem worse even though it might not be.

This implements a metric based on the relative ordering preferences of
users from their click behavior. It is based on the paper 'Accurately
Interpreting Clickthrough Data as Implicit Feedback' by Thorsten
Joachims which is a highly cited paper, and seems to be commonly used
in learn to rank scenarios.

One thing i couldn't find any reference to though was how to generate a
score from the preferences. I've taken the naive approach of scoring
each query as the % of constraints that were satisfied, and then having
the engine score be the average of the query score. I don't know if this
is the best way, but seems plausible.

Change-Id: I610db0e574164d32e659259ba325d3e681f06f2f
---
M engineScore.py
A sql/hive_clicks.yaml
2 files changed, 156 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/relevanceForge 
refs/changes/40/317540/1

diff --git a/engineScore.py b/engineScore.py
index 92b5f43..694bdc1 100755
--- a/engineScore.py
+++ b/engineScore.py
@@ -44,6 +44,7 @@
 'PaulScore': PaulScore,
 'nDCG': nDCG,
 'ERR': ERR,
+'ClickOrdering': ClickOrdering,
 }
 
 query = CachedQuery(settings)
@@ -179,6 +180,122 @@
 return EngineScoreSet(scores)
 
 
+# https://www.cs.cornell.edu/people/tj/publications/joachims_etal_05a.pdf
+#
+# Generates a set of constraints, matching Click > Skip Above along with
+# Click > Skip Next, for each set of query + clicks. Reports the average
+# % of constraints that are satisfied per query by the provided results.
+class ClickOrdering(object):
+def __init__(self, sql_result, options):
+# Map from query string to set of tuples (a,b) such that a is preferred
+# over b
+self._constraints = {}
+
+# The hive output is a mess, we need to burn a few lines.
+# First remove lines until we get to one that starts with
+# a space. This is where the query is being provided.
+while sql_result[0][0] != ' ':
+sql_result.pop(0)
+# Then burn lines until it no longer starts with a space, which
+# is where we will find the query header
+while sql_result[0][0] == ' ':
+sql_result.pop(0)
+# Burn one more line, which is the query header
+sql_result.pop(0)
+# We also need to burn one line off the end, which is the command 
prompt
+sql_result.pop()
+
+for line in sql_result:
+try:
+query, encoded_clicks_and_hits = line.strip().split("\t")
+except ValueError:
+debug("Bad input line: %s" % (line))
+continue
+# The set of clicks, and the hits shown when that click was
+# generated, for a single user + query pair.
+clicks_and_hits = json.loads(encoded_clicks_and_hits)
+
+# Set ensures if multiple clicks generate the same constraints, we
+# only evaluate them once. But is that desired? Not sure...
+constraints = set()
+
+# The set of clicked page id's for this user + query
+clicks = set([int(c['page_id']) for c in clicks_and_hits])
+for meta in clicks_and_hits:
+hits = meta['hits']
+click_page_id = int(meta['page_id'])
+click_pos = self._find_click_pos(hits, click_page_id)
+if click_pos is None:
+# Click is not in hits somehow ... some sort of data
+# collection error but not sure what yet.
+continue
+for i in xrange(0, click_pos):
+hit_page_id = int(hits[i]['pageid'])
+if hit_page_id not in clicks:
+constraints.add((click_page_id, hit_page_id))
+if click_pos + 1 < len(hits):
+hit_page_id = int(hits[click_pos+1]['pageid'])
+if hit_page_id not in clicks:
+constraints.add((click_page_id, hit_page_id))
+
+# Add new constraints to the set of constraints for the query
+if len(constraints) > 0:
+try:
+self._constraints[query] = 
self._constraints[query].union(constraints)
+except KeyError:
+self._constraints[query] = constraints
+self.queries = self._constraints.keys()
+
+def name(self):
+return 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: proxysql: Fix process check and user permissions; Fix .my.cnf

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

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

Change subject: proxysql: Fix process check and user permissions; Fix .my.cnf
..

proxysql: Fix process check and user permissions; Fix .my.cnf

By default, make root the default owner.
Fix mistake on .my.cnf template not adding the password for access.

Bug: T148500
Change-Id: Ice1fde7c6f61d8492840dc24f14771ad40c0ac0b
---
M modules/proxysql/templates/root.my.cnf.erb
M modules/role/manifests/labs/db/proxy.pp
2 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/modules/proxysql/templates/root.my.cnf.erb 
b/modules/proxysql/templates/root.my.cnf.erb
index fd7360e..0727f8d 100644
--- a/modules/proxysql/templates/root.my.cnf.erb
+++ b/modules/proxysql/templates/root.my.cnf.erb
@@ -1,6 +1,6 @@
 [client]
 user = <%= @admin_user %>
-<% if @password -%>
+<% if @admin_password -%>
 password = <%= @admin_password %>
 <% end -%>
 socket   = <%= @admin_socket %>
diff --git a/modules/role/manifests/labs/db/proxy.pp 
b/modules/role/manifests/labs/db/proxy.pp
index 72fba7d..5e32505 100644
--- a/modules/role/manifests/labs/db/proxy.pp
+++ b/modules/role/manifests/labs/db/proxy.pp
@@ -23,7 +23,7 @@
 
 file {'/var/run/proxysql':
 ensure  => directory,
-owner   => 'proxysql',
+owner   => 'root',
 group   => 'root',
 mode=> '0755',
 require => Class['proxysql'],
@@ -31,8 +31,8 @@
 
 nrpe::monitor_service { 'proxysql':
 description   => 'proxysql processes',
-nrpe_command  => '/usr/lib/nagios/plugins/check_procs -c 1: \
--a "proxysql"',
+nrpe_command  => '/usr/lib/nagios/plugins/check_procs \
+-c 2:2 -C proxysql',
 critical  => false,
 contact_group => 'admins', # show on icinga/irc only
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: http2 concurrency: 32

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

Change subject: http2 concurrency: 32
..


http2 concurrency: 32

Bug: T107749
Change-Id: I3d164b1817d5350597af07311b4266cb0f16f145
---
M modules/tlsproxy/templates/nginx.conf.erb
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/tlsproxy/templates/nginx.conf.erb 
b/modules/tlsproxy/templates/nginx.conf.erb
index 90ab6e0..36f15b2 100644
--- a/modules/tlsproxy/templates/nginx.conf.erb
+++ b/modules/tlsproxy/templates/nginx.conf.erb
@@ -102,9 +102,9 @@
 ssl_dyn_rec_timeout 1s;   # cf patch default: 1s
 <% end -%>
 
-# limit http2 request-parallelism to 512.  Testing whether this affects
+# limit http2 request-parallelism to 32.  Testing whether this affects
 # problems in T148917 .
-http2_max_concurrent_streams 512; # default 128
+http2_max_concurrent_streams 32; # default 128
 
 # nginx's $http2 is either 'h2' or '' (empty string) for http/1
 # Map it to $h2 as a boolean string value '1' or '0' for use in headers

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: http2 concurrency: 32

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

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

Change subject: http2 concurrency: 32
..

http2 concurrency: 32

Bug: T107749
Change-Id: I3d164b1817d5350597af07311b4266cb0f16f145
---
M modules/tlsproxy/templates/nginx.conf.erb
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/tlsproxy/templates/nginx.conf.erb 
b/modules/tlsproxy/templates/nginx.conf.erb
index 90ab6e0..36f15b2 100644
--- a/modules/tlsproxy/templates/nginx.conf.erb
+++ b/modules/tlsproxy/templates/nginx.conf.erb
@@ -102,9 +102,9 @@
 ssl_dyn_rec_timeout 1s;   # cf patch default: 1s
 <% end -%>
 
-# limit http2 request-parallelism to 512.  Testing whether this affects
+# limit http2 request-parallelism to 32.  Testing whether this affects
 # problems in T148917 .
-http2_max_concurrent_streams 512; # default 128
+http2_max_concurrent_streams 32; # default 128
 
 # nginx's $http2 is either 'h2' or '' (empty string) for http/1
 # Map it to $h2 as a boolean string value '1' or '0' for use in headers

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: proxysql: Fix process check and user permissions; Fix .my.cnf

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

Change subject: proxysql: Fix process check and user permissions; Fix .my.cnf
..


proxysql: Fix process check and user permissions; Fix .my.cnf

By default, make root the default owner.
Fix mistake on .my.cnf template not adding the password for access.
Fix wrong default mysql socket on manifest.

Bug: T148500
Change-Id: Ice1fde7c6f61d8492840dc24f14771ad40c0ac0b
---
M modules/proxysql/manifests/init.pp
M modules/proxysql/templates/root.my.cnf.erb
M modules/role/manifests/labs/db/proxy.pp
3 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/modules/proxysql/manifests/init.pp 
b/modules/proxysql/manifests/init.pp
index d1f329d..9931a06 100644
--- a/modules/proxysql/manifests/init.pp
+++ b/modules/proxysql/manifests/init.pp
@@ -7,8 +7,8 @@
 $admin_port  = 6032,
 $admin_interface = '127.0.0.1',
 $admin_socket= '/tmp/proxysql_admin.sock',
-$mysql_interface = '0.0.0.0',
 $mysql_port  = 6033,
+$mysql_interface = '0.0.0.0',
 $mysql_socket= '/tmp/proxysql.sock',
 ) {
 
diff --git a/modules/proxysql/templates/root.my.cnf.erb 
b/modules/proxysql/templates/root.my.cnf.erb
index fd7360e..0727f8d 100644
--- a/modules/proxysql/templates/root.my.cnf.erb
+++ b/modules/proxysql/templates/root.my.cnf.erb
@@ -1,6 +1,6 @@
 [client]
 user = <%= @admin_user %>
-<% if @password -%>
+<% if @admin_password -%>
 password = <%= @admin_password %>
 <% end -%>
 socket   = <%= @admin_socket %>
diff --git a/modules/role/manifests/labs/db/proxy.pp 
b/modules/role/manifests/labs/db/proxy.pp
index 72fba7d..b28594e 100644
--- a/modules/role/manifests/labs/db/proxy.pp
+++ b/modules/role/manifests/labs/db/proxy.pp
@@ -17,13 +17,13 @@
 admin_user => $admin_user,
 admin_password => $admin_password,
 admin_socket   => '/var/run/proxysql/proxysql_admin.sock',
-mysql_socket   => '/var/run/proxysql/proxysql_admin.sock',
+mysql_socket   => '/var/run/proxysql/proxysql.sock',
 mysql_port => 3306,
 }
 
 file {'/var/run/proxysql':
 ensure  => directory,
-owner   => 'proxysql',
+owner   => 'root',
 group   => 'root',
 mode=> '0755',
 require => Class['proxysql'],
@@ -31,8 +31,8 @@
 
 nrpe::monitor_service { 'proxysql':
 description   => 'proxysql processes',
-nrpe_command  => '/usr/lib/nagios/plugins/check_procs -c 1: \
--a "proxysql"',
+nrpe_command  => '/usr/lib/nagios/plugins/check_procs \
+-c 2:2 -C proxysql',
 critical  => false,
 contact_group => 'admins', # show on icinga/irc only
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: [completion] Properly fail if the response is not ok.

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

Change subject: [completion] Properly fail if the response is not ok.
..


[completion] Properly fail if the response is not ok.

It's still unclear when this can happen but it's a plausible cause for
the error:
Argument 2 passed to SearchEngine::processCompletionResults() must be
an instance of SearchSuggestionSet, Elastica\Response in SearchEngine
class

Bug: T148978
Change-Id: Ic2042fa1773901072a8964404b8a5a9ea4380d29
---
M includes/CompletionSuggester.php
1 file changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  Tjones: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/CompletionSuggester.php b/includes/CompletionSuggester.php
index 0906e8b..b1a5f4d 100644
--- a/includes/CompletionSuggester.php
+++ b/includes/CompletionSuggester.php
@@ -223,8 +223,13 @@
$result = $index->request( "_suggest", 
Request::POST, $suggest, $queryOptions );
if( $result->isOk() ) {
$result = 
$this->postProcessSuggest( $result, $profiles, $log );
+   return $this->success( $result 
);
+   } else {
+   throw new 
\Elastica\Exception\ResponseException(
+   new Request( 
"_suggest", Request::POST, $suggest, $queryOptions ),
+   $result
+   );
}
-   return $this->success( $result );
} catch ( 
\Elastica\Exception\ExceptionInterface $e ) {
return $this->failure( $e );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2042fa1773901072a8964404b8a5a9ea4380d29
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: DCausse 
Gerrit-Reviewer: Cindy-the-browser-test-bot 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Manybubbles 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: Tjones 
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...cxserver[master]: Add source and target languages in error message

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

Change subject: Add source and target languages in error message
..


Add source and target languages in error message

Add source/target languages in error messages so it can be debug better.

Change-Id: Ia6b4f8fec1739a0c975b754d0b1c434628955dcf
---
M mt/Yandex.js
M mt/Youdao.js
2 files changed, 7 insertions(+), 4 deletions(-)

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



diff --git a/mt/Yandex.js b/mt/Yandex.js
index d87f29f..f8f68de 100644
--- a/mt/Yandex.js
+++ b/mt/Yandex.js
@@ -41,7 +41,8 @@
}
 
if ( sourceText.length > 1 ) {
-   return BBPromise.reject( new Error( 'Source text too long' ) );
+   return BBPromise.reject( new Error( 'Source text too long ' ) +
+   sourceLang + '-' + targetLang );
}
 
sourceLang = yandexLanguageNameMap[ sourceLang ] || sourceLang;
@@ -62,7 +63,7 @@
return response.body.text[ 0 ];
} ).catch( function ( response ) {
throw new Error( 'Translation with Yandex failed. Error: ' +
-   self.getErrorName( response.body.code ) );
+   self.getErrorName( response.body.code ) + ' ' + 
sourceLang + '-' + targetLang );
} );
 };
 
diff --git a/mt/Youdao.js b/mt/Youdao.js
index 7f2c99b..3b18fa4 100644
--- a/mt/Youdao.js
+++ b/mt/Youdao.js
@@ -99,7 +99,8 @@
}
 
if ( sourceText.length > 1 ) {
-   return BBPromise.reject( new Error( 'Source text too long' ) );
+   return BBPromise.reject( new Error( 'Source text too long ' ) +
+   sourceLang + targetLang );
}
 
postData = {
@@ -120,7 +121,8 @@
return response.body.translation[ 0 ];
} else {
throw new Error( 'Translation with Youdao failed. 
Error: ' +
-   self.getErrorName( response.body.errorCode ) );
+   self.getErrorName( response.body.errorCode ) +
+   ' ' + sourceLang + '>' + targetLang );
}
} );
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6b4f8fec1739a0c975b754d0b1c434628955dcf
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: http2 concurrency: back to defaults

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

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

Change subject: http2 concurrency: back to defaults
..

http2 concurrency: back to defaults

Bug: T107749
Change-Id: I3c50fc3d7863fc85692bf0a930e5b48d5d2f3cd2
---
M modules/tlsproxy/templates/nginx.conf.erb
1 file changed, 0 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/44/317544/1

diff --git a/modules/tlsproxy/templates/nginx.conf.erb 
b/modules/tlsproxy/templates/nginx.conf.erb
index 36f15b2..d386d88 100644
--- a/modules/tlsproxy/templates/nginx.conf.erb
+++ b/modules/tlsproxy/templates/nginx.conf.erb
@@ -102,10 +102,6 @@
 ssl_dyn_rec_timeout 1s;   # cf patch default: 1s
 <% end -%>
 
-# limit http2 request-parallelism to 32.  Testing whether this affects
-# problems in T148917 .
-http2_max_concurrent_streams 32; # default 128
-
 # nginx's $http2 is either 'h2' or '' (empty string) for http/1
 # Map it to $h2 as a boolean string value '1' or '0' for use in headers
 map $http2 $h2 {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: WIP: Upgrade mapbox.js to v3.0 (upgrade leaflet to 1.0)

2016-10-24 Thread JGirault (Code Review)
JGirault has uploaded a new change for review.

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

Change subject: WIP: Upgrade mapbox.js to v3.0 (upgrade leaflet to 1.0)
..

WIP: Upgrade mapbox.js to v3.0 (upgrade leaflet to 1.0)

Bug: T147347
Change-Id: Iefd04175e4391649d8072ad29b51db9505d15eff
---
M lib/mapbox/mapbox-lib.js
M lib/mapbox/style.css
M modules/box/Map.js
M modules/linkbox/Link.js
M modules/wikivoyage/ControlLayers.js
M package.json
6 files changed, 8,975 insertions(+), 5,056 deletions(-)


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iefd04175e4391649d8072ad29b51db9505d15eff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: JGirault 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: API: Update ApiOptions docs for I45f69997

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

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

Change subject: API: Update ApiOptions docs for I45f69997
..

API: Update ApiOptions docs for I45f69997

Now that we have an alternative multiple-value separator, the
documentation for action=options's change parameter should recommend
that instead of stating that values cannot contain pipes.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/47/317547/1

diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json
index c20ed5d..fe73a56 100644
--- a/includes/api/i18n/en.json
+++ b/includes/api/i18n/en.json
@@ -289,9 +289,9 @@
"apihelp-options-description": "Change preferences of the current 
user.\n\nOnly options which are registered in core or in one of installed 
extensions, or options with keys prefixed with userjs- (intended 
to be used by user scripts), can be set.",
"apihelp-options-param-reset": "Resets preferences to the site 
defaults.",
"apihelp-options-param-resetkinds": "List of types of options to reset 
when the $1reset option is set.",
-   "apihelp-options-param-change": "List of changes, formatted name=value 
(e.g. skin=vector). Value cannot contain pipe characters. If no value is given 
(not even an equals sign), e.g., optionname|otheroption|..., the option will be 
reset to its default value.",
+   "apihelp-options-param-change": "List of changes, formatted name=value 
(e.g. skin=vector). If no value is given (not even an equals sign), e.g., 
optionname|otheroption|..., the option will be reset to its default value. If 
any value passed contains the pipe character (|), use the 
[[Special:ApiHelp/main#main/datatypes|alternative multiple-value separator]] 
for correct operation.",
"apihelp-options-param-optionname": "The name of the option that should 
be set to the value given by $1optionvalue.",
-   "apihelp-options-param-optionvalue": "The value for the option 
specified by $1optionname, can contain pipe characters.",
+   "apihelp-options-param-optionvalue": "The value for the option 
specified by $1optionname.",
"apihelp-options-example-reset": "Reset all preferences.",
"apihelp-options-example-change": "Change skin and 
hideminor preferences.",
"apihelp-options-example-complex": "Reset all preferences, then set 
skin and nickname.",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.28.0-wmf.22]: resourceloader: Make cache-eval in mw.loader.work asynchronous

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

Change subject: resourceloader: Make cache-eval in mw.loader.work asynchronous
..


resourceloader: Make cache-eval in mw.loader.work asynchronous

This is an amended version of reverted commit 482ad8d9fb2e.

The difference is that this change is smaller.

We keep the eval as one large chunk. Not split up in <=50ms chunks and
spread out based on how fast code executes on the device. This means we keep
the issue of an irresponsive UI thread during execution, and trade it for
finishing quicker. This doesn't feel right, but is something we should change
separately, later because it has side-effects (T146510).

Doing it in one chunk is the status quo as we've had it for the last two
years. This commit merely defers the big eval chunk to one tick later so
that higher priority work may happen first (e.g. rendering).

Bug: T142129
Change-Id: I2b31b27554cd29b48d986ed6a6f698a77e59c0e5
(cherry picked from commit 2a895edbd23f796206e26fb7d08a79fe6c653103)
---
M resources/src/mediawiki/mediawiki.js
1 file changed, 33 insertions(+), 16 deletions(-)

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



diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index f878e42..6b23439 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -1681,6 +1681,26 @@
}
 
/**
+* @private
+* @param {string[]} implementations Array containing 
pieces of JavaScript code in the
+*  form of calls to mw.loader#implement().
+* @param {Function} cb Callback in case of failure
+* @param {Error} cb.err
+*/
+   function asyncEval( implementations, cb ) {
+   if ( !implementations.length ) {
+   return;
+   }
+   mw.requestIdleCallback( function () {
+   try {
+   $.globalEval( 
implementations.join( ';' ) );
+   } catch ( err ) {
+   cb( err );
+   }
+   } );
+   }
+
+   /**
 * Make a versioned key for a specific module.
 *
 * @private
@@ -1733,7 +1753,7 @@
 * @protected
 */
work: function () {
-   var q, batch, concatSource, origBatch;
+   var q, batch, implementations, 
sourceModules;
 
batch = [];
 
@@ -1763,19 +1783,18 @@
 
mw.loader.store.init();
if ( mw.loader.store.enabled ) {
-   concatSource = [];
-   origBatch = batch;
+   implementations = [];
+   sourceModules = [];
batch = $.grep( batch, function 
( module ) {
-   var source = 
mw.loader.store.get( module );
-   if ( source ) {
-   
concatSource.push( source );
+   var implementation = 
mw.loader.store.get( module );
+   if ( implementation ) {
+   
implementations.push( implementation );
+   
sourceModules.push( module );
return false;
}
return true;
} );
-   try {
-   $.globalEval( 
concatSource.join( ';' ) );
-   } catch ( err ) {
+   asyncEval( implementations, 
function ( err ) {
// Not good, the cached 
mw.loader.implement calls failed! This should
  

[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Browser tests: update beta feature selector

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

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

Change subject: Browser tests: update beta feature selector
..

Browser tests: update beta feature selector

Change-Id: I14c61767bb53bdcfd091f3e838c8eb7f1af49c8c
---
M tests/browser/features/support/pages/special_preferences_page.rb
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/tests/browser/features/support/pages/special_preferences_page.rb 
b/tests/browser/features/support/pages/special_preferences_page.rb
index 84445f1..928bbcc 100644
--- a/tests/browser/features/support/pages/special_preferences_page.rb
+++ b/tests/browser/features/support/pages/special_preferences_page.rb
@@ -5,7 +5,7 @@
 
   link(:beta_features, id: 'preftab-betafeatures')
 
-  checkbox(:flow_beta_feature, id: 
'mw-input-wpbeta-feature-flow-user-talk-page')
+  checkbox(:flow_beta_feature, name: 'wpbeta-feature-flow-user-talk-page')
 
   button(:save_preferences, id: 'prefcontrol')
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[wmf/1.28.0-wmf.22]: Add wgContentNamespaces to the list of vars loaded by Search...

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

Change subject: Add wgContentNamespaces to the list of vars loaded by 
SearchConfig
..


Add wgContentNamespaces to the list of vars loaded by SearchConfig

This is our best bet to explain the errors that started to spam the
logs when we activated BM25 on the top10 wikipedias.
It was the first time that a rescore profile was used with the value
'content' as supported_namespaces, this tells the Rescorebuilder to
inspect wgContentNamespaces.
Unfortunately when running a secondTry query issued from a TextCat
language detection we load an external wiki config via SearchConfig.
This class uses a prefix filter for cirrus vars and a whitelist
approach for non cirrus one.

This patch adds 'wgContentNamespaces' to this whitelist.

Bug: T148840
Change-Id: If7452e0d12dd0cb3d3fed36106708e5a0f95c41d
(cherry picked from commit 47bd6747a1537ab85d0443396c06e92ab4a674c8)
---
M includes/SearchConfig.php
A tests/unit/SearchConfigTest.php
2 files changed, 50 insertions(+), 3 deletions(-)

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



diff --git a/includes/SearchConfig.php b/includes/SearchConfig.php
index 5576d96..89d73cf 100644
--- a/includes/SearchConfig.php
+++ b/includes/SearchConfig.php
@@ -14,6 +14,13 @@
// Constants for referring to various config values. Helps prevent 
fat-fingers
const INDEX_BASE_NAME = 'CirrusSearchIndexBaseName';
const PREFIX_IDS = 'CirrusSearchPrefixIds';
+   const CIRRUS_VAR_PREFIX = 'wgCirrus';
+
+   /** @static string[] non cirrus vars to load when loading external wiki 
config */
+   private static $nonCirrusVars = [
+   'wgLanguageCode',
+   'wgContentNamespaces',
+   ];
 
/**
 * Override settings
@@ -53,6 +60,14 @@
 
/**
 * Create new search config for current or other wiki.
+* NOTE: if loading another wiki config the list of variables extracted
+* is:
+*   - all globals with a prefix 'wgCirrus'
+*   - all non cirrus vars defined in self::$nonCirrusVars
+* Make sure to update this array when new vars are needed or you may 
encounter
+* issues when running queries on external wiki such as TextCat lang 
detection
+* see CirrusSearch::searchTextSecondTry().
+*
 * @param string|null $overrideWiki Interwiki link name for wiki
 * @param string|null $overrideName DB name for the wiki
 */
@@ -61,7 +76,7 @@
if ( $overrideWiki && $overrideName ) {
$this->wikiId = $overrideName;
if ( $this->wikiId != wfWikiID() ) {
-   $this->source = new \HashConfig( 
$this->getConfigVars( $overrideName, 'wgCirrus' ) );
+   $this->source = new \HashConfig( 
$this->getConfigVars( $overrideName, self::CIRRUS_VAR_PREFIX ) );
$this->prefix = 'wg';
// Re-create language object
$this->source->set( 'wgContLang', 
\Language::factory( $this->source->get( 'wgLanguageCode' ) ) );
@@ -74,11 +89,14 @@
 
/**
 * Get search config vars from other wiki's config
+*
+* Public for unit test purpose only.
+*
 * @param string $wiki Target wiki
 * @param string $prefix Cirrus variables prefix
 * @return array
 */
-   private function getConfigVars( $wiki, $prefix ) {
+   public function getConfigVars( $wiki, $prefix ) {
global $wgConf;
 
$cirrusVars = array_filter( array_keys($GLOBALS),
@@ -89,7 +107,7 @@
return strncmp( $key, $prefix, 
strlen($prefix) ) === 0;
}
);
-   $cirrusVars[] = 'wgLanguageCode';
+   $cirrusVars = array_merge( $cirrusVars, self::$nonCirrusVars );
// Hack to work around https://phabricator.wikimedia.org/T111441
putenv( 'REQUEST_METHOD' );
return $wgConf->getConfig( $wiki, $cirrusVars );
@@ -304,4 +322,12 @@
$this->writableClusters = $this->availableClusters;
}
}
+
+   /**
+* for unit tests purpose only
+* @return string[] list of "non-cirrus" var names
+*/
+   public static function getNonCirrusConfigVarNames() {
+   return self::$nonCirrusVars;
+   }
 }
diff --git a/tests/unit/SearchConfigTest.php b/tests/unit/SearchConfigTest.php
new file mode 100644
index 000..24f11c3
--- /dev/null
+++ b/tests/unit/SearchConfigTest.php
@@ -0,0 +1,21 @@
+getConfigVars(wfWikiID(), 
SearchConfig::CIRRUS_VAR_PREFIX) );
+   $prefix = SearchConfig::CIRRUS_VAR_PREFIX;
+   foreach( $GLOBALS as $n => $v 

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Fix all db subclasses sharing a PDO

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

Change subject: Fix all db subclasses sharing a PDO
..


Fix all db subclasses sharing a PDO

WTF PHP, even static::$thing refers to the same object always?
Even this gets a single shared instance:
  $klass = get_called_class();
  $db = $klass::$db

We need this to re-apply change I61ef044899ee on deployment, where
it's currently reverted.

Change-Id: Ic770319c8d1f9812e980e08fd833cdbee1bab4d6
---
M Core/DataStores/SmashPigDatabase.php
M Tests/DamagedDatabaseTest.php
A Tests/SmashPigDatabaseTest.php
M Tests/TestingDatabase.php
4 files changed, 73 insertions(+), 14 deletions(-)

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



diff --git a/Core/DataStores/SmashPigDatabase.php 
b/Core/DataStores/SmashPigDatabase.php
index 48f78b4..ad8c9b7 100644
--- a/Core/DataStores/SmashPigDatabase.php
+++ b/Core/DataStores/SmashPigDatabase.php
@@ -7,16 +7,23 @@
 abstract class SmashPigDatabase {
 
/**
-* @var PDO
+* @var array
+* key is concrete class name, value is a backing PDO object
 * We do the silly singleton thing for convenient testing with in-memory
 * databases that would otherwise not be shared between components.
+*
+* Ideally, this would be a scalar variable holding a single PDO object
+* for each concrete subclass. Unfortunately, in PHP the static member
+* variable is shared between all subclasses of the class that declares
+* it, even in an abstract class like this one. See
+* 
http://stackoverflow.com/questions/11417681/static-properties-on-base-class-and-inheritance#11418607
 */
-   protected static $db;
+   protected static $dbs = array();
 
protected function __construct() {
$config = Context::get()->getConfiguration();
-   if ( !static::$db ) {
-   static::$db = $config->object( $this->getConfigKey() );
+   if ( !$this->getDatabase() ) {
+   $this->setDatabase( $config->object( 
$this->getConfigKey() ) );
}
}
 
@@ -25,10 +32,19 @@
}
 
/**
-* @return PDO
+* @return PDO|null
 */
public function getDatabase() {
-   return static::$db;
+   $className = get_called_class();
+   if ( isset ( self::$dbs[$className] ) ) {
+   return self::$dbs[$className];
+   }
+   return null;
+   }
+
+   protected function setDatabase( PDO $db ) {
+   $className = get_called_class();
+   self::$dbs[$className] = $db;
}
 
public function createTable() {
diff --git a/Tests/DamagedDatabaseTest.php b/Tests/DamagedDatabaseTest.php
index db03227..705ddad 100644
--- a/Tests/DamagedDatabaseTest.php
+++ b/Tests/DamagedDatabaseTest.php
@@ -22,12 +22,7 @@
}
 
public function tearDown() {
-   // Reset PDO static member
-   $klass = new \ReflectionClass( 
'SmashPig\Core\DataStores\DamagedDatabase' );
-   $dbProperty = $klass->getProperty( 'db' );
-   $dbProperty->setAccessible( true );
-   $dbProperty->setValue( null );
-
+   TestingDatabase::clearStatics( $this->db );
parent::tearDown();
}
 
diff --git a/Tests/SmashPigDatabaseTest.php b/Tests/SmashPigDatabaseTest.php
new file mode 100644
index 000..118b897
--- /dev/null
+++ b/Tests/SmashPigDatabaseTest.php
@@ -0,0 +1,48 @@
+pendingDb = PendingDatabase::get();
+   $this->pendingDb->createTable();
+   $this->paymentsInitialDb = PaymentsInitialDatabase::get();
+   $this->paymentsInitialDb->createTable();
+   }
+
+   public function tearDown() {
+   TestingDatabase::clearStatics( $this->paymentsInitialDb );
+   TestingDatabase::clearStatics( $this->pendingDb );
+
+   parent::tearDown();
+   }
+
+   public function testDifferentDatabases() {
+   $pendingPdo = $this->pendingDb->getDatabase();
+   $initPdo = $this->paymentsInitialDb->getDatabase();
+   $this->assertNotEquals(
+   spl_object_hash( $pendingPdo ),
+   spl_object_hash( $initPdo ),
+   'Pending and paymentsInit databases share the same PDO'
+   );
+   }
+}
diff --git a/Tests/TestingDatabase.php b/Tests/TestingDatabase.php
index 6173a22..48e0e87 100644
--- a/Tests/TestingDatabase.php
+++ b/Tests/TestingDatabase.php
@@ -10,8 +10,8 @@
 */
public static function clearStatics( $classish ) {
$klass = new \ReflectionClass( $classish );
-   $dbProperty = $klass->getProperty( 'db' );
+   $dbProperty = $klass->getProperty( 'dbs' 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Labs images: Only add fqdn of instance to /etc/hosts

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

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

Change subject: Labs images: Only add fqdn of instance to /etc/hosts
..

Labs images: Only add fqdn of instance to /etc/hosts

Adding the simple hostname seems to break hostname -d

Bug: T120830
Change-Id: Ib100fed1d8e3d93f5aee385ac403f575f3fe0be4
---
M modules/labs_bootstrapvz/files/firstboot.sh
M modules/labs_vmbuilder/files/firstboot.sh
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/54/317554/1

diff --git a/modules/labs_bootstrapvz/files/firstboot.sh 
b/modules/labs_bootstrapvz/files/firstboot.sh
index 5d86d25..fe5e3d4 100644
--- a/modules/labs_bootstrapvz/files/firstboot.sh
+++ b/modules/labs_bootstrapvz/files/firstboot.sh
@@ -141,7 +141,7 @@
 options timeout:5 ndots:2
 EOF
 
-echo "$ip  $hostname $fqdn" >> /etc/hosts
+echo "$ip  $fqdn" >> /etc/hosts
 
 # This is only needed when running bootstrap-vz on
 # a puppetmaster::self instance, and even then
diff --git a/modules/labs_vmbuilder/files/firstboot.sh 
b/modules/labs_vmbuilder/files/firstboot.sh
index e110c01..1f11287 100644
--- a/modules/labs_vmbuilder/files/firstboot.sh
+++ b/modules/labs_vmbuilder/files/firstboot.sh
@@ -83,7 +83,7 @@
 options timeout:5 ndots:2
 EOF
 
-echo "$ip  $hostname $fqdn" >> /etc/hosts
+echo "$ip  $fqdn" >> /etc/hosts
 
 /etc/init.d/nslcd restart
 /etc/init.d/nscd restart

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib100fed1d8e3d93f5aee385ac403f575f3fe0be4
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/mediawiki-config[master]: Fix capitalization for change 317387

2016-10-24 Thread Arseny1992 (Code Review)
Arseny1992 has uploaded a new change for review.

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

Change subject: Fix capitalization for change 317387
..

Fix capitalization for change 317387

Related: 317523

Bug: T148328
Change-Id: I50dc7cbfc2258962e8fc2a7784e52b3902cea6a7
---
M wmf-config/InitialiseSettings.php
1 file changed, 0 insertions(+), 5 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index cbcf1a3..01e4b9d 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -17596,11 +17596,6 @@
'nonglobal' => false,
 ],
 
-'wmgWatchlistdefault' => [
-   'default' => false,
-   'cswiki' => true, // T148328
-],
-
 'wmgWatchlistDefault' => [
'default' => false,
'cswiki' => true, // T148328

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: consolidate PageTests into PageTest

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

Change subject: Hygiene: consolidate PageTests into PageTest
..


Hygiene: consolidate PageTests into PageTest

Move PageTests into PageTest and convert to plain JUnit.

Change-Id: Ia1cfbd35e8bd05c5f2e083ccba82145947c870ed
---
D app/src/androidTest/java/org/wikipedia/page/PageTests.java
M app/src/test/java/org/wikipedia/page/PageTest.java
2 files changed, 27 insertions(+), 47 deletions(-)

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



diff --git a/app/src/androidTest/java/org/wikipedia/page/PageTests.java 
b/app/src/androidTest/java/org/wikipedia/page/PageTests.java
deleted file mode 100644
index a6e1ec5..000
--- a/app/src/androidTest/java/org/wikipedia/page/PageTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.wikipedia.page;
-
-import android.support.test.filters.SmallTest;
-
-import junit.framework.TestCase;
-
-import org.json.JSONObject;
-import org.wikipedia.dataclient.WikiSite;
-
-import java.util.ArrayList;
-import java.util.List;
-
-@SmallTest
-public class PageTests extends TestCase {
-
-private static final int NUM_SECTIONS = 10;
-
-public void testJSONSerialization() throws Exception {
-List sections = new ArrayList<>();
-Section headSection = new Section(0, 1, null, null, "Hi there!");
-sections.add(headSection);
-for (int i = 1; i <= NUM_SECTIONS; i++) {
-sections.add(new Section(i, 1, "Something " + i, "Something_" + i, 
"Content Something" + i));
-}
-PageTitle title = new PageTitle(null, "Test", 
WikiSite.forLanguageCode("en"));
-PageProperties props = new PageProperties(new 
JSONObject("{\"id\":15580374,\"displaytitle\":\"Test\",\"revision\":615503846,\"lastmodified\":\"2001-02-03T04:00:00Z\",\"editable\":true,\"mainpage\":true}"));
-Page page = new Page(title, sections, props);
-assertEquals(page, new Page(page.toJSON()));
-}
-}
diff --git a/app/src/test/java/org/wikipedia/page/PageTest.java 
b/app/src/test/java/org/wikipedia/page/PageTest.java
index 29afdb9..27d4169 100644
--- a/app/src/test/java/org/wikipedia/page/PageTest.java
+++ b/app/src/test/java/org/wikipedia/page/PageTest.java
@@ -1,15 +1,14 @@
 package org.wikipedia.page;
 
+import org.json.JSONObject;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.wikipedia.dataclient.WikiSite;
 import org.wikipedia.server.BasePageLeadTest;
 import org.wikipedia.test.TestRunner;
 
-import org.json.JSONObject;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
 import java.util.ArrayList;
+import java.util.List;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
@@ -19,17 +18,11 @@
 public class PageTest {
 private static final WikiSite WIKI = WikiSite.forLanguageCode("en");
 
-private PageTitle title;
-private PageProperties props;
-
-@Before
-public void setUp() throws Exception {
-title = new PageTitle("Main page", WIKI, "//foo/thumb.jpg");
-props = new PageProperties(new 
JSONObject(BasePageLeadTest.getEnglishMainPageJson()));
-}
-
 @Test
-public void testMediaWikiMarshalling() throws Exception {
+public void testMediaWikiMarshalling() throws Throwable {
+PageTitle title = new PageTitle("Main page", WIKI, "//foo/thumb.jpg");
+PageProperties props = new PageProperties(new 
JSONObject(BasePageLeadTest.getEnglishMainPageJson()));
+
 Page page = new Page(title, new ArrayList(), props, 
Page.MEDIAWIKI_ORIGIN);
 assertThat(page.isFromRestBase(), is(false));
 Page pageClone = new Page(page.toJSON());
@@ -37,11 +30,28 @@
 }
 
 @Test
-public void testRestBaseMarshalling() throws Exception {
+public void testRestBaseMarshalling() throws Throwable {
+PageTitle title = new PageTitle("Main page", WIKI, "//foo/thumb.jpg");
+PageProperties props = new PageProperties(new 
JSONObject(BasePageLeadTest.getEnglishMainPageJson()));
+
 Page page = new Page(title, new ArrayList(), props, 
Page.RESTBASE_ORIGIN);
 Page pageClone = new Page(page.toJSON()); // = complete 
unmarshall(marshall(subject))
 assertThat(pageClone, is(page));
 assertThat(page.isFromRestBase(), is(true));
 assertThat(pageClone.isFromRestBase(), is(true));
 }
-}
+
+@Test public void testConstructorJson() throws Exception {
+List sections = new ArrayList<>();
+Section headSection = new Section(0, 1, null, null, "Hi there!");
+sections.add(headSection);
+final int numSections = 10;
+for (int i = 1; i <= numSections; i++) {
+sections.add(new Section(i, 1, "Something " + i, "Something_" + i, 
"Content Something" + i));
+}
+PageTitle title = new PageTitle(null, "Test", 

[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Remove support for MW 1.20

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

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

Change subject: Remove support for MW 1.20
..

Remove support for MW 1.20

Change-Id: I4ff9ad922a18c3db9d34d7d0522dc4be96daeba2
---
M includes/PF_FormLinker.php
M includes/PF_PageSchemas.php
M includes/PF_Utils.php
M specials/PF_CreateClass.php
4 files changed, 13 insertions(+), 48 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms 
refs/changes/57/317557/2

diff --git a/includes/PF_FormLinker.php b/includes/PF_FormLinker.php
index 85d09c3..8eb0eab 100644
--- a/includes/PF_FormLinker.php
+++ b/includes/PF_FormLinker.php
@@ -243,12 +243,7 @@
$job = new PFCreatePageJob( $title, $params );
 
$jobs = array( $job );
-   if ( class_exists( 'JobQueueGroup' ) ) {
-   JobQueueGroup::singleton()->push( $jobs );
-   } else {
-   // MW <= 1.20
-   Job::batchInsert( $jobs );
-   }
+   JobQueueGroup::singleton()->push( $jobs );
}
 
/**
diff --git a/includes/PF_PageSchemas.php b/includes/PF_PageSchemas.php
index 2b6d988..97a72f4 100644
--- a/includes/PF_PageSchemas.php
+++ b/includes/PF_PageSchemas.php
@@ -708,12 +708,7 @@
$job = new PSCreatePageJob( $formTitle, $params );
 
$jobs = array( $job );
-   if ( class_exists( 'JobQueueGroup' ) ) {
-   JobQueueGroup::singleton()->push( $jobs );
-   } else {
-   // MW <= 1.20
-   Job::batchInsert( $jobs );
-   }
+   JobQueueGroup::singleton()->push( $jobs );
}
 
/**
@@ -833,12 +828,7 @@
}
}
 
-   if ( class_exists( 'JobQueueGroup' ) ) {
-   JobQueueGroup::singleton()->push( $jobs );
-   } else {
-   // MW <= 1.20
-   Job::batchInsert( $jobs );
-   }
+   JobQueueGroup::singleton()->push( $jobs );
 
// Create form, if it's specified.
$formName = self::getFormName( $pageSchemaObj );
diff --git a/includes/PF_Utils.php b/includes/PF_Utils.php
index 5dfa4a1..1ad888f 100644
--- a/includes/PF_Utils.php
+++ b/includes/PF_Utils.php
@@ -56,21 +56,13 @@
/**
 * Gets the text contents of a page with the passed-in Title object.
 */
-   public static function getPageText( $title ) {
-   if ( method_exists( 'WikiPage', 'getContent' ) ) {
-   // MW 1.21+
-   $wikiPage = new WikiPage( $title );
-   $content = $wikiPage->getContent();
-
-   if ( $content !== null ) {
-   return $content->getNativeData();
-   } else {
-   return null;
-   }
+   public static function getPageText( $title ) {=
+   $wikiPage = new WikiPage( $title );
+   $content = $wikiPage->getContent();
+   if ( $content !== null ) {
+   return $content->getNativeData();
} else {
-   // MW <= 1.20
-   $article = new Article( $title );
-   return $article->getContent();
+   return null;
}
}
 
diff --git a/specials/PF_CreateClass.php b/specials/PF_CreateClass.php
index 6405e9e..6251900 100644
--- a/specials/PF_CreateClass.php
+++ b/specials/PF_CreateClass.php
@@ -113,16 +113,9 @@
 
$template_title = Title::makeTitleSafe( NS_TEMPLATE, 
$template_name );
$edit_summary = '';
-   if ( method_exists( 'WikiPage', 'doEditContent' ) ) {
-   // MW 1.21+
-   $template_page = new WikiPage( $template_title );
-   $content = new WikitextContent( $full_text );
-   $template_page->doEditContent( $content, $edit_summary 
);
-   } else {
-   // MW <= 1.20
-   $template_article = new Article( $template_title );
-   $template_article->doEdit( $full_text, $edit_summary );
-   }
+   $template_page = new WikiPage( $template_title );
+   $content = new WikitextContent( $full_text );
+   $template_page->doEditContent( $content, $edit_summary );
 
// Create the form, and make a job for it.
if ( $form_name != '' ) {
@@ -150,12 +143,7 @@
$jobs[] = new PFCreatePageJob( $category_title, $params 
);
}
 
-   if ( class_exists( 'JobQueueGroup' ) ) {
-   

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: convert ParcelableTest to JUnit 4

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

Change subject: Hygiene: convert ParcelableTest to JUnit 4
..


Hygiene: convert ParcelableTest to JUnit 4

Change-Id: I1838c694c92e230a7c07c5a43f62738f3a9f10ac
---
M app/src/androidTest/java/org/wikipedia/test/ParcelableTest.java
1 file changed, 26 insertions(+), 24 deletions(-)

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



diff --git a/app/src/androidTest/java/org/wikipedia/test/ParcelableTest.java 
b/app/src/androidTest/java/org/wikipedia/test/ParcelableTest.java
index 0abb6cb..759f650 100644
--- a/app/src/androidTest/java/org/wikipedia/test/ParcelableTest.java
+++ b/app/src/androidTest/java/org/wikipedia/test/ParcelableTest.java
@@ -4,9 +4,9 @@
 import android.os.Parcelable;
 import android.support.test.filters.SmallTest;
 
-import junit.framework.TestCase;
 
 import org.json.JSONObject;
+import org.junit.Test;
 import org.wikipedia.ParcelableLruCache;
 import org.wikipedia.dataclient.WikiSite;
 import org.wikipedia.history.HistoryEntry;
@@ -14,41 +14,33 @@
 import org.wikipedia.page.PageTitle;
 import org.wikipedia.pageimages.PageImage;
 
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+
 @SmallTest
-public class ParcelableTest extends TestCase {
-
-private void parcelAndTestObjects(Parcelable p) throws Exception {
-Parcel parcel = Parcel.obtain();
-p.writeToParcel(parcel, 0);
-
-parcel.setDataPosition(0);
-Parcelable.Creator creator = (Parcelable.Creator) 
p.getClass().getField("CREATOR").get(null);
-Parcelable newObject = (Parcelable) creator.createFromParcel(parcel);
-assertEquals(p, newObject);
-}
-
-public void testPageTitle() throws Exception {
+public class ParcelableTest {
+@Test public void testPageTitle() throws Throwable {
 PageTitle title = new PageTitle(null, "Test", 
WikiSite.forLanguageCode("en"));
 parcelAndTestObjects(title);
 }
 
-public void testPageTitleTalk() throws Exception {
+@Test public void testPageTitleTalk() throws Throwable {
 WikiSite wiki = WikiSite.forLanguageCode("en");
 PageTitle origTitle = new PageTitle("Talk", "India", wiki);
 parcelAndTestObjects(origTitle);
 }
 
-public void testWikiSite() throws Exception {
+@Test public void testWikiSite() throws Throwable {
 WikiSite wiki = WikiSite.forLanguageCode("en");
 parcelAndTestObjects(wiki);
 }
 
-public void testPageProperties() throws Exception {
+@Test public void testPageProperties() throws Throwable {
 PageProperties props = new PageProperties(new 
JSONObject("{\"protection\":{\"edit\":[\"autoconfirmed\"],\"move\":[\"sysop\"]},\"id\":15580374,\"displaytitle\":\"Something\",\"revision\":615503846,\"lastmodified\":\"\",\"editable\":false,\"mainpage\":false}"));
 parcelAndTestObjects(props);
 }
 
-public void testLruCache() throws Exception {
+@Test public void testLruCache() throws Throwable {
 ParcelableLruCache oldCache = new ParcelableLruCache<>(2, 
WikiSite.class);
 oldCache.put("english", WikiSite.forLanguageCode("en"));
 oldCache.put("tamil", WikiSite.forLanguageCode("ta"));
@@ -61,13 +53,13 @@
 //noinspection unchecked
 ParcelableLruCache newCache = (ParcelableLruCache) 
creator.createFromParcel(parcel);
 
-assertEquals(newCache.maxSize(), oldCache.maxSize());
-assertEquals(newCache.size(), oldCache.size());
-assertEquals(newCache.get("english"), oldCache.get("english"));
-assertEquals(newCache.get("tamil"), oldCache.get("tamil"));
+assertThat(newCache.maxSize(), is(oldCache.maxSize()));
+assertThat(newCache.size(), is(oldCache.size()));
+assertThat(newCache.get("english"), is(oldCache.get("english")));
+assertThat(newCache.get("tamil"), is(oldCache.get("tamil")));
 }
 
-public void testHistoryEntry() throws Exception {
+@Test public void testHistoryEntry() throws Throwable {
 WikiSite wiki = WikiSite.forLanguageCode("en");
 PageTitle title = new PageTitle("Talk", "India", wiki);
 HistoryEntry historyEntry = new HistoryEntry(title, 
HistoryEntry.SOURCE_EXTERNAL_LINK);
@@ -75,11 +67,21 @@
 parcelAndTestObjects(historyEntry);
 }
 
-public void testPageImage() throws Exception {
+@Test public void testPageImage() throws Throwable {
 WikiSite wiki = WikiSite.forLanguageCode("en");
 PageTitle title = new PageTitle("Talk", "India", wiki);
 PageImage pageImage = new PageImage(title, "Testing image");
 
 parcelAndTestObjects(pageImage);
 }
+
+private void parcelAndTestObjects(Parcelable p) throws Throwable {
+Parcel parcel = Parcel.obtain();
+p.writeToParcel(parcel, 0);
+
+parcel.setDataPosition(0);
+

[MediaWiki-commits] [Gerrit] operations/puppet[production]: standard: deploy prometheus-node-exporter to eqiad

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

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

Change subject: standard: deploy prometheus-node-exporter to eqiad
..

standard: deploy prometheus-node-exporter to eqiad

Bug: T140646
Change-Id: I26a848a1e49f63fddf9d614e80e351de8c2f6538
---
M modules/standard/manifests/prometheus.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/52/317552/1

diff --git a/modules/standard/manifests/prometheus.pp 
b/modules/standard/manifests/prometheus.pp
index 8b86cfe..1c01c8a 100644
--- a/modules/standard/manifests/prometheus.pp
+++ b/modules/standard/manifests/prometheus.pp
@@ -1,6 +1,6 @@
 # standard class for prometheus
 class standard::prometheus {
-if $::site == 'codfw' {
+if $::site == 'codfw' or $::site == 'eqiad' {
 include ::role::prometheus::node_exporter
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I26a848a1e49f63fddf9d614e80e351de8c2f6538
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Adding Tyler to releasers-mediawiki group

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

Change subject: Adding Tyler to releasers-mediawiki group
..


Adding Tyler to releasers-mediawiki group

Do not merge until approved.

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

Approvals:
  Hashar: Looks good to me, but someone else must approve
  Dzahn: Verified; Looks good to me, approved



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 101e8b1..450a537 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -87,7 +87,7 @@
   releasers-mediawiki:
 gid: 711
 description: people who upload mediawiki releases
-members: [catrope, csteipp, demon, hashar, reedy]
+members: [catrope, csteipp, demon, hashar, reedy, thcipriani]
   releasers-mobile:
 gid: 712
 description: people who upload mobile app releases

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id57b2edba69e6b1c7c013a6b31418ed479c79c7d
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Dzahn 
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] operations/puppet[production]: Add missing wiki to RB

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

Change subject: Add missing wiki to RB
..


Add missing wiki to RB

Bug: T148861
Change-Id: I1ed68aa9ceb15e907bf0080e37f2a9ba42407141
---
M modules/restbase/templates/config.yaml.erb
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/restbase/templates/config.yaml.erb 
b/modules/restbase/templates/config.yaml.erb
index 6bd2b81..73b06da 100644
--- a/modules/restbase/templates/config.yaml.erb
+++ b/modules/restbase/templates/config.yaml.erb
@@ -866,6 +866,7 @@
 /{domain:wikimediafoundation.org}: *default_project
 /{domain:www.mediawiki.org}: *default_project
 /{domain:wikisource.org}: *default_project
+/{domain:beta.wikiversity.org}: *default_project
 /{domain:test.wikidata.org}: *default_project
 /{domain:www.wikidata.org}: *default_project
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1ed68aa9ceb15e907bf0080e37f2a9ba42407141
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Mobrovac 
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]: Fix capitalization for change 317387

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

Change subject: Fix capitalization for change 317387
..


Fix capitalization for change 317387

Bug: T148328
Change-Id: Ia6b5c87fb6d625b421e5e92c61352d16cdff13d8
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 9572b18..a622558 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1868,7 +1868,7 @@
 
 // Temporary override: WMF is not hardcore enough to enable this.
 // See T37785, T38316, T47022 about it.
-if ( $wmgWatchlistdefault )
+if ( $wmgWatchlistDefault )
 {
$wgDefaultUserOptions['watchdefault'] = 1;
 }
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 2b94f9a..cbcf1a3 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -17601,6 +17601,11 @@
'cswiki' => true, // T148328
 ],
 
+'wmgWatchlistDefault' => [
+   'default' => false,
+   'cswiki' => true, // T148328
+],
+
 ];
 
 ### WMF Labs override #

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6b5c87fb6d625b421e5e92c61352d16cdff13d8
Gerrit-PatchSet: 5
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Arseny1992 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: update test packaging and naming

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

Change subject: Hygiene: update test packaging and naming
..


Hygiene: update test packaging and naming

Move tests to match subject packaging and naming.

Change-Id: Ife248bd34b2fe60412d5f2e17edab0bd24fcf6b7
---
R app/src/androidTest/java/org/wikipedia/bridge/CommunicationBridgeTest.java
R 
app/src/androidTest/java/org/wikipedia/createaccount/CreateAccountInfoTaskTest.java
R app/src/androidTest/java/org/wikipedia/editing/EditTaskTest.java
R 
app/src/androidTest/java/org/wikipedia/editing/FetchSectionWikitextTaskTest.java
R app/src/androidTest/java/org/wikipedia/login/LoginClientTest.java
R app/src/androidTest/java/org/wikipedia/page/PageTests.java
R app/src/androidTest/java/org/wikipedia/page/SectionTest.java
R app/src/androidTest/java/org/wikipedia/page/SuggestionsTaskTest.java
R app/src/androidTest/java/org/wikipedia/search/FullSearchArticlesTaskTest.java
9 files changed, 24 insertions(+), 45 deletions(-)

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



diff --git a/app/src/androidTest/java/org/wikipedia/test/BridgeTests.java 
b/app/src/androidTest/java/org/wikipedia/bridge/CommunicationBridgeTest.java
similarity index 96%
rename from app/src/androidTest/java/org/wikipedia/test/BridgeTests.java
rename to 
app/src/androidTest/java/org/wikipedia/bridge/CommunicationBridgeTest.java
index 9a8c840..be4a7ca 100644
--- a/app/src/androidTest/java/org/wikipedia/test/BridgeTests.java
+++ b/app/src/androidTest/java/org/wikipedia/bridge/CommunicationBridgeTest.java
@@ -1,4 +1,4 @@
-package org.wikipedia.test;
+package org.wikipedia.bridge;
 
 import android.support.test.filters.LargeTest;
 import android.support.test.runner.AndroidJUnit4;
@@ -9,7 +9,6 @@
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.wikipedia.WikipediaApp;
-import org.wikipedia.bridge.CommunicationBridge;
 import org.wikipedia.testlib.TestLatch;
 
 import static org.hamcrest.CoreMatchers.equalTo;
@@ -18,7 +17,7 @@
 
 @LargeTest
 @RunWith(AndroidJUnit4.class)
-public class BridgeTests {
+public class CommunicationBridgeTest {
 private static final String TEST_FILE_URI = 
"file:///android_asset/tests/index.html";
 private static final String DOM_LOADED = "DOMLoaded";
 private static final String PING = "ping";
diff --git 
a/app/src/androidTest/java/org/wikipedia/test/CreateAccountTaskTest.java 
b/app/src/androidTest/java/org/wikipedia/createaccount/CreateAccountInfoTaskTest.java
similarity index 93%
rename from 
app/src/androidTest/java/org/wikipedia/test/CreateAccountTaskTest.java
rename to 
app/src/androidTest/java/org/wikipedia/createaccount/CreateAccountInfoTaskTest.java
index 48320ab..ad303f5 100644
--- a/app/src/androidTest/java/org/wikipedia/test/CreateAccountTaskTest.java
+++ 
b/app/src/androidTest/java/org/wikipedia/createaccount/CreateAccountInfoTaskTest.java
@@ -1,4 +1,4 @@
-package org.wikipedia.test;
+package org.wikipedia.createaccount;
 
 import android.content.Context;
 import android.net.Uri;
@@ -13,8 +13,6 @@
 import org.junit.runner.RunWith;
 import org.mediawiki.api.json.Api;
 import org.wikipedia.WikipediaApp;
-import org.wikipedia.createaccount.CreateAccountInfoResult;
-import org.wikipedia.createaccount.CreateAccountInfoTask;
 import org.wikipedia.dataclient.WikiSite;
 import org.wikipedia.editing.CaptchaResult;
 import org.wikipedia.testlib.TestLatch;
@@ -34,7 +32,7 @@
  */
 @SmallTest
 @RunWith(AndroidJUnit4.class)
-public class CreateAccountTaskTest {
+public class CreateAccountInfoTaskTest {
 private static WikiSite TEST_WIKI = WikiSite.forLanguageCode("test");
 private static Api TEST_API = 
WikipediaApp.getInstance().getAPIForSite(TEST_WIKI);
 private Context context = 
InstrumentationRegistry.getInstrumentation().getTargetContext();
diff --git a/app/src/androidTest/java/org/wikipedia/test/EditTaskTest.java 
b/app/src/androidTest/java/org/wikipedia/editing/EditTaskTest.java
similarity index 96%
rename from app/src/androidTest/java/org/wikipedia/test/EditTaskTest.java
rename to app/src/androidTest/java/org/wikipedia/editing/EditTaskTest.java
index edb5c45..7b5d84f 100644
--- a/app/src/androidTest/java/org/wikipedia/test/EditTaskTest.java
+++ b/app/src/androidTest/java/org/wikipedia/editing/EditTaskTest.java
@@ -1,4 +1,4 @@
-package org.wikipedia.test;
+package org.wikipedia.editing;
 
 import android.support.annotation.NonNull;
 import android.support.test.filters.SmallTest;
@@ -9,11 +9,6 @@
 import org.junit.runner.RunWith;
 import org.wikipedia.WikipediaApp;
 import org.wikipedia.dataclient.WikiSite;
-import org.wikipedia.editing.AbuseFilterEditResult;
-import org.wikipedia.editing.CaptchaResult;
-import org.wikipedia.editing.EditTask;
-import org.wikipedia.editing.EditingResult;
-import org.wikipedia.editing.SuccessEditResult;
 import org.wikipedia.page.PageTitle;
 import org.wikipedia.testlib.TestLatch;
 
diff --git 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "labs firstboot.sh: Add instance hostname to /etc/hosts"

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

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

Change subject: Revert "labs firstboot.sh: Add instance hostname to /etc/hosts"
..

Revert "labs firstboot.sh: Add instance hostname to /etc/hosts"

This breaks hostname -d and prevents instances from coming up
properly.

This reverts commit 8fa387cb06272ac5d4cbe70322fef7071695a792.

Change-Id: Ia1df625e7d7863f3538f3f8c3a17ff40a4d88106
---
M modules/labs_bootstrapvz/files/firstboot.sh
M modules/labs_vmbuilder/files/firstboot.sh
2 files changed, 0 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/56/317556/1

diff --git a/modules/labs_bootstrapvz/files/firstboot.sh 
b/modules/labs_bootstrapvz/files/firstboot.sh
index 5d86d25..f11a2e7 100644
--- a/modules/labs_bootstrapvz/files/firstboot.sh
+++ b/modules/labs_bootstrapvz/files/firstboot.sh
@@ -141,8 +141,6 @@
 options timeout:5 ndots:2
 EOF
 
-echo "$ip  $hostname $fqdn" >> /etc/hosts
-
 # This is only needed when running bootstrap-vz on
 # a puppetmaster::self instance, and even then
 # it isn't perfect
diff --git a/modules/labs_vmbuilder/files/firstboot.sh 
b/modules/labs_vmbuilder/files/firstboot.sh
index e110c01..79ad558 100644
--- a/modules/labs_vmbuilder/files/firstboot.sh
+++ b/modules/labs_vmbuilder/files/firstboot.sh
@@ -83,8 +83,6 @@
 options timeout:5 ndots:2
 EOF
 
-echo "$ip  $hostname $fqdn" >> /etc/hosts
-
 /etc/init.d/nslcd restart
 /etc/init.d/nscd restart
 dpkg-reconfigure -fnoninteractive -pcritical openssh-server

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1df625e7d7863f3538f3f8c3a17ff40a4d88106
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...Popups[master]: Fix browser tests

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

Change subject: Fix browser tests
..


Fix browser tests

The Hovercards checkbox on the beta preferences page doesn't have an ID
anymore. It has a name though, which is used from now on.

The regression was introduced in I8636f32330e23814ba3b4c0f5e22e55aaf77883e.

Bug: T148856
Change-Id: I7baa78b0d8c560ee29c3a550628bfd47cad1c30e
---
M tests/browser/features/support/pages/special_preferences_page.rb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/browser/features/support/pages/special_preferences_page.rb 
b/tests/browser/features/support/pages/special_preferences_page.rb
index cff4fa5..7156e74 100644
--- a/tests/browser/features/support/pages/special_preferences_page.rb
+++ b/tests/browser/features/support/pages/special_preferences_page.rb
@@ -3,7 +3,7 @@
   page_url 'Special:Preferences'
 
   a(:beta_features_tab, css: '#preftab-betafeatures')
-  text_field(:hovercards_checkbox, css: '#mw-input-wppopups')
+  text_field(:hovercards_checkbox, css: '[name=wppopups]')
   button(:submit_button, css: '#prefcontrol')
   div(:notification, css: ".mw-notification")
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7baa78b0d8c560ee29c3a550628bfd47cad1c30e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Bmansurov 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Labs images: Only add fqdn of instance to /etc/hosts

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

Change subject: Labs images: Only add fqdn of instance to /etc/hosts
..


Labs images: Only add fqdn of instance to /etc/hosts

Adding the simple hostname seems to break hostname -d

Bug: T120830
Change-Id: Ib100fed1d8e3d93f5aee385ac403f575f3fe0be4
---
M modules/labs_bootstrapvz/files/firstboot.sh
M modules/labs_vmbuilder/files/firstboot.sh
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/labs_bootstrapvz/files/firstboot.sh 
b/modules/labs_bootstrapvz/files/firstboot.sh
index 5d86d25..fe5e3d4 100644
--- a/modules/labs_bootstrapvz/files/firstboot.sh
+++ b/modules/labs_bootstrapvz/files/firstboot.sh
@@ -141,7 +141,7 @@
 options timeout:5 ndots:2
 EOF
 
-echo "$ip  $hostname $fqdn" >> /etc/hosts
+echo "$ip  $fqdn" >> /etc/hosts
 
 # This is only needed when running bootstrap-vz on
 # a puppetmaster::self instance, and even then
diff --git a/modules/labs_vmbuilder/files/firstboot.sh 
b/modules/labs_vmbuilder/files/firstboot.sh
index e110c01..1f11287 100644
--- a/modules/labs_vmbuilder/files/firstboot.sh
+++ b/modules/labs_vmbuilder/files/firstboot.sh
@@ -83,7 +83,7 @@
 options timeout:5 ndots:2
 EOF
 
-echo "$ip  $hostname $fqdn" >> /etc/hosts
+echo "$ip  $fqdn" >> /etc/hosts
 
 /etc/init.d/nslcd restart
 /etc/init.d/nscd restart

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib100fed1d8e3d93f5aee385ac403f575f3fe0be4
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] wikidata...gui[master]: Introduce line, bar, area and scatter chart (do not deploy b...

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

Change subject: Introduce line, bar, area and scatter chart (do not deploy 
before 29th!)
..


Introduce line, bar, area and scatter chart (do not deploy before 29th!)

Bug: T142179
Change-Id: I7f0397f3a9173c5e48178d79b1a6e0bbf2547fe5
---
M .jshintrc
M embed.html
M index.html
M package.json
M style.css
M wikibase/queryService/ui/App.js
M wikibase/queryService/ui/editor/hint/Sparql.js
M wikibase/queryService/ui/resultBrowser/AbstractChartResultBrowser.js
A wikibase/queryService/ui/resultBrowser/AbstractDimpleChartResultBrowser.js
A wikibase/queryService/ui/resultBrowser/AreaChartResultBrowser.js
A wikibase/queryService/ui/resultBrowser/BarChartResultBrowser.js
A wikibase/queryService/ui/resultBrowser/LineChartResultBrowser.js
A wikibase/queryService/ui/resultBrowser/ScatterChartResultBrowser.js
M wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js
M wikibase/tests/index.html
M wikibase/tests/queryService/ui/resultBrowser/ResultBrowser.test.js
16 files changed, 535 insertions(+), 43 deletions(-)

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



diff --git a/.jshintrc b/.jshintrc
index d181085..d0d4c66 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -44,6 +44,7 @@
"_": false,
"Cookies": false,
"vis": false,
-   "moment": false
+   "moment": false,
+   "dimple": false
}
 }
diff --git a/embed.html b/embed.html
index 4dfd7f6..09a363a 100644
--- a/embed.html
+++ b/embed.html
@@ -54,6 +54,7 @@



+   



@@ -62,12 +63,17 @@



+   
+   



-   


+   
+   
+   
+   



@@ -77,6 +83,7 @@

 

+   // TODO: Put this to config and consolidate with the one in 
app.js
var RESULT_BROWSER = {
Table: {
class: 'TableResultBrowser'
@@ -90,6 +97,18 @@
BubbleChart: {
class: 'BubbleChartResultBrowser'
},
+   LineChart: {
+   class: 'LineChartResultBrowser',
+   },
+   BarChart: {
+   class: 'BarChartResultBrowser',
+   },
+   ScatterChart: {
+   class: 'ScatterChartResultBrowser',
+   },
+   AreaChart: {
+   class: 'AreaChartResultBrowser',
+   },
TreeMap: {
class: 'TreeMapResultBrowser'
},
diff --git a/index.html b/index.html
index c0acdf4..2bfd0fa 100644
--- a/index.html
+++ b/index.html
@@ -9,6 +9,7 @@
 


+   



@@ -232,6 +233,7 @@