[MediaWiki-commits] [Gerrit] pywikibot/core[master]: tests.page_tests: assertRaises => assertRaisesRegex

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/331224 )

Change subject: tests.page_tests: assertRaises => assertRaisesRegex
..


tests.page_tests: assertRaises => assertRaisesRegex

Adds more detail and preciseness to page unit tests.

Bug: T154281
Change-Id: I4971a775c9955cb7262582af0da2df2bc2465867
---
M tests/page_tests.py
1 file changed, 39 insertions(+), 17 deletions(-)

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



diff --git a/tests/page_tests.py b/tests/page_tests.py
index 1af59a2..fa2f2f2 100644
--- a/tests/page_tests.py
+++ b/tests/page_tests.py
@@ -7,7 +7,12 @@
 #
 from __future__ import absolute_import, unicode_literals
 
+
+__version__ = '$Id$'
+
+
 import pickle
+import re
 try:
 import unittest.mock as mock
 except ImportError:
@@ -32,7 +37,9 @@
 )
 
 
-__version__ = '$Id$'
+EMPTY_TITLE_RE = 'Title must be specified and not empty if source is a Site\.'
+INVALID_TITLE_RE = 'The link does not contain a page title'
+NO_PAGE_RE = 'doesn\'t exist\.'
 
 
 class TestLinkObject(SiteAttributeTestCase):
@@ -161,7 +168,11 @@
 # Translation namespace does not exist on wikisource:it
 l3 = pywikibot.page.Link('Translation:Albert Einstein', 
source=self.enws)
 self.assertEqual(l3.ns_title(), 'Translation:Albert Einstein')
-self.assertRaises(pywikibot.Error, l3.ns_title, onsite=self.itws)
+self.assertRaisesRegex(pywikibot.Error,
+   'No corresponding namespace found for '
+   'namespace Translation: on wikisource:it.',
+   l3.ns_title,
+   onsite=self.itws)
 
 
 class TestPageObjectEnglish(TestCase):
@@ -297,10 +308,11 @@
 # the site parameter.
 # Empty string or None as title raises error.
 page = pywikibot.page.BasePage(site)
-self.assertRaises(InvalidTitle, page.title)
+self.assertRaisesRegex(InvalidTitle, INVALID_TITLE_RE, page.title)
 page = pywikibot.page.BasePage(site, title=u'')
-self.assertRaises(InvalidTitle, page.title)
-self.assertRaises(ValueError, pywikibot.page.BasePage, site, 
title=None)
+self.assertRaisesRegex(InvalidTitle, INVALID_TITLE_RE, page.title)
+self.assertRaisesRegex(ValueError, 'Title cannot be None.',
+   pywikibot.page.BasePage, site, title=None)
 
 def testPageConstructor(self):
 """Test Page constructor."""
@@ -308,15 +320,20 @@
 mainpage = self.get_mainpage()
 
 # Test that Page() needs a title when Site is used as source.
-self.assertRaises(ValueError, pywikibot.Page, site)
-self.assertRaises(ValueError, pywikibot.Page, site, '')
+self.assertRaisesRegex(ValueError, EMPTY_TITLE_RE,
+   pywikibot.Page, site)
+self.assertRaisesRegex(ValueError, EMPTY_TITLE_RE,
+   pywikibot.Page, site, '')
 
 # Test Page as source.
 p1 = pywikibot.Page(mainpage)
 self.assertEqual(p1, mainpage)
 
 # Test not valid source.
-self.assertRaises(pywikibot.Error, pywikibot.Page, 'dummy')
+self.assertRaisesRegex(pywikibot.Error,
+   'Invalid argument type \'<\\w* \'\\w*\'>\' in '
+   'Page constructor: dummy',
+   pywikibot.Page, 'dummy')
 
 def testTitle(self):
 """Test title() method options in article namespace."""
@@ -432,7 +449,7 @@
 def test_bad_page(self):
 """Test various methods that rely on API: bad page."""
 badpage = self.get_missing_article()
-self.assertRaises(pywikibot.NoPage, badpage.get)
+self.assertRaisesRegex(pywikibot.NoPage, NO_PAGE_RE, badpage.get)
 
 def testIsDisambig(self):
 """Test the integration with Extension:Disambiguator."""
@@ -837,8 +854,10 @@
 
 text = u'This page is used in the [[mw:Manual:Pywikipediabot]] testing 
suite.'
 self.assertEqual(p1.get(), text)
-self.assertRaises(pywikibot.exceptions.IsRedirectPage, p2.get)
-self.assertRaises(pywikibot.exceptions.NoPage, p3.get)
+self.assertRaisesRegex(pywikibot.exceptions.IsRedirectPage,
+   '{0} is a redirect page\.'
+   .format(re.escape(str(p2))), p2.get)
+self.assertRaisesRegex(pywikibot.exceptions.NoPage, NO_PAGE_RE, p3.get)
 
 def test_set_redirect_target(self):
 """Test set_redirect_target method."""
@@ -849,10 +868,12 @@
 p3 = pywikibot.Page(site, u'User:Legoktm/R3')
 
 text = p2.get(get_redirect=True)
-self.assertRaises(pywikibot.exceptions.IsNotRedirectPage,
-  p1.set_redirect_target, p2)
-self.assertRaises(pywikibot.exceptions.NoPage, p3.set

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: TemplateHandler: Remove duplicate code during template resol...

2017-01-30 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335192 )

Change subject: TemplateHandler: Remove duplicate code during template 
resolution
..

TemplateHandler: Remove duplicate code during template resolution

* Followup on previous refactoring commits that centralized all
  template resolution logic in one place.

* Additional work here to enable removal of duplicated logic and
  cleanup of code to better reflect functionality.

Change-Id: Ieecad80ff9b9cc093fb03b69553f2547f34100f7
---
M lib/wt2html/tt/TemplateHandler.js
M lib/wt2html/tt/TokenStreamPatcher.js
2 files changed, 61 insertions(+), 103 deletions(-)


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

diff --git a/lib/wt2html/tt/TemplateHandler.js 
b/lib/wt2html/tt/TemplateHandler.js
index 89967ae..f1275d4 100644
--- a/lib/wt2html/tt/TemplateHandler.js
+++ b/lib/wt2html/tt/TemplateHandler.js
@@ -85,14 +85,12 @@
};
 
var tgt = this.resolveTemplateTarget(state, token.attribs[0].k);
-   if (tgt && (tgt.magicWord || tgt.isSpecialMagicWord)) {
-   // magic word variables can be mistaken for templates
+   if (tgt && tgt.magicWordType) {
try {
-   var magicWord = this.checkForMagicWordVariable(token);
-   if (magicWord) {
-   cb({ tokens: Array.isArray(magicWord) ? 
magicWord : [magicWord] });
-   return;
-   }
+   var toks = this.processSpecialMagicWord(token, tgt);
+   console.assert(toks !== null);
+   cb({ tokens: Array.isArray(toks) ? toks : [toks] });
+   return;
} catch (e) {
env.log("error", "Exception ", e, " checking magic word 
for token: ", token);
}
@@ -232,15 +230,16 @@
 };
 
 /**
- * Check if token is a magic word masquerading as a template
- * - currently only DEFAULTSORT and DISPLAYTITLE are considered
+ * Process the special magic word as specified by resolvedTgt.magicWordType
+ * magicWordType === '!'=> {{!}} is the magic word
+ * magicWordtype === 'MASQ' => DEFAULTSORT, DISPLAYTITLE are the magic words
+ * (Util.magicMasqs.has(..))
  */
-TemplateHandler.prototype.checkForMagicWordVariable = function(tplToken) {
+TemplateHandler.prototype.processSpecialMagicWord = function(tplToken, 
resolvedTgt) {
var env = this.manager.env;
-   var magicWord = tplToken.attribs[0].k;
 
// special case for {{!}} magic word
-   if (magicWord === "!") {
+   if ((resolvedTgt && resolvedTgt.magicWordType === '!') || 
tplToken.attribs[0].k === "!") {
// If we're not at the top level, return a table cell. This 
will always
// be the case. Either {{!}} was tokenized as a td, or it is 
tokenized
// as template but the recursive call to fetch its content 
returns a
@@ -263,105 +262,59 @@
return toks;
}
 
-   // Deal with the following scenarios:
-   //
-   // 1. Normal string:{{DEFAULTSORT:foo}}
-   // 2. String with entities: {{DEFAULTSORT:"foo"bar}}
-   // 3. Templated key:{{DEFAULTSORT:{{foo}}bar}}
-
-   var property, key, propAndKey, keyToks;
-   if (magicWord.constructor === String) {
-   // Scenario 1. above -- common case
-   propAndKey = magicWord.match(/^([^:]+:?)(.*)$/);
-   if (propAndKey) {
-   property = propAndKey[1];
-   key = propAndKey[2];
-   }
-   } else if (Array.isArray(magicWord)) {
-   // Scenario 2. or 3. above -- uncommon case
-
-   property = magicWord[0];
-   if (!property || property.constructor !== String) {
-   // FIXME: We don't know if this is a magic word at this 
point.
-   // Ex: {{ {{echo|DEFAULTSORT}}:foo }}
-   // {{ {{echo|lc}}:foo }}
-   // This requires more info from the preprocessor than
-   // we have currently. This will be handled at a later 
point.
-   return null;
-   }
-
-   propAndKey = property.match(/^([^:]+:?)(.*)$/);
-   if (propAndKey) {
-   property = propAndKey[1];
-   key = propAndKey[2];
-   }
-
-   keyToks = [key].concat(magicWord.slice(1));
-   }
-
-   // TODO gwicke: factor out generic magic word (and parser function) 
round-tripping logic!
-
-   if (!property) {
+   if (resolvedTgt === null || resolvedTgt.magicWordType !== 'MASQ') {
+   // Nothing to do
return null;
}
 
-   

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Source and translation titles: Widget, alignment, change han...

2017-01-30 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335191 )

Change subject: Source and translation titles: Widget, alignment, change handler
..

Source and translation titles: Widget, alignment, change handler

Introduce mw.cx.widgets.PageTitleWidget, handle the change events
for the translation title, align the titles when translation title
changes.

Update the translation data model when user change the translation
title.

There is a provision for validation of translation title. Currently
not implemented.

Bug: T152586
Change-Id: I82067e632b638a4198254a628302a2c880c3d288
---
M extension.json
M modules/ui/mixins/mw.cx.ui.mixin.AlignableTranslationUnit.js
M modules/ui/mw.cx.ui.SourceColumn.js
M modules/ui/mw.cx.ui.TranslationColumn.js
M modules/ui/mw.cx.ui.TranslationView.js
M modules/ui/styles/mw.cx.ui.Columns.less
M modules/ui/styles/mw.cx.ui.TranslationColumn.less
A modules/util/mw.cx.util.js
A modules/widgets/mw.cx.widgets.PageTitleWidget.js
A modules/widgets/mw.cx.widgets.PageTitleWidget.less
10 files changed, 233 insertions(+), 90 deletions(-)


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

diff --git a/extension.json b/extension.json
index debe980..77fa507 100644
--- a/extension.json
+++ b/extension.json
@@ -296,6 +296,18 @@
"mobile"
]
},
+   "mw.cx.util": {
+   "scripts": [
+   "util/mw.cx.util.js"
+   ],
+   "dependencies": [
+   "ext.cx.model"
+   ],
+   "targets": [
+   "desktop",
+   "mobile"
+   ]
+   },
"ext.cx.util.selection": {
"scripts": [
"util/ext.cx.util.selection.js"
@@ -1447,7 +1459,8 @@
"dependencies": [
"mw.cx.ui",
"ext.cx.widgets.spinner",
-   "mw.cx.ui.Categories"
+   "mw.cx.ui.Categories",
+   "mw.cx.widgets.PageTitleWidget"
]
},
"mw.cx.ui.SourceColumn.legacy": {
@@ -1479,7 +1492,8 @@
],
"dependencies": [
"mw.cx.ui",
-   "ext.cx.widgets.spinner"
+   "ext.cx.widgets.spinner",
+   "mw.cx.widgets.PageTitleWidget"
]
},
"mw.cx.ui.TranslationColumn.legacy": {
@@ -1717,6 +1731,18 @@
"dependencies": [
"oojs-ui-widgets"
]
+   },
+   "mw.cx.widgets.PageTitleWidget": {
+   "scripts": [
+   "widgets/mw.cx.widgets.PageTitleWidget.js"
+   ],
+   "styles": [
+   "widgets/mw.cx.widgets.PageTitleWidget.less"
+   ],
+   "dependencies": [
+   "oojs-ui-widgets",
+   "mw.cx.util"
+   ]
}
},
"ResourceFileModulePaths": {
diff --git a/modules/ui/mixins/mw.cx.ui.mixin.AlignableTranslationUnit.js 
b/modules/ui/mixins/mw.cx.ui.mixin.AlignableTranslationUnit.js
index 7a9da9d..28fdc47 100644
--- a/modules/ui/mixins/mw.cx.ui.mixin.AlignableTranslationUnit.js
+++ b/modules/ui/mixins/mw.cx.ui.mixin.AlignableTranslationUnit.js
@@ -22,34 +22,8 @@
 };
 
 mw.cx.ui.mixin.AlignableTranslationUnit.prototype.align = function() {
-   var sections, sourceHeight, targetHeight,
-   $sourceSection, $translationSection,
-   steps = 0;
+   var sections;
 
sections = this.getAlignableSections();
-   $sourceSection = sections.source;
-   $translationSection = sections.target;
-   // Remove min-heights
-   $sourceSection.css( 'min-height', '' );
-   $translationSection.css( 'min-height', '' );
-
-   sourceHeight = $sourceSection[ 0 ].scrollHeight;
-   targetHeight = $translationSection[ 0 ].scrollHeight;
-
-   sourceHeight = parseInt( sourceHeight, 10 );
-   targetHeight = parseInt( targetHeight, 10 );
-
-   while ( sourceHeight !== targetHeight ) {
-   if ( targetHeight > sourceHeight ) {
-   $sourceSection.css( 'min-height', targetHeight );
-   } else {
-   $translationSection.css( 'min-height', sourceHeight );
-   }
-

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-codfw.php: Repool db2034

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335190 )

Change subject: db-codfw.php: Repool db2034
..


db-codfw.php: Repool db2034

db2034 has been moved to another rack. Repool it and change its rack
location

Bug: T156478
Change-Id: I268d63cb3082f0dcdd60967226d82cabb8963724
---
M wmf-config/db-codfw.php
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index a1e3c82..2438b76 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -94,7 +94,7 @@
 'sectionLoads' => [
's1' => [
'db2016' => 0,   # B6 2.9TB  96GB, master
-#  'db2034' => 50,  # C6 2.9TB 160GB, rc, log #T156478
+   'db2034' => 50,  # A5 2.9TB 160GB, rc, log
'db2042' => 50,  # C6 2.9TB 160GB, rc, log
'db2048' => 400, # C6 2.9TB 160GB
'db2055' => 50,  # D6 3.3TB 160GB, dump (inactive), vslow
@@ -218,23 +218,23 @@
 'groupLoadsBySection' => [
's1' => [
'watchlist' => [
-#  'db2034' => 1,
+   'db2034' => 1,
'db2042' => 1,
],
'recentchanges' => [
-#  'db2034' => 1,
+   'db2034' => 1,
'db2042' => 1,
],
'recentchangeslinked' => [
-#  'db2034' => 1,
+   'db2034' => 1,
'db2042' => 1,
],
'contributions' => [
-#  'db2034' => 1,
+   'db2034' => 1,
'db2042' => 1,
],
'logpager' => [
-#  'db2034' => 1,
+   'db2034' => 1,
'db2042' => 1,
],
'dump' => [

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-codfw.php: Repool db2034

2017-01-30 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335190 )

Change subject: db-codfw.php: Repool db2034
..

db-codfw.php: Repool db2034

db2034 has been moved to another rack. Repool it and change its rack
location

Bug: T156478
Change-Id: I268d63cb3082f0dcdd60967226d82cabb8963724
---
M wmf-config/db-codfw.php
1 file changed, 6 insertions(+), 6 deletions(-)


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

diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index a1e3c82..2438b76 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -94,7 +94,7 @@
 'sectionLoads' => [
's1' => [
'db2016' => 0,   # B6 2.9TB  96GB, master
-#  'db2034' => 50,  # C6 2.9TB 160GB, rc, log #T156478
+   'db2034' => 50,  # A5 2.9TB 160GB, rc, log
'db2042' => 50,  # C6 2.9TB 160GB, rc, log
'db2048' => 400, # C6 2.9TB 160GB
'db2055' => 50,  # D6 3.3TB 160GB, dump (inactive), vslow
@@ -218,23 +218,23 @@
 'groupLoadsBySection' => [
's1' => [
'watchlist' => [
-#  'db2034' => 1,
+   'db2034' => 1,
'db2042' => 1,
],
'recentchanges' => [
-#  'db2034' => 1,
+   'db2034' => 1,
'db2042' => 1,
],
'recentchangeslinked' => [
-#  'db2034' => 1,
+   'db2034' => 1,
'db2042' => 1,
],
'contributions' => [
-#  'db2034' => 1,
+   'db2034' => 1,
'db2042' => 1,
],
'logpager' => [
-#  'db2034' => 1,
+   'db2034' => 1,
'db2042' => 1,
],
'dump' => [

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: registration: Allow properties in "requires" from v2

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335060 )

Change subject: registration: Allow properties in "requires" from v2
..


registration: Allow properties in "requires" from v2

v2 of the schema allows extensions and skins to be definied under
"requires". This is also used by some extensions in extension.json for
v1.
It works, so allow the same properties in v1 as in v2.

Change-Id: I9b5f1986cadbd714d6f3460ac3e1db3bf7aae65d
---
M docs/extension.schema.v1.json
1 file changed, 10 insertions(+), 1 deletion(-)

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



diff --git a/docs/extension.schema.v1.json b/docs/extension.schema.v1.json
index 421ea5c..3d6eda9 100644
--- a/docs/extension.schema.v1.json
+++ b/docs/extension.schema.v1.json
@@ -55,11 +55,20 @@
},
"requires": {
"type": "object",
-   "description": "Indicates what versions of MediaWiki 
core are required. This syntax may be extended in the future, for example to 
check dependencies between other extensions.",
+   "description": "Indicates what versions of MediaWiki 
core or extensions are required. This syntax may be extended in the future, for 
example to check dependencies between other services.",
+   "additionalProperties": false,
"properties": {
"MediaWiki": {
"type": "string",
"description": "Version constraint 
string against MediaWiki core."
+   },
+   "extensions": {
+   "type": "object",
+   "description": "Set of version 
constraint strings against specific extensions."
+   },
+   "skins": {
+   "type": "object",
+   "description": "Set of version 
constraint strings against specific skins."
}
}
},

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Add GetContentModels hook for Wikibase

2017-01-30 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335189 )

Change subject: Add GetContentModels hook for Wikibase
..

Add GetContentModels hook for Wikibase

Bug: T155139
Change-Id: Ic8baff59da802c83d528b319192b2951f13b477b
Depends-On: Icb41c470dfa4638676eb3ba0e74f437e85acc792
---
M repo/Wikibase.hooks.php
M repo/Wikibase.php
2 files changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/89/335189/1

diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index fa9afde..41490cc 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -874,6 +874,16 @@
}
 
/**
+* Add Wikibase content models to model list.
+* @param string[] $models List of content models
+*/
+   public static function onGetContentModels( &$models ) {
+   $wikibaseRepo = WikibaseRepo::getDefaultInstance();
+   $models = array_merge( $models,
+   
$wikibaseRepo->getEntityContentFactory()->getEntityContentModels() );
+   }
+
+   /**
 * Adds a list of data value types, sparql endpoint and concept base 
URI to
 * the action=query&meta=siteinfo API.
 *
diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index b285940..7b25205 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -451,6 +451,7 @@
$wgHooks['ContentHandlerForModelID'][] = 
'Wikibase\RepoHooks::onContentHandlerForModelID';
$wgHooks['BeforeDisplayNoArticleText'][] = 
'Wikibase\ViewEntityAction::onBeforeDisplayNoArticleText';
$wgHooks['InfoAction'][] = '\Wikibase\RepoHooks::onInfoAction';
+   $wgHooks['GetContentModels'][] = 
'\Wikibase\RepoHooks::onGetContentModels';
 
// CirrusSearch hooks
$wgHooks['CirrusSearchMappingConfig'][] = 
'Wikibase\Repo\Hooks\CirrusSearchHookHandlers::onCirrusSearchMappingConfig';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8baff59da802c83d528b319192b2951f13b477b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Code refactoring: Handle special case for {{!}} early

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335187 )

Change subject: Code refactoring: Handle special case for {{!}} early
..


Code refactoring: Handle special case for {{!}} early

This could let us use existing information from resolveTemplateTarget
and eliminate some duplicate code. To be explored in future patches.

Change-Id: I2eeb27967f2e43ba8d6808292058ac48ee32a27e
---
M lib/wt2html/tt/TemplateHandler.js
1 file changed, 29 insertions(+), 28 deletions(-)

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



diff --git a/lib/wt2html/tt/TemplateHandler.js 
b/lib/wt2html/tt/TemplateHandler.js
index 84e5bbb..89967ae 100644
--- a/lib/wt2html/tt/TemplateHandler.js
+++ b/lib/wt2html/tt/TemplateHandler.js
@@ -236,19 +236,42 @@
  * - currently only DEFAULTSORT and DISPLAYTITLE are considered
  */
 TemplateHandler.prototype.checkForMagicWordVariable = function(tplToken) {
+   var env = this.manager.env;
+   var magicWord = tplToken.attribs[0].k;
+
+   // special case for {{!}} magic word
+   if (magicWord === "!") {
+   // If we're not at the top level, return a table cell. This 
will always
+   // be the case. Either {{!}} was tokenized as a td, or it is 
tokenized
+   // as template but the recursive call to fetch its content 
returns a
+   // single | in an ambiguous context which will again be 
tokenized as td.
+   if (!this.atTopLevel) {
+   return [new TagTk("td")];
+   }
+
+   var state = {
+   token: tplToken,
+   wrapperType: "mw:Transclusion",
+   wrappedObjectId: env.newObjectId(),
+   };
+
+   this.resolveTemplateTarget(state, "!");
+   var toks = this.getEncapsulationInfo(state, ["|"]);
+   toks.push(this.getEncapsulationInfoEndTag(state));
+   var argInfo = this.getArgInfo(state);
+   toks[0].dataAttribs.tmp.tplarginfo = JSON.stringify(argInfo);
+   return toks;
+   }
+
// Deal with the following scenarios:
//
-   // 0. Simple:   {{!}}
// 1. Normal string:{{DEFAULTSORT:foo}}
// 2. String with entities: {{DEFAULTSORT:"foo"bar}}
// 3. Templated key:{{DEFAULTSORT:{{foo}}bar}}
 
-   var env = this.manager.env;
var property, key, propAndKey, keyToks;
-   var magicWord = tplToken.attribs[0].k;
-
if (magicWord.constructor === String) {
-   // Scenario 0. or 1. above -- common case
+   // Scenario 1. above -- common case
propAndKey = magicWord.match(/^([^:]+:?)(.*)$/);
if (propAndKey) {
property = propAndKey[1];
@@ -290,29 +313,7 @@
name = env.conf.wiki.magicWords[property.slice(0, -1)];
}
 
-   // special case for {{!}} magic word
-   if (name === "!") {
-   // If we're not at the top level, return a table cell. This 
will always
-   // be the case. Either {{!}} was tokenized as a td, or it is 
tokenized
-   // as template but the recursive call to fetch its content 
returns a
-   // single | in an ambiguous context which will again be 
tokenized as td.
-   if (!this.atTopLevel) {
-   return [new TagTk("td")];
-   }
-
-   var state = {
-   token: tplToken,
-   wrapperType: "mw:Transclusion",
-   wrappedObjectId: env.newObjectId(),
-   };
-
-   this.resolveTemplateTarget(state, "!");
-   var toks = this.getEncapsulationInfo(state, ["|"]);
-   toks.push(this.getEncapsulationInfoEndTag(state));
-   var argInfo = this.getArgInfo(state);
-   toks[0].dataAttribs.tmp.tplarginfo = JSON.stringify(argInfo);
-   return toks;
-   } else if (Util.magicMasqs.has(name)) {
+   if (Util.magicMasqs.has(name)) {
var templatedKey = false;
if (keyToks) {
// Check if any part of the key is templated

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add GetContentModels hook to allow extensions to enumerate d...

2017-01-30 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335188 )

Change subject: Add GetContentModels hook to allow extensions to enumerate 
dynamic content models.
..

Add GetContentModels hook to allow extensions to enumerate dynamic content 
models.

Bug: T155139
Change-Id: Icb41c470dfa4638676eb3ba0e74f437e85acc792
---
M docs/hooks.txt
M includes/content/ContentHandler.php
M tests/phpunit/includes/content/ContentHandlerTest.php
3 files changed, 13 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/88/335188/1

diff --git a/docs/hooks.txt b/docs/hooks.txt
index 27773f6..3945269 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -1558,6 +1558,9 @@
 &$url: string value as output (out parameter, can modify)
 $query: query options passed to Title::getCanonicalURL()
 
+'GetContentModels': Add content models to the list of available models.
+&$models: Current model list, as strings. Extensions should add to this list.
+
 'GetDefaultSortkey': Override the default sortkey for a page.
 $title: Title object that we need to get a sortkey for
 &$sortkey: Sortkey to use.
diff --git a/includes/content/ContentHandler.php 
b/includes/content/ContentHandler.php
index 119144a..58665bb 100644
--- a/includes/content/ContentHandler.php
+++ b/includes/content/ContentHandler.php
@@ -361,7 +361,9 @@
public static function getContentModels() {
global $wgContentHandlers;
 
-   return array_keys( $wgContentHandlers );
+   $models = array_keys( $wgContentHandlers );
+   Hooks::run( 'GetContentModels', [ &$models ] );
+   return $models;
}
 
public static function getAllContentFormats() {
diff --git a/tests/phpunit/includes/content/ContentHandlerTest.php 
b/tests/phpunit/includes/content/ContentHandlerTest.php
index efd60e5fb..405312a 100644
--- a/tests/phpunit/includes/content/ContentHandlerTest.php
+++ b/tests/phpunit/includes/content/ContentHandlerTest.php
@@ -461,4 +461,11 @@
$this->assertContains( 'one who smiths', $out->getRawText() );
}
 
+   public function testGetContentModelsHook() {
+   $this->setTemporaryHook( 'GetContentModels', function ( 
&$models ) {
+   $models[] = 'Ferrari';
+   } );
+
+   $this->assertArraySubset( [ 'Ferrari' ], 
ContentHandler::getContentModels() );
+   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Make the plugin uninstall message a bit more reassuring

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/334734 )

Change subject: Make the plugin uninstall message a bit more reassuring
..


Make the plugin uninstall message a bit more reassuring

Moriel pointed out that the original message I wrote looked like
a built-in system message. Add a phab link that will hopefully reassure
folks that this is not an evil trick being played on them by Vagrant or
Q or another evil genius planning on destroying their work productivity.

Other ideas included:
* "All the cool kids are uninstalling the mediawiki-vagrant plugin"
* "This is your MediaWiki Vagrant speaking: ..."
* "ALERT! ALERT" 
* "You will not be eaten by a grue. Probably"
  "And we take no responsibility if you are."

Change-Id: I5bf6926f9a45953c2a06ba5db7df5bc927051fcb
---
M Vagrantfile
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/Vagrantfile b/Vagrantfile
index 4110509..c726d6b 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -38,7 +38,10 @@
   raise <<-EOS
 
   The deprecated mediawiki-vagrant plugin is installed.
+
   Please remove it by running `vagrant plugin uninstall mediawiki-vagrant`.
+
+  See https://phabricator.wikimedia.org/T156380 for details.
   EOS
 end
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5bf6926f9a45953c2a06ba5db7df5bc927051fcb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Fix model defaults in ores role

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/314646 )

Change subject: Fix model defaults in ores role
..


Fix model defaults in ores role

Change-Id: Iafdea4abef009a2919041d5ca7857377521d8cce
---
M puppet/modules/role/manifests/ores.pp
1 file changed, 6 insertions(+), 3 deletions(-)

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



diff --git a/puppet/modules/role/manifests/ores.pp 
b/puppet/modules/role/manifests/ores.pp
index 52a9b10..ca5ff78 100644
--- a/puppet/modules/role/manifests/ores.pp
+++ b/puppet/modules/role/manifests/ores.pp
@@ -17,9 +17,12 @@
 # Point at some fake data with flat probability distribution.
 wgOresWikiId  => 'testwiki',
 
-# This parameter is supposed to be an array, but we're working
-# around T121378 and a limitation in the testwiki pseudomodels.
-wgOresModels  => 'damaging',
+wgOresModels  => {
+damaging  => true,
+goodfaith => false,
+reverted  => false,
+wp10  => false,
+},
 },
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iafdea4abef009a2919041d5ca7857377521d8cce
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Code refactoring: Handle special case for {{!}} early

2017-01-30 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335187 )

Change subject: Code refactoring: Handle special case for {{!}} early
..

Code refactoring: Handle special case for {{!}} early

This could let us use existing information from resolveTemplateTarget
and eliminate some duplicate code. To be explored in future patches.

Change-Id: I2eeb27967f2e43ba8d6808292058ac48ee32a27e
---
M lib/wt2html/tt/TemplateHandler.js
1 file changed, 29 insertions(+), 28 deletions(-)


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

diff --git a/lib/wt2html/tt/TemplateHandler.js 
b/lib/wt2html/tt/TemplateHandler.js
index 84e5bbb..89967ae 100644
--- a/lib/wt2html/tt/TemplateHandler.js
+++ b/lib/wt2html/tt/TemplateHandler.js
@@ -236,19 +236,42 @@
  * - currently only DEFAULTSORT and DISPLAYTITLE are considered
  */
 TemplateHandler.prototype.checkForMagicWordVariable = function(tplToken) {
+   var env = this.manager.env;
+   var magicWord = tplToken.attribs[0].k;
+
+   // special case for {{!}} magic word
+   if (magicWord === "!") {
+   // If we're not at the top level, return a table cell. This 
will always
+   // be the case. Either {{!}} was tokenized as a td, or it is 
tokenized
+   // as template but the recursive call to fetch its content 
returns a
+   // single | in an ambiguous context which will again be 
tokenized as td.
+   if (!this.atTopLevel) {
+   return [new TagTk("td")];
+   }
+
+   var state = {
+   token: tplToken,
+   wrapperType: "mw:Transclusion",
+   wrappedObjectId: env.newObjectId(),
+   };
+
+   this.resolveTemplateTarget(state, "!");
+   var toks = this.getEncapsulationInfo(state, ["|"]);
+   toks.push(this.getEncapsulationInfoEndTag(state));
+   var argInfo = this.getArgInfo(state);
+   toks[0].dataAttribs.tmp.tplarginfo = JSON.stringify(argInfo);
+   return toks;
+   }
+
// Deal with the following scenarios:
//
-   // 0. Simple:   {{!}}
// 1. Normal string:{{DEFAULTSORT:foo}}
// 2. String with entities: {{DEFAULTSORT:"foo"bar}}
// 3. Templated key:{{DEFAULTSORT:{{foo}}bar}}
 
-   var env = this.manager.env;
var property, key, propAndKey, keyToks;
-   var magicWord = tplToken.attribs[0].k;
-
if (magicWord.constructor === String) {
-   // Scenario 0. or 1. above -- common case
+   // Scenario 1. above -- common case
propAndKey = magicWord.match(/^([^:]+:?)(.*)$/);
if (propAndKey) {
property = propAndKey[1];
@@ -290,29 +313,7 @@
name = env.conf.wiki.magicWords[property.slice(0, -1)];
}
 
-   // special case for {{!}} magic word
-   if (name === "!") {
-   // If we're not at the top level, return a table cell. This 
will always
-   // be the case. Either {{!}} was tokenized as a td, or it is 
tokenized
-   // as template but the recursive call to fetch its content 
returns a
-   // single | in an ambiguous context which will again be 
tokenized as td.
-   if (!this.atTopLevel) {
-   return [new TagTk("td")];
-   }
-
-   var state = {
-   token: tplToken,
-   wrapperType: "mw:Transclusion",
-   wrappedObjectId: env.newObjectId(),
-   };
-
-   this.resolveTemplateTarget(state, "!");
-   var toks = this.getEncapsulationInfo(state, ["|"]);
-   toks.push(this.getEncapsulationInfoEndTag(state));
-   var argInfo = this.getArgInfo(state);
-   toks[0].dataAttribs.tmp.tplarginfo = JSON.stringify(argInfo);
-   return toks;
-   } else if (Util.magicMasqs.has(name)) {
+   if (Util.magicMasqs.has(name)) {
var templatedKey = false;
if (keyToks) {
// Check if any part of the key is templated

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2eeb27967f2e43ba8d6808292058ac48ee32a27e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Lint fix for Vagrantfile

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335186 )

Change subject: Lint fix for Vagrantfile
..


Lint fix for Vagrantfile

Change-Id: Ib7090203f3d04fb952beeb88b7b719aaa8aeb7d1
(cherry picked from commit cce765972e13c1fc2edfb164cde35f73197f3368)
---
M Vagrantfile
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/Vagrantfile b/Vagrantfile
index 4c657f5..4110509 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -35,11 +35,11 @@
 
 # T156380: Check to see if the legacy gem version of the plugin is installed
 if Vagrant.has_plugin?('mediawiki-vagrant')
-raise <<-EOS
+  raise <<-EOS
 
-The deprecated mediawiki-vagrant plugin is installed.
-Please remove it by running `vagrant plugin uninstall mediawiki-vagrant`.
-EOS
+  The deprecated mediawiki-vagrant plugin is installed.
+  Please remove it by running `vagrant plugin uninstall mediawiki-vagrant`.
+  EOS
 end
 
 mwv = MediaWikiVagrant::Environment.new(File.expand_path('..', __FILE__))

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib7090203f3d04fb952beeb88b7b719aaa8aeb7d1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Lint fix for Vagrantfile

2017-01-30 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335186 )

Change subject: Lint fix for Vagrantfile
..

Lint fix for Vagrantfile

Change-Id: Ib7090203f3d04fb952beeb88b7b719aaa8aeb7d1
(cherry picked from commit cce765972e13c1fc2edfb164cde35f73197f3368)
---
M Vagrantfile
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/86/335186/1

diff --git a/Vagrantfile b/Vagrantfile
index 4c657f5..4110509 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -35,11 +35,11 @@
 
 # T156380: Check to see if the legacy gem version of the plugin is installed
 if Vagrant.has_plugin?('mediawiki-vagrant')
-raise <<-EOS
+  raise <<-EOS
 
-The deprecated mediawiki-vagrant plugin is installed.
-Please remove it by running `vagrant plugin uninstall mediawiki-vagrant`.
-EOS
+  The deprecated mediawiki-vagrant plugin is installed.
+  Please remove it by running `vagrant plugin uninstall mediawiki-vagrant`.
+  EOS
 end
 
 mwv = MediaWikiVagrant::Environment.new(File.expand_path('..', __FILE__))

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: parser test editor: Fix emitting of !! hooks

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/334869 )

Change subject: parser test editor: Fix emitting of !! hooks
..


parser test editor: Fix emitting of !! hooks

The first newline was missing so a block like:
 !! hooks
 source
 !! endhooks

would turn into:
 !! hookssource
 !! endhooks

Change-Id: I2a4c5e52050d55fb0c9b4f5d0494eb00e34b233c
---
M tests/parser/TestFileEditor.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/parser/TestFileEditor.php b/tests/parser/TestFileEditor.php
index 05b1216..7f64671 100644
--- a/tests/parser/TestFileEditor.php
+++ b/tests/parser/TestFileEditor.php
@@ -125,7 +125,7 @@
$line = $this->lines[$this->pos++];
$heading = $this->getHeading( $line );
$expectedEnd = 'end' . $heading;
-   $contents = $line;
+   $contents = "$line\n";
 
do {
$line = $this->lines[$this->pos++];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a4c5e52050d55fb0c9b4f5d0494eb00e34b233c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Tim Starling 
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...parsoid[master]: Fix to resolveTemplateTarget to better handle magic word ali...

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/334756 )

Change subject: Fix to resolveTemplateTarget to better handle magic word aliases
..


Fix to resolveTemplateTarget to better handle magic word aliases

* Magic word aliases sometimes have a ":" for their suffix and
  trying to resolve a string to a potential magicword alias has
  to search with this suffix as well.

  Aside: I don't yet know the rationale behind the ":" suffix in
  aliases.

* This patch fixes a longstanding parser test failure.

* In addition, this patch lets us fix an oddity in our native
  parser-functions implementation which had a special case for
  the language core parser function. It was recorded as pf_#language
  instead of pf_language.

* This fixes the regression seen during rt-testing on hewiki:אשר_כנפו

Change-Id: I4eb22cbb05ef5d1a97f6224833d18da6047c41fe
---
M lib/wt2html/tt/ParserFunctions.js
M lib/wt2html/tt/TemplateHandler.js
M tests/parserTests-blacklist.js
3 files changed, 7 insertions(+), 3 deletions(-)

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



diff --git a/lib/wt2html/tt/ParserFunctions.js 
b/lib/wt2html/tt/ParserFunctions.js
index 38342d9..54d70b7 100644
--- a/lib/wt2html/tt/ParserFunctions.js
+++ b/lib/wt2html/tt/ParserFunctions.js
@@ -806,7 +806,7 @@
 ParserFunctions.prototype.pf_numberofarticles = function(token, frame, cb, 
args) {
cb({ tokens: ["1"] });
 };
-ParserFunctions.prototype['pf_#language'] = function(token, frame, cb, args) {
+ParserFunctions.prototype.pf_language = function(token, frame, cb, args) {
var target = args[0].k;
cb({ tokens: [target] });
 };
diff --git a/lib/wt2html/tt/TemplateHandler.js 
b/lib/wt2html/tt/TemplateHandler.js
index cab64ea..84e5bbb 100644
--- a/lib/wt2html/tt/TemplateHandler.js
+++ b/lib/wt2html/tt/TemplateHandler.js
@@ -427,6 +427,11 @@
// Check if we have a parser function.
// Unalias to canonical form and look in config.functionHooks
var magicWordAlias = wiki.magicWords[prefix] || 
wiki.magicWords[lowerPrefix];
+
+   // Retry by adding a ":" to prefix if necessary
+   if (!magicWordAlias && pieces.length > 1) {
+   magicWordAlias = wiki.magicWords[prefix + ':'] || 
wiki.magicWords[lowerPrefix + ':'];
+   }
var translatedPrefix = magicWordAlias || lowerPrefix || '';
 
// The check for pieces.length > 1 is require to distinguish between
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 5e63865..4931d87 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -229,7 +229,6 @@
 add("wt2html", "T153140: Don't break table handling if language converter 
markup is in the cell.", "\n\nB}-\n");
 add("wt2html", "Bug 529: Uncovered bullet in parser function result", " 
Foo  bar");
 add("wt2html", "Bug 5678: Double-parsed template invocation", "{{paramtest 
 param = hello }}");
-add("wt2html", "Case insensitivity of parser functions for non-ASCII 
characters (bug 8143)", "Warning:
 Page/template fetching disabled, and no cache for 
PRVNÍVELKÉ:ěščř\nWarning:
 Page/template fetching disabled, and no cache for 
Prvnívelké:ěščř\nWarning:
 Page/template fetching disabled, and no cache for PRVNÍMALÉ:ěščř\nWarning:
 Page/template fetching disabled, and no cache for Prvnímalé:ěščř\nWarning:
 Page/template fetching disabled, and no cache for MALÁ:ěščř\nWarning:
 Page/template fetching disabled, and no cache for Malá:ěščř\nWarning:
 Page/template fetching disabled, and no cache for VELKÁ:ěščř\nWarning:
 Page/template fetching disabled, and no cache for Velká:ěščř");
 add("wt2html", "Nesting tags, paragraphs on lines which begin with ", 
"A\nB");
 add("wt2html", "Bug 6200: paragraphs inside blockquotes (no extra line 
breaks)", "Line one\n\nLine 
two");
 add("wt2html", "Bug 6200: paragraphs inside blockquotes (extra line break on 
close)", "Line one\n\nLine two\n");
@@ -257,7 +256,7 @@
 add("wt2html", "Wrong option for formatNum (bug 56199)", "1,234.56\n1,234.56\n1234.56");
 add("wt2html", "Strip marker in grammar", "Parser
 function implementation for pf_grammar missing in Parsoid.");
 add("wt2html", "Gallery override link with WikiLink (bug 34852)", "\ncaption\n");
-add("wt2html", "Language parser function", "ar");
+add("wt2html", "Language parser function", "ar");
 add("wt2html", "Special parser function", "Parser
 function implementation for pf_#special missing in Parsoid.\nParser
 function implementation for pf_#special missing in Parsoid.\nParser
 function implementation for pf_#special missing in Parsoid.");
 add("wt2html", "1. SOL-sensitive wikitext tokens as template-args", "*a\n#a\n:a");
 add("wt2html", "Empty table rows go away", "\n Hello\n 
there\n\n\n");

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

Gerrit-Message

[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: fixed interaction: mapping params & $wgPageFormsUseDisplayTitle

2017-01-30 Thread Cicalese (Code Review)
Cicalese has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335185 )

Change subject: fixed interaction: mapping params & $wgPageFormsUseDisplayTitle
..

fixed interaction: mapping params & $wgPageFormsUseDisplayTitle

Change-Id: Ifa14df527255fc8cd2aab2b0fcb4ea48957053d8
---
M includes/PF_FormField.php
1 file changed, 15 insertions(+), 6 deletions(-)


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

diff --git a/includes/PF_FormField.php b/includes/PF_FormField.php
index c006ff8..10f8a52 100644
--- a/includes/PF_FormField.php
+++ b/includes/PF_FormField.php
@@ -511,13 +511,16 @@
 * given a mapping template.
 */
function setValuesWithMappingTemplate() {
-   global $wgParser;
+   global $wgParser, $wgPageFormsUseDisplayTitle;
 
$labels = array();
$templateName = $this->mFieldArgs['mapping template'];
$title = Title::makeTitleSafe( NS_TEMPLATE, $templateName );
$templateExists = $title->exists();
-   foreach ( $this->mPossibleValues as $value ) {
+   foreach ( $this->mPossibleValues as $index => $value ) {
+   if ( $wgPageFormsUseDisplayTitle ) {
+   $value = $index;
+   }
if ( $templateExists ) {
$label = trim( $wgParser->recursiveTagParse( 
'{{' . $templateName .
'|' . $value . '}}' ) );
@@ -549,9 +552,13 @@
return;
}
 
+   global $wgPageFormsUseDisplayTitle;
$propertyName = $this->mFieldArgs['mapping property'];
$labels = array();
-   foreach ( $this->mPossibleValues as $value ) {
+   foreach ( $this->mPossibleValues as $index => $value ) {
+   if ( $wgPageFormsUseDisplayTitle ) {
+   $value = $index;
+   }
$labels[$value] = $value;
$subject = Title::newFromText( $value );
if ( $subject != null ) {
@@ -569,8 +576,12 @@
 * given a mapping Cargo table/field.
 */
function setValuesWithMappingCargoField() {
+   global $wgPageFormsUseDisplayTitle;
$labels = array();
-   foreach ( $this->mPossibleValues as $value ) {
+   foreach ( $this->mPossibleValues as $index => $value ) {
+   if ( $wgPageFormsUseDisplayTitle ) {
+   $value = $index;
+   }
$labels[$value] = $value;
$vals = PFValuesUtils::getValuesForCargoField(
$this->mFieldArgs['mapping cargo table'],
@@ -647,8 +658,6 @@
}
}
}
-wfDebug("VALUES: " . print_r($values, true));
-wfDebug("LABELS: " . print_r($labels, true));
if ( count( $labels ) > 1 ) {
return $labels;
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa14df527255fc8cd2aab2b0fcb4ea48957053d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Cicalese 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "Keystone: Turn on caching of tokens and catalog"

2017-01-30 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335184 )

Change subject: Revert "Keystone:  Turn on caching of tokens and catalog"
..


Revert "Keystone:  Turn on caching of tokens and catalog"

This didn't fix the one thing I wanted it to fix, and who the hell knows what 
else it might break... tonight keystone seemed to be handing expired or invalid 
tokens over to nova-api.

This reverts commit 03f55287c8ee09f0f19d405f0a5dd63dcbe025d4.

Change-Id: I38ee1c37a142fa1df7fab110d8b45ea2e8d2ca38
---
M modules/openstack/templates/liberty/keystone/keystone.conf.erb
M modules/openstack/templates/mitaka/keystone/keystone.conf.erb
2 files changed, 2 insertions(+), 7 deletions(-)

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



diff --git a/modules/openstack/templates/liberty/keystone/keystone.conf.erb 
b/modules/openstack/templates/liberty/keystone/keystone.conf.erb
index 704aee9..6ab3924 100644
--- a/modules/openstack/templates/liberty/keystone/keystone.conf.erb
+++ b/modules/openstack/templates/liberty/keystone/keystone.conf.erb
@@ -305,7 +305,7 @@
  
 # Global toggle for all caching using the should_cache_fn mechanism. (boolean
 # value)
-enabled = true
+#enabled = false
  
 # Extra debugging from the cache backend (cache keys, get/set/delete/etc
 # calls). This is only really useful if you need to see the specific cache-
@@ -341,7 +341,6 @@
 [catalog]
 # dynamic, sql-based backend (supports API/CLI-based management commands)
 driver = sql
-caching = true
 
 # static, file-based backend (does *NOT* support any management commands)
 # driver = keystone.catalog.backends.templated.TemplatedCatalog
@@ -351,8 +350,6 @@
 [token]
 provider = uuid
 driver = sql
-caching = true
-
 
 # Amount of time a token should remain valid (in seconds)
 # Using 7.1 days, as we'll set MediaWiki to 7 days
diff --git a/modules/openstack/templates/mitaka/keystone/keystone.conf.erb 
b/modules/openstack/templates/mitaka/keystone/keystone.conf.erb
index 662e9b0..6ab3924 100644
--- a/modules/openstack/templates/mitaka/keystone/keystone.conf.erb
+++ b/modules/openstack/templates/mitaka/keystone/keystone.conf.erb
@@ -305,7 +305,7 @@
  
 # Global toggle for all caching using the should_cache_fn mechanism. (boolean
 # value)
-enabled = true
+#enabled = false
  
 # Extra debugging from the cache backend (cache keys, get/set/delete/etc
 # calls). This is only really useful if you need to see the specific cache-
@@ -341,7 +341,6 @@
 [catalog]
 # dynamic, sql-based backend (supports API/CLI-based management commands)
 driver = sql
-caching = true
 
 # static, file-based backend (does *NOT* support any management commands)
 # driver = keystone.catalog.backends.templated.TemplatedCatalog
@@ -351,7 +350,6 @@
 [token]
 provider = uuid
 driver = sql
-caching = true
 
 # Amount of time a token should remain valid (in seconds)
 # Using 7.1 days, as we'll set MediaWiki to 7 days

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I38ee1c37a142fa1df7fab110d8b45ea2e8d2ca38
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Rush 
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]: [Facepalm] Correctly set interval for notification polling.

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335169 )

Change subject: [Facepalm] Correctly set interval for notification polling.
..


[Facepalm] Correctly set interval for notification polling.

In my ongoing testing of our notifications, I've been noticing that our
polling task doesn't actually repeat like we tell it to. After hours of
fruitless debugging, I noticed that we were passing in the raw integer
resource ID, instead of the actual integer dimension. Therefore, we were
inadvertently setting a repeat interval of 2132897234 or something
similar.  The same for the number-of-days timeout for the polling task to
stop itself.

This patch switches to the much-more-correct scheme of using the
getInteger() method of retrieving the integer dimension, instead of using
the resource ID.

I suspect that our "testing" of notifications has worked so far because
after editing a description we call startPollTask() which effectively
queues the task for immediate execution.

(This patch also cleans up the code a bit.)

Change-Id: I5e0f6b0bb3813763133f891b9475abb232dee62a
---
M 
app/src/main/java/org/wikipedia/notifications/NotificationPollBroadcastReceiver.java
1 file changed, 14 insertions(+), 17 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/notifications/NotificationPollBroadcastReceiver.java
 
b/app/src/main/java/org/wikipedia/notifications/NotificationPollBroadcastReceiver.java
index c808fc8..c1474c3 100644
--- 
a/app/src/main/java/org/wikipedia/notifications/NotificationPollBroadcastReceiver.java
+++ 
b/app/src/main/java/org/wikipedia/notifications/NotificationPollBroadcastReceiver.java
@@ -23,15 +23,13 @@
 public class NotificationPollBroadcastReceiver extends BroadcastReceiver {
 public static final String ACTION_POLL = "action_notification_poll";
 
-private static final long POLL_INTERVAL_MILLIS
-= 
TimeUnit.MINUTES.toMillis(R.integer.notification_poll_interval_minutes);
-
 @Override
 public void onReceive(Context context, Intent intent) {
 if (TextUtils.equals(intent.getAction(), ACTION_POLL)) {
 
 if (User.isLoggedIn()
-&& 
lastDescriptionEditedWithin(R.integer.notification_poll_timeout_days)) {
+&& lastDescriptionEditedWithin(context.getResources()
+.getInteger(R.integer.notification_poll_timeout_days))) {
 pollNotifications(context);
 } else {
 stopPollTask(context);
@@ -41,23 +39,22 @@
 }
 
 public void startPollTask(@NonNull Context context) {
-Intent alarmIntent = new Intent(context, 
NotificationPollBroadcastReceiver.class);
-boolean isAlarmUp = PendingIntent.getBroadcast(context, 0, 
alarmIntent, PendingIntent.FLAG_NO_CREATE) != null;
-if (!isAlarmUp) {
-AlarmManager alarmManager = (AlarmManager) 
context.getSystemService(Context.ALARM_SERVICE);
-alarmIntent.setAction(ACTION_POLL);
-PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 
0, alarmIntent, 0);
-
alarmManager.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP,
-SystemClock.elapsedRealtime(), POLL_INTERVAL_MILLIS, 
pendingIntent);
-}
+AlarmManager alarmManager = (AlarmManager) 
context.getSystemService(Context.ALARM_SERVICE);
+alarmManager.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP,
+SystemClock.elapsedRealtime(),
+
context.getResources().getInteger(R.integer.notification_poll_interval_minutes),
+getAlarmPendingIntent(context));
 }
 
 public void stopPollTask(@NonNull Context context) {
 AlarmManager alarmManager = (AlarmManager) 
context.getSystemService(Context.ALARM_SERVICE);
-Intent alarmIntent = new Intent(context, 
NotificationPollBroadcastReceiver.class);
-alarmIntent.setAction(ACTION_POLL);
-PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, 
alarmIntent, 0);
-alarmManager.cancel(pendingIntent);
+alarmManager.cancel(getAlarmPendingIntent(context));
+}
+
+@NonNull private PendingIntent getAlarmPendingIntent(@NonNull Context 
context) {
+Intent intent = new Intent(context, 
NotificationPollBroadcastReceiver.class);
+intent.setAction(ACTION_POLL);
+return PendingIntent.getBroadcast(context, 0, intent, 
PendingIntent.FLAG_UPDATE_CURRENT);
 }
 
 private void pollNotifications(@NonNull final Context context) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5e0f6b0bb3813763133f891b9475abb232dee62a
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Move ChronologyProtector/TransactionProfiler to Rdbms namespace

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/334386 )

Change subject: Move ChronologyProtector/TransactionProfiler to Rdbms namespace
..


Move ChronologyProtector/TransactionProfiler to Rdbms namespace

Change-Id: I37a655bd8bd267c9bc32028b55925b2dce527d33
---
M autoload.php
M includes/MediaWiki.php
M includes/libs/rdbms/ChronologyProtector.php
M includes/libs/rdbms/TransactionProfiler.php
M includes/libs/rdbms/database/Database.php
M includes/libs/rdbms/lbfactory/LBFactory.php
M includes/libs/rdbms/loadbalancer/LoadBalancer.php
M includes/objectcache/SqlBagOStuff.php
M includes/profiler/Profiler.php
M tests/phpunit/includes/db/DatabaseMysqlBaseTest.php
M tests/phpunit/includes/db/DatabaseTestHelper.php
M tests/phpunit/includes/db/LBFactoryTest.php
12 files changed, 27 insertions(+), 3 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index e7c97ad..e3fee89 100644
--- a/autoload.php
+++ b/autoload.php
@@ -247,7 +247,6 @@
'CheckStorage' => __DIR__ . '/maintenance/storage/checkStorage.php',
'CheckSyntax' => __DIR__ . '/maintenance/checkSyntax.php',
'CheckUsernames' => __DIR__ . '/maintenance/checkUsernames.php',
-   'ChronologyProtector' => __DIR__ . 
'/includes/libs/rdbms/ChronologyProtector.php',
'ClassCollector' => __DIR__ . '/includes/utils/AutoloadGenerator.php',
'CleanupAncientTables' => __DIR__ . 
'/maintenance/cleanupAncientTables.php',
'CleanupBlocks' => __DIR__ . '/maintenance/cleanupBlocks.php',
@@ -1461,7 +1460,6 @@
'TrackBlobs' => __DIR__ . '/maintenance/storage/trackBlobs.php',
'TrackingCategories' => __DIR__ . '/includes/TrackingCategories.php',
'TraditionalImageGallery' => __DIR__ . 
'/includes/gallery/TraditionalImageGallery.php',
-   'TransactionProfiler' => __DIR__ . 
'/includes/libs/rdbms/TransactionProfiler.php',
'TransformParameterError' => __DIR__ . 
'/includes/media/MediaTransformOutput.php',
'TransformTooBigImageAreaError' => __DIR__ . 
'/includes/media/MediaTransformOutput.php',
'TransformationalImageHandler' => __DIR__ . 
'/includes/media/TransformationalImageHandler.php',
@@ -1586,8 +1584,10 @@
'WikiRevision' => __DIR__ . '/includes/import/WikiRevision.php',
'WikiStatsOutput' => __DIR__ . '/maintenance/language/StatOutputs.php',
'WikiTextStructure' => __DIR__ . 
'/includes/content/WikiTextStructure.php',
+   'Wikimedia\\Rdbms\\ChronologyProtector' => __DIR__ . 
'/includes/libs/rdbms/ChronologyProtector.php',
'Wikimedia\\Rdbms\\ConnectionManager' => __DIR__ . 
'/includes/libs/rdbms/connectionmanager/ConnectionManager.php',
'Wikimedia\\Rdbms\\SessionConsistentConnectionManager' => __DIR__ . 
'/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManager.php',
+   'Wikimedia\\Rdbms\\TransactionProfiler' => __DIR__ . 
'/includes/libs/rdbms/TransactionProfiler.php',
'WikitextContent' => __DIR__ . '/includes/content/WikitextContent.php',
'WikitextContentHandler' => __DIR__ . 
'/includes/content/WikitextContentHandler.php',
'WinCacheBagOStuff' => __DIR__ . 
'/includes/libs/objectcache/WinCacheBagOStuff.php',
diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php
index faca533..3e72d54 100644
--- a/includes/MediaWiki.php
+++ b/includes/MediaWiki.php
@@ -22,6 +22,7 @@
 
 use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\MediaWikiServices;
+use Wikimedia\Rdbms\ChronologyProtector;
 
 /**
  * The MediaWiki class is the helper class for the index.php entry point.
diff --git a/includes/libs/rdbms/ChronologyProtector.php 
b/includes/libs/rdbms/ChronologyProtector.php
index 88af1db..dfe950e 100644
--- a/includes/libs/rdbms/ChronologyProtector.php
+++ b/includes/libs/rdbms/ChronologyProtector.php
@@ -20,9 +20,16 @@
  * @file
  * @ingroup Database
  */
+
+namespace Wikimedia\Rdbms;
+
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerInterface;
+use Psr\Log\NullLogger;
 use Wikimedia\WaitConditionLoop;
+use BagOStuff;
+use DBMasterPos;
+use ILoadBalancer;
 
 /**
  * Class for ensuring a consistent ordering of events as seen by the user, 
despite replication.
@@ -72,7 +79,7 @@
$this->clientId = md5( $client['ip'] . "\n" . $client['agent'] 
);
$this->key = $store->makeGlobalKey( __CLASS__, $this->clientId 
);
$this->waitForPosTime = $posTime;
-   $this->logger = new \Psr\Log\NullLogger();
+   $this->logger = new NullLogger();
}
 
public function setLogger( LoggerInterface $logger ) {
diff --git a/includes/libs/rdbms/TransactionProfiler.php 
b/includes/libs/rdbms/TransactionProfiler.php
index bf5e299..5d3534f 100644
--- a/includes/libs/rdbms/TransactionProfiler.php
+++ b/includes/libs/rdbms/TransactionProfiler.php
@@ -22,9 +22,

[MediaWiki-commits] [Gerrit] performance/WebPageTest[master]: Collect timings as authenticated for Firefox

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/334415 )

Change subject: Collect timings as authenticated for Firefox
..


Collect timings as authenticated for Firefox

By also collecting metrics from Firefox it will be easier for us to
investigate problems. Today we have a really high TTFB for Chrome
authenticated users.

Bug: T153640
Change-Id: I3d18f8ee6bd6ef6ecdfda3998691e7bdb0296e5c
---
M scripts/batch/login-desktop.txt
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/scripts/batch/login-desktop.txt b/scripts/batch/login-desktop.txt
index 5be36d7..da6934d 100644
--- a/scripts/batch/login-desktop.txt
+++ b/scripts/batch/login-desktop.txt
@@ -14,3 +14,5 @@
 # $ WMF_WPT_KEY=SECRET_KEY STATSV_ENDPOINT=http://localhost WPT_RUNS=1 
WPT_USER=wptuser WPT_USER_PASSWORD=SECRET_PASSWORD WMF_WPT_LOCATION=us-west-1 
bin/index.js --batch ./scripts/batch/login-desktop.txt
 
 --webPageTestKey <%WMF_WPT_KEY> --median SpeedIndex --webPageTestHost 
wpt.wmftest.org --location <%WMF_WPT_LOCATION>:Chrome --label 
chrome-authenticated --runs <%WPT_RUNS> --first true --endpoint 
<%STATSV_ENDPOINT> --namespace webpagetest.enwiki.authenticated.Facebook 
--reporter statsv --timeline true --bodies true 
./scripts/wptscripts/login-desktop-enwiki-facebook.txt
+
+--webPageTestKey <%WMF_WPT_KEY> --median SpeedIndex --webPageTestHost 
wpt.wmftest.org --location <%WMF_WPT_LOCATION>:Firefox --label 
firefox-authenticated --runs <%WPT_RUNS> --first true --endpoint 
<%STATSV_ENDPOINT> --namespace webpagetest.enwiki.authenticated.Facebook 
--reporter statsv ./scripts/wptscripts/login-desktop-enwiki-facebook.txt

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3d18f8ee6bd6ef6ecdfda3998691e7bdb0296e5c
Gerrit-PatchSet: 2
Gerrit-Project: performance/WebPageTest
Gerrit-Branch: master
Gerrit-Owner: Phedenskog 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: objectcache: Avoid using deprecated ScopedCallback alias

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/334903 )

Change subject: objectcache: Avoid using deprecated ScopedCallback alias
..


objectcache: Avoid using deprecated ScopedCallback alias

Change-Id: Ica8a066c3f28adc710ee11919c07dd188144beb5
---
M includes/libs/objectcache/WANObjectCacheReaper.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/includes/libs/objectcache/WANObjectCacheReaper.php 
b/includes/libs/objectcache/WANObjectCacheReaper.php
index 62e4536..956a3a9 100644
--- a/includes/libs/objectcache/WANObjectCacheReaper.php
+++ b/includes/libs/objectcache/WANObjectCacheReaper.php
@@ -23,6 +23,7 @@
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerInterface;
 use Psr\Log\NullLogger;
+use Wikimedia\ScopedCallback;
 
 /**
  * Class for scanning through chronological, log-structured data or change logs

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "Keystone: Turn on caching of tokens and catalog"

2017-01-30 Thread Andrew Bogott (Code Review)
Hello jenkins-bot,

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

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

to review the following change.


Change subject: Revert "Keystone:  Turn on caching of tokens and catalog"
..

Revert "Keystone:  Turn on caching of tokens and catalog"

This didn't fix the one thing I wanted it to fix, and who the hell knows what 
else it might break... tonight keystone seemed to be handing expired or invalid 
tokens over to nova-api.

This reverts commit 03f55287c8ee09f0f19d405f0a5dd63dcbe025d4.

Change-Id: I38ee1c37a142fa1df7fab110d8b45ea2e8d2ca38
---
M modules/openstack/templates/liberty/keystone/keystone.conf.erb
M modules/openstack/templates/mitaka/keystone/keystone.conf.erb
2 files changed, 2 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/84/335184/1

diff --git a/modules/openstack/templates/liberty/keystone/keystone.conf.erb 
b/modules/openstack/templates/liberty/keystone/keystone.conf.erb
index 704aee9..6ab3924 100644
--- a/modules/openstack/templates/liberty/keystone/keystone.conf.erb
+++ b/modules/openstack/templates/liberty/keystone/keystone.conf.erb
@@ -305,7 +305,7 @@
  
 # Global toggle for all caching using the should_cache_fn mechanism. (boolean
 # value)
-enabled = true
+#enabled = false
  
 # Extra debugging from the cache backend (cache keys, get/set/delete/etc
 # calls). This is only really useful if you need to see the specific cache-
@@ -341,7 +341,6 @@
 [catalog]
 # dynamic, sql-based backend (supports API/CLI-based management commands)
 driver = sql
-caching = true
 
 # static, file-based backend (does *NOT* support any management commands)
 # driver = keystone.catalog.backends.templated.TemplatedCatalog
@@ -351,8 +350,6 @@
 [token]
 provider = uuid
 driver = sql
-caching = true
-
 
 # Amount of time a token should remain valid (in seconds)
 # Using 7.1 days, as we'll set MediaWiki to 7 days
diff --git a/modules/openstack/templates/mitaka/keystone/keystone.conf.erb 
b/modules/openstack/templates/mitaka/keystone/keystone.conf.erb
index 662e9b0..6ab3924 100644
--- a/modules/openstack/templates/mitaka/keystone/keystone.conf.erb
+++ b/modules/openstack/templates/mitaka/keystone/keystone.conf.erb
@@ -305,7 +305,7 @@
  
 # Global toggle for all caching using the should_cache_fn mechanism. (boolean
 # value)
-enabled = true
+#enabled = false
  
 # Extra debugging from the cache backend (cache keys, get/set/delete/etc
 # calls). This is only really useful if you need to see the specific cache-
@@ -341,7 +341,6 @@
 [catalog]
 # dynamic, sql-based backend (supports API/CLI-based management commands)
 driver = sql
-caching = true
 
 # static, file-based backend (does *NOT* support any management commands)
 # driver = keystone.catalog.backends.templated.TemplatedCatalog
@@ -351,7 +350,6 @@
 [token]
 provider = uuid
 driver = sql
-caching = true
 
 # Amount of time a token should remain valid (in seconds)
 # Using 7.1 days, as we'll set MediaWiki to 7 days

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[master]: Don't fail on long Flickr upload filenames

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/334091 )

Change subject: Don't fail on long Flickr upload filenames
..


Don't fail on long Flickr upload filenames

Filenames should be no longer than 240 characters.

We also don't need the timestamp (in fact, it's better not
to have it for AbuseFilter purposes, and the filename is
ignored for stashes anyway - see I9b22108e4823ffc9e9a1e064ddf7527f0f4e2d67)

Bug: T151776
Change-Id: I7e8cca63042da085bc9f0f4237a21e262ab1ad96
---
M resources/handlers/mw.ApiUploadPostHandler.js
M resources/transports/mw.FormDataTransport.js
2 files changed, 10 insertions(+), 4 deletions(-)

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



diff --git a/resources/handlers/mw.ApiUploadPostHandler.js 
b/resources/handlers/mw.ApiUploadPostHandler.js
index 5ef6b0a..001bf07 100644
--- a/resources/handlers/mw.ApiUploadPostHandler.js
+++ b/resources/handlers/mw.ApiUploadPostHandler.js
@@ -13,9 +13,15 @@
 
mw.ApiUploadPostHandler.prototype = {
start: function () {
-   var handler = this;
+   var handler = this,
+   tempname = this.upload.getFilename(),
+   ext = tempname.split( '.' ).pop();
 
-   this.beginTime = ( new Date() ).getTime();
+   // Limit filename length to 240 bytes (limit hardcoded 
in UploadBase.php).
+   if ( tempname.length > 240 ) {
+   tempname = tempname.substr( 0, 240 - ext.length 
- 1 ) + '.' + ext;
+   }
+
this.upload.ui.setStatus( 'mwe-upwiz-transport-started' 
);
 
return this.api.postWithToken( 'csrf', {
@@ -23,7 +29,7 @@
stash: 1,
ignorewarnings: 1,
url: this.upload.file.url,
-   filename: this.beginTime.toString() + 
this.upload.getFilename()
+   filename: tempname
} )
.done( function ( result ) {
if ( result.upload && 
result.upload.warnings ) {
diff --git a/resources/transports/mw.FormDataTransport.js 
b/resources/transports/mw.FormDataTransport.js
index 845f441..5d2816a 100644
--- a/resources/transports/mw.FormDataTransport.js
+++ b/resources/transports/mw.FormDataTransport.js
@@ -117,7 +117,7 @@
var params, ext;
 
this.tempname = tempFileName;
-   // Also limit length to 240 bytes (limit hardcoded in 
UploadBase.php).
+   // Limit length to 240 bytes (limit hardcoded in 
UploadBase.php).
if ( this.tempname.length > 240 ) {
ext = this.tempname.split( '.' ).pop();
this.tempname = this.tempname.substr( 0, 240 - 
ext.length - 1 ) + '.' + ext;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e8cca63042da085bc9f0f4237a21e262ab1ad96
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Fix dead 'Continue' button on paypal EC form

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335166 )

Change subject: Fix dead 'Continue' button on paypal EC form
..


Fix dead 'Continue' button on paypal EC form

We were just missing the line to load the generic form code.

Bug: T156692
Change-Id: Ibf0521a4b9209cbd988d2ca80c668df0c83b423d
---
M paypal_gateway/express_checkout/paypal_express_gateway.body.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/paypal_gateway/express_checkout/paypal_express_gateway.body.php 
b/paypal_gateway/express_checkout/paypal_express_gateway.body.php
index 55648f4..2d7e4ce 100644
--- a/paypal_gateway/express_checkout/paypal_express_gateway.body.php
+++ b/paypal_gateway/express_checkout/paypal_express_gateway.body.php
@@ -8,6 +8,7 @@
 */
protected function handleRequest() {
$this->getOutput()->allowClickjacking();
+   $this->getOutput()->addModules( 'ext.donationInterface.forms' );
 
$this->handleDonationRequest();
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf0521a4b9209cbd988d2ca80c668df0c83b423d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Set Age: 0 for RL requests served by Varnish

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/330874 )

Change subject: Set Age: 0 for RL requests served by Varnish
..


Set Age: 0 for RL requests served by Varnish

Bug: T105657
Change-Id: I28ad76343877c7180c3c97fa67fe38d12b7ef0a1
---
M puppet/modules/varnish/files/default-subs.vcl
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/puppet/modules/varnish/files/default-subs.vcl 
b/puppet/modules/varnish/files/default-subs.vcl
index 594c0fb..3b41717 100644
--- a/puppet/modules/varnish/files/default-subs.vcl
+++ b/puppet/modules/varnish/files/default-subs.vcl
@@ -106,6 +106,11 @@
 } else {
 set resp.http.X-Cache = "miss (0)";
 }
+
+# Enforce Age: 0 for ResourceLoader
+if (req.url ~ "^/w/load\.php" ) {
+set resp.http.Age = 0;
+}
 }
 
 # Called after a document has been successfully retrieved from the backend.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I28ad76343877c7180c3c97fa67fe38d12b7ef0a1
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gilles 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Gilles 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Fix paypal EC transformer list

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335162 )

Change subject: Fix paypal EC transformer list
..


Fix paypal EC transformer list

Need to validate amount, don't need to double-stage date.

Bug: T134445
Change-Id: I34c8b01dc02f59ac6d5236e034d35c08409bae54
---
M paypal_gateway/express_checkout/config/transformers.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/paypal_gateway/express_checkout/config/transformers.yaml 
b/paypal_gateway/express_checkout/config/transformers.yaml
index e55037c..ab18d8e 100644
--- a/paypal_gateway/express_checkout/config/transformers.yaml
+++ b/paypal_gateway/express_checkout/config/transformers.yaml
@@ -1,4 +1,4 @@
+- Amount
 - IsoDate
 - DonorLocale
 - PaypalExpressReturnUrl
-- IsoDate

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I34c8b01dc02f59ac6d5236e034d35c08409bae54
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[wmf/1.29.0-wmf.10]: New deployment build - wmf/1.29.0-wmf.10

2017-01-30 Thread Aude (Code Review)
Aude has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335183 )

Change subject: New deployment build - wmf/1.29.0-wmf.10
..

New deployment build - wmf/1.29.0-wmf.10

Change-Id: Ie232ae935556a6100955586fc1936c2614b4ffb0
---
M WikibaseClient.settings.php
M WikibaseRepo.settings.php
M composer.json
M composer.lock
M extensions/ArticlePlaceholder/extension.json
M extensions/ArticlePlaceholder/includes/AboutTopicRenderer.php
M extensions/ArticlePlaceholder/includes/specials/SpecialAboutTopic.php
M 
extensions/ArticlePlaceholder/tests/phpunit/includes/AboutTopicRendererTest.php
M 
extensions/ArticlePlaceholder/tests/phpunit/includes/specials/SpecialAboutTopicTest.php
A extensions/Wikibase/CREDITS
M extensions/Wikibase/client/WikibaseClient.hooks.php
M extensions/Wikibase/client/WikibaseClient.i18n.alias.php
M extensions/Wikibase/client/WikibaseClient.i18n.magic.php
M extensions/Wikibase/client/WikibaseClient.php
M extensions/Wikibase/client/config/WikibaseClient.default.php
M extensions/Wikibase/client/config/WikibaseClient.example.php
M extensions/Wikibase/client/config/WikibaseClient.jenkins.php
M extensions/Wikibase/client/i18n/bn.json
M extensions/Wikibase/client/i18n/bs.json
M extensions/Wikibase/client/i18n/es.json
M extensions/Wikibase/client/i18n/fi.json
M extensions/Wikibase/client/i18n/glk.json
M extensions/Wikibase/client/i18n/hu.json
A extensions/Wikibase/client/i18n/ie.json
A extensions/Wikibase/client/i18n/io.json
A extensions/Wikibase/client/i18n/lfn.json
M extensions/Wikibase/client/i18n/lzh.json
M extensions/Wikibase/client/i18n/my.json
M extensions/Wikibase/client/i18n/nl.json
M extensions/Wikibase/client/i18n/oc.json
M extensions/Wikibase/client/includes/Api/ApiClientInfo.php
M extensions/Wikibase/client/includes/Api/ApiListEntityUsage.php
M extensions/Wikibase/client/includes/Api/ApiPropsEntityUsage.php
M extensions/Wikibase/client/includes/Api/PageTerms.php
M extensions/Wikibase/client/includes/CachingOtherProjectsSitesProvider.php
M extensions/Wikibase/client/includes/ChangeNotificationJob.php
M extensions/Wikibase/client/includes/Changes/AffectedPagesFinder.php
M extensions/Wikibase/client/includes/Changes/ChangeHandler.php
M extensions/Wikibase/client/includes/Changes/ChangeListTransformer.php
M extensions/Wikibase/client/includes/Changes/ChangeRunCoalescer.php
M extensions/Wikibase/client/includes/Changes/PageUpdater.php
M extensions/Wikibase/client/includes/Changes/WikiPageUpdater.php
M extensions/Wikibase/client/includes/DataAccess/ClientSiteLinkTitleLookup.php
M 
extensions/Wikibase/client/includes/DataAccess/DataAccessSnakFormatterFactory.php
M extensions/Wikibase/client/includes/DataAccess/PropertyIdResolver.php
M 
extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
M 
extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/Runner.php
M 
extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/StatementGroupRenderer.php
M 
extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/StatementGroupRendererFactory.php
M 
extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/VariantsAwareRenderer.php
M extensions/Wikibase/client/includes/DataAccess/Scribunto/EntityAccessor.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/SnakSerializationRenderer.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/WikibaseLanguageDependentLuaBindings.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/WikibaseLanguageIndependentLuaBindings.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/WikibaseLuaEntityBindings.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua
M extensions/Wikibase/client/includes/DataAccess/Scribunto/mw.wikibase.lua
M extensions/Wikibase/client/includes/DataAccess/SnaksFinder.php
M 
extensions/Wikibase/client/includes/DataAccess/StatementTransclusionInteractor.php
M extensions/Wikibase/client/includes/DispatchingServiceFactory.php
A extensions/Wikibase/client/includes/EntityDataRetrievalServiceFactory.php
M extensions/Wikibase/client/includes/Hooks/BaseTemplateAfterPortletHandler.php
M extensions/Wikibase/client/includes/Hooks/BeforePageDisplayHandler.php
M 
extensions/Wikibase/client/includes/Hooks/ChangesListSpecialPageHookHandlers.php
M extensions/Wikibase/client/includes/Hooks/DataUpdateHookHandlers.php
M extensions/Wikibase/client/includes/Hooks/DeletePageNoticeCreator.php
M extensions/Wikibase/client/includes/Hooks/EchoNotificationsHandlers.php
M extensions/Wikibase/client/includes/Hooks/EditActionHookHandler.php
M extensions/Wikibase/client/includes/Hooks/InfoActionHookHandler.php
M extensions/Wikibase/client/incl

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable TorBlock for Wikitech

2017-01-30 Thread BryanDavis (Code Review)
BryanDavis has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335180 )

Change subject: Enable TorBlock for Wikitech
..


Enable TorBlock for Wikitech

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

Approvals:
  Chad: Looks good to me, but someone else must approve
  BryanDavis: Verified; Looks good to me, approved



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 42ae425..6cdd81a 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -16841,7 +16841,6 @@
 'wmgUseTorBlock' => [
'default' => true,
'private' => false,
-   'wikitech' => false,
 ],
 
 'wmgUseSearchExtraNS' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If20a592d0d47178f79d4d44dd1757df7177af713
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Update: improve WikiSite.authorityToLanguageCode() robustness

2017-01-30 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335182 )

Change subject: Update: improve WikiSite.authorityToLanguageCode() robustness
..

Update: improve WikiSite.authorityToLanguageCode() robustness

Return correct outputs for no and mobile subdomain authority inputs. Add
some tests to WikiSite

Bug: T152980
Change-Id: I2a6075b746b36462086a8aa639d06d6bb6e1c275
---
M app/src/main/java/org/wikipedia/dataclient/WikiSite.java
M app/src/test/java/org/wikipedia/dataclient/WikiSiteTest.java
2 files changed, 193 insertions(+), 24 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/dataclient/WikiSite.java 
b/app/src/main/java/org/wikipedia/dataclient/WikiSite.java
index ceaae17..fa58902 100644
--- a/app/src/main/java/org/wikipedia/dataclient/WikiSite.java
+++ b/app/src/main/java/org/wikipedia/dataclient/WikiSite.java
@@ -29,6 +29,15 @@
  * Simple English Wikipedia (beta cluster mirror): HTTP / 
simple.wikipedia.beta.wmflabs.org / simple
  * Development: HTTP / 192.168.1.11:8080 / (none)
  * 
+ *
+ * As shown above, the language code or mapping is part of the 
authority:
+ * 
+ * Validity: authority / language code
+ * Correct: "test.wikipedia.org" / "test"
+ * Correct: "wikipedia.org", ""
+ * Correct: "no.wikipedia.org", "nb"
+ * Incorrect: "wikipedia.org", "test"
+ * 
  */
 public class WikiSite implements Parcelable {
 public static final Parcelable.Creator CREATOR = new 
Parcelable.Creator() {
@@ -138,7 +147,7 @@
  * Võro Wikipedia: fiu-vro.m.wikipedia.org
  * Simple English Wikipedia: simple.m.wikipedia.org
  * Simple English Wikipedia (beta cluster mirror): 
simple.m.wikipedia.beta.wmflabs.org
- * Development: m.192.168.1.11:8080
+ * Development: m.192.168.1.11
  * 
  */
 @NonNull
@@ -146,6 +155,7 @@
 return authorityToMobile(host());
 }
 
+/**  @return the port if specified or -1 if invalid or not present */
 public int port() {
 return uri.getPort();
 }
@@ -162,7 +172,7 @@
  * @return The canonical URL. e.g., https://en.wikipedia.org.
  */
 public String url() {
-return scheme() + "://" + authority();
+return uri.toString();
 }
 
 /**
@@ -274,9 +284,17 @@
 }
 }
 
-@NonNull
-private static String authorityToLanguageCode(@NonNull String authority) {
-return authority.split("\\.")[0];
+@NonNull private static String authorityToLanguageCode(@NonNull String 
authority) {
+String[] parts = authority.split("\\.");
+final int minLengthForSubdomain = 3;
+if (parts.length < minLengthForSubdomain
+|| parts.length == minLengthForSubdomain && 
parts[0].equals("m")) {
+// ""
+// wikipedia.org
+// m.wikipedia.org
+return "";
+}
+return parts[0];
 }
 
 /** @param authority Host and optional port. */
diff --git a/app/src/test/java/org/wikipedia/dataclient/WikiSiteTest.java 
b/app/src/test/java/org/wikipedia/dataclient/WikiSiteTest.java
index bfbc3cf..ceb65a0 100644
--- a/app/src/test/java/org/wikipedia/dataclient/WikiSiteTest.java
+++ b/app/src/test/java/org/wikipedia/dataclient/WikiSiteTest.java
@@ -13,14 +13,173 @@
 import static org.hamcrest.Matchers.not;
 
 @RunWith(TestRunner.class) public class WikiSiteTest {
+@Test public void testSupportedAuthority() {
+assertThat(WikiSite.supportedAuthority("fr.wikipedia.org"), is(true));
+assertThat(WikiSite.supportedAuthority("fr.m.wikipedia.org"), 
is(true));
+assertThat(WikiSite.supportedAuthority("roa-rup.wikipedia.org"), 
is(true));
+
+assertThat(WikiSite.supportedAuthority("google.com"), is(false));
+}
+
+@Test public void testForLanguageCodeScheme() {
+WikiSite subject = WikiSite.forLanguageCode("test");
+assertThat(subject.scheme(), is("https"));
+}
+
+@Test public void testForLanguageCodeAuthority() {
+WikiSite subject = WikiSite.forLanguageCode("test");
+assertThat(subject.authority(), is("test.wikipedia.org"));
+}
+
+@Test public void testForLanguageCodeLanguage() {
+WikiSite subject = WikiSite.forLanguageCode("test");
+assertThat(subject.languageCode(), is("test"));
+}
+
+@Test public void testForLanguageCodeNoLanguage() {
+WikiSite subject = WikiSite.forLanguageCode("");
+assertThat(subject.languageCode(), is(""));
+}
+
+@Test public void testForLanguageCodeNoLanguageAuthority() {
+WikiSite subject = WikiSite.forLanguageCode("");
+assertThat(subject.authority(), is("wikipedia.org"));
+}
+
+@Test public void testForLanguageCodeLanguageAuthority() {
+WikiSite subject = WikiSite.forLanguageCode("zh-hans");

[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[branding]: Avoid a 1px glitch in ios

2017-01-30 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335181 )

Change subject: Avoid a 1px glitch in ios
..

Avoid a 1px glitch in ios

The combination of animation and the fact that overlay-ios
header-container is absolution appear to cause a 1px glitch

Bug: T156509
Change-Id: Id2b340e827fd2d1c99921da9592affcd3ecf01ab
---
M resources/mobile.overlays/Overlay.less
M resources/mobile.search/SearchOverlay.less
2 files changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/81/335181/1

diff --git a/resources/mobile.overlays/Overlay.less 
b/resources/mobile.overlays/Overlay.less
index e7ea056..88ba269 100644
--- a/resources/mobile.overlays/Overlay.less
+++ b/resources/mobile.overlays/Overlay.less
@@ -350,6 +350,8 @@
 .overlay-ios {
.overlay-header-container {
position: absolute !important;
+   // see T156509
+   top: 1px;
}
 
.overlay-footer-container {
diff --git a/resources/mobile.search/SearchOverlay.less 
b/resources/mobile.search/SearchOverlay.less
index f24f211..5bdcaf0 100644
--- a/resources/mobile.search/SearchOverlay.less
+++ b/resources/mobile.search/SearchOverlay.less
@@ -172,6 +172,11 @@
&.fade-out {
.animation( fadeOut 0.5s );
}
+
+   // see T156509
+   &.overlay-ios {
+   .animation( none );
+   }
}
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2b340e827fd2d1c99921da9592affcd3ecf01ab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: branding
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable TorBlock for Wikitech

2017-01-30 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335180 )

Change subject: Enable TorBlock for Wikitech
..

Enable TorBlock for Wikitech

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 42ae425..6cdd81a 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -16841,7 +16841,6 @@
 'wmgUseTorBlock' => [
'default' => true,
'private' => false,
-   'wikitech' => false,
 ],
 
 'wmgUseSearchExtraNS' => [

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: adding icinga cert monitoring for *.corp.wikimedia.org

2017-01-30 Thread RobH (Code Review)
RobH has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335179 )

Change subject: adding icinga cert monitoring for *.corp.wikimedia.org
..

adding icinga cert monitoring for *.corp.wikimedia.org

using the directory.corp.wikimedia.org service per Byron's suggestion
for a public facing point to monitor this ssl certificate.

Change-Id: If18ee070e28461993e8acf94e640f9ed133fb5a1
---
M modules/icinga/manifests/monitor/certs.pp
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/79/335179/1

diff --git a/modules/icinga/manifests/monitor/certs.pp 
b/modules/icinga/manifests/monitor/certs.pp
index 2e54f3e..6b83559 100644
--- a/modules/icinga/manifests/monitor/certs.pp
+++ b/modules/icinga/manifests/monitor/certs.pp
@@ -78,4 +78,15 @@
 host  => 'wikitech-static.wikimedia.org',
 contact_group => 'wikitech-static',
 }
+
+# *.corp.wikiemdia.org (OIT)
+@monitoring::host { 'https_directory-corp':
+host_fqdn => 'directory.corp.wikimedia.org',
+}
+monitoring::service { 'https_directory-corp':
+description   => 'HTTPS-directory_corp',
+check_command => 'check_ssl_http!directory.corp.wikimedia.org',
+host  => 'directory.corp.wikimedia.org',
+}
+
 }

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Mediawiki theme: Fix focus inset to overlap scrollbars

2017-01-30 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335178 )

Change subject: Mediawiki theme: Fix focus inset to overlap scrollbars
..

Mediawiki theme: Fix focus inset to overlap scrollbars

Fix focus inset on TextinputWidget's textareas by applying `outline` and
`outline-offset`. As IE/Edge are the only browser which don't support this
property, let's hack them out of our way.

Bug: T103851
Change-Id: Iad03f82cee0d2c06ebb4a3c6f28e54881e7f8cdb
---
M src/themes/mediawiki/widgets.less
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/78/335178/1

diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index 8b852e3..93349c2 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -767,6 +767,17 @@
}
}
 
+   // HACK: Exclude IE/Edge (and Saf<6) from this selector as it
+   // doesn't understand `outline-offset`. All other browsers do. 
:/
+   @media screen {
+   @media ( min-width: 0 ) {
+   textarea:focus {
+   outline: 1px solid @color-progressive;
+   outline-offset: -2px;
+   }
+   }
+   }
+
.mw-placeholder();
 
&.oo-ui-flaggedElement-invalid {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [wip^2] Make 'groups' a model in the FiltersViewModel

2017-01-30 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335177 )

Change subject: [wip^2] Make 'groups' a model in the FiltersViewModel
..

[wip^2] Make 'groups' a model in the FiltersViewModel

Bug: T156533
Change-Id: Iebde3138e16bac7f62e8f557e5ce08f41a9535cb
---
M resources/Resources.php
A resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterGroupWidget.js
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FiltersListWidget.js
6 files changed, 193 insertions(+), 67 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/77/335177/1

diff --git a/resources/Resources.php b/resources/Resources.php
index f14787f..94d7d99 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1737,6 +1737,7 @@
'scripts' => [
'resources/src/mediawiki.rcfilters/mw.rcfilters.js',

'resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js',
+   
'resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js',

'resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js',

'resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FiltersListWidget.js',

'resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterGroupWidget.js',
diff --git 
a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js 
b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
new file mode 100644
index 000..9c8da19
--- /dev/null
+++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
@@ -0,0 +1,88 @@
+( function ( mw, $ ) {
+   /**
+* View model for a filter group
+*
+* @mixins OO.EventEmitter
+* @mixins OO.EmitterList
+*
+* @constructor
+* @param {Object} [config] Configuration options
+* @cfg {string} [type='send_unselected_if_any'] Group type
+* @cfg {string} [title] Group title
+* @cfg {string} [separator='|'] Value separator for 'string_options' 
groups
+* @cfg {string} [exclusionType='default'] Group exclusion type
+* @cfg {boolean} [active] Group is active
+*/
+   mw.rcfilters.dm.FilterGroup = function MwRcfiltersDmFilterGroup( config 
) {
+   config = config || {};
+
+   // Mixin constructor
+   OO.EventEmitter.call( this );
+   OO.EmitterList.call( this );
+
+   this.type = config.type || 'send_unselected_if_any';
+   this.title = config.title;
+   this.separator = config.separator || '|';
+   this.exclusionType = config.exclusionType || 'default';
+   this.active = !!config.active;
+   };
+
+   /* Initialization */
+   OO.initClass( mw.rcfilters.dm.FilterGroup );
+   OO.mixinClass( mw.rcfilters.dm.FilterGroup, OO.EventEmitter );
+
+   /* Events */
+
+   /**
+* @event update
+*
+* Group state has been updated
+*/
+
+   /* Methods */
+
+   /**
+* Check the active status of the group and set it accordingly.
+*
+* @fires update
+*/
+   mw.rcfilters.dm.FilterGroup.prototype.checkActive = function () {
+   var active,
+   count = 0;
+
+   // Recheck group activity
+   this.getItems().forEach( function ( filterItem ) {
+   count += Number( filterItem.isSelected() );
+   } );
+
+   active = (
+   count > 0 &&
+   count < filters.length
+   );
+
+   if ( this.active !== active ) {
+   this.active = active;
+   this.emit( 'update' );
+   }
+   };
+
+   mw.rcfilters.dm.FilterGroup.prototype.isActive = function ( active ) {
+   return this.active;
+   };
+
+   mw.rcfilters.dm.FilterGroup.prototype.getType = function () {
+   return this.type;
+   };
+
+   mw.rcfilters.dm.FilterGroup.prototype.getTitle = function () {
+   return this.title;
+   };
+
+   mw.rcfilters.dm.FilterGroup.prototype.getSeparator = function () {
+   return this.separator;
+   };
+
+   mw.rcfilters.dm.FilterGroup.prototype.getExclusionType = function () {
+   return this.exclusionType;
+   };
+}( mediaWiki, jQuery ) );
diff --git 
a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js 
b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.Filt

[MediaWiki-commits] [Gerrit] mediawiki...QuizGame[master]: Add missing comma to flagQuestion() which was breaking the q...

2017-01-30 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335173 )

Change subject: Add missing comma to flagQuestion() which was breaking the quiz 
creation form
..


Add missing comma to flagQuestion() which was breaking the quiz creation form

Also added some missing semicolons and cleaned up code style

Change-Id: I7056373b3b2c36748c83a2957a2a6658af592356
---
M js/QuizGame.js
1 file changed, 34 insertions(+), 34 deletions(-)

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



diff --git a/js/QuizGame.js b/js/QuizGame.js
index ce9e5a0..1fbc2d0 100644
--- a/js/QuizGame.js
+++ b/js/QuizGame.js
@@ -26,7 +26,7 @@
{ label: mw.msg( 'cancel' ) },
{ label: mw.msg( 'quizgame-delete' ), action: 
'accept', flags: ['destructive', 'primary'] }
]
-   }
+   };
OO.ui.confirm( mw.msg( 'quizgame-delete-confirm' ), options 
).done( function ( confirmed ) {
if ( confirmed ) {
document.getElementById( 'items[' + id + ']' 
).style.display = 'none';
@@ -45,7 +45,7 @@
}
);
}
-   });
+   } );
},
 
unflagById: function( id, key ) {
@@ -54,7 +54,7 @@
{ label: mw.msg( 'cancel' ) },
{ label: mw.msg( 'quizgame-unflag' ), action: 
'accept', flags: ['constructive', 'primary'] }
]
-   }
+   };
OO.ui.confirm( mw.msg( 'quizgame-unflag-confirm' ), options 
).done( function ( confirmed ) {
if ( confirmed ) {
document.getElementById( 'items[' + id + ']' 
).style.display = 'none';
@@ -191,7 +191,7 @@
{ label: mw.msg( 'cancel' ) },
{ label: mw.msg( 'quizgame-delete' ), action: 
'accept', flags: ['destructive', 'primary'] }
]
-   }
+   };
OO.ui.confirm( mw.msg( 'quizgame-delete-confirm' ), options 
).done( function ( confirmed ) {
if ( confirmed ) {
var gameKey = document.getElementById( 
'quizGameKey' ).value;
@@ -230,35 +230,35 @@
 * @see https://phabricator.wikimedia.org/T156304
 */
flagQuestion: function() {
-var options = {
-actions: [
-{ label: mw.msg( 'cancel' ) }
-{ label: mw.msg( 'quizgame-flag' ), action: 
'accept', flags: ['destructive', 'primary'] },
-],
-textInput: { placeholder: mw.msg( 
'quizgame-flagged-reason' ) }
-}
-OO.ui.prompt( mw.msg( 'quizgame-flag-confirm' ), options 
).done( function ( reason ) {
-if ( reason !== null ) {
-var gameKey = document.getElementById( 
'quizGameKey' ).value;
-var gameId = document.getElementById( 
'quizGameId' ).value;
-jQuery.getJSON(
-mw.util.wikiScript( 'api' ), {
-format: 'json',
-action: 'quizgame',
-quizaction: 'flagItem',
-key: gameKey,
-id: gameId,
-reason: reason
-},
-function( data ) {
-document.getElementById( 
'ajax-messages' ).innerHTML = data.quizgame.output;
-document.getElementById( 
'flag-comment' ).style.display = 'none';
-document.getElementById( 
'flag-comment' ).style.visibility = 'hidden';
-}
-);
-   }
-} );
-},
+   var options = {
+   actions: [
+   { label: mw.msg( 'cancel' ) },
+   { label: mw.msg( 'quizgame-flag' ), action: 
'accept', flags: ['destructive', 'primary'] },
+   ],
+   textInput: { placeholder: mw.msg( 
'quizgame-flagged-reason' ) }
+   };
+   OO.ui.prompt( mw.msg( 'quizgame-flag-confirm' ), options 
).done( functi

[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[branding]: Define header height in pixels

2017-01-30 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335176 )

Change subject: Define header height in pixels
..

Define header height in pixels

When expressed in ems due to how browsers round up decimals the height
can differ leading to inconsistencies.

Bug: T156509
Change-Id: I77f74acc089d7606f648da2eeb6153214f6a0b08
---
M resources/skins.minerva.base.styles/ui.less
1 file changed, 7 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/76/335176/1

diff --git a/resources/skins.minerva.base.styles/ui.less 
b/resources/skins.minerva.base.styles/ui.less
index 06d6c06..06a7f80 100644
--- a/resources/skins.minerva.base.styles/ui.less
+++ b/resources/skins.minerva.base.styles/ui.less
@@ -89,16 +89,19 @@
}
 }
 
+.banner-container {
+   // When banners are present we want to easily distinguish between them 
and the header so add border
+   border-bottom: 1px solid @colorGray12;
+   margin-top: @headerMarginTop;
+}
+
 .header {
display: table;
width: 100%;
border-spacing: 0;
border-collapse: collapse;
-   height: @headerHeight;
+   height: floor(unit(@headerHeight*16, px));
white-space: nowrap;
-   // When banners are present we want to easily distinguish between them 
and the header so add border
-   border-top: 1px solid @colorGray12;
-   margin-top: @headerMarginTop;
 
// button
> div {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77f74acc089d7606f648da2eeb6153214f6a0b08
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: branding
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.api: Add unit tests for pipe-joining non-string va...

2017-01-30 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335175 )

Change subject: mediawiki.api: Add unit tests for pipe-joining non-string values
..

mediawiki.api: Add unit tests for pipe-joining non-string values

Change-Id: I099b055ba8ddd367b6df2dd8f2997d8c6cd243df
---
M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js
1 file changed, 23 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/75/335175/1

diff --git a/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js 
b/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js
index 6a00ac9..fafe567 100644
--- a/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js
+++ b/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js
@@ -89,7 +89,7 @@
return api.post( { action: 'test' }, { contentType: 
'multipart/form-data' } );
} );
 
-   QUnit.test( 'Converting arrays to pipe-separated', function ( assert ) {
+   QUnit.test( 'Converting arrays to pipe-separated (string)', function ( 
assert ) {
var api = new mw.Api();
 
this.server.respond( function ( request ) {
@@ -100,6 +100,28 @@
return api.get( { test: [ 'foo', 'bar', 'baz' ] } );
} );
 
+   QUnit.test( 'Converting arrays to pipe-separated (mw.Title)', function 
( assert ) {
+   var api = new mw.Api();
+
+   this.server.respond( function ( request ) {
+   assert.ok( request.url.match( /test=Foo%7CBar/ ), 
'Pipe-separated value was submitted' );
+   request.respond( 200, { 'Content-Type': 
'application/json' }, '[]' );
+   } );
+
+   return api.get( { test: [ new mw.Title( 'Foo' ), new mw.Title( 
'Bar' ) ] } );
+   } );
+
+   QUnit.test( 'Converting arrays to pipe-separated (misc primitives)', 
function ( assert ) {
+   var api = new mw.Api();
+
+   this.server.respond( function ( request ) {
+   assert.ok( request.url.match( 
/test=true%7Cfalse%7Cnull%7C0%7C1%2E2/ ), 'Pipe-separated value was submitted: 
' + request.url );
+   request.respond( 200, { 'Content-Type': 
'application/json' }, '[]' );
+   } );
+
+   return api.get( { test: [ true, false, null, 0, 1.2 ] } );
+   } );
+
QUnit.test( 'Omitting false booleans', function ( assert ) {
var api = new mw.Api();
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: decom db2015

2017-01-30 Thread RobH (Code Review)
RobH has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335170 )

Change subject: decom db2015
..


decom db2015

old db host being decommissioned

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

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



diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index d3bec7f..3c6b6a7 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -1486,11 +1486,6 @@
 fixed-address db2014.codfw.wmnet;
 }
 
-host db2015 {
-hardware ethernet D4:AE:52:7C:A6:FD;
-fixed-address db2015.codfw.wmnet;
-}
-
 host db2016 {
 hardware ethernet d4:ae:52:90:39:8c;
 fixed-address db2016.codfw.wmnet;

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: [FOR CUSTOM BUILD] Create dummy revert notification for UX t...

2017-01-30 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335174 )

Change subject: [FOR CUSTOM BUILD] Create dummy revert notification for UX 
testing
..

[FOR CUSTOM BUILD] Create dummy revert notification for UX testing

As directed on the task.  A "Wallaroo" article will be accessible from
clicking on the notification, provided that the app language is "en" or
"test".

Bug: T156520
Change-Id: I904ccf94f92992ffaca32b20b66df6025175c19d
---
A app/src/main/assets/desc_edit_ux_test.json
M app/src/main/java/org/wikipedia/feed/FeedFragment.java
M app/src/main/java/org/wikipedia/views/ExploreOverflowView.java
M app/src/main/res/layout/view_explore_overflow.xml
M app/src/main/res/values/strings_no_translate.xml
5 files changed, 58 insertions(+), 1 deletion(-)


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

diff --git a/app/src/main/assets/desc_edit_ux_test.json 
b/app/src/main/assets/desc_edit_ux_test.json
new file mode 100644
index 000..5609c31
--- /dev/null
+++ b/app/src/main/assets/desc_edit_ux_test.json
@@ -0,0 +1,25 @@
+{
+  "wiki": "wikidatawiki",
+  "id": "1557960",
+  "type": "reverted",
+  "category": "reverted",
+  "timestamp": {
+"utciso8601": "2017-01-30T17:10:56Z",
+"utcmw": "20170130171056",
+"mw": "20170130171056",
+"date": "Today"
+  },
+  "title": {
+"full": "Wallaroo",
+"namespace": "",
+"namespace-key": 0,
+"text": "Q1623471"
+  },
+  "agent": {
+"id": 0,
+"name": "Mhollo"
+  },
+  "revid": 309132,
+  "read": "20170130172611",
+  "targetpages": []
+}
\ No newline at end of file
diff --git a/app/src/main/java/org/wikipedia/feed/FeedFragment.java 
b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
index 4078712..c4d8dd9 100644
--- a/app/src/main/java/org/wikipedia/feed/FeedFragment.java
+++ b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
@@ -31,7 +31,10 @@
 import org.wikipedia.feed.view.FeedAdapter;
 import org.wikipedia.feed.view.FeedView;
 import org.wikipedia.history.HistoryEntry;
+import org.wikipedia.json.GsonUnmarshaller;
 import org.wikipedia.login.LoginActivity;
+import org.wikipedia.notifications.Notification;
+import org.wikipedia.notifications.NotificationPresenter;
 import org.wikipedia.settings.Prefs;
 import org.wikipedia.settings.SettingsActivity;
 import org.wikipedia.util.FeedbackUtil;
@@ -39,11 +42,14 @@
 import org.wikipedia.util.UriUtil;
 import org.wikipedia.views.ExploreOverflowView;
 
+import java.io.IOException;
 import java.util.List;
 
 import butterknife.BindView;
 import butterknife.ButterKnife;
 import butterknife.Unbinder;
+
+import static org.wikipedia.util.FileUtil.readFile;
 
 public class FeedFragment extends Fragment implements BackPressedHandler {
 @BindView(R.id.feed_swipe_refresh_layout) SwipeRefreshLayout 
swipeRefreshLayout;
@@ -376,5 +382,17 @@
 WikipediaApp.getInstance().logOut();
 FeedbackUtil.showMessage(FeedFragment.this, 
R.string.toast_logout_complete);
 }
+
+@Override
+public void exitClick() {
+try {
+String json = 
readFile(getResources().getAssets().open("desc_edit_ux_test.json"));
+Notification n = 
GsonUnmarshaller.unmarshal(Notification.class, json);
+NotificationPresenter.showNotification(getContext(), n);
+getActivity().finish();
+} catch (IOException e) {
+FeedbackUtil.showError(getActivity(), e);
+}
+}
 }
 }
diff --git a/app/src/main/java/org/wikipedia/views/ExploreOverflowView.java 
b/app/src/main/java/org/wikipedia/views/ExploreOverflowView.java
index 2e7cc38..608fe81 100644
--- a/app/src/main/java/org/wikipedia/views/ExploreOverflowView.java
+++ b/app/src/main/java/org/wikipedia/views/ExploreOverflowView.java
@@ -28,9 +28,11 @@
 void logoutClick();
 void settingsClick();
 void donateClick();
+void exitClick();
 }
 
 @BindView(R.id.explore_overflow_account_name) TextView accountName;
+@BindView(R.id.explore_overflow_exit_application) View exitView;
 @BindView(R.id.explore_overflow_log_out) View logout;
 @Nullable private Callback callback;
 @Nullable private PopupWindow popupWindowHost;
@@ -53,7 +55,8 @@
 }
 
 @OnClick({R.id.explore_overflow_settings, R.id.explore_overflow_donate,
-R.id.explore_overflow_account_container, 
R.id.explore_overflow_log_out})
+R.id.explore_overflow_account_container, 
R.id.explore_overflow_log_out,
+R.id.explore_overflow_exit_application})
 void onItemClick(View view) {
 if (popupWindowHost != null) {
 popupWindowHost.dismiss();
@@ -74,6 +77,9 @@
 case R.id.explore_overflow_donate:
 callback.donateClick();
 break;
+case R.id.explore_overflow_exit_application

[MediaWiki-commits] [Gerrit] mediawiki...QuizGame[master]: Add missing comma to flagQuestion() which was breaking the q...

2017-01-30 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335173 )

Change subject: Add missing comma to flagQuestion() which was breaking the quiz 
creation form
..

Add missing comma to flagQuestion() which was breaking the quiz creation form

Also added some missing semicolons and cleaned up code style

Change-Id: I7056373b3b2c36748c83a2957a2a6658af592356
---
M js/QuizGame.js
1 file changed, 34 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuizGame 
refs/changes/73/335173/1

diff --git a/js/QuizGame.js b/js/QuizGame.js
index ce9e5a0..1fbc2d0 100644
--- a/js/QuizGame.js
+++ b/js/QuizGame.js
@@ -26,7 +26,7 @@
{ label: mw.msg( 'cancel' ) },
{ label: mw.msg( 'quizgame-delete' ), action: 
'accept', flags: ['destructive', 'primary'] }
]
-   }
+   };
OO.ui.confirm( mw.msg( 'quizgame-delete-confirm' ), options 
).done( function ( confirmed ) {
if ( confirmed ) {
document.getElementById( 'items[' + id + ']' 
).style.display = 'none';
@@ -45,7 +45,7 @@
}
);
}
-   });
+   } );
},
 
unflagById: function( id, key ) {
@@ -54,7 +54,7 @@
{ label: mw.msg( 'cancel' ) },
{ label: mw.msg( 'quizgame-unflag' ), action: 
'accept', flags: ['constructive', 'primary'] }
]
-   }
+   };
OO.ui.confirm( mw.msg( 'quizgame-unflag-confirm' ), options 
).done( function ( confirmed ) {
if ( confirmed ) {
document.getElementById( 'items[' + id + ']' 
).style.display = 'none';
@@ -191,7 +191,7 @@
{ label: mw.msg( 'cancel' ) },
{ label: mw.msg( 'quizgame-delete' ), action: 
'accept', flags: ['destructive', 'primary'] }
]
-   }
+   };
OO.ui.confirm( mw.msg( 'quizgame-delete-confirm' ), options 
).done( function ( confirmed ) {
if ( confirmed ) {
var gameKey = document.getElementById( 
'quizGameKey' ).value;
@@ -230,35 +230,35 @@
 * @see https://phabricator.wikimedia.org/T156304
 */
flagQuestion: function() {
-var options = {
-actions: [
-{ label: mw.msg( 'cancel' ) }
-{ label: mw.msg( 'quizgame-flag' ), action: 
'accept', flags: ['destructive', 'primary'] },
-],
-textInput: { placeholder: mw.msg( 
'quizgame-flagged-reason' ) }
-}
-OO.ui.prompt( mw.msg( 'quizgame-flag-confirm' ), options 
).done( function ( reason ) {
-if ( reason !== null ) {
-var gameKey = document.getElementById( 
'quizGameKey' ).value;
-var gameId = document.getElementById( 
'quizGameId' ).value;
-jQuery.getJSON(
-mw.util.wikiScript( 'api' ), {
-format: 'json',
-action: 'quizgame',
-quizaction: 'flagItem',
-key: gameKey,
-id: gameId,
-reason: reason
-},
-function( data ) {
-document.getElementById( 
'ajax-messages' ).innerHTML = data.quizgame.output;
-document.getElementById( 
'flag-comment' ).style.display = 'none';
-document.getElementById( 
'flag-comment' ).style.visibility = 'hidden';
-}
-);
-   }
-} );
-},
+   var options = {
+   actions: [
+   { label: mw.msg( 'cancel' ) },
+   { label: mw.msg( 'quizgame-flag' ), action: 
'accept', flags: ['destructive', 'primary'] },
+   ],
+   textInput: { placeholder: mw.msg( 
'quizgame-flagged-reason' ) }
+   };
+   OO.ui.prompt( mw.msg( 'quizgame-flag-confirm'

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Ensure the editing textarea is not higher than browser's vie...

2017-01-30 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335172 )

Change subject: Ensure the editing textarea is not higher than browser's 
viewport
..

Ensure the editing textarea is not higher than browser's viewport

Limit it to 100vh (full viewport height) minus 15em (arbitrarily
chosen to hopefully allow the toolbar and summary field to stay
visible on screen).

'vh' is a new unit introduced in CSS3, representing 1% of the viewport
height, and fairly widely supported in today's browsers:
.

Bug: T155886
Change-Id: I4a32d7d5c4eb110c9ecd0b6b13e4c176d343d82f
---
M resources/src/mediawiki.action/mediawiki.action.edit.styles.css
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/72/335172/1

diff --git a/resources/src/mediawiki.action/mediawiki.action.edit.styles.css 
b/resources/src/mediawiki.action/mediawiki.action.edit.styles.css
index 0ee4058..20b4308 100644
--- a/resources/src/mediawiki.action/mediawiki.action.edit.styles.css
+++ b/resources/src/mediawiki.action/mediawiki.action.edit.styles.css
@@ -6,6 +6,10 @@
 #wpTextbox1 {
margin: 0;
display: block;
+   /* Ensure the textarea is not higher than browser's viewport on small 
screens */
+   max-height: calc(100vh - 15em);
+   /* But don't let it collapse into nothingness on really tiny screens */
+   min-height: 10em;
 }
 
 /* Adjustments to edit form elements */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a32d7d5c4eb110c9ecd0b6b13e4c176d343d82f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: decom db2015

2017-01-30 Thread RobH (Code Review)
RobH has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335171 )

Change subject: decom db2015
..


decom db2015

removing production dns entries for decommissioned host

Bug:T149102
Change-Id: Ic84112a92a488909c913eaa21a3837f777f1b3d3
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 66be75e..30f94d2 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -2539,7 +2539,7 @@
 15  1H IN PTR   db2012.codfw.wmnet.
 16  1H IN PTR   db2013.codfw.wmnet.
 17  1H IN PTR   db2014.codfw.wmnet.
-18  1H IN PTR   db2015.codfw.wmnet.
+
 19  1H IN PTR   ms-be2001.codfw.wmnet.
 20  1H IN PTR   ms-be2002.codfw.wmnet.
 21  1H IN PTR   ms-be2003.codfw.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index 0677ae4..f85e3e6 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -2321,7 +2321,6 @@
 db2012  1H  IN A10.192.0.15
 db2013  1H  IN A10.192.0.16
 db2014  1H  IN A10.192.0.17
-db2015  1H  IN A10.192.0.18
 db2016  1H  IN A10.192.16.4
 db2017  1H  IN A10.192.16.5
 db2018  1H  IN A10.192.16.6

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic84112a92a488909c913eaa21a3837f777f1b3d3
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: RobH 
Gerrit-Reviewer: RobH 
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/dns[master]: decom db2015

2017-01-30 Thread RobH (Code Review)
RobH has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335171 )

Change subject: decom db2015
..

decom db2015

removing production dns entries for decommissioned host

Bug:T149102
Change-Id: Ic84112a92a488909c913eaa21a3837f777f1b3d3
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/71/335171/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 66be75e..30f94d2 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -2539,7 +2539,7 @@
 15  1H IN PTR   db2012.codfw.wmnet.
 16  1H IN PTR   db2013.codfw.wmnet.
 17  1H IN PTR   db2014.codfw.wmnet.
-18  1H IN PTR   db2015.codfw.wmnet.
+
 19  1H IN PTR   ms-be2001.codfw.wmnet.
 20  1H IN PTR   ms-be2002.codfw.wmnet.
 21  1H IN PTR   ms-be2003.codfw.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index 0677ae4..f85e3e6 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -2321,7 +2321,6 @@
 db2012  1H  IN A10.192.0.15
 db2013  1H  IN A10.192.0.16
 db2014  1H  IN A10.192.0.17
-db2015  1H  IN A10.192.0.18
 db2016  1H  IN A10.192.16.4
 db2017  1H  IN A10.192.16.5
 db2018  1H  IN A10.192.16.6

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: decom db2015

2017-01-30 Thread RobH (Code Review)
RobH has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335170 )

Change subject: decom db2015
..

decom db2015

old db host being decommissioned

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


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

diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index d3bec7f..3c6b6a7 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -1486,11 +1486,6 @@
 fixed-address db2014.codfw.wmnet;
 }
 
-host db2015 {
-hardware ethernet D4:AE:52:7C:A6:FD;
-fixed-address db2015.codfw.wmnet;
-}
-
 host db2016 {
 hardware ethernet d4:ae:52:90:39:8c;
 fixed-address db2016.codfw.wmnet;

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: [Facepalm] Correctly set interval for notification polling.

2017-01-30 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335169 )

Change subject: [Facepalm] Correctly set interval for notification polling.
..

[Facepalm] Correctly set interval for notification polling.

In my ongoing testing of our notifications, I've been noticing that our
polling task doesn't actually repeat like we tell it to. After hours of
fruitless debugging, I noticed that we were passing in the raw integer
resource ID, instead of the actual integer dimension. Therefore, we were
inadvertently setting a repeat interval of 2132897234 or something
similar.  The same for the number-of-days timeout for the polling task to
stop itself.

This patch switches to the much-more-correct scheme of using the
getInteger() method of retrieving the integer dimension, instead of using
the resource ID.

I suspect that our "testing" of notifications has worked so far because
after editing a description we call startPollTask() which effectively
queues the task for immediate execution.

(This patch also cleans up the code a bit.)

Change-Id: I5e0f6b0bb3813763133f891b9475abb232dee62a
---
M 
app/src/main/java/org/wikipedia/notifications/NotificationPollBroadcastReceiver.java
1 file changed, 14 insertions(+), 17 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/notifications/NotificationPollBroadcastReceiver.java
 
b/app/src/main/java/org/wikipedia/notifications/NotificationPollBroadcastReceiver.java
index c808fc8..c1474c3 100644
--- 
a/app/src/main/java/org/wikipedia/notifications/NotificationPollBroadcastReceiver.java
+++ 
b/app/src/main/java/org/wikipedia/notifications/NotificationPollBroadcastReceiver.java
@@ -23,15 +23,13 @@
 public class NotificationPollBroadcastReceiver extends BroadcastReceiver {
 public static final String ACTION_POLL = "action_notification_poll";
 
-private static final long POLL_INTERVAL_MILLIS
-= 
TimeUnit.MINUTES.toMillis(R.integer.notification_poll_interval_minutes);
-
 @Override
 public void onReceive(Context context, Intent intent) {
 if (TextUtils.equals(intent.getAction(), ACTION_POLL)) {
 
 if (User.isLoggedIn()
-&& 
lastDescriptionEditedWithin(R.integer.notification_poll_timeout_days)) {
+&& lastDescriptionEditedWithin(context.getResources()
+.getInteger(R.integer.notification_poll_timeout_days))) {
 pollNotifications(context);
 } else {
 stopPollTask(context);
@@ -41,23 +39,22 @@
 }
 
 public void startPollTask(@NonNull Context context) {
-Intent alarmIntent = new Intent(context, 
NotificationPollBroadcastReceiver.class);
-boolean isAlarmUp = PendingIntent.getBroadcast(context, 0, 
alarmIntent, PendingIntent.FLAG_NO_CREATE) != null;
-if (!isAlarmUp) {
-AlarmManager alarmManager = (AlarmManager) 
context.getSystemService(Context.ALARM_SERVICE);
-alarmIntent.setAction(ACTION_POLL);
-PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 
0, alarmIntent, 0);
-
alarmManager.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP,
-SystemClock.elapsedRealtime(), POLL_INTERVAL_MILLIS, 
pendingIntent);
-}
+AlarmManager alarmManager = (AlarmManager) 
context.getSystemService(Context.ALARM_SERVICE);
+alarmManager.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP,
+SystemClock.elapsedRealtime(),
+
context.getResources().getInteger(R.integer.notification_poll_interval_minutes),
+getAlarmPendingIntent(context));
 }
 
 public void stopPollTask(@NonNull Context context) {
 AlarmManager alarmManager = (AlarmManager) 
context.getSystemService(Context.ALARM_SERVICE);
-Intent alarmIntent = new Intent(context, 
NotificationPollBroadcastReceiver.class);
-alarmIntent.setAction(ACTION_POLL);
-PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, 
alarmIntent, 0);
-alarmManager.cancel(pendingIntent);
+alarmManager.cancel(getAlarmPendingIntent(context));
+}
+
+@NonNull private PendingIntent getAlarmPendingIntent(@NonNull Context 
context) {
+Intent intent = new Intent(context, 
NotificationPollBroadcastReceiver.class);
+intent.setAction(ACTION_POLL);
+return PendingIntent.getBroadcast(context, 0, intent, 
PendingIntent.FLAG_UPDATE_CURRENT);
 }
 
 private void pollNotifications(@NonNull final Context context) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e0f6b0bb3813763133f891b9475abb232dee62a
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wiki

[MediaWiki-commits] [Gerrit] mediawiki...RelatedArticles[master]: Hygiene: Instead of non-testable class_exists use ExtensionR...

2017-01-30 Thread Pmiazga (Code Review)
Pmiazga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335168 )

Change subject: Hygiene: Instead of non-testable class_exists use 
ExtensionRegistry
..

Hygiene: Instead of non-testable class_exists use ExtensionRegistry

Changes:
 - use ExtensionRegistry to check Disambiguator extension existence

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


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

diff --git a/includes/FooterHooks.php b/includes/FooterHooks.php
index 0ba1115..eed9633 100644
--- a/includes/FooterHooks.php
+++ b/includes/FooterHooks.php
@@ -44,7 +44,7 @@
 * @return boolean
 */
private static function isDisambiguationPage( Title $title ) {
-   return class_exists( 'DisambiguatorHooks' ) &&
+   return \ExtensionRegistry::getInstance()->isLoaded( 
'Disambiguator' ) &&
DisambiguatorHooks::isDisambiguationPage( $title );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb1fa899fe3b07074ef5c69911d0b7a4e09336ae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RelatedArticles
Gerrit-Branch: master
Gerrit-Owner: Pmiazga 

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


[MediaWiki-commits] [Gerrit] mediawiki...RelatedArticles[master]: Hygiene: Don't use deprecated ConfigFactory::getDefaultInsta...

2017-01-30 Thread Pmiazga (Code Review)
Pmiazga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335167 )

Change subject: Hygiene: Don't use deprecated 
ConfigFactory::getDefaultInstance()
..

Hygiene: Don't use deprecated ConfigFactory::getDefaultInstance()

Changes:
 - use MediaWikiServices::getConfigFactory() instead of depreacted func

Change-Id: Id983f3cc57a4d1d23ef8dd0a52e78320dd51e9ca
---
M includes/FooterHooks.php
M includes/Hooks.php
M includes/SidebarHooks.php
3 files changed, 15 insertions(+), 11 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RelatedArticles 
refs/changes/67/335167/1

diff --git a/includes/FooterHooks.php b/includes/FooterHooks.php
index 0ba1115..fc18da9 100644
--- a/includes/FooterHooks.php
+++ b/includes/FooterHooks.php
@@ -3,10 +3,10 @@
 namespace RelatedArticles;
 
 use BetaFeatures;
+use MediaWiki\MediaWikiServices;
 use OutputPage;
 use ResourceLoader;
 use Skin;
-use ConfigFactory;
 use User;
 use DisambiguatorHooks;
 use Title;
@@ -24,7 +24,8 @@
 * @return boolean Always true
 */
public static function onMakeGlobalVariablesScript( &$vars, OutputPage 
$out ) {
-   $config = ConfigFactory::getDefaultInstance()->makeConfig( 
'RelatedArticles' );
+   $config = MediaWikiServices::getInstance()->getConfigFactory()
+   ->makeConfig( 'RelatedArticles' );
 
$vars['wgRelatedArticles'] = $out->getProperty( 
'RelatedArticles' );
 
@@ -76,7 +77,8 @@
 * @return bool
 */
private static function isReadMoreAllowedOnSkin( User $user, Skin $skin 
) {
-   $config = ConfigFactory::getDefaultInstance()->makeConfig( 
'RelatedArticles' );
+   $config = MediaWikiServices::getInstance()->getConfigFactory()
+   ->makeConfig( 'RelatedArticles' );
$blacklistedSkins = $config->get( 
'RelatedArticlesFooterBlacklistedSkins' );
$skinName = $skin->getSkinName();
$isBlacklistedSkin = in_array( $skinName, $blacklistedSkins );
@@ -115,7 +117,8 @@
 * @return boolean Always true
 */
public static function onBeforePageDisplay( OutputPage $out, Skin $skin 
) {
-   $config = ConfigFactory::getDefaultInstance()->makeConfig( 
'RelatedArticles' );
+   $config = MediaWikiServices::getInstance()->getConfigFactory()
+   ->makeConfig( 'RelatedArticles' );
$showReadMore = $config->get( 'RelatedArticlesShowInFooter' );
 
$title = $out->getContext()->getTitle();
@@ -165,7 +168,8 @@
 * @return boolean
 */
public static function onResourceLoaderGetConfigVars( &$vars ) {
-   $config = ConfigFactory::getDefaultInstance()->makeConfig( 
'RelatedArticles' );
+   $config = MediaWikiServices::getInstance()->getConfigFactory()
+   ->makeConfig( 'RelatedArticles' );
$vars['wgRelatedArticlesLoggingSamplingRate'] =
$config->get( 'RelatedArticlesLoggingSamplingRate' );
$vars['RelatedArticlesEnabledSamplingRate']
@@ -240,7 +244,8 @@
 * @return bool
 */
public static function onGetBetaFeaturePreferences( User $user, array 
&$preferences ) {
-   $config = ConfigFactory::getDefaultInstance()->makeConfig( 
'RelatedArticles' );
+   $config =   $config = 
MediaWikiServices::getInstance()->getConfigFactory()
+   ->makeConfig( 'RelatedArticles' );
$showReadMore = $config->get( 'RelatedArticlesShowInFooter' );
 
if ( $showReadMore ) {
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 6329e0f..a785ae6 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -81,7 +81,7 @@
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules
 *
 * @param array $modules
-* @param ResourceLoader $rl
+* @param \ResourceLoader $rl
 * @return bool
 */
public static function onResourceLoaderTestModules( &$modules, &$rl ) {
diff --git a/includes/SidebarHooks.php b/includes/SidebarHooks.php
index 2cd3417..ec7b622 100644
--- a/includes/SidebarHooks.php
+++ b/includes/SidebarHooks.php
@@ -2,10 +2,8 @@
 
 namespace RelatedArticles;
 
-use ConfigFactory;
+use MediaWiki\MediaWikiServices;
 use Title;
-use SkinTemplate;
-use BaseTemplate;
 use Skin;
 use Html;
 use User;
@@ -106,7 +104,8 @@
 * @throws \ConfigException
 */
private static function isInSidebar( $relatedPages, User $user ) {
-   $config = ConfigFactory::getDefaultInstance()->makeConfig( 
'RelatedArticles' );
+   $config = MediaWikiServices::getInstance()->getConfigFactory()
+   ->makeConfig( 'RelatedArticles' );
 
if ( !$r

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Fix dead 'Continue' button on paypal EC form

2017-01-30 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335166 )

Change subject: Fix dead 'Continue' button on paypal EC form
..

Fix dead 'Continue' button on paypal EC form

We were just missing the line to load the generic form code.

Bug: T156692
Change-Id: Ibf0521a4b9209cbd988d2ca80c668df0c83b423d
---
M paypal_gateway/express_checkout/paypal_express_gateway.body.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/paypal_gateway/express_checkout/paypal_express_gateway.body.php 
b/paypal_gateway/express_checkout/paypal_express_gateway.body.php
index 55648f4..2d7e4ce 100644
--- a/paypal_gateway/express_checkout/paypal_express_gateway.body.php
+++ b/paypal_gateway/express_checkout/paypal_express_gateway.body.php
@@ -8,6 +8,7 @@
 */
protected function handleRequest() {
$this->getOutput()->allowClickjacking();
+   $this->getOutput()->addModules( 'ext.donationInterface.forms' );
 
$this->handleDonationRequest();
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[branding]: SVG logo should not blur

2017-01-30 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335165 )

Change subject: SVG logo should not blur
..

SVG logo should not blur

A known workaround for a webkit bug with SVGS
(see http://bugs.webkit.org/show_bug.cgi?id=93471)

Bug: T152458
Change-Id: I01cb97d270bfe9b9a82431c9d12f1c53fcaf25e9
---
M resources/skins.minerva.base.styles/ui.less
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/65/335165/1

diff --git a/resources/skins.minerva.base.styles/ui.less 
b/resources/skins.minerva.base.styles/ui.less
index 06d6c06..bb7e682 100644
--- a/resources/skins.minerva.base.styles/ui.less
+++ b/resources/skins.minerva.base.styles/ui.less
@@ -133,6 +133,8 @@
 
img {
vertical-align: middle;
+   // avoid blurriness in iOS (see 
https://phabricator.wikimedia.org/T152458)
+   -webkit-transform: translateZ(0);
}
 
> * {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I01cb97d270bfe9b9a82431c9d12f1c53fcaf25e9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: branding
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Scap: Disable endpoints check for the time being

2017-01-30 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335116 )

Change subject: Scap: Disable endpoints check for the time being
..


Scap: Disable endpoints check for the time being

When the service starts up, it replays events from the last period
(currently 18h). There are enough events to cause a time-out for the
checker script, so disable them until we find a solution to this.

Change-Id: I91af23662c0025c26df166a213ee8d4543ca9c1c
---
M scap/checks.yaml
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/scap/checks.yaml b/scap/checks.yaml
index e11dbe1..cc22bf3 100644
--- a/scap/checks.yaml
+++ b/scap/checks.yaml
@@ -1,8 +1,8 @@
 checks:
-  endpoints:
-type: nrpe
-stage: restart_service
-command: check_endpoints_trendingedits
+#  endpoints:
+#type: nrpe
+#stage: restart_service
+#command: check_endpoints_trendingedits
   depool:
 type: command
 stage: promote

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I91af23662c0025c26df166a213ee8d4543ca9c1c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: BearND 
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] mediawiki...deploy[master]: Config: Bump the heartbeat time-out to 20s

2017-01-30 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335113 )

Change subject: Config: Bump the heartbeat time-out to 20s
..


Config: Bump the heartbeat time-out to 20s

Change-Id: I8ba6efb3541d6eb21f8fc5c173ac19043537d4ae
---
M scap/templates/config.yaml.j2
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index c3a4efe..ebc9e18 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -9,7 +9,7 @@
 
 # The maximum interval in ms that can pass between two beat messages
 # sent by each worker to the master before it is killed
-worker_heartbeat_timeout: 15000
+worker_heartbeat_timeout: 2
 
 # Logger info
 logging:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8ba6efb3541d6eb21f8fc5c173ac19043537d4ae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: BearND 
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] mediawiki...deploy[master]: Config: Disable sampled logging

2017-01-30 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335110 )

Change subject: Config: Disable sampled logging
..


Config: Disable sampled logging

We now know the service is processing the events, so this is no longer
needed.

Change-Id: Ie17d26b435c2170dbab1ad116a5d99ddd3e9dd96
---
M scap/templates/config.yaml.j2
1 file changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 5c420a2..c3a4efe 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -15,9 +15,6 @@
 logging:
   level: warn
   name: trendingedits
-  sampled_levels:
-# log ~1 event per minute @10 events/s
-trace/event: 0.002
   streams:
 - host: <%= logstash_host %>
   port: <%= logstash_port %>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie17d26b435c2170dbab1ad116a5d99ddd3e9dd96
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: BearND 
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] mediawiki...CirrusSearch[master]: Don't require sampleRate in UserTesting config

2017-01-30 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335163 )

Change subject: Don't require sampleRate in UserTesting config
..

Don't require sampleRate in UserTesting config

It's quite rare these days that we actually use sample rate. Adjust so
it can be an optional parameter.

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


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

diff --git a/includes/UserTesting.php b/includes/UserTesting.php
index c59860b..d58ca7d 100644
--- a/includes/UserTesting.php
+++ b/includes/UserTesting.php
@@ -114,7 +114,7 @@
break;
}
}
-   } elseif ( $testConfig['sampleRate'] > 0 ) {
+   } elseif ( isset( $testConfig['sampleRate'] ) && 
$testConfig['sampleRate'] > 0 ) {
$bucketProbability = call_user_func( $callback, 
$testName, $testConfig['sampleRate'] );
if ( $bucketProbability > 0 ) {
$this->activateTest( $testName, 
$bucketProbability, $testConfig );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Highlight interwiki search results

2017-01-30 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335164 )

Change subject: Highlight interwiki search results
..

Highlight interwiki search results

The AB test requires interwiki search results to be highlighted. While
it saves some amount of processing, the extra code complexity of
supporting both highlighted and non-highlighted interwiki doesn't seem
worthwhile. As such change to using FullTextResultsType for all
interwiki searches.

Change-Id: I24b5329d8b213e59143e3a7cacd0a752082d4755
---
M autoload.php
M includes/InterwikiSearcher.php
M includes/Search/ResultsType.php
3 files changed, 15 insertions(+), 47 deletions(-)


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

diff --git a/autoload.php b/autoload.php
index 73ecdd4..4680a03 100644
--- a/autoload.php
+++ b/autoload.php
@@ -156,7 +156,6 @@
'CirrusSearch\\Search\\IdResultsType' => __DIR__ . 
'/includes/Search/ResultsType.php',
'CirrusSearch\\Search\\IncomingLinksFunctionScoreBuilder' => __DIR__ . 
'/includes/Search/RescoreBuilders.php',
'CirrusSearch\\Search\\IntegerIndexField' => __DIR__ . 
'/includes/Search/IntegerIndexField.php',
-   'CirrusSearch\\Search\\InterwikiResultsType' => __DIR__ . 
'/includes/Search/ResultsType.php',
'CirrusSearch\\Search\\InvalidRescoreProfileException' => __DIR__ . 
'/includes/Search/RescoreBuilders.php',
'CirrusSearch\\Search\\KeywordIndexField' => __DIR__ . 
'/includes/Search/KeywordIndexField.php',
'CirrusSearch\\Search\\LangWeightFunctionScoreBuilder' => __DIR__ . 
'/includes/Search/RescoreBuilders.php',
diff --git a/includes/InterwikiSearcher.php b/includes/InterwikiSearcher.php
index 2e6593a..b2ecf36 100644
--- a/includes/InterwikiSearcher.php
+++ b/includes/InterwikiSearcher.php
@@ -2,7 +2,7 @@
 
 namespace CirrusSearch;
 
-use CirrusSearch\Search\InterwikiResultsType;
+use CirrusSearch\Search\FullTextResultsType;
 use CirrusSearch\Search\ResultSet;
 use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\MediaWikiServices;
@@ -34,6 +34,11 @@
const MAX_COMPLEXITY = 10;
 
/**
+* @var int Highlighting bitfield
+*/
+   private $highlightingConfig;
+
+   /**
 * Constructor
 * @param Connection $connection
 * @param SearchConfig $config
@@ -41,7 +46,13 @@
 * @param User|null $user
 * @param string $index Base name for index to search from, defaults to 
$wgCirrusSearchIndexBaseName
 */
-   public function __construct( Connection $connection, SearchConfig 
$config, array $namespaces = null, User $user = null ) {
+   public function __construct(
+   Connection $connection,
+   SearchConfig $config,
+   array $namespaces = null,
+   User $user = null,
+   $highlightingConfig = FullTextResultsType::HIGHLIGHT_NONE
+   ) {
// Only allow core namespaces. We can't be sure any others exist
if ( $namespaces !== null ) {
$namespaces = array_filter( $namespaces, function( 
$namespace ) {
@@ -50,6 +61,7 @@
}
$maxResults = $config->get( 
'CirrusSearchNumCrossProjectSearchResults' );
parent::__construct( $connection, 0, $maxResults, $config, 
$namespaces, $user );
+   $this->highlightingConfig = $highlightingConfig;
}
 
/**
@@ -97,7 +109,7 @@
// TODO: remove when getWikiCode is removed.
// In theory we should be able to reuse the same
// Results type for all searches
-   $resultsTypes[$interwiki] = new InterwikiResultsType( 
$this->config->newInterwikiConfig( $index, false ) );
+   $resultsTypes[$interwiki] = new FullTextResultsType( 
$this->config->newInterwikiConfig( $index, false ), $this->highlightingConfig );
$this->setResultsType( $resultsTypes[$interwiki] );
$this->indexBaseName = $index;
$this->searchContext = clone $context;
diff --git a/includes/Search/ResultsType.php b/includes/Search/ResultsType.php
index e6a87e9..e1485c8 100644
--- a/includes/Search/ResultsType.php
+++ b/includes/Search/ResultsType.php
@@ -597,46 +597,3 @@
return [];
}
 }
-
-/**
- * This class does exactly the same as TitleResultsType
- * but returns a ResultSet instead of an array of titles
- */
-class InterwikiResultsType extends BaseResultsType {
-   /**
-   * @param SearchContext $context
-   * @param \Elastica\ResultSet $result
-   * @return ResultSet
-   */
-   public function transformElasticsearchResult( SearchContext $context, 
\Elastica\ResultSet $result ) {
-   return new ResultSet(
-   $co

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Fix paypal EC transformer list

2017-01-30 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335162 )

Change subject: Fix paypal EC transformer list
..

Fix paypal EC transformer list

Need to validate amount, don't need to double-stage date.

Bug: T134445
Change-Id: I34c8b01dc02f59ac6d5236e034d35c08409bae54
---
M paypal_gateway/express_checkout/config/transformers.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/paypal_gateway/express_checkout/config/transformers.yaml 
b/paypal_gateway/express_checkout/config/transformers.yaml
index e55037c..ab18d8e 100644
--- a/paypal_gateway/express_checkout/config/transformers.yaml
+++ b/paypal_gateway/express_checkout/config/transformers.yaml
@@ -1,4 +1,4 @@
+- Amount
 - IsoDate
 - DonorLocale
 - PaypalExpressReturnUrl
-- IsoDate

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Inject SetQualifier dependencies

2017-01-30 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335161 )

Change subject: Inject SetQualifier dependencies
..

Inject SetQualifier dependencies

Bug: T156688
Change-Id: Icb9a958b155ef4157606cab1f48f5bfbbda1c0da
---
M repo/Wikibase.php
M repo/includes/Api/SetQualifier.php
2 files changed, 49 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/61/335161/1

diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index ec6618c..3cacc44 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -236,7 +236,32 @@
$wgAPIModules['wbremovereferences'] = 
Wikibase\Repo\Api\RemoveReferences::class;
$wgAPIModules['wbsetclaim'] = Wikibase\Repo\Api\SetClaim::class;
$wgAPIModules['wbremovequalifiers'] = 
Wikibase\Repo\Api\RemoveQualifiers::class;
-   $wgAPIModules['wbsetqualifier'] = Wikibase\Repo\Api\SetQualifier::class;
+   $wgAPIModules['wbsetqualifier'] = [
+   'class' => Wikibase\Repo\Api\SetQualifier::class,
+   'factory' => function( ApiMain $mainModule, $moduleName ) {
+   $wikibaseRepo = 
\Wikibase\Repo\WikibaseRepo::getDefaultInstance();
+   $apiHelperFactory = $wikibaseRepo->getApiHelperFactory( 
$mainModule->getContext() );
+   $changeOpFactoryProvider = 
$wikibaseRepo->getChangeOpFactoryProvider();
+
+   $modificationHelper = new 
\Wikibase\Repo\Api\StatementModificationHelper(
+   $wikibaseRepo->getSnakFactory(),
+   $wikibaseRepo->getEntityIdParser(),
+   $wikibaseRepo->getStatementGuidValidator(),
+   $apiHelperFactory->getErrorReporter( 
$mainModule )
+   );
+
+   return new Wikibase\Repo\Api\SetQualifier(
+   $mainModule,
+   $moduleName,
+   $apiHelperFactory->getErrorReporter( 
$mainModule ),
+   
$changeOpFactoryProvider->getStatementChangeOpFactory(),
+   $modificationHelper,
+   $wikibaseRepo->getStatementGuidParser(),
+   $apiHelperFactory->getResultBuilder( 
$mainModule ),
+   $apiHelperFactory->getEntitySavingHelper( 
$mainModule )
+   );
+   }
+   ];
$wgAPIModules['wbmergeitems'] = Wikibase\Repo\Api\MergeItems::class;
$wgAPIModules['wbformatvalue'] = [
'class' => Wikibase\Repo\Api\FormatSnakValue::class,
diff --git a/repo/includes/Api/SetQualifier.php 
b/repo/includes/Api/SetQualifier.php
index 975c1d5..1a4eddc 100644
--- a/repo/includes/Api/SetQualifier.php
+++ b/repo/includes/Api/SetQualifier.php
@@ -54,28 +54,32 @@
/**
 * @param ApiMain $mainModule
 * @param string $moduleName
-* @param string $modulePrefix
+* @param ApiErrorReporter $errorReporter
+* @param StatementChangeOpFactory $statementChangeOpFactory
+* @param StatementModificationHelper $modificationHelper
+* @param StatementGuidParser $guidParser
+* @param ResultBuilder $resultBuilder
+* @param EntitySavingHelper $entitySavingHelper
 */
-   public function __construct( ApiMain $mainModule, $moduleName, 
$modulePrefix = '' ) {
-   parent::__construct( $mainModule, $moduleName, $modulePrefix );
+   public function __construct(
+   ApiMain $mainModule,
+   $moduleName,
+   ApiErrorReporter $errorReporter,
+   StatementChangeOpFactory $statementChangeOpFactory,
+   StatementModificationHelper $modificationHelper,
+   StatementGuidParser $guidParser,
+   ResultBuilder $resultBuilder,
+   EntitySavingHelper $entitySavingHelper
+   ) {
+   parent::__construct( $mainModule, $moduleName );
 
-   $wikibaseRepo = WikibaseRepo::getDefaultInstance();
-   $apiHelperFactory = $wikibaseRepo->getApiHelperFactory( 
$this->getContext() );
-   $changeOpFactoryProvider = 
$wikibaseRepo->getChangeOpFactoryProvider();
+   $this->errorReporter = $errorReporter;
+   $this->statementChangeOpFactory = $statementChangeOpFactory;
 
-   $this->errorReporter = $apiHelperFactory->getErrorReporter( 
$this );
-   $this->statementChangeOpFactory = 
$changeOpFactoryProvider->getStatementChangeOpFactory();
-
-   $this->modificationHelper = new StatementModificationHelper(
-   $wikibaseRepo->getSnakFactory(),
-   $wikibaseRepo->getEntityIdParser(),
-   $wikibaseRepo->ge

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Add a query parameter to force users into search satisfaction

2017-01-30 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335160 )

Change subject: Add a query parameter to force users into search satisfaction
..

Add a query parameter to force users into search satisfaction

When testing, along with demoing, changes to the satisfaction schema
prior to deployment we often need some way to put users into the test.
It can be done with some hackery in the js console, but this makes
things much more explicit. Ideally we would also not ship events, to
allow this to be used in production as well, but we need to ship the
events so the debug handling in EventLogging (eventlogging-display-web)
can generate notifications showing logging as it happens.

Change-Id: I76b981d65ae819a03a6bad5d8980153757736cec
---
M modules/ext.wikimediaEvents.searchSatisfaction.js
1 file changed, 45 insertions(+), 28 deletions(-)


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

diff --git a/modules/ext.wikimediaEvents.searchSatisfaction.js 
b/modules/ext.wikimediaEvents.searchSatisfaction.js
index 92a6d9c..ae4b7b2 100644
--- a/modules/ext.wikimediaEvents.searchSatisfaction.js
+++ b/modules/ext.wikimediaEvents.searchSatisfaction.js
@@ -113,17 +113,19 @@
function initialize( session ) {
 
var sessionId = session.get( 'sessionId' ),
+   // Allow for a query parameter that puts a user 
into the test, optionally with an explicit bucket chosen
+   forceIntoTest = 
uri.query.forceSearchSatisfaction !== undefined,
+   forceIntoBucket = ( forceIntoTest && 
uri.query.forceSearchSatisfaction !== null ) ? 
uri.query.forceSearchSatisfaction : false,
+   // List of valid sub-test buckets
+   validBuckets = [
+   'bm25:control',
+   'bm25:inclinks_pv'
+   ],
+   // Sampling to use when choosing which users 
should participate in test
sampleSize = ( function () {
var dbName = mw.config.get( 'wgDBname' 
),
-   subTests = {
-   thwiki: {
-   // 1:5 overall 
sessions into test
-   test: 5,
-   // 1:39 of test 
sessions reserved for dashboard
-   // 38:39 
sessions split evenly between test buckets
-   subTest: 39
-   }
-   };
+   // Not currently used, but may 
be used in the future
+   subTests = {};
 
if ( subTests[ dbName ] ) {
return subTests[ dbName ];
@@ -167,28 +169,43 @@
return buckets[ Math.floor( parsed / 
step ) ];
};
 
-   if ( sessionId === 'rejected' ) {
-   // User was previously rejected
-   return;
-   }
-   // If a sessionId exists the user was previously 
accepted into the test
-   if ( !sessionId ) {
-   if ( !oneIn( sampleSize.test ) ) {
-   // user was not chosen in a sampling of 
search results
-   session.set( 'sessionId', 'rejected' );
+   if ( forceIntoTest ) {
+   if ( sessionId === 'rejected'  || !sessionId ) {
+   // No valid session id set, create one
+   session.set( 'sessionId', randomToken() 
);
+   }
+   if ( forceIntoBucket !== false && $.inArray( 
forceIntoBucket, validBuckets ) === -1 ) {
+   // Bucket was chosen but it's not a 
currently valid bucket
+   forceIntoBucket = false;
+   }
+   if ( forceIntoBucket !== false ) {
+   // Query string requested a specific 
bucket
+   session.set( 'subTest', forceIntoBucket 
);
+  

[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki...

2017-01-30 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335159 )

Change subject: Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment
..

Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment

7331a8a Update drupal to 7.5.2
c6dceac Add missing module message fixer module.

Bug: T143268
Change-Id: I544d4fd237c393a96be3714e81075b9216bafffa
---
0 files changed, 0 insertions(+), 0 deletions(-)


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


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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update drupal to 7.5.2

2017-01-30 Thread Eileen (Code Review)
Eileen has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335154 )

Change subject: Update drupal to 7.5.2
..


Update drupal to 7.5.2

3109716 Re-apply WMF patches
04702e6 Upgrade to Drupal 7.52 upstream

Change-Id: I38cd9be4af28c1a5ab3c0b9d05433b5b90f2dab4
---
M drupal
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/drupal b/drupal
index b4567f5..3109716 16
--- a/drupal
+++ b/drupal
@@ -1 +1 @@
-Subproject commit b4567f5222103fef9a5a17f7dbde91e635b3a792
+Subproject commit 3109716d59c7c21e7d9c40519f34c72d5b0fb529

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

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

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


[MediaWiki-commits] [Gerrit] analytics/refinery[master]: Script to drop mediawiki log partitions in HDFS

2017-01-30 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335158 )

Change subject: Script to drop mediawiki log partitions in HDFS
..

Script to drop mediawiki log partitions in HDFS

Log data in the mediawiki -> kafka -> camus -> hdfs pipeline has
various PII in it that needs to be deleted after no more than 90
days. This script adapts from the existing scripts to support the
need to drop old data.

Change-Id: Ia6811a7447ff63c2b0b78ed4a90d801e700a9379
---
A bin/refinery-drop-mediawiki-partitions
1 file changed, 116 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/58/335158/1

diff --git a/bin/refinery-drop-mediawiki-partitions 
b/bin/refinery-drop-mediawiki-partitions
new file mode 100755
index 000..1a97016
--- /dev/null
+++ b/bin/refinery-drop-mediawiki-partitions
@@ -0,0 +1,116 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Note: You should make sure to put refinery/python on your PYTHONPATH.
+#   export PYTHONPATH=$PYTHONPATH:/path/to/refinery/python
+
+"""
+Automatically deletes the hourly time bucketed mediawiki logging
+directories from HDFS.
+
+Usage: refinery-drop-mediawiki-partitions [options]
+
+Options:
+-h --help   Show this help message and exit.
+-d --older-than-days= Drop data older than this number of 
days.  [default: 60]
+-l --location=Base HDFS location path of the 
mediawiki log data.
+-v --verboseTurn on verbose debug logging.
+-n --dry-runDon't actually delete any data. Print 
the HDFS directory paths
+that will be deleted
+"""
+__author__ = 'Madhumitha Viswanathan '
+
+import datetime
+from   docopt   import docopt
+import logging
+import re
+import os
+import sys
+from refinery.util import HiveUtils, HdfsUtils
+
+
+if __name__ == '__main__':
+# parse arguments
+arguments = docopt(__doc__)
+# pp(arguments)
+days= int(arguments['--older-than-days'])
+location= arguments['--location']
+verbose = arguments['--verbose']
+dry_run = arguments['--dry-run']
+
+log_level = logging.INFO
+if verbose:
+log_level = logging.DEBUG
+
+logging.basicConfig(level=log_level,
+format='%(asctime)s %(levelname)-6s %(message)s',
+datefmt='%Y-%m-%dT%H:%M:%S')
+
+
+if not HdfsUtils.validate_path(location):
+logging.error('Location \'{0}\' is not a valid HDFS path.  Path must 
start with \'/\' or \'hdfs://\'.  Aborting.'
+.format(location))
+sys.exit(1)
+
+
+# This glob will be used to list out all partition paths in HDFS.
+partition_glob = os.path.join(location, 'hourly', '*', '*', '*', '*')
+
+# This regex tells HiveUtils partition_datetime_from_path
+# how to extract just the date portion from a partition path.
+# The first match group will be passed to datetime.datetime.strptime
+# using one of the below date_formats.
+date_regex = re.compile(r'.*/hourly/(.+)$')
+
+# This regex will be used to extract a datetime object from the string
+# matched by date_regex in HiveUtils partition_datetime_from_path
+date_format = '%Y/%m/%d/%H'
+
+# Delete partitions older than this.
+old_partition_datetime_threshold = datetime.datetime.now() - 
datetime.timedelta(days=days)
+
+partition_paths_to_delete = []
+
+# Loop through all the partition directory paths for this table
+# and check if any of them are old enough for deletion.
+for partition_path in HdfsUtils.ls(partition_glob, include_children=False):
+try:
+partition_datetime = HiveUtils.partition_datetime_from_path(
+partition_path,
+date_regex,
+date_format
+)
+except ValueError as e:
+logging.error(
+'HiveUtils.partition_datetime_from_path could not parse date 
found in {0} using pattern {1}. Skipping. ({2})'
+.format(partition_path, date_regex.pattern, e)
+)
+continue
+
+if partition_datetime and partition_datetime < 
old_partition_datetime_threshold:
+partition_paths_to_delete.append(partition_path)
+
+
+   

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Display description editing errors as user-friendly language...

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335136 )

Change subject: Display description editing errors as user-friendly language in 
a snackbar
..


Display description editing errors as user-friendly language in a snackbar

Use FeedbackUtil.showError, which achieves both goals at once:

1) Shows the message in a snackbar, and

2) Leverages ThrowableUtil.getAppError to return a user-friendly
   message for the error type.

Bug: T152010
Change-Id: Ia231dea2c10d41fd5e8a637c9e583425742352f0
---
M app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java 
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
index 57f66fb..85f96fa 100644
--- a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
+++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
@@ -25,6 +25,7 @@
 import org.wikipedia.login.User;
 import org.wikipedia.page.PageTitle;
 import org.wikipedia.settings.Prefs;
+import org.wikipedia.util.FeedbackUtil;
 import org.wikipedia.util.log.L;
 
 import java.util.Date;
@@ -252,7 +253,8 @@
 private void editFailed(@NonNull Throwable caught) {
 if (editView != null) {
 editView.setSaveState(false);
-editView.setError(caught.getMessage());
+FeedbackUtil.showError(getActivity(), caught);
+L.e(caught);
 }
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: add Page @NonNull / @Nullable annotations

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335099 )

Change subject: Hygiene: add Page @NonNull / @Nullable annotations
..


Hygiene: add Page @NonNull / @Nullable annotations

Add missing @NonNull / @Nullable annotations as inferred by existing
constructor annotations and final. Remove redundant null check in
DescriptionEditClient

Change-Id: Ia657ef88f78f653229f61a6d929b5cc10ff54dbf
---
M app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java
M app/src/main/java/org/wikipedia/page/Page.java
2 files changed, 17 insertions(+), 23 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java 
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java
index 2a86efb..51e8344 100644
--- a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java
+++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java
@@ -42,8 +42,7 @@
 
 public static boolean isEditAllowed(@NonNull Page page) {
 PageProperties props = page.getPageProperties();
-return props != null
-&& props.canEdit()
+return props.canEdit()
 && !TextUtils.isEmpty(props.getWikiBaseItem())
 && 
ENABLED_LANGUAGES.contains(page.getTitle().getWikiSite().languageCode());
 }
diff --git a/app/src/main/java/org/wikipedia/page/Page.java 
b/app/src/main/java/org/wikipedia/page/Page.java
index 8b6b3fd..3c93637 100755
--- a/app/src/main/java/org/wikipedia/page/Page.java
+++ b/app/src/main/java/org/wikipedia/page/Page.java
@@ -17,14 +17,12 @@
  * Represents a particular page along with its full contents.
  */
 public class Page {
-@VisibleForTesting
-static final int MEDIAWIKI_ORIGIN = 0;
-@VisibleForTesting
-static final int RESTBASE_ORIGIN = 1;
+@VisibleForTesting static final int MEDIAWIKI_ORIGIN = 0;
+@VisibleForTesting static final int RESTBASE_ORIGIN = 1;
 
-private final PageTitle title;
-private final List sections;
-private final PageProperties pageProperties;
+@NonNull private final PageTitle title;
+@NonNull private final List sections;
+@NonNull private final PageProperties pageProperties;
 
 /**
  * The media gallery collection associated with this page.
@@ -32,7 +30,7 @@
  * the page cache because the page itself is cached. Subsequent instances 
of the Gallery
  * activity will then be able to retrieve the page's gallery collection 
from cache.
  */
-private GalleryCollection galleryCollection;
+@Nullable private GalleryCollection galleryCollection;
 
 /**
  * An indicator what payload version the page content was originally 
retrieved from.
@@ -42,10 +40,11 @@
  */
 private int version = MEDIAWIKI_ORIGIN;
 
-public GalleryCollection getGalleryCollection() {
+@Nullable public GalleryCollection getGalleryCollection() {
 return galleryCollection;
 }
-public void setGalleryCollection(GalleryCollection collection) {
+
+public void setGalleryCollection(@Nullable GalleryCollection collection) {
 galleryCollection = collection;
 }
 
@@ -77,11 +76,11 @@
 return version == RESTBASE_ORIGIN;
 }
 
-public PageTitle getTitle() {
+@NonNull public PageTitle getTitle() {
 return title;
 }
 
-public List getSections() {
+@NonNull public List getSections() {
 return sections;
 }
 
@@ -89,12 +88,11 @@
 return pageProperties.getDisplayTitle();
 }
 
-@Nullable
-public String getTitlePronunciationUrl() {
+@Nullable public String getTitlePronunciationUrl() {
 return getPageProperties().getTitlePronunciationUrl();
 }
 
-public PageProperties getPageProperties() {
+@NonNull public PageProperties getPageProperties() {
 return pageProperties;
 }
 
@@ -102,8 +100,7 @@
 return getTitle().namespace() == Namespace.MAIN;
 }
 
-@Override
-public boolean equals(Object o) {
+@Override public boolean equals(Object o) {
 if (!(o instanceof Page)) {
 return false;
 }
@@ -114,16 +111,14 @@
 && pageProperties.equals(other.pageProperties);
 }
 
-@Override
-public int hashCode() {
+@Override public int hashCode() {
 int result = title.hashCode();
 result = 31 * result + sections.hashCode();
 result = 31 * result + pageProperties.hashCode();
 return result;
 }
 
-@Override
-public String toString() {
+@Override public String toString() {
 return "Page{"
 + "title=" + title
 + ", sections=" + sections

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

Gerri

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update drupal to 7.5.2

2017-01-30 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335154 )

Change subject: Update drupal to 7.5.2
..

Update drupal to 7.5.2

3109716 Re-apply WMF patches
04702e6 Upgrade to Drupal 7.52 upstream

Change-Id: I38cd9be4af28c1a5ab3c0b9d05433b5b90f2dab4
---
M drupal
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/54/335154/1

diff --git a/drupal b/drupal
index b4567f5..3109716 16
--- a/drupal
+++ b/drupal
@@ -1 +1 @@
-Subproject commit b4567f5222103fef9a5a17f7dbde91e635b3a792
+Subproject commit 3109716d59c7c21e7d9c40519f34c72d5b0fb529

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

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

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


[MediaWiki-commits] [Gerrit] eventlogging[master]: Changes UA string to JSON map

2017-01-30 Thread Nuria (Code Review)
Nuria has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335145 )

Change subject: Changes UA string to JSON map
..

Changes UA string to JSON map

Uses ua_parser to generate a JSON object with properties obtained from
the user agent string. The capsule schema remains unchanged.

Custom code parses the WMF app version

Bug: T153207
Change-Id: I165214a8b12ff573115381ff1d2d0305e8310e93
---
M eventlogging/parse.py
M eventlogging/utils.py
M requirements.txt
M tests/test_parser.py
4 files changed, 62 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/eventlogging 
refs/changes/45/335145/1

diff --git a/eventlogging/parse.py b/eventlogging/parse.py
index 98bf758..982cfa8 100644
--- a/eventlogging/parse.py
+++ b/eventlogging/parse.py
@@ -42,6 +42,7 @@
 
 from .compat import json, unquote_plus, uuid5
 from .event import Event
+from .utils import parse_ua
 
 __all__ = (
 'LogParser', 'ncsa_to_unix',
@@ -155,6 +156,9 @@
 event = {k: f(match.group(k)) for f, k in caster_key_pairs}
 event.update(event.pop('capsule'))
 event['uuid'] = capsule_uuid(event)
+if ('userAgent' in event) and event['userAgent']:
+parsed_ua = parse_ua(event['userAgent'])
+event['userAgent'] = parsed_ua
 return Event(event)
 
 def __repr__(self):
diff --git a/eventlogging/utils.py b/eventlogging/utils.py
index a0cfa62..55ab8e5 100644
--- a/eventlogging/utils.py
+++ b/eventlogging/utils.py
@@ -12,6 +12,7 @@
 import copy
 import datetime
 import dateutil.parser
+import json
 import logging
 import re
 import os
@@ -20,6 +21,7 @@
 import threading
 import traceback
 import uuid
+from ua_parser import user_agent_parser
 
 from .compat import (
 items, monotonic_clock, urisplit, urlencode, parse_qsl,
@@ -291,3 +293,46 @@
 # Set module logging level to INFO, DEBUG is too noisy.
 logging.getLogger("kafka").setLevel(logging.INFO)
 logging.getLogger("kazoo").setLevel(logging.INFO)
+
+
+def parse_ua(userAgent):
+"""
+Returns a json string containing the parsed User Agent data
+from a request's UA string. Uses the following format:
+{
+"device_family":"Other",
+"browser_major":"11",
+"os_family":"Windows",
+"os_major":"-",
+"browser_family":"IE",
+"os_minor":"-",
+"wmf_app_version":"-"
+}
+
+App version in user agents is parsed as follows:
+WikipediaApp/5.3.1.1011 (iOS 10.0.2; Phone)
+"wmf_app_version":"5.3.1.1011"
+WikipediaApp/2.4.160-r-2016-10-14 (Android 4.4.2; Phone) Google Play
+"wmf_app_version":"2.4.160-r-2016-10-14"
+"""
+parsed_ua = user_agent_parser.Parse(userAgent)
+formatted_ua = {}
+formatted_ua['device_family'] = parsed_ua['device']['family']
+formatted_ua['browser_major'] = parsed_ua['user_agent']['major']
+formatted_ua['os_family'] = parsed_ua['os']['family']
+formatted_ua['os_major'] = parsed_ua['os']['major']
+formatted_ua['browser_family'] = parsed_ua['user_agent']['family']
+formatted_ua['os_minor'] = parsed_ua['os']['minor']
+# default wmf_app_version is '-'
+formatted_ua['wmf_app_version'] = '-'
+appUA = 'WikipediaApp/'
+l = 'WikipediaApp/'
+
+if appUA in userAgent:
+items = userAgent.split()
+version = items[0][l:]
+formatted_ua['wmf_app_version'] = version
+
+# escape json so it doesn't cause problems when validating
+# to string (per capsule definition)
+return json.dumps(formatted_ua)
diff --git a/requirements.txt b/requirements.txt
index 44a567b..fd3d7b3 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -11,3 +11,4 @@
 statsd>=3.0
 tornado>=4.0
 sprockets.mixins.statsd>=1.3.1
+ua_parser>=0.7.2
diff --git a/tests/test_parser.py b/tests/test_parser.py
index 8d0c117..5d64b71 100644
--- a/tests/test_parser.py
+++ b/tests/test_parser.py
@@ -10,6 +10,7 @@
 
 import calendar
 import datetime
+import json
 import unittest
 
 import eventlogging
@@ -39,7 +40,16 @@
'2%3A1%2C%22articleTitle%22%3A%22H%C3%A9ctor%20Elizondo%22%7'
'D%2C%22webHost%22%3A%22test.wikipedia.org%22%7D; cp3022.esa'
'ms.wikimedia.org 132073 2013-01-19T23:16:38 - '
-   'Mozilla/5.0')
+   'Mozilla/5.0 (X11; Linux x86_64; rv:10.0)'
+   ' Gecko/20100101 Firefox/10.0')
+ua = json.dumps({
+'os_minor': None,
+'os_major': None,
+'device_family': 'Other',
+'os_family': 'Linux',
+'browser_major': '10',
+'browser_family': 'Firefox'
+})
 parsed = {
 'uuid': '799341a01ba957c79b15dc4d2d950864',
 'recvFrom': 'cp3022.esams.wikimedia.org',
@@ -49,7 +59,7 @@
 'timestamp': 1358637398,
 'schema': 'Generic',
 'revision': 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: [WIP] Drop mediawiki logs in HDFS after 90 days

2017-01-30 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335140 )

Change subject: [WIP] Drop mediawiki logs in HDFS after 90 days
..

[WIP] Drop mediawiki logs in HDFS after 90 days

Change-Id: I5aceeb46fb5c7db0ed578b57463b276f39b4d059
---
M modules/role/manifests/analytics_cluster/refinery/data/drop.pp
1 file changed, 12 insertions(+), 1 deletion(-)


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

diff --git a/modules/role/manifests/analytics_cluster/refinery/data/drop.pp 
b/modules/role/manifests/analytics_cluster/refinery/data/drop.pp
index 5c5ff07..eba3f34 100644
--- a/modules/role/manifests/analytics_cluster/refinery/data/drop.pp
+++ b/modules/role/manifests/analytics_cluster/refinery/data/drop.pp
@@ -7,6 +7,7 @@
 
 $webrequest_log_file = 
"${role::analytics_cluster::refinery::log_dir}/drop-webrequest-partitions.log"
 $eventlogging_log_file   = 
"${role::analytics_cluster::refinery::log_dir}/drop-eventlogging-partitions.log"
+$mediawiki_log_file  = 
"${role::analytics_cluster::refinery::log_dir}/drop-mediawiki-partitions.log"
 
 # keep this many days of raw webrequest data
 $raw_retention_days = 31
@@ -34,4 +35,14 @@
 minute  => '15',
 hour=> '*/4',
 }
-}
\ No newline at end of file
+
+$mediawiki_retention_days = 90
+['CirrusSearchRequestSet', 'ApiAction'].each |log_type| do
+cron {"refinery-drop-${type}-partitions":
+command => "export 
PYTHONPATH=\${PYTHONPATH}:${role::analytics_cluster::refinery::path}/python && 
${role::analytics_cluster::refinery::path}/bin/refinery-drop-eventlogging-partitions
 -d ${mediawiki_retention_days} -l 
/wmf/data/raw/mediawiki/mediawiki_${log_type} >> ${mediawiki_log_file} 2>&1",
+user=> 'hdfs',
+minute  => '15',
+hour=> '*/4',
+}
+end
+}

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Display description editing errors as user-friendly language...

2017-01-30 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335136 )

Change subject: Display description editing errors as user-friendly language in 
a snackbar
..

Display description editing errors as user-friendly language in a snackbar

Use FeedbackUtil.showError, which achieves both goals at once:

1) Shows the message in a snackbar, and

2) Leverages ThrowableUtil.getAppError to return a user-friendly
   message for the error type.

Bug: T152010
Change-Id: Ia231dea2c10d41fd5e8a637c9e583425742352f0
---
M app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java 
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
index 57f66fb..85f96fa 100644
--- a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
+++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
@@ -25,6 +25,7 @@
 import org.wikipedia.login.User;
 import org.wikipedia.page.PageTitle;
 import org.wikipedia.settings.Prefs;
+import org.wikipedia.util.FeedbackUtil;
 import org.wikipedia.util.log.L;
 
 import java.util.Date;
@@ -252,7 +253,8 @@
 private void editFailed(@NonNull Throwable caught) {
 if (editView != null) {
 editView.setSaveState(false);
-editView.setError(caught.getMessage());
+FeedbackUtil.showError(getActivity(), caught);
+L.e(caught);
 }
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia231dea2c10d41fd5e8a637c9e583425742352f0
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Add missing module message fixer module.

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335084 )

Change subject: Add missing module message fixer module.
..


Add missing module message fixer module.

When we deploy the next drupal update it litters our screen with messages about 
modules
removed but not uninstalled. To clean those up we install this & then run

drush mmmff --all

We could possibly remove this afterwards.

https://www.drupal.org/project/module_missing_message_fixer

Change-Id: If3f592813882378ae6b7d0e585ffc09166699c07
---
A sites/all/modules/contrib/module_missing_message_fixer/LICENSE.txt
A 
sites/all/modules/contrib/module_missing_message_fixer/includes/module_missing_message_fixer.admin.inc
A 
sites/all/modules/contrib/module_missing_message_fixer/includes/module_missing_message_fixer.drush.inc
A 
sites/all/modules/contrib/module_missing_message_fixer/module_missing_message_fixer.info
A 
sites/all/modules/contrib/module_missing_message_fixer/module_missing_message_fixer.module
5 files changed, 680 insertions(+), 0 deletions(-)

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



diff --git a/sites/all/modules/contrib/module_missing_message_fixer/LICENSE.txt 
b/sites/all/modules/contrib/module_missing_message_fixer/LICENSE.txt
new file mode 100644
index 000..d159169
--- /dev/null
+++ b/sites/all/modules/contrib/module_missing_message_fixer/LICENSE.txt
@@ -0,0 +1,339 @@
+GNU GENERAL PUBLIC LICENSE
+   Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+

[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Add support for RESTBase endpoint consumption

2017-01-30 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335127 )

Change subject: Add support for RESTBase endpoint consumption
..

Add support for RESTBase endpoint consumption

Bug: T123445
Change-Id: I71a8a848f3143fa4a0dfd4ca182ee086903110bc
---
M Popups.hooks.php
M extension.json
M resources/ext.popups/actions.js
M resources/ext.popups/boot.js
D resources/ext.popups/gateway.js
A resources/ext.popups/gateway/BaseGateway.js
A resources/ext.popups/gateway/MediaWikiAPIGateway.js
A resources/ext.popups/gateway/RESTBaseGateway.js
A resources/ext.popups/gateway/factory.js
A resources/ext.popups/gateway/index.js
A resources/ext.popups/gateway/util.js
A tests/qunit/ext.popups/gateway/BaseGateway.test.js
R tests/qunit/ext.popups/gateway/MediaWikiAPIGateway.test.js
A tests/qunit/ext.popups/gateway/RESTBaseGateway.test.js
A tests/qunit/ext.popups/gateway/factory.test.js
A tests/qunit/ext.popups/gateway/util.test.js
16 files changed, 631 insertions(+), 231 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups 
refs/changes/27/335127/1

diff --git a/Popups.hooks.php b/Popups.hooks.php
index 25392cc..d06f0ef 100644
--- a/Popups.hooks.php
+++ b/Popups.hooks.php
@@ -143,6 +143,7 @@
$conf = PopupsContext::getInstance()->getConfig();
$vars['wgPopupsSchemaSamplingRate'] = $conf->get( 
'PopupsSchemaSamplingRate' );
$vars['wgPopupsBetaFeature'] = $conf->get( 'PopupsBetaFeature' 
);
+   $vars['wgPopupsAPIUseRESTBase'] = $conf->get( 
'PopupsAPIUseRESTBase' );
}
 
/**
diff --git a/extension.json b/extension.json
index 98022ce..06e1b0a 100644
--- a/extension.json
+++ b/extension.json
@@ -57,7 +57,9 @@
"@PopupsOptInDefaultState" : "@var string:['1'|'0'] Default 
Page Previews visibility. Has to be a string as a compatibility with beta 
feature settings",
"PopupsOptInDefaultState" : "0",
"@PopupsConflictingNavPopupsGadgetName": "@var string: 
Navigation popups gadget name",
-   "PopupsConflictingNavPopupsGadgetName": "Navigation_popups"
+   "PopupsConflictingNavPopupsGadgetName": "Navigation_popups",
+   "@PopupsAPIUseRESTBase": "Whether to use RESTBase rather than 
the MediaWiki API for fetching Popups data.",
+   "PopupsAPIUseRESTBase": false
},
"ResourceModules": {
"ext.popups.images": {
@@ -77,7 +79,13 @@
"resources/ext.popups/actions.js",
"resources/ext.popups/processLinks.js",
"resources/ext.popups/counts.js",
-   "resources/ext.popups/gateway.js",
+
+   "resources/ext.popups/gateway/index.js",
+   "resources/ext.popups/gateway/util.js",
+   "resources/ext.popups/gateway/BaseGateway.js",
+   
"resources/ext.popups/gateway/MediaWikiAPIGateway.js",
+   
"resources/ext.popups/gateway/RESTBaseGateway.js",
+   "resources/ext.popups/gateway/factory.js",
 
"resources/ext.popups/renderer.js",
"resources/ext.popups/schema.js",
@@ -137,6 +145,7 @@
"mediawiki.ui.button",
"mediawiki.ui.icon",
"mediawiki.Uri",
+   "oojs",
"moment",
"jquery.hidpi",
"ext.popups.lib"
diff --git a/resources/ext.popups/actions.js b/resources/ext.popups/actions.js
index 3135794..13f2d0a 100644
--- a/resources/ext.popups/actions.js
+++ b/resources/ext.popups/actions.js
@@ -123,7 +123,7 @@
title: title
} );
 
-   gateway( title )
+   gateway.getPageSummary( title )
.fail( function () {
dispatch( {
type: types.FETCH_FAILED,
diff --git a/resources/ext.popups/boot.js b/resources/ext.popups/boot.js
index 45e5710..de5fdc1 100644
--- a/resources/ext.popups/boot.js
+++ b/resources/ext.popups/boot.js
@@ -10,17 +10,6 @@
];
 
/**
-* Creates a gateway with sensible values for the dependencies.
-*
-* See `mw.popups.createGateway`.
-*
-* @return {ext.popups.Gateway}
-*/
-   function createGateway() {
-   return mw.popups.createGateway( new mw.Api() );
-   }
-
-   /**
 * Subscribes the registered change listeners to the
 * [store](http://redux.js.org/docs/api/Store.html#s

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Scap: Disable endpoints check for the time being

2017-01-30 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335116 )

Change subject: Scap: Disable endpoints check for the time being
..

Scap: Disable endpoints check for the time being

When the service starts up, it replays events from the last period
(currently 18h). There are enough events to cause a time-out for the
checker script, so disable them until we find a solution to this.

Change-Id: I91af23662c0025c26df166a213ee8d4543ca9c1c
---
M scap/checks.yaml
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/trending-edits/deploy 
refs/changes/16/335116/1

diff --git a/scap/checks.yaml b/scap/checks.yaml
index e11dbe1..cc22bf3 100644
--- a/scap/checks.yaml
+++ b/scap/checks.yaml
@@ -1,8 +1,8 @@
 checks:
-  endpoints:
-type: nrpe
-stage: restart_service
-command: check_endpoints_trendingedits
+#  endpoints:
+#type: nrpe
+#stage: restart_service
+#command: check_endpoints_trendingedits
   depool:
 type: command
 stage: promote

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91af23662c0025c26df166a213ee8d4543ca9c1c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Config: Bump the heartbeat time-out to 20s

2017-01-30 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335113 )

Change subject: Config: Bump the heartbeat time-out to 20s
..

Config: Bump the heartbeat time-out to 20s

Change-Id: I8ba6efb3541d6eb21f8fc5c173ac19043537d4ae
---
M scap/templates/config.yaml.j2
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/trending-edits/deploy 
refs/changes/13/335113/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index c3a4efe..ebc9e18 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -9,7 +9,7 @@
 
 # The maximum interval in ms that can pass between two beat messages
 # sent by each worker to the master before it is killed
-worker_heartbeat_timeout: 15000
+worker_heartbeat_timeout: 2
 
 # Logger info
 logging:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ba6efb3541d6eb21f8fc5c173ac19043537d4ae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Config: Disable sampled logging

2017-01-30 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335110 )

Change subject: Config: Disable sampled logging
..

Config: Disable sampled logging

We now know the service is processing the events, so this is no longer
needed.

Change-Id: Ie17d26b435c2170dbab1ad116a5d99ddd3e9dd96
---
M scap/templates/config.yaml.j2
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/trending-edits/deploy 
refs/changes/10/335110/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 5c420a2..c3a4efe 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -15,9 +15,6 @@
 logging:
   level: warn
   name: trendingedits
-  sampled_levels:
-# log ~1 event per minute @10 events/s
-trace/event: 0.002
   streams:
 - host: <%= logstash_host %>
   port: <%= logstash_port %>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie17d26b435c2170dbab1ad116a5d99ddd3e9dd96
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Make description editing respect page protection

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/334349 )

Change subject: Make description editing respect page protection
..


Make description editing respect page protection

Change-Id: I45f99bf1af8fb75ec61a454ab9bcfb0dc87e3119
---
M app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java
M app/src/test/java/org/wikipedia/descriptions/DescriptionEditClientTest.java
2 files changed, 18 insertions(+), 3 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java 
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java
index a3046a4..2a86efb 100644
--- a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java
+++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java
@@ -10,6 +10,7 @@
 import org.wikipedia.dataclient.retrofit.RetrofitException;
 import org.wikipedia.login.User;
 import org.wikipedia.page.Page;
+import org.wikipedia.page.PageProperties;
 import org.wikipedia.page.PageTitle;
 import org.wikipedia.server.mwapi.MwServiceError;
 
@@ -40,9 +41,11 @@
 }
 
 public static boolean isEditAllowed(@NonNull Page page) {
-return 
ENABLED_LANGUAGES.contains(page.getTitle().getWikiSite().languageCode())
-&& page.getPageProperties() != null
-&& 
!TextUtils.isEmpty(page.getPageProperties().getWikiBaseItem());
+PageProperties props = page.getPageProperties();
+return props != null
+&& props.canEdit()
+&& !TextUtils.isEmpty(props.getWikiBaseItem())
+&& 
ENABLED_LANGUAGES.contains(page.getTitle().getWikiSite().languageCode());
 }
 
 /**
diff --git 
a/app/src/test/java/org/wikipedia/descriptions/DescriptionEditClientTest.java 
b/app/src/test/java/org/wikipedia/descriptions/DescriptionEditClientTest.java
index 8b66361..ebb4cf5 100644
--- 
a/app/src/test/java/org/wikipedia/descriptions/DescriptionEditClientTest.java
+++ 
b/app/src/test/java/org/wikipedia/descriptions/DescriptionEditClientTest.java
@@ -89,12 +89,24 @@
 WikiSite wiki = WikiSite.forLanguageCode("en");
 PageProperties props = mock(PageProperties.class);
 when(props.getWikiBaseItem()).thenReturn("Q123");
+when(props.canEdit()).thenReturn(true);
 Page page = new Page(new PageTitle("Test", wiki, null, null, props),
 Collections.emptyList(), props);
 
 assertThat(DescriptionEditClient.isEditAllowed(page), is(true));
 }
 
+@Test public void testIsEditAllowedPageProtected() {
+WikiSite wiki = WikiSite.forLanguageCode("en");
+PageProperties props = mock(PageProperties.class);
+when(props.getWikiBaseItem()).thenReturn("Q123");
+when(props.canEdit()).thenReturn(false);
+Page page = new Page(new PageTitle("Test", wiki, null, null, props),
+Collections.emptyList(), props);
+
+assertThat(DescriptionEditClient.isEditAllowed(page), is(false));
+}
+
 @Test public void testIsEditAllowedNoWikiBaseItem() {
 WikiSite wiki = WikiSite.forLanguageCode("en");
 PageProperties props = mock(PageProperties.class);

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Add comment for VisualDiff test store merge hack

2017-01-30 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335103 )

Change subject: Add comment for VisualDiff test store merge hack
..

Add comment for VisualDiff test store merge hack

Change-Id: I7358a3a83ed9e6a03c8bcab08bc8df08412cac94
---
M tests/ui/ve.ui.DiffElement.test.js
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/tests/ui/ve.ui.DiffElement.test.js 
b/tests/ui/ve.ui.DiffElement.test.js
index ed894e9..b340a09 100644
--- a/tests/ui/ve.ui.DiffElement.test.js
+++ b/tests/ui/ve.ui.DiffElement.test.js
@@ -180,6 +180,8 @@
for ( i = 0, len = cases.length; i < len; i++ ) {
oldDoc = ve.dm.converter.getModelFromDom( 
ve.createDocumentFromHtml( cases[ i ].oldDoc ) );
newDoc = ve.dm.converter.getModelFromDom( 
ve.createDocumentFromHtml( cases[ i ].newDoc ) );
+   // TODO: Differ expects newDoc to be derived from oldDoc and 
contain all it's store data.
+   // We may want to remove that assumption from the differ?
newDoc.getStore().merge( oldDoc.getStore() );
visualDiff = new ve.dm.VisualDiff( oldDoc, newDoc );
diffElement = new ve.ui.DiffElement( visualDiff );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7358a3a83ed9e6a03c8bcab08bc8df08412cac94
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [WIP][POC] Automatic serialization guard trait

2017-01-30 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335101 )

Change subject: [WIP][POC] Automatic serialization guard trait
..

[WIP][POC] Automatic serialization guard trait

Bug: T156541
Change-Id: Ib3d24da9cb29b6c0ca1f2c9033f7d206f771d2d8
---
A includes/SafeSerializable.php
A includes/SerializationChangedException.php
2 files changed, 48 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/01/335101/1

diff --git a/includes/SafeSerializable.php b/includes/SafeSerializable.php
new file mode 100644
index 000..b15cfea
--- /dev/null
+++ b/includes/SafeSerializable.php
@@ -0,0 +1,41 @@
+serializationId = $this->getSerializationId();
+   }
+
+   public function __wakeup() {
+   if ( $this->serializationId !== $this->getSerializationId() ) {
+   throw new SerializationChangedException( static::class 
);
+   }
+   if ( $this->serializationId === null ) {
+   throw new Exception( static::class . ' deserialized 
with a null serializationId' );
+   }
+   }
+
+   public function getSerializationId() {
+   static $cachedId;
+
+   if ( $cachedId === null ) {
+   $this->serializationId = $cachedId = 
$this->generateSerializationId();
+   }
+
+   return $this->serializationId;
+   }
+
+   private function generateSerializationId() {
+   $className = static::class;
+   $classNameLen = strlen( $className );
+
+   // Create a blank copy of the current class
+   $serialization = "0:$classNameLen:\"$className\":0:{}";
+
+   $serialization = serialize( unserialize( $serialization ) );
+
+   return md5( $serialization );
+   }
+}
diff --git a/includes/SerializationChangedException.php 
b/includes/SerializationChangedException.php
new file mode 100644
index 000..0794382
--- /dev/null
+++ b/includes/SerializationChangedException.php
@@ -0,0 +1,7 @@
+https://gerrit.wikimedia.org/r/335101
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: add Page @NonNull / @Nullable annotations

2017-01-30 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335099 )

Change subject: Hygiene: add Page @NonNull / @Nullable annotations
..

Hygiene: add Page @NonNull / @Nullable annotations

Add missing @NonNull / @Nullable annotations as inferred by existing
constructor annotations and final. Remove redundant null check in
DescriptionEditClient

Change-Id: Ia657ef88f78f653229f61a6d929b5cc10ff54dbf
---
M app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java
M app/src/main/java/org/wikipedia/page/Page.java
2 files changed, 17 insertions(+), 23 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java 
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java
index 2a86efb..51e8344 100644
--- a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java
+++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java
@@ -42,8 +42,7 @@
 
 public static boolean isEditAllowed(@NonNull Page page) {
 PageProperties props = page.getPageProperties();
-return props != null
-&& props.canEdit()
+return props.canEdit()
 && !TextUtils.isEmpty(props.getWikiBaseItem())
 && 
ENABLED_LANGUAGES.contains(page.getTitle().getWikiSite().languageCode());
 }
diff --git a/app/src/main/java/org/wikipedia/page/Page.java 
b/app/src/main/java/org/wikipedia/page/Page.java
index 8b6b3fd..3c93637 100755
--- a/app/src/main/java/org/wikipedia/page/Page.java
+++ b/app/src/main/java/org/wikipedia/page/Page.java
@@ -17,14 +17,12 @@
  * Represents a particular page along with its full contents.
  */
 public class Page {
-@VisibleForTesting
-static final int MEDIAWIKI_ORIGIN = 0;
-@VisibleForTesting
-static final int RESTBASE_ORIGIN = 1;
+@VisibleForTesting static final int MEDIAWIKI_ORIGIN = 0;
+@VisibleForTesting static final int RESTBASE_ORIGIN = 1;
 
-private final PageTitle title;
-private final List sections;
-private final PageProperties pageProperties;
+@NonNull private final PageTitle title;
+@NonNull private final List sections;
+@NonNull private final PageProperties pageProperties;
 
 /**
  * The media gallery collection associated with this page.
@@ -32,7 +30,7 @@
  * the page cache because the page itself is cached. Subsequent instances 
of the Gallery
  * activity will then be able to retrieve the page's gallery collection 
from cache.
  */
-private GalleryCollection galleryCollection;
+@Nullable private GalleryCollection galleryCollection;
 
 /**
  * An indicator what payload version the page content was originally 
retrieved from.
@@ -42,10 +40,11 @@
  */
 private int version = MEDIAWIKI_ORIGIN;
 
-public GalleryCollection getGalleryCollection() {
+@Nullable public GalleryCollection getGalleryCollection() {
 return galleryCollection;
 }
-public void setGalleryCollection(GalleryCollection collection) {
+
+public void setGalleryCollection(@Nullable GalleryCollection collection) {
 galleryCollection = collection;
 }
 
@@ -77,11 +76,11 @@
 return version == RESTBASE_ORIGIN;
 }
 
-public PageTitle getTitle() {
+@NonNull public PageTitle getTitle() {
 return title;
 }
 
-public List getSections() {
+@NonNull public List getSections() {
 return sections;
 }
 
@@ -89,12 +88,11 @@
 return pageProperties.getDisplayTitle();
 }
 
-@Nullable
-public String getTitlePronunciationUrl() {
+@Nullable public String getTitlePronunciationUrl() {
 return getPageProperties().getTitlePronunciationUrl();
 }
 
-public PageProperties getPageProperties() {
+@NonNull public PageProperties getPageProperties() {
 return pageProperties;
 }
 
@@ -102,8 +100,7 @@
 return getTitle().namespace() == Namespace.MAIN;
 }
 
-@Override
-public boolean equals(Object o) {
+@Override public boolean equals(Object o) {
 if (!(o instanceof Page)) {
 return false;
 }
@@ -114,16 +111,14 @@
 && pageProperties.equals(other.pageProperties);
 }
 
-@Override
-public int hashCode() {
+@Override public int hashCode() {
 int result = title.hashCode();
 result = 31 * result + sections.hashCode();
 result = 31 * result + pageProperties.hashCode();
 return result;
 }
 
-@Override
-public String toString() {
+@Override public String toString() {
 return "Page{"
 + "title=" + title
 + ", sections=" + sections

-- 
To view, visit https://gerrit.wikimedia.org/r/335099
To unsubscribe, visit https://gerrit.wikimedia.org/r/settin

[MediaWiki-commits] [Gerrit] eventlogging[master]: Revert "Changes UA string to JSON map"

2017-01-30 Thread Nuria (Code Review)
Nuria has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335091 )

Change subject: Revert "Changes UA string to JSON map"
..


Revert "Changes UA string to JSON map"

This reverts commit 4b28b1455043585b6a0462cd3ad39c5bd8feb0e1.

Change-Id: I955c36ade34e93f9ced07a21fed37e8c0a5ece26
---
M eventlogging/parse.py
M eventlogging/utils.py
M requirements.txt
M tests/test_parser.py
4 files changed, 2 insertions(+), 45 deletions(-)

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



diff --git a/eventlogging/parse.py b/eventlogging/parse.py
index 982cfa8..98bf758 100644
--- a/eventlogging/parse.py
+++ b/eventlogging/parse.py
@@ -42,7 +42,6 @@
 
 from .compat import json, unquote_plus, uuid5
 from .event import Event
-from .utils import parse_ua
 
 __all__ = (
 'LogParser', 'ncsa_to_unix',
@@ -156,9 +155,6 @@
 event = {k: f(match.group(k)) for f, k in caster_key_pairs}
 event.update(event.pop('capsule'))
 event['uuid'] = capsule_uuid(event)
-if ('userAgent' in event) and event['userAgent']:
-parsed_ua = parse_ua(event['userAgent'])
-event['userAgent'] = parsed_ua
 return Event(event)
 
 def __repr__(self):
diff --git a/eventlogging/utils.py b/eventlogging/utils.py
index 416d5f8..a0cfa62 100644
--- a/eventlogging/utils.py
+++ b/eventlogging/utils.py
@@ -12,7 +12,6 @@
 import copy
 import datetime
 import dateutil.parser
-import json
 import logging
 import re
 import os
@@ -21,7 +20,6 @@
 import threading
 import traceback
 import uuid
-from ua_parser import user_agent_parser
 
 from .compat import (
 items, monotonic_clock, urisplit, urlencode, parse_qsl,
@@ -293,29 +291,3 @@
 # Set module logging level to INFO, DEBUG is too noisy.
 logging.getLogger("kafka").setLevel(logging.INFO)
 logging.getLogger("kazoo").setLevel(logging.INFO)
-
-
-def parse_ua(userAgent):
-"""
-Returns a json string containing the parsed User Agent data
-from a request's UA string. Uses the following format:
-{
-"device_family":"Other",
-"browser_major":"11",
-"os_family":"Windows",
-"os_major":"-",
-"browser_family":"IE",
-"os_minor":"-"
-}
-"""
-parsed_ua = user_agent_parser.Parse(userAgent)
-formatted_ua = {}
-formatted_ua['device_family'] = parsed_ua['device']['family']
-formatted_ua['browser_major'] = parsed_ua['user_agent']['major']
-formatted_ua['os_family'] = parsed_ua['os']['family']
-formatted_ua['os_major'] = parsed_ua['os']['major']
-formatted_ua['browser_family'] = parsed_ua['user_agent']['family']
-formatted_ua['os_minor'] = parsed_ua['os']['minor']
-# escape json so it doesn't cause problems when validating
-# to string (per capsule definition)
-return json.dumps(formatted_ua)
diff --git a/requirements.txt b/requirements.txt
index fd3d7b3..44a567b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -11,4 +11,3 @@
 statsd>=3.0
 tornado>=4.0
 sprockets.mixins.statsd>=1.3.1
-ua_parser>=0.7.2
diff --git a/tests/test_parser.py b/tests/test_parser.py
index 5d64b71..8d0c117 100644
--- a/tests/test_parser.py
+++ b/tests/test_parser.py
@@ -10,7 +10,6 @@
 
 import calendar
 import datetime
-import json
 import unittest
 
 import eventlogging
@@ -40,16 +39,7 @@
'2%3A1%2C%22articleTitle%22%3A%22H%C3%A9ctor%20Elizondo%22%7'
'D%2C%22webHost%22%3A%22test.wikipedia.org%22%7D; cp3022.esa'
'ms.wikimedia.org 132073 2013-01-19T23:16:38 - '
-   'Mozilla/5.0 (X11; Linux x86_64; rv:10.0)'
-   ' Gecko/20100101 Firefox/10.0')
-ua = json.dumps({
-'os_minor': None,
-'os_major': None,
-'device_family': 'Other',
-'os_family': 'Linux',
-'browser_major': '10',
-'browser_family': 'Firefox'
-})
+   'Mozilla/5.0')
 parsed = {
 'uuid': '799341a01ba957c79b15dc4d2d950864',
 'recvFrom': 'cp3022.esams.wikimedia.org',
@@ -59,7 +49,7 @@
 'timestamp': 1358637398,
 'schema': 'Generic',
 'revision': 13,
-'userAgent': ua,
+'userAgent': 'Mozilla/5.0',
 'event': {
 'articleTitle': 'Héctor Elizondo',
 'articleId': 1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I955c36ade34e93f9ced07a21fed37e8c0a5ece26
Gerrit-PatchSet: 1
Gerrit-Project: eventlogging
Gerrit-Branch: master
Gerrit-Owner: Nuria 
Gerrit-Reviewer: Fdans 
Gerrit-Reviewer: Nuria 
Gerrit-Reviewer: Ottomata 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.o

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: New: diff tests

2017-01-30 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335092 )

Change subject: New: diff tests
..

New: diff tests

Useful for regression testing. These tests do diffs of JSON output of
MCS, so we can see when things change.

The main value is in testing the /page/mobile-sections* and
/page/formatted endpoints since the bulk of transformations doesn't
receive any end-to-end testing.

To update the expected test results temporarily set the constant
UPDATE_EXPECTED_RESULTS in diff.js to true.
After the run consider updating the TestSpec constructors at the end of
test-specs.js to paste in the revisions (if any were left out or need
to be updated).

Bug: T155698
Change-Id: Id4706e0d13b0b4b3fb95e44bc250b8fa5a4c1748
---
A .eslintignore
A test/diff/diff.js
A test/diff/results/media_image_featured-enwiki-2016-04-29.json
A test/diff/results/page_definition-enwiktionary-cat.json
A test/diff/results/page_featured-enwiki-2016-04-29.json
A test/diff/results/page_formatted-dewiki-Berlin.json
A test/diff/results/page_formatted-enwiki-Barack_Obama.json
A 
test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_TitleLinkEncoding.json
A test/diff/results/page_formatted-frwiki-Paris.json
A test/diff/results/page_mobile-sections-dewiki-Berlin.json
A test/diff/results/page_mobile-sections-enwiki-Barack_Obama.json
A 
test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_TitleLinkEncoding.json
A test/diff/results/page_mobile-sections-frwiki-Paris.json
A 
test/diff/results/page_mobile-sections-hewiki-%D7%99%D7%A8%D7%95%D7%A9%D7%9C%D7%99%D7%9D.json
A test/diff/results/page_most-read-enwiki-2016-01-01.json
A test/diff/test-specs.js
16 files changed, 6,317 insertions(+), 0 deletions(-)


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


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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[master]: Clean up alias files

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335073 )

Change subject: Clean up alias files
..


Clean up alias files

No need for double initialize

Change-Id: I48baca39b2506e99d3689c4f7c10b056541f7cbe
---
M languages/BlueSpice.Credits.alias.php
M languages/BlueSpice.Diagnostics.alias.php
2 files changed, 0 insertions(+), 6 deletions(-)

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



diff --git a/languages/BlueSpice.Credits.alias.php 
b/languages/BlueSpice.Credits.alias.php
index 40579e0..e9ca48e 100644
--- a/languages/BlueSpice.Credits.alias.php
+++ b/languages/BlueSpice.Credits.alias.php
@@ -1,7 +1,4 @@
 https://gerrit.wikimedia.org/r/335073
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I48baca39b2506e99d3689c4f7c10b056541f7cbe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Dvogel hallowelt 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: Robert Vogel 
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]: Fix "Edit History" link in notifications.

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335085 )

Change subject: Fix "Edit History" link in notifications.
..


Fix "Edit History" link in notifications.

When a notification comes from Wikidata, the text() property contains the
Q-number, and the full() contains the label. When directing the user to
the edit history of the item, we actually want the Q-number, since
navigating to the label in Wikidata will go to a nonexistent page.

Change-Id: I2193847d1182dd58b28c31663de982ce89f6898f
---
M app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java 
b/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
index 4e31cd9..db381a8 100644
--- a/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
+++ b/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
@@ -30,7 +30,8 @@
 @DrawableRes int icon = R.mipmap.launcher;
 @ColorInt int color = ContextCompat.getColor(context, 
R.color.foundation_gray);
 
-Uri historyUri = uriForPath(n, "Special:History/" + n.title().full());
+Uri historyUri = uriForPath(n, "Special:History/"
++ (n.isFromWikidata() ? n.title().text() : n.title().full()));
 Uri agentUri = uriForPath(n, "User:" + n.agent().name());
 
 Intent pageIntent = PageActivity.newIntent(context, n.title().full());

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...SmiteSpam[master]: Clean up alias file

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335074 )

Change subject: Clean up alias file
..


Clean up alias file

No need for double initialize

Change-Id: I13ae9df5204ec3cf64184970ce1a56d602992518
---
M SmiteSpam.alias.php
1 file changed, 0 insertions(+), 6 deletions(-)

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



diff --git a/SmiteSpam.alias.php b/SmiteSpam.alias.php
index 999ab02..0cdeb58 100644
--- a/SmiteSpam.alias.php
+++ b/SmiteSpam.alias.php
@@ -1,10 +1,4 @@
 https://gerrit.wikimedia.org/r/335074
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I13ae9df5204ec3cf64184970ce1a56d602992518
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SmiteSpam
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Raimond Spekking 
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...GeoData[master]: Clean up alias file

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335075 )

Change subject: Clean up alias file
..


Clean up alias file

No need for double initialize

Change-Id: I99d870b148330cf90c87d4203f9faa65a18c3d98
---
M GeoData.i18n.magic.php
1 file changed, 0 insertions(+), 6 deletions(-)

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



diff --git a/GeoData.i18n.magic.php b/GeoData.i18n.magic.php
index e5e28b7..1211642 100644
--- a/GeoData.i18n.magic.php
+++ b/GeoData.i18n.magic.php
@@ -2,12 +2,6 @@
 
 $magicWords = [];
 
-/**
- * English
- */
-
-$magicWords = [];
-
 /** English (English) */
 $magicWords['en'] = [
'coordinates' => [ 0, 'coordinates' ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I99d870b148330cf90c87d4203f9faa65a18c3d98
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] eventlogging[master]: Revert "Changes UA string to JSON map"

2017-01-30 Thread Nuria (Code Review)
Hello Ottomata, Fdans, jenkins-bot,

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

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

to review the following change.


Change subject: Revert "Changes UA string to JSON map"
..

Revert "Changes UA string to JSON map"

This reverts commit 4b28b1455043585b6a0462cd3ad39c5bd8feb0e1.

Change-Id: I955c36ade34e93f9ced07a21fed37e8c0a5ece26
---
M eventlogging/parse.py
M eventlogging/utils.py
M requirements.txt
M tests/test_parser.py
4 files changed, 2 insertions(+), 45 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/eventlogging 
refs/changes/91/335091/1

diff --git a/eventlogging/parse.py b/eventlogging/parse.py
index 982cfa8..98bf758 100644
--- a/eventlogging/parse.py
+++ b/eventlogging/parse.py
@@ -42,7 +42,6 @@
 
 from .compat import json, unquote_plus, uuid5
 from .event import Event
-from .utils import parse_ua
 
 __all__ = (
 'LogParser', 'ncsa_to_unix',
@@ -156,9 +155,6 @@
 event = {k: f(match.group(k)) for f, k in caster_key_pairs}
 event.update(event.pop('capsule'))
 event['uuid'] = capsule_uuid(event)
-if ('userAgent' in event) and event['userAgent']:
-parsed_ua = parse_ua(event['userAgent'])
-event['userAgent'] = parsed_ua
 return Event(event)
 
 def __repr__(self):
diff --git a/eventlogging/utils.py b/eventlogging/utils.py
index 416d5f8..a0cfa62 100644
--- a/eventlogging/utils.py
+++ b/eventlogging/utils.py
@@ -12,7 +12,6 @@
 import copy
 import datetime
 import dateutil.parser
-import json
 import logging
 import re
 import os
@@ -21,7 +20,6 @@
 import threading
 import traceback
 import uuid
-from ua_parser import user_agent_parser
 
 from .compat import (
 items, monotonic_clock, urisplit, urlencode, parse_qsl,
@@ -293,29 +291,3 @@
 # Set module logging level to INFO, DEBUG is too noisy.
 logging.getLogger("kafka").setLevel(logging.INFO)
 logging.getLogger("kazoo").setLevel(logging.INFO)
-
-
-def parse_ua(userAgent):
-"""
-Returns a json string containing the parsed User Agent data
-from a request's UA string. Uses the following format:
-{
-"device_family":"Other",
-"browser_major":"11",
-"os_family":"Windows",
-"os_major":"-",
-"browser_family":"IE",
-"os_minor":"-"
-}
-"""
-parsed_ua = user_agent_parser.Parse(userAgent)
-formatted_ua = {}
-formatted_ua['device_family'] = parsed_ua['device']['family']
-formatted_ua['browser_major'] = parsed_ua['user_agent']['major']
-formatted_ua['os_family'] = parsed_ua['os']['family']
-formatted_ua['os_major'] = parsed_ua['os']['major']
-formatted_ua['browser_family'] = parsed_ua['user_agent']['family']
-formatted_ua['os_minor'] = parsed_ua['os']['minor']
-# escape json so it doesn't cause problems when validating
-# to string (per capsule definition)
-return json.dumps(formatted_ua)
diff --git a/requirements.txt b/requirements.txt
index fd3d7b3..44a567b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -11,4 +11,3 @@
 statsd>=3.0
 tornado>=4.0
 sprockets.mixins.statsd>=1.3.1
-ua_parser>=0.7.2
diff --git a/tests/test_parser.py b/tests/test_parser.py
index 5d64b71..8d0c117 100644
--- a/tests/test_parser.py
+++ b/tests/test_parser.py
@@ -10,7 +10,6 @@
 
 import calendar
 import datetime
-import json
 import unittest
 
 import eventlogging
@@ -40,16 +39,7 @@
'2%3A1%2C%22articleTitle%22%3A%22H%C3%A9ctor%20Elizondo%22%7'
'D%2C%22webHost%22%3A%22test.wikipedia.org%22%7D; cp3022.esa'
'ms.wikimedia.org 132073 2013-01-19T23:16:38 - '
-   'Mozilla/5.0 (X11; Linux x86_64; rv:10.0)'
-   ' Gecko/20100101 Firefox/10.0')
-ua = json.dumps({
-'os_minor': None,
-'os_major': None,
-'device_family': 'Other',
-'os_family': 'Linux',
-'browser_major': '10',
-'browser_family': 'Firefox'
-})
+   'Mozilla/5.0')
 parsed = {
 'uuid': '799341a01ba957c79b15dc4d2d950864',
 'recvFrom': 'cp3022.esams.wikimedia.org',
@@ -59,7 +49,7 @@
 'timestamp': 1358637398,
 'schema': 'Generic',
 'revision': 13,
-'userAgent': ua,
+'userAgent': 'Mozilla/5.0',
 'event': {
 'articleTitle': 'Héctor Elizondo',
 'articleId': 1

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I955c36ade34e93f9ced07a21fed37e8c0a5ece26
Gerrit-PatchSet: 1
Gerrit-Project: eventlogging
Gerrit-Branch: master
Gerrit-Owner: Nuria 
Gerrit-Reviewer: Fdans 
Gerrit-Reviewer: Ottomata 
Gerrit-Reviewer: jenkins-bot <>

___

[MediaWiki-commits] [Gerrit] mediawiki...PureWikiDeletion[master]: Clean up alias file

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335077 )

Change subject: Clean up alias file
..


Clean up alias file

No need for double initialize

Change-Id: I13d889115ec1f9b37fd48f05b244a178e5e7ae47
---
M PureWikiDeletion.alias.php
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/PureWikiDeletion.alias.php b/PureWikiDeletion.alias.php
index 3dd7b10..2c7b448 100644
--- a/PureWikiDeletion.alias.php
+++ b/PureWikiDeletion.alias.php
@@ -1,8 +1,4 @@
 https://gerrit.wikimedia.org/r/335077
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I13d889115ec1f9b37fd48f05b244a178e5e7ae47
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PureWikiDeletion
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Raimond Spekking 
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...Flow[master]: Clean up alias file

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335081 )

Change subject: Clean up alias file
..


Clean up alias file

Move 'en' to top

Change-Id: I14d99c5390732dba353f3a26cd3894af94698299
---
M Flow.namespaces.php
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/Flow.namespaces.php b/Flow.namespaces.php
index d2ea165..a57e670 100644
--- a/Flow.namespaces.php
+++ b/Flow.namespaces.php
@@ -9,6 +9,11 @@
 
 $namespaceNames = array();
 
+/** English */
+$namespaceNames['en'] = array(
+   NS_TOPIC =>  'Topic',
+);
+
 /** Arabic */
 $namespaceNames['ar'] = array(
NS_TOPIC => 'موضوع',
@@ -52,11 +57,6 @@
 /** Zazaki */
 $namespaceNames['diq'] = array(
NS_TOPIC =>  'Mewzu',
-);
-
-/** English */
-$namespaceNames['en'] = array(
-   NS_TOPIC =>  'Topic',
 );
 
 /** Spanish */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I14d99c5390732dba353f3a26cd3894af94698299
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Raimond Spekking 
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...LoopFunctions[master]: Clean up alias file

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335076 )

Change subject: Clean up alias file
..


Clean up alias file

No need for check, if mediawiki is loaded

Change-Id: I4c95454ecbe42460460e254e3c77d49f9c7a0722
---
M LoopFunctions.i18n.magic.php
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/LoopFunctions.i18n.magic.php b/LoopFunctions.i18n.magic.php
index 32fd90d..8e184f8 100644
--- a/LoopFunctions.i18n.magic.php
+++ b/LoopFunctions.i18n.magic.php
@@ -1,9 +1,5 @@
 https://gerrit.wikimedia.org/r/335076
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4c95454ecbe42460460e254e3c77d49f9c7a0722
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LoopFunctions
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Show notifications in heads-up style.

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335072 )

Change subject: Show notifications in heads-up style.
..


Show notifications in heads-up style.

This configures our notifications to appear as "heads-up" notifications,
meaning that they will pop up on top of the current app, in addition to
just showing a notification icon in the system bar.

This applies to Revert notifications, as well as Zero enter/exit
notifications.

The key was to set the DEFAULT_ALL flag on the notification, along with
the PRIORITY flag being set to high or max.

Change-Id: I24c8f54a5c6c6761e7ddcd5ad87469d751f0fcac
---
M app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
M app/src/main/java/org/wikipedia/zero/WikipediaZeroHandler.java
2 files changed, 4 insertions(+), 0 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java 
b/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
index e621079..4e31cd9 100644
--- a/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
+++ b/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
@@ -44,6 +44,8 @@
 context), PendingIntent.FLAG_UPDATE_CURRENT);
 
 NotificationCompat.Builder builder = new 
NotificationCompat.Builder(context)
+.setDefaults(NotificationCompat.DEFAULT_ALL)
+.setPriority(NotificationCompat.PRIORITY_HIGH)
 .setAutoCancel(true);
 
 switch (n.type()) {
@@ -60,6 +62,7 @@
 icon = R.drawable.ic_rotate_left_white_24dp;
 title = R.string.notification_reverted_title;
 color = ContextCompat.getColor(context, 
R.color.foundation_red);
+builder.setPriority(NotificationCompat.PRIORITY_MAX);
 builder.addAction(0, 
context.getString(R.string.notification_button_view_edit_history), 
historyIntent);
 break;
 case Notification.TYPE_EDIT_THANK:
diff --git a/app/src/main/java/org/wikipedia/zero/WikipediaZeroHandler.java 
b/app/src/main/java/org/wikipedia/zero/WikipediaZeroHandler.java
index fe440bb..aee6856 100644
--- a/app/src/main/java/org/wikipedia/zero/WikipediaZeroHandler.java
+++ b/app/src/main/java/org/wikipedia/zero/WikipediaZeroHandler.java
@@ -299,6 +299,7 @@
 
 private NotificationCompat.Builder createNotification(@NonNull Context 
context) {
 return (NotificationCompat.Builder) new 
NotificationCompat.Builder(context)
+.setDefaults(NotificationCompat.DEFAULT_ALL)
 .setPriority(NotificationCompat.PRIORITY_MAX)
 
.setContentTitle(context.getString(R.string.zero_wikipedia_zero_heading))
 .setContentIntent(PendingIntent

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: VisualDiff: Annotation tests

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/334325 )

Change subject: VisualDiff: Annotation tests
..


VisualDiff: Annotation tests

Change-Id: I8ea81c8e9a89db43e4a7af7d07ae861a31916be5
---
M tests/ui/ve.ui.DiffElement.test.js
1 file changed, 23 insertions(+), 4 deletions(-)

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



diff --git a/tests/ui/ve.ui.DiffElement.test.js 
b/tests/ui/ve.ui.DiffElement.test.js
index e38bb67..ed894e9 100644
--- a/tests/ui/ve.ui.DiffElement.test.js
+++ b/tests/ui/ve.ui.DiffElement.test.js
@@ -10,6 +10,7 @@
 
 QUnit.test( 'Diffing', function ( assert ) {
var i, len, visualDiff, diffElement,
+   oldDoc, newDoc,
spacer = '⋮',
cases = [
{
@@ -155,14 +156,32 @@
'CD' +
'' +
''
+   },
+   {
+   msg: 'Annotation insertion',
+   oldDoc: 'foo bar baz',
+   newDoc: 'foo bar baz',
+   expected:
+   '' +
+   'foo bar  bar baz' +
+   ''
+   },
+   {
+   msg: 'Annotation removal',
+   oldDoc: 'foo bar baz',
+   newDoc: 'foo bar baz',
+   expected:
+   '' +
+   'foo bar  bar baz' +
+   ''
}
];
 
for ( i = 0, len = cases.length; i < len; i++ ) {
-   visualDiff = new ve.dm.VisualDiff(
-   ve.dm.converter.getModelFromDom( 
ve.createDocumentFromHtml( cases[ i ].oldDoc ) ),
-   ve.dm.converter.getModelFromDom( 
ve.createDocumentFromHtml( cases[ i ].newDoc ) )
-   );
+   oldDoc = ve.dm.converter.getModelFromDom( 
ve.createDocumentFromHtml( cases[ i ].oldDoc ) );
+   newDoc = ve.dm.converter.getModelFromDom( 
ve.createDocumentFromHtml( cases[ i ].newDoc ) );
+   newDoc.getStore().merge( oldDoc.getStore() );
+   visualDiff = new ve.dm.VisualDiff( oldDoc, newDoc );
diffElement = new ve.ui.DiffElement( visualDiff );
assert.strictEqual( diffElement.$element.html(), cases[ i 
].expected, cases[ i ].msg );
}

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki...

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335088 )

Change subject: Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment
..


Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment

3d77c71 Add index to nick_name field.
ea06847 Merge "Fix missing ct_id recovery"

Change-Id: Ifb3abdb1b0b43f57601ca2c2c4854fb6e9d440eb
---
D sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
1 file changed, 0 insertions(+), 210 deletions(-)

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



diff --git 
a/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
 
b/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
deleted file mode 100644
index a569bb5..000
--- 
a/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
+++ /dev/null
@@ -1,210 +0,0 @@
-<<< HEAD   (6b6f5d Merge branch 'master' into deployment)
-===
-subscriptionId = 'SUB-FOO-' . mt_rand();
-   $this->amount = '1.12';
-
-   $this->contributions = array();
-
-   $result = civicrm_api3( 'Contact', 'create', array(
-   'first_name' => 'Testes',
-   'contact_type' => 'Individual',
-   ) );
-   $this->contactId = $result['id'];
-
-   $result = civicrm_api3( 'ContributionRecur', 'create', array(
-   'contact_id' => $this->contactId,
-   'amount' => $this->amount,
-   'frequency_interval' => 1,
-   'frequency_unit' => 'month',
-   'next_sched_contribution' => 
wmf_common_date_unix_to_civicrm(strtotime('+1 month')),
-   'installments' => 0,
-   'processor_id' => 1,
-   'currency' => 'USD',
-   'trxn_id' => "RECURRING GLOBALCOLLECT 
{$this->subscriptionId}",
-   ) );
-   $this->contributionRecurId = $result['id'];
-
-   $result = civicrm_api3( 'Contribution', 'create', array(
-   'contact_id' => $this->contactId,
-   'contribution_recur_id' => $this->contributionRecurId,
-   'currency' => 'USD',
-   'total_amount' => $this->amount,
-   'contribution_type' => 'Cash',
-   'payment_instrument' => 'Credit Card',
-   'trxn_id' => 'RECURRING GLOBALCOLLECT 
STUB_ORIG_CONTRIB-' . mt_rand(),
-   ) );
-   $this->contributions[] = $result['id'];
-   wmf_civicrm_insert_contribution_tracking( '..rcc', 'civicrm', 
null, wmf_common_date_unix_to_sql( strtotime( 'now' ) ), $result['id'] );
-   }
-
-   function testChargeRecorded() {
-
-   // Get some extra access to the testing adapter :(
-   global $wgDonationInterfaceGatewayAdapters;
-   $wgDonationInterfaceGatewayAdapters['globalcollect'] = 
'TestingRecurringStubAdapter';
-
-   // Include using require_once rather than autoload because the 
file
-   // depends on a DonationInterface testing class we loaded above.
-   require_once __DIR__ . '/TestingRecurringStubAdapter.php';
-   TestingRecurringStubAdapter::$singletonDummyGatewayResponseCode 
= 'recurring-OK';
-
-   recurring_globalcollect_charge( $this->contributionRecurId );
-
-   $result = civicrm_api3( 'Contribution', 'get', array(
-   'contact_id' => $this->contactId,
-   ) );
-   $this->assertEquals( 2, count( $result['values'] ) );
-   foreach ( $result['values'] as $contribution ) {
-   if ( $contribution['id'] == $this->contributions[0] ) {
-   // Skip assertions on the synthetic original 
contribution
-   continue;
-   }
-
-   $this->assertEquals( 1,
-   preg_match( "/^RECURRING GLOBALCOLLECT 
{$this->subscriptionId}-2\$/", $contribution['trxn_id'] ) );
-   }
-   }
-
-   public function testRecurringCharge() {
-   $init = array(
-   'contribution_tracking_id' => mt_rand(),
-   'amount' => '2345',
-   'effort_id' => 2,
-   'order_id' => '9998890004',
-   'currency_code' => 'EUR',
-   'payment_product' => '',
-   );
-   $gateway = DonationInterfaceFactory::createAdapter( 
'globalcollect', $init );
-
-   $gateway->setDummyGatewayResponseCode( 'recurrin

[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki...

2017-01-30 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335088 )

Change subject: Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment
..

Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment

3d77c71 Add index to nick_name field.
ea06847 Merge "Fix missing ct_id recovery"

Change-Id: Ifb3abdb1b0b43f57601ca2c2c4854fb6e9d440eb
---
D sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
1 file changed, 0 insertions(+), 210 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/88/335088/1

diff --git 
a/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
 
b/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
deleted file mode 100644
index a569bb5..000
--- 
a/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
+++ /dev/null
@@ -1,210 +0,0 @@
-<<< HEAD   (6b6f5d Merge branch 'master' into deployment)
-===
-subscriptionId = 'SUB-FOO-' . mt_rand();
-   $this->amount = '1.12';
-
-   $this->contributions = array();
-
-   $result = civicrm_api3( 'Contact', 'create', array(
-   'first_name' => 'Testes',
-   'contact_type' => 'Individual',
-   ) );
-   $this->contactId = $result['id'];
-
-   $result = civicrm_api3( 'ContributionRecur', 'create', array(
-   'contact_id' => $this->contactId,
-   'amount' => $this->amount,
-   'frequency_interval' => 1,
-   'frequency_unit' => 'month',
-   'next_sched_contribution' => 
wmf_common_date_unix_to_civicrm(strtotime('+1 month')),
-   'installments' => 0,
-   'processor_id' => 1,
-   'currency' => 'USD',
-   'trxn_id' => "RECURRING GLOBALCOLLECT 
{$this->subscriptionId}",
-   ) );
-   $this->contributionRecurId = $result['id'];
-
-   $result = civicrm_api3( 'Contribution', 'create', array(
-   'contact_id' => $this->contactId,
-   'contribution_recur_id' => $this->contributionRecurId,
-   'currency' => 'USD',
-   'total_amount' => $this->amount,
-   'contribution_type' => 'Cash',
-   'payment_instrument' => 'Credit Card',
-   'trxn_id' => 'RECURRING GLOBALCOLLECT 
STUB_ORIG_CONTRIB-' . mt_rand(),
-   ) );
-   $this->contributions[] = $result['id'];
-   wmf_civicrm_insert_contribution_tracking( '..rcc', 'civicrm', 
null, wmf_common_date_unix_to_sql( strtotime( 'now' ) ), $result['id'] );
-   }
-
-   function testChargeRecorded() {
-
-   // Get some extra access to the testing adapter :(
-   global $wgDonationInterfaceGatewayAdapters;
-   $wgDonationInterfaceGatewayAdapters['globalcollect'] = 
'TestingRecurringStubAdapter';
-
-   // Include using require_once rather than autoload because the 
file
-   // depends on a DonationInterface testing class we loaded above.
-   require_once __DIR__ . '/TestingRecurringStubAdapter.php';
-   TestingRecurringStubAdapter::$singletonDummyGatewayResponseCode 
= 'recurring-OK';
-
-   recurring_globalcollect_charge( $this->contributionRecurId );
-
-   $result = civicrm_api3( 'Contribution', 'get', array(
-   'contact_id' => $this->contactId,
-   ) );
-   $this->assertEquals( 2, count( $result['values'] ) );
-   foreach ( $result['values'] as $contribution ) {
-   if ( $contribution['id'] == $this->contributions[0] ) {
-   // Skip assertions on the synthetic original 
contribution
-   continue;
-   }
-
-   $this->assertEquals( 1,
-   preg_match( "/^RECURRING GLOBALCOLLECT 
{$this->subscriptionId}-2\$/", $contribution['trxn_id'] ) );
-   }
-   }
-
-   public function testRecurringCharge() {
-   $init = array(
-   'contribution_tracking_id' => mt_rand(),
-   'amount' => '2345',
-   'effort_id' => 2,
-   'order_id' => '9998890004',
-   'currency_code' => 'EUR',
-   'payment_product' => '',
-   );
-   $gateway = DonationInterfaceFactory::createAdapter( 
'globalcollect', $init );
-
-   $gateway->setDummyGatewayResponseCode(

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Config: Bump heap limit to 700 and heartbeat to 15s

2017-01-30 Thread Ppchelko (Code Review)
Ppchelko has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335087 )

Change subject: Config: Bump heap limit to 700 and heartbeat to 15s
..


Config: Bump heap limit to 700 and heartbeat to 15s

Change-Id: Idae3e993a7a66bed8192a9d7b9c3b4529e91f168
---
M scap/templates/config.yaml.j2
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index a3e5863..5c420a2 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -5,11 +5,11 @@
 
 # Log error messages and gracefully restart a worker if v8 reports that it
 # uses more heap (note: not RSS) than this many mb.
-worker_heap_limit_mb: 500
+worker_heap_limit_mb: 700
 
 # The maximum interval in ms that can pass between two beat messages
 # sent by each worker to the master before it is killed
-worker_heartbeat_timeout: 7500
+worker_heartbeat_timeout: 15000
 
 # Logger info
 logging:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idae3e993a7a66bed8192a9d7b9c3b4529e91f168
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Ppchelko 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Config: Bump heap limit to 700 and heartbeat to 15s

2017-01-30 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335087 )

Change subject: Config: Bump heap limit to 700 and heartbeat to 15s
..

Config: Bump heap limit to 700 and heartbeat to 15s

Change-Id: Idae3e993a7a66bed8192a9d7b9c3b4529e91f168
---
M scap/templates/config.yaml.j2
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/trending-edits/deploy 
refs/changes/87/335087/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index a3e5863..5c420a2 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -5,11 +5,11 @@
 
 # Log error messages and gracefully restart a worker if v8 reports that it
 # uses more heap (note: not RSS) than this many mb.
-worker_heap_limit_mb: 500
+worker_heap_limit_mb: 700
 
 # The maximum interval in ms that can pass between two beat messages
 # sent by each worker to the master before it is killed
-worker_heartbeat_timeout: 7500
+worker_heartbeat_timeout: 15000
 
 # Logger info
 logging:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idae3e993a7a66bed8192a9d7b9c3b4529e91f168
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Scap: Bump version to 3.5.1-1

2017-01-30 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/334677 )

Change subject: Scap: Bump version to 3.5.1-1
..


Scap: Bump version to 3.5.1-1

Update scap version and modify config for new version.

Bug: T127762
Change-Id: I015350dca1ffc7ee5746d587c8370d428383af35
---
M modules/scap/manifests/init.pp
M modules/scap/templates/scap.cfg.erb
2 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/modules/scap/manifests/init.pp b/modules/scap/manifests/init.pp
index 8461e22..7c267d8 100644
--- a/modules/scap/manifests/init.pp
+++ b/modules/scap/manifests/init.pp
@@ -12,7 +12,7 @@
 class scap (
 $deployment_server = 'deployment',
 $wmflabs_master = 'deployment-tin.deployment-prep.eqiad.wmflabs',
-$version = '3.4.2-1',
+$version = '3.5.1-1',
 ) {
 package { 'scap':
 ensure => $version,
diff --git a/modules/scap/templates/scap.cfg.erb 
b/modules/scap/templates/scap.cfg.erb
index d4cdef6..a829491 100644
--- a/modules/scap/templates/scap.cfg.erb
+++ b/modules/scap/templates/scap.cfg.erb
@@ -55,6 +55,7 @@
 dsh_app_canaries: mediawiki-appserver-canaries
 
 logstash_host: logstash1001.eqiad.wmnet:9200
+canary_service: mwdeploy
 
 [eqiad.wmnet]
 # Wikimedia Foundation production eqiad datacenter

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Always convert newlines to paragraph breaks in source mode

2017-01-30 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335086 )

Change subject: Always convert newlines to paragraph breaks in source mode
..

Always convert newlines to paragraph breaks in source mode

Some are getting through when imported from inside a  tag.

Bug: T156498
Change-Id: I2f99ab3d93e267c8b8b1a285a68d50f95ca14128
---
M build/modules.json
M src/dm/ve.dm.SourceSurfaceFragment.js
A tests/dm/ve.dm.SourceSurfaceFragment.test.js
M tests/index.html
4 files changed, 70 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/86/335086/1

diff --git a/build/modules.json b/build/modules.json
index 28c7629..0a414c5 100644
--- a/build/modules.json
+++ b/build/modules.json
@@ -672,6 +672,7 @@
"tests/dm/ve.dm.APIResultsQueue.test.js",
"tests/dm/ve.dm.Surface.test.js",
"tests/dm/ve.dm.SurfaceFragment.test.js",
+   "tests/dm/ve.dm.SourceSurfaceFragment.test.js",
"tests/dm/ve.dm.ModelRegistry.test.js",
"tests/dm/ve.dm.MetaList.test.js",
"tests/dm/ve.dm.Scalable.test.js",
diff --git a/src/dm/ve.dm.SourceSurfaceFragment.js 
b/src/dm/ve.dm.SourceSurfaceFragment.js
index ec7609c..298ec51 100644
--- a/src/dm/ve.dm.SourceSurfaceFragment.js
+++ b/src/dm/ve.dm.SourceSurfaceFragment.js
@@ -106,7 +106,8 @@
  * @inheritdoc
  */
 ve.dm.SourceSurfaceFragment.prototype.insertDocument = function ( doc, 
newDocRange, annotate ) {
-   var range = this.getSelection().getCoveringRange(),
+   var data,
+   range = this.getSelection().getCoveringRange(),
fragment = this;
 
if ( !range ) {
@@ -120,10 +121,18 @@
 
// Pass `annotate` as `ignoreCoveringAnnotations`. If matching the 
target annotation (plain text) strip covering annotations.
if ( doc.data.isPlainText( newDocRange, false, [ 'paragraph' ], 
annotate ) ) {
-   return 
ve.dm.SourceSurfaceFragment.super.prototype.insertContent.call( this, 
doc.data.getDataSlice( newDocRange ).map( function ( element ) {
+   data = doc.data.getDataSlice( newDocRange );
+   data.forEach( function ( element, i, arr ) {
// Remove any text annotations, as we have determined 
them to be covering
-   return Array.isArray( element ) ? element[ 0 ] : 
element;
-   } ) );
+   element = Array.isArray( element ) ? element[ 0 ] : 
element;
+   // Convert newlines to paragraph breaks (T156498)
+   if ( element === '\r' ) {
+   arr.splice( i, 1 );
+   } else if ( element === '\n' ) {
+   arr.splice( i, 1, { type: '/paragraph' }, { 
type: 'paragraph' } );
+   }
+   } );
+   return 
ve.dm.SourceSurfaceFragment.super.prototype.insertContent.call( this, data );
}
 
this.convertToSource( doc )
diff --git a/tests/dm/ve.dm.SourceSurfaceFragment.test.js 
b/tests/dm/ve.dm.SourceSurfaceFragment.test.js
new file mode 100644
index 000..3fa10fd
--- /dev/null
+++ b/tests/dm/ve.dm.SourceSurfaceFragment.test.js
@@ -0,0 +1,55 @@
+/*!,
+ * VisualEditor DataModel SourceSurfaceFragment tests.
+ *
+ * @copyright 2011-2017 VisualEditor Team and others; see 
http://ve.mit-license.org
+ */
+
+QUnit.module( 've.dm.SourceSurfaceFragment' );
+
+/* Tests */
+
+QUnit.test( 'insertContent/insertDocument', function ( assert ) {
+   var doc = ve.dm.example.createExampleDocumentFromData( [ { type: 
'paragraph' }, { type: '/paragraph' }, { type: 'internalList' }, { type: 
'/internalList' } ] ),
+   surface = new ve.dm.Surface( doc, { sourceMode: true } ),
+   fragment = surface.getLinearFragment( new ve.Range( 0 ) );
+
+   fragment.insertContent( [ { type: 'heading', attributes: { level: 1 } 
}, 'a', { type: '/heading' } ] );
+   assert.deepEqual(
+   doc.getData( new ve.Range( 0, 12 ) ),
+   [ { type: 'paragraph' } ].concat( 'a'.split( '' ) 
).concat( [ { type: '/paragraph' } ] ),
+   'Heading converted to HTML'
+   );
+
+   fragment.insertContent( 'foo\nbar' );
+   assert.deepEqual(
+   doc.getData( new ve.Range( 0, 10 ) ),
+   [
+   { type: 'paragraph' },
+   'f', 'o', 'o',
+   { type: '/paragraph' },
+   { type: 'paragraph' },
+   'b', 'a', 'r',
+   { type: '/paragraph' }
+   ],
+   'Newline in string split to paragraphs'
+   );
+
+   fragment.insertDocument( new ve.dm.Document( [
+   { type: 'paragraph' },
+ 

[MediaWiki-commits] [Gerrit] operations...tools-webservice[master]: kubernetesbackend: change absolute kubectl path to '/usr/bin...

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/334978 )

Change subject: kubernetesbackend: change absolute kubectl path to 
'/usr/bin/kubectl'
..


kubernetesbackend: change absolute kubectl path to '/usr/bin/kubectl'

It has been moved from '/usr/local/bin/kubectl' for some reason, and
subprocess fails with 'OSError: [Errno 2] No such file or directory'.

Bug: T156605
Change-Id: Id3d90cb9712431b1fe63603c4b2186f3466b4f8e
---
M debian/changelog
M toollabs/webservice/backends/kubernetesbackend.py
2 files changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/debian/changelog b/debian/changelog
index 266a6a7..8c99636 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+toollabs-webservice (0.32) trusty; urgency=medium
+
+  * change absolute kubectl path to '/usr/bin/kubectl'
+
+ -- YiFei Zhu  Mon, 30 Jan 2017 08:58:51 +
+
 toollabs-webservice (0.31) trusty; urgency=medium
 
   * guard against PYTHONPATH munging in caller's environment
diff --git a/toollabs/webservice/backends/kubernetesbackend.py 
b/toollabs/webservice/backends/kubernetesbackend.py
index 7385d11..39a6bbd 100644
--- a/toollabs/webservice/backends/kubernetesbackend.py
+++ b/toollabs/webservice/backends/kubernetesbackend.py
@@ -400,7 +400,7 @@
 self._delete_obj(pykube.Pod, self.shell_label_selector)
 sys.exit(1)
 kubectl = subprocess.Popen([
-'/usr/local/bin/kubectl',
+'/usr/bin/kubectl',
 'attach',
 '--tty',
 '--stdin',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id3d90cb9712431b1fe63603c4b2186f3466b4f8e
Gerrit-PatchSet: 2
Gerrit-Project: operations/software/tools-webservice
Gerrit-Branch: master
Gerrit-Owner: Zhuyifei1999 
Gerrit-Reviewer: Tim Landscheidt 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix "Edit History" link in notifications.

2017-01-30 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335085 )

Change subject: Fix "Edit History" link in notifications.
..

Fix "Edit History" link in notifications.

When a notification comes from Wikidata, the text() property contains the
Q-number, and the full() contains the label. When directing the user to
the edit history of the item, we actually want the Q-number, since
navigating to the label in Wikidata will go to a nonexistent page.

Change-Id: I2193847d1182dd58b28c31663de982ce89f6898f
---
M app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java 
b/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
index 4e31cd9..db381a8 100644
--- a/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
+++ b/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
@@ -30,7 +30,8 @@
 @DrawableRes int icon = R.mipmap.launcher;
 @ColorInt int color = ContextCompat.getColor(context, 
R.color.foundation_gray);
 
-Uri historyUri = uriForPath(n, "Special:History/" + n.title().full());
+Uri historyUri = uriForPath(n, "Special:History/"
++ (n.isFromWikidata() ? n.title().text() : n.title().full()));
 Uri agentUri = uriForPath(n, "User:" + n.agent().name());
 
 Intent pageIntent = PageActivity.newIntent(context, n.title().full());

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2193847d1182dd58b28c31663de982ce89f6898f
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Add missing module message fixer module.

2017-01-30 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335084 )

Change subject: Add missing module message fixer module.
..

Add missing module message fixer module.

When we deploy the next drupal update it litters our screen with messages about 
modules
removed but not uninstalled. To clean those up we install this & then run

drush mmmff --all

We could possibly remove this afterwards.

https://www.drupal.org/project/module_missing_message_fixer

Change-Id: If3f592813882378ae6b7d0e585ffc09166699c07
---
A sites/all/modules/contrib/module_missing_message_fixer/LICENSE.txt
A 
sites/all/modules/contrib/module_missing_message_fixer/includes/module_missing_message_fixer.admin.inc
A 
sites/all/modules/contrib/module_missing_message_fixer/includes/module_missing_message_fixer.drush.inc
A 
sites/all/modules/contrib/module_missing_message_fixer/module_missing_message_fixer.info
A 
sites/all/modules/contrib/module_missing_message_fixer/module_missing_message_fixer.module
5 files changed, 680 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/84/335084/1

diff --git a/sites/all/modules/contrib/module_missing_message_fixer/LICENSE.txt 
b/sites/all/modules/contrib/module_missing_message_fixer/LICENSE.txt
new file mode 100644
index 000..d159169
--- /dev/null
+++ b/sites/all/modules/contrib/module_missing_message_fixer/LICENSE.txt
@@ -0,0 +1,339 @@
+GNU GENERAL PUBLIC LICENSE
+   Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a porti

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Config: Bump max_age to 18h (1080 mins)

2017-01-30 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335083 )

Change subject: Config: Bump max_age to 18h (1080 mins)
..


Config: Bump max_age to 18h (1080 mins)

Bug: T156411
Change-Id: I0832895ca8d0cd7376e53fd07f301851666b9a34
---
M scap/templates/config.yaml.j2
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 1afa8e1..a3e5863 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -83,7 +83,7 @@
 # maximum time in minutes a page can go without edits
 max_inactivity: 1440
 # maximum age allowed in minutes
-max_age: 720
+max_age: 1080
 # minimum speed in edits per minute that a page is kept around
 min_speed: 0.1
   # the number of edits needed to take a page into account

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0832895ca8d0cd7376e53fd07f301851666b9a34
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Config: Bump max_age to 18h (1080 mins)

2017-01-30 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335083 )

Change subject: Config: Bump max_age to 18h (1080 mins)
..

Config: Bump max_age to 18h (1080 mins)

Bug: T156411
Change-Id: I0832895ca8d0cd7376e53fd07f301851666b9a34
---
M scap/templates/config.yaml.j2
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/trending-edits/deploy 
refs/changes/83/335083/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 1afa8e1..a3e5863 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -83,7 +83,7 @@
 # maximum time in minutes a page can go without edits
 max_inactivity: 1440
 # maximum age allowed in minutes
-max_age: 720
+max_age: 1080
 # minimum speed in edits per minute that a page is kept around
 min_speed: 0.1
   # the number of edits needed to take a page into account

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0832895ca8d0cd7376e53fd07f301851666b9a34
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: [UploadWizard] remove built-in jshint/jsonlint

2017-01-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335082 )

Change subject: [UploadWizard] remove built-in jshint/jsonlint
..


[UploadWizard] remove built-in jshint/jsonlint

Done via npm test nowadays.

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

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 468099d..b0196a8 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -8646,9 +8646,6 @@
   - name: extension-qunit-generic
   - name: npm
   - name: tox-jessie
-check:
-  - jshint
-  - jsonlint
 
   - name: mediawiki/extensions/UserDailyContribs
 template:

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

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

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


  1   2   3   4   >