[MediaWiki-commits] [Gerrit] mediawiki...UserMerge[master]: Remove deprecated PHP entry point

2017-03-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342576 )

Change subject: Remove deprecated PHP entry point
..

Remove deprecated PHP entry point

Bug: T140007
Change-Id: Id2b05ea71653edc319a3f327d0c293b3380418bc
---
D UserMerge.php
M extension.json
2 files changed, 1 insertion(+), 15 deletions(-)


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

diff --git a/UserMerge.php b/UserMerge.php
deleted file mode 100644
index 120aa80..000
--- a/UserMerge.php
+++ /dev/null
@@ -1,14 +0,0 @@
-https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   ); */
-   return;
-} else {
-   die( 'This version of the UserMerge extension requires MediaWiki 1.25+' 
);
-}
diff --git a/extension.json b/extension.json
index 274d3e3..08ded52 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "UserMerge",
-   "version": "1.10.0",
+   "version": "1.10.1",
"author": [
"Tim Laqua",
"Thomas Gries",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2b05ea71653edc319a3f327d0c293b3380418bc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UserMerge
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...WhoIsWatching[master]: Remove deprecated PHP entry point

2017-03-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342575 )

Change subject: Remove deprecated PHP entry point
..

Remove deprecated PHP entry point

Bug: T140007
Change-Id: I1b5a791e887e71ae353ec7c31bc1eeb3c5726c69
---
D WhoIsWatching.php
M extension.json
2 files changed, 1 insertion(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WhoIsWatching 
refs/changes/75/342575/1

diff --git a/WhoIsWatching.php b/WhoIsWatching.php
deleted file mode 100644
index a1822bc..000
--- a/WhoIsWatching.php
+++ /dev/null
@@ -1,12 +0,0 @@
-https://www.mediawiki.org/wiki/Special:ExtensionDistributor/WhoIsWatching
-
-To install WhoIsWatching extension, put the following line in 
LocalSettings.php:
-wfLoadExtension( "WhoIsWatching" );
-EOT;
-exit( 1 );
diff --git a/extension.json b/extension.json
index d43ce9e..8a8ab80 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "WhoIsWatching",
-   "version": "0.12.0",
+   "version": "0.12.1",
"license-name": "GPL-2.0",
"author": [
"Paul Grinberg",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b5a791e887e71ae353ec7c31bc1eeb3c5726c69
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhoIsWatching
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikiEditor[master]: Remove deprecated PHP entry point

2017-03-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342574 )

Change subject: Remove deprecated PHP entry point
..

Remove deprecated PHP entry point

Bug: T140007
Change-Id: I514be311a359cffd36e404bff3df2c5de05e3b21
---
D WikiEditor.php
M extension.json
2 files changed, 1 insertion(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiEditor 
refs/changes/74/342574/1

diff --git a/WikiEditor.php b/WikiEditor.php
deleted file mode 100644
index fe61803..000
--- a/WikiEditor.php
+++ /dev/null
@@ -1,13 +0,0 @@
-https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   ); */
-   return true;
-} else {
-   die( 'This version of the WikiEditor extension requires MediaWiki 
1.25+' );
-}
diff --git a/extension.json b/extension.json
index d0491fe..207fe05 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "WikiEditor",
-   "version": "0.5.0",
+   "version": "0.5.1",
"author": [
"Derk-Jan Hartman",
"Trevor Parscal",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I514be311a359cffd36e404bff3df2c5de05e3b21
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix pronunciation parsing issues

2017-03-13 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342573 )

Change subject: Fix pronunciation parsing issues
..

Fix pronunciation parsing issues

Some pronunciation file names with special characters caused issues
by creating invalid CSS selectors. In the example of
http://localhost:6927/ur.wikipedia.org/v1/page/mobile-sections/%D8%A2%D8%A6%DB%8C%D9%88%D8%B1%DB%8C_%DA%A9%D9%88%D8%B3%D9%B9
it was a single quote character but there could be others. A list can be
found in the function Sanitizer.cleanUrl
in 
https://github.com/wikimedia/parsoid/blob/master/lib/wt2html/tt/Sanitizer.js#L630
and phpURLEncode() in
https://github.com/wikimedia/parsoid/blob/master/lib/utils/Util.js#L1004-L1012

This is a follow up from the fix of T156941.

Also bump up the mobile-sections version for this bug fix.

Bug: T156941
Bug: T159252
Change-Id: I6fa159562c9bab1ebf24f35c4ee9e57fd5f4cd25
---
M lib/mobile-util.js
M lib/parseProperty.js
M test/features/mobile-sections-lead/pagecontent.js
A test/features/mobile-sections-lead/parse-pronunciation-selector-chars-test.js
M test/features/mobile-sections-lead/parse-pronunciation-test.js
5 files changed, 69 insertions(+), 10 deletions(-)


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

diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index a0b451b..d31608d 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -7,7 +7,7 @@
 
 
 mUtil.CONTENT_TYPES = {
-mobileSections: { name: 'mobile-sections', version: '0.9.1' },
+mobileSections: { name: 'mobile-sections', version: '0.9.2' },
 definition: { name: 'definition', version: '0.7.1' },
 
 random: { name: 'random', version: '0.6.0' },
diff --git a/lib/parseProperty.js b/lib/parseProperty.js
index 9da7e4e..9903f60 100644
--- a/lib/parseProperty.js
+++ b/lib/parseProperty.js
@@ -5,7 +5,7 @@
 
 'use strict';
 
-const mUtil = require('../lib/mobile-util');
+const mUtil = require('./mobile-util');
 const escape = require('escape-string-regexp');
 
 function parseInfobox(doc) {
@@ -33,8 +33,16 @@
 return url && url.replace(/^.*wiki\/File:/, '');
 }
 
+const minimalEncoding = (txt) => {
+return txt
+.replace(/"/g, '%22')
+.replace(/'/g, '%27')
+.replace(/\[/g, '%5B')
+.replace(/\]/g, '%5D');
+};
+
 function filePageUrlToFileUrlSelector(filePageUrl) {
-const plainSelector = 
`a[href^=//][href$=${filePageUrlToFilename(filePageUrl)}]`;
+const selector = 
`a[href^=//][href$=${minimalEncoding(filePageUrlToFilename(filePageUrl))}]`;
 // NOTE: escape() is deprecated, but encodes certain filenames correctly, 
whereas the preferred
 // encodeURI() and encodeURIComponent() both fail.  One such example is
 // 'En-us-Yazidis_from_Iraq_pronunciation_(Voice_of_America).ogg'.
@@ -43,7 +51,7 @@
 = 
`a[href^=//][href$=${global.escape(filePageUrlToFilename(filePageUrl))}]`;
 // TODO: reevaluate whether the dual selector is necessary
 return filePageUrl
-&& `${plainSelector}, ${escapedSelector}`;
+&& `${selector}, ${escapedSelector}`;
 }
 
 function pickPronunciationFilePageUrl(urls, title) {
@@ -139,5 +147,8 @@
 parsePronunciation,
 parseSpokenWikipedia,
 parseGeo,
-_pickPronunciationFilePageUrl: pickPronunciationFilePageUrl
+testing: {
+pickPronunciationFilePageUrl,
+filePageUrlToFileUrlSelector
+}
 };
diff --git a/test/features/mobile-sections-lead/pagecontent.js 
b/test/features/mobile-sections-lead/pagecontent.js
index f805ad9..3678643 100644
--- a/test/features/mobile-sections-lead/pagecontent.js
+++ b/test/features/mobile-sections-lead/pagecontent.js
@@ -188,6 +188,14 @@
assert.deepEqual(lead.pronunciation.url, exp);
});
 });
+it('\' in pronunciation file name does not cause parsing error)', () => {
+const title = 
`%D8%A2%D8%A6%DB%8C%D9%88%D8%B1%DB%8C_%DA%A9%D9%88%D8%B3%D9%B9`;
+const uri = 
`${server.config.uri}ur.wikipedia.org/v1/page/mobile-sections-lead/${title}`;
+return preq.get({ uri })
+   .then((res) => {
+   assert.deepEqual(res.status, 200);
+   });
+});
 it('Enwiki Lead_paragraph_move has the infobox moved after the lead 
paragraph', () => {
 const title = 
`User:BSitzmann_%28WMF%29%2FMCS%2FTest%2FLead_paragraph_move`;
 const uri = 
`${server.config.uri}en.wikipedia.org/v1/page/mobile-sections-lead/${title}`;
diff --git 
a/test/features/mobile-sections-lead/parse-pronunciation-selector-chars-test.js 
b/test/features/mobile-sections-lead/parse-pronunciation-selector-chars-test.js
new file mode 100644
index 000..5004396
--- /dev/null
+++ 
b/test/features/mobile-sections-lead/parse-pronunciation-selector-chars-test.js
@@ -0,0 +1,40 @@
+'use strict';
+
+const domino = require('domino');
+const assert = 

[MediaWiki-commits] [Gerrit] mediawiki...WikiLove[master]: Remove deprecated PHP entry point

2017-03-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342572 )

Change subject: Remove deprecated PHP entry point
..

Remove deprecated PHP entry point

Bug: T140007
Change-Id: Iee9d56e79717baaea71a54547f4ab9aa9f7ade51
---
D WikiLove.php
M extension.json
2 files changed, 1 insertion(+), 41 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiLove 
refs/changes/72/342572/1

diff --git a/WikiLove.php b/WikiLove.php
deleted file mode 100644
index b221641..000
--- a/WikiLove.php
+++ /dev/null
@@ -1,40 +0,0 @@
-http://www.mediawiki.org/wiki/Extension:WikiLove
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to 
deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * This program is distributed WITHOUT ANY WARRANTY.
- *
- * Heart icon by Mark James (Creative Commons Attribution 3.0 License)
- * Interface design by Brandon Harris
- *
- * @file
- * @ingroup Extensions
- * @author Ryan Kaldari
- * @author Jan Paul Posma
- * @author Sam Reed
- * @licence MIT License
- */
-
-if ( function_exists( 'wfLoadExtension' ) ) {
-   wfLoadExtension( 'WikiLove' );
-   // Keep i18n globals so mergeMessageFileList.php doesn't break
-   $wgMessagesDirs['WikiLove'] = __DIR__ . '/i18n';
-   /*wfWarn(
-   'Deprecated PHP entry point used for WikiLove extension. Please 
use wfLoadExtension instead, ' .
-   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   );*/
-   return;
-} else {
-   die( 'This version of the WikiLove extension requires MediaWiki 1.25+' 
);
-}
\ No newline at end of file
diff --git a/extension.json b/extension.json
index 37a18eb..7f808d4 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "WikiLove",
-   "version": "1.3.0",
+   "version": "1.3.1",
"author": [
"Ryan Kaldari",
"Jan Paul Posma",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee9d56e79717baaea71a54547f4ab9aa9f7ade51
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLove
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

___
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: Simplify Radio- & Checkbox*optionWidget lab...

2017-03-13 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342571 )

Change subject: MediaWiki theme: Simplify Radio- & Checkbox*optionWidget label 
rules
..

MediaWiki theme: Simplify Radio- & Checkbox*optionWidget label rules

Simplify RadioOptionWidget and CheckboxMultioptionWidget label's
vertical spacing rules, also introducing new Less variables and
cleanup leftover not applied or duplicated selectors & properties.

Change-Id: I2566370006c86d0580dfa691c915d6f2b6cf3dea
---
M src/styles/widgets/CheckboxMultioptionWidget.less
M src/styles/widgets/RadioOptionWidget.less
M src/themes/mediawiki/common.less
M src/themes/mediawiki/widgets.less
4 files changed, 7 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/71/342571/1

diff --git a/src/styles/widgets/CheckboxMultioptionWidget.less 
b/src/styles/widgets/CheckboxMultioptionWidget.less
index 9314071..42cb97a 100644
--- a/src/styles/widgets/CheckboxMultioptionWidget.less
+++ b/src/styles/widgets/CheckboxMultioptionWidget.less
@@ -1,8 +1,6 @@
 @import '../common';
 
 .oo-ui-checkboxMultioptionWidget {
-   cursor: default;
-
.oo-ui-checkboxInputWidget,
&.oo-ui-labelElement .oo-ui-labelElement-label {
display: inline-block;
diff --git a/src/styles/widgets/RadioOptionWidget.less 
b/src/styles/widgets/RadioOptionWidget.less
index 9a83997..c8641bd 100644
--- a/src/styles/widgets/RadioOptionWidget.less
+++ b/src/styles/widgets/RadioOptionWidget.less
@@ -1,8 +1,6 @@
 @import '../common';
 
 .oo-ui-radioOptionWidget {
-   cursor: default;
-
.oo-ui-radioInputWidget,
&.oo-ui-labelElement .oo-ui-labelElement-label {
display: inline-block;
diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less
index 6732f3c..fecdf46 100644
--- a/src/themes/mediawiki/common.less
+++ b/src/themes/mediawiki/common.less
@@ -61,7 +61,7 @@
 @border-toolbar: @border-width-default solid #c8ccd1;
 
 // Box Sizes
-@min-width-button-default: 40 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `3.125em`≈`40px` at base `font-size: 
12.8px` // equals `40px` at base `font-size: 0.8em`
+@min-width-button-default: 40 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `3.125em`≈`40px` at base `font-size: 12.8px`
 @min-width-button-combo-widget: 32 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `2.5em`≈`32px` at base `font-size: 12.8px`
 @min-height-button-default: 32 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default;
 @min-height-toggleswitch: 26px; // equals `16px` @size-toggleswitch-grip-min + 
4px*2 distance top/bottom + 1px*2 border top/bottom
@@ -107,6 +107,7 @@
 
 @padding-widget-default: 7 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `0.547em`≈`7px` at base `font-size: 12.8px`
 @padding-top-input-text: 8 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `0.625em`≈`8px` at base `font-size: 12.8px`
+@padding-vertical-label: 4 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `0.3125em`≈`4px` at base `font-size: 12.8px`
 
 @box-shadow-dialog: 0 2px 2px 0 rgba( 0, 0, 0, 0.25 );
 @box-shadow-menu: @box-shadow-dialog;
@@ -147,8 +148,8 @@
 @border-color-input-binary: @border-color-default-active;
 @border-color-input-binary-active: @color-progressive-active;
 @border-color-input-binary-on: @color-progressive;
+@padding-start-input-binary-label: 6 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `0.46875em`≈`6px` at base `font-size: 
12.8px`
 @box-shadow-input-binary: 0 0 0 1px rgba( 0, 0, 0, 0.1 );
-@padding-input-binary-label: 0.25em 0.25em 0.25em 0.46875em;
 
 // Theme mixins
 
diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index 8872c16..fcbfb87 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -1127,7 +1127,6 @@
 
 .theme-oo-ui-optionWidget () {
border: 0;
-   padding: 0.25em 0.5em;
 
.oo-ui-labelElement-label {
line-height: @line-height-default;
@@ -1181,17 +1180,10 @@
 }
 
 .theme-oo-ui-radioOptionWidget () {
-   padding: 0.25em 0;
-   background-color: transparent;
-
-   &.oo-ui-optionWidget-selected,
-   &.oo-ui-optionWidget-pressed,
-   &.oo-ui-optionWidget-highlighted {
-   background-color: transparent;
-   }
+   padding: @padding-vertical-label 0;
 
&.oo-ui-labelElement .oo-ui-labelElement-label {
-   padding: @padding-input-binary-label;
+   padding-left: @padding-start-input-binary-label;
}
 
.oo-ui-radioInputWidget {
@@ -1818,10 +1810,10 @@
 .theme-oo-ui-checkboxMultiselectWidget () {}
 
 .theme-oo-ui-checkboxMultioptionWidget () {
-   padding: 0.25em 0;
+   padding: @padding-vertical-label 0;
 
&.oo-ui-labelElement 

[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQuality[master]: Remove deprecated PHP entry point

2017-03-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342570 )

Change subject: Remove deprecated PHP entry point
..

Remove deprecated PHP entry point

Bug: T140007
Change-Id: I05acf0baccad274fd9c560c2651952542f324dd0
---
D WikibaseQuality.php
M extension.json
2 files changed, 1 insertion(+), 15 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQuality 
refs/changes/70/342570/1

diff --git a/WikibaseQuality.php b/WikibaseQuality.php
deleted file mode 100644
index f27bc8a..000
--- a/WikibaseQuality.php
+++ /dev/null
@@ -1,14 +0,0 @@
-https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   );*/
-   return;
-} else {
-   die( 'This version of the WikibaseQuality extension requires MediaWiki 
1.25+' );
-}
diff --git a/extension.json b/extension.json
index 0de28b9..9868911 100644
--- a/extension.json
+++ b/extension.json
@@ -4,7 +4,7 @@
"author": "BP2014N1",
"url": "https://www.mediawiki.org/wiki/Extension:WikibaseQuality;,
"descriptionmsg": "wbq-desc",
-   "version": "1.0.0",
+   "version": "1.0.1",
"type": "wikibase",
"license-name": "GPL-2.0+",
"MessagesDirs": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05acf0baccad274fd9c560c2651952542f324dd0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQuality
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikidataPageBanner[master]: Remove deprecated PHP entry point

2017-03-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342569 )

Change subject: Remove deprecated PHP entry point
..

Remove deprecated PHP entry point

Bug: T140007
Change-Id: I9ed57903e319ac23b929561c5bad880a69dd5374
---
D WikidataPageBanner.php
M extension.json
2 files changed, 1 insertion(+), 24 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataPageBanner 
refs/changes/69/342569/1

diff --git a/WikidataPageBanner.php b/WikidataPageBanner.php
deleted file mode 100644
index 2590d11..000
--- a/WikidataPageBanner.php
+++ /dev/null
@@ -1,23 +0,0 @@
-http://mediawiki.org/wiki/Extension:WikidataPageBanner
- * @author Sumit Asthana, 2015
- * @license GNU General Public Licence 2.0 or later
- */
-
-if ( function_exists( 'wfLoadExtension' ) ) {
-   wfLoadExtension( 'WikidataPageBanner' );
-   // Keep i18n globals so mergeMessageFileList.php doesn't break
-   $wgMessagesDirs['WikidataPageBanner'] = __DIR__ . '/i18n';
-   $wgExtensionMessagesFiles['WikidataPageBannerMagic'] =
-   __DIR__ . '/WikidataPageBanner.i18n.magic.php';
-   /* wfWarn(
-   'Deprecated PHP entry point used for WikidataPageBanner 
extension. Please use wfLoadExtension'.
-   'instead, see 
https://www.mediawiki.org/wiki/Extension_registration for more details.'
-   ); */
-   return;
-} else {
-   die( 'This version of the WikidataPageBanner extension requires 
MediaWiki 1.25+' );
-}
diff --git a/extension.json b/extension.json
index baed1a9..71cbd4d 100644
--- a/extension.json
+++ b/extension.json
@@ -1,7 +1,7 @@
 {
"name": "WikidataPageBanner",
"namemsg": "wikidatapagebanner-extensionname",
-   "version": "0.0.1",
+   "version": "0.0.2",
"author": [
"Sumit Asthana"
],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ed57903e319ac23b929561c5bad880a69dd5374
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataPageBanner
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Remove deprecated PHP entry point

2017-03-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342568 )

Change subject: Remove deprecated PHP entry point
..

Remove deprecated PHP entry point

Bug: T140007
Change-Id: I3870b0e5da2a5bcca0d67f79c906e018ace58341
---
D WikimediaEvents.php
M extension.json
2 files changed, 1 insertion(+), 27 deletions(-)


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

diff --git a/WikimediaEvents.php b/WikimediaEvents.php
deleted file mode 100644
index 954f3b5..000
--- a/WikimediaEvents.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- * @author Matthew Flaschen 
- * @author Benny Situ 
- *
- * @license GPL v2 or later
- * @version 1.0
- */
-
-if ( function_exists( 'wfLoadExtension' ) ) {
-   wfLoadExtension( 'WikimediaEvents' );
-   // Keep i18n globals so mergeMessageFileList.php doesn't break
-   $wgMessagesDirs['WikimediaEvents'] = __DIR__ . '/i18n';
-   /*wfWarn(
-   'Deprecated PHP entry point used for FooBar extension. Please 
use wfLoadExtension instead, ' .
-   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   );*/
-   return;
-} else {
-   die( 'This version of the WikimediaEvents extension requires MediaWiki 
1.25+' );
-}
\ No newline at end of file
diff --git a/extension.json b/extension.json
index 1ef3327..02fcc0f 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "WikimediaEvents",
-   "version": "1.1.0",
+   "version": "1.1.1",
"author": [
"Matthew Flaschen",
"Ori Livneh",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3870b0e5da2a5bcca0d67f79c906e018ace58341
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaIncubator[master]: Remove deprecated PHP entry point

2017-03-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342567 )

Change subject: Remove deprecated PHP entry point
..

Remove deprecated PHP entry point

Bug: T140007
Change-Id: I1bdeb1888b40a3c424def875c9dd732b132a7676
---
D WikimediaIncubator.php
M extension.json
2 files changed, 1 insertion(+), 18 deletions(-)


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

diff --git a/WikimediaIncubator.php b/WikimediaIncubator.php
deleted file mode 100644
index 2b74fcf..000
--- a/WikimediaIncubator.php
+++ /dev/null
@@ -1,17 +0,0 @@
-https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   ); */
-   return;
-} else {
-   die( 'This version of the WikimediaIncubator extension requires 
MediaWiki 1.25+' );
-}
diff --git a/extension.json b/extension.json
index e651fbe..acf930d 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "Wikimedia Incubator",
-   "version": "5.3.0",
+   "version": "5.3.1",
"author": [
"SPQRobin",
"Hydriz"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1bdeb1888b40a3c424def875c9dd732b132a7676
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaIncubator
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...XAnalytics[master]: Remove deprecated PHP entry point

2017-03-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342566 )

Change subject: Remove deprecated PHP entry point
..

Remove deprecated PHP entry point

Bug: T140007
Change-Id: I7f343c9be98bb8786a16d7cd004d46b1ea52f423
---
D XAnalytics.php
M extension.json
2 files changed, 2 insertions(+), 16 deletions(-)


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

diff --git a/XAnalytics.php b/XAnalytics.php
deleted file mode 100644
index aff27a2..000
--- a/XAnalytics.php
+++ /dev/null
@@ -1,14 +0,0 @@
-https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   );*/
-   return;
-} else {
-   die( 'This version of the XAnalytics extension requires MediaWiki 
1.25+' );
-}
\ No newline at end of file
diff --git a/extension.json b/extension.json
index 6388d36..8a00ad6 100644
--- a/extension.json
+++ b/extension.json
@@ -6,7 +6,7 @@
"author": [
"Ori Livneh"
],
-   "version": "0.1",
+   "version": "0.2",
"type": "other",
"AutoloadClasses": {
"XAnalytics": "XAnalytics.class.php"
@@ -25,4 +25,4 @@
]
},
"manifest_version": 1
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f343c9be98bb8786a16d7cd004d46b1ea52f423
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/XAnalytics
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...ZeroBanner[master]: Remove deprecated PHP entry point

2017-03-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342565 )

Change subject: Remove deprecated PHP entry point
..

Remove deprecated PHP entry point

Bug: T140007
Change-Id: I516db30d54386069512221753969014a76f4fbb6
---
D ZeroBanner.php
M extension.json
2 files changed, 1 insertion(+), 19 deletions(-)


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

diff --git a/ZeroBanner.php b/ZeroBanner.php
deleted file mode 100644
index 3fc6d50..000
--- a/ZeroBanner.php
+++ /dev/null
@@ -1,18 +0,0 @@
-https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   ); */
-   return;
-} else {
-   die( 'This version of the ZeroBanner extension requires MediaWiki 
1.28+' );
-}
diff --git a/extension.json b/extension.json
index e3778d7..624b8ed 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "ZeroBanner",
-   "version": "1.1.0",
+   "version": "1.1.1",
"author": [
"Patrick Reilly",
"Yuri Astrakhan"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I516db30d54386069512221753969014a76f4fbb6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroBanner
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...ZeroPortal[master]: Remove deprecated PHP entry point

2017-03-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342564 )

Change subject: Remove deprecated PHP entry point
..

Remove deprecated PHP entry point

Bug: T140007
Change-Id: Ia1efd30e135ae20a12140c04db7a5a177948971a
---
D ZeroPortal.php
M extension.json
2 files changed, 1 insertion(+), 17 deletions(-)


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

diff --git a/ZeroPortal.php b/ZeroPortal.php
deleted file mode 100644
index ef35ba9..000
--- a/ZeroPortal.php
+++ /dev/null
@@ -1,16 +0,0 @@
-https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   );*/
-   return;
-} else {
-   die( 'This version of the ZeroPortal extension requires MediaWiki 
1.28+' );
-}
diff --git a/extension.json b/extension.json
index 0810889..3943938 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "ZeroPortal",
-   "version": "1.1.0",
+   "version": "1.1.1",
"author": [
"Yuri Astrakhan"
],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1efd30e135ae20a12140c04db7a5a177948971a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroPortal
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...ExtensionDistributor[master]: Remove deprecated PHP entry point

2017-03-13 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342563 )

Change subject: Remove deprecated PHP entry point
..

Remove deprecated PHP entry point

Bug: T140007
Change-Id: I39cb22f2131b72dfa11eaf9496d5773a59a4631e
---
D ExtensionDistributor.php
1 file changed, 0 insertions(+), 15 deletions(-)


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

diff --git a/ExtensionDistributor.php b/ExtensionDistributor.php
deleted file mode 100644
index 6870a4d..000
--- a/ExtensionDistributor.php
+++ /dev/null
@@ -1,15 +0,0 @@
-https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   ); */
-   return;
-} else {
-   die( 'This version of the ExtensionDistributor extension requires 
MediaWiki 1.25+' );
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I39cb22f2131b72dfa11eaf9496d5773a59a4631e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ExtensionDistributor
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...RemexHtml[master]: Basic PHPLint support

2017-03-13 Thread Tim Starling (Code Review)
Tim Starling has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342562 )

Change subject: Basic PHPLint support
..

Basic PHPLint support

Move src to a directory named after the namespace RemexHtml, to support
PHPLint's idea of autoloading.

Ran PHPLint 3.0 and fixed a few minor issues. There are still many, many
errors, and it's not a goal to fix them. But I was able to verify that there
are no unintentional missing breaks, or variables accessed before their
assignment.

Change-Id: Icb269d934a80bdfe0332c0003c854bffdc58eb71
---
R RemexHtml/DOM/DOMBuilder.php
R RemexHtml/DOM/DOMFormatter.php
R RemexHtml/DOM/DOMSerializer.php
R RemexHtml/DOM/DOMUtils.php
R RemexHtml/FuzzTest/CharacterSalad.php
R RemexHtml/FuzzTest/FuzzData.php
R RemexHtml/FuzzTest/FuzzTest.php
R RemexHtml/FuzzTest/Html5Depurate.php
R RemexHtml/FuzzTest/TokenSalad.php
R RemexHtml/FuzzTest/Utils.php
R RemexHtml/FuzzTest/validatornu-dictionary
R RemexHtml/GenerateDataFiles.php
R RemexHtml/HTMLData.php
R RemexHtml/PropGuard.php
R RemexHtml/Serializer/AbstractSerializer.php
R RemexHtml/Serializer/DepurateFormatter.php
R RemexHtml/Serializer/FastFormatter.php
R RemexHtml/Serializer/Formatter.php
R RemexHtml/Serializer/HtmlFormatter.php
R RemexHtml/Serializer/Serializer.php
R RemexHtml/Serializer/SerializerError.php
R RemexHtml/Serializer/SerializerNode.php
R RemexHtml/Serializer/TestFormatter.php
R RemexHtml/Tokenizer/Attribute.php
R RemexHtml/Tokenizer/Attributes.php
R RemexHtml/Tokenizer/LazyAttributes.php
R RemexHtml/Tokenizer/PlainAttributes.php
R RemexHtml/Tokenizer/TestTokenHandler.php
R RemexHtml/Tokenizer/TokenGenerator.php
R RemexHtml/Tokenizer/TokenGeneratorHandler.php
R RemexHtml/Tokenizer/TokenHandler.php
R RemexHtml/Tokenizer/TokenSerializer.php
R RemexHtml/Tokenizer/Tokenizer.php
R RemexHtml/Tokenizer/TokenizerError.php
R RemexHtml/TreeBuilder/ActiveFormattingElements.php
R RemexHtml/TreeBuilder/AfterAfterBody.php
R RemexHtml/TreeBuilder/AfterAfterFrameset.php
R RemexHtml/TreeBuilder/AfterBody.php
R RemexHtml/TreeBuilder/AfterFrameset.php
R RemexHtml/TreeBuilder/AfterHead.php
R RemexHtml/TreeBuilder/BeforeHead.php
R RemexHtml/TreeBuilder/BeforeHtml.php
R RemexHtml/TreeBuilder/CachingStack.php
R RemexHtml/TreeBuilder/DestructTracer.php
R RemexHtml/TreeBuilder/DestructTracerNode.php
R RemexHtml/TreeBuilder/DispatchTracer.php
R RemexHtml/TreeBuilder/Dispatcher.php
R RemexHtml/TreeBuilder/Element.php
R RemexHtml/TreeBuilder/ForeignAttributes.php
R RemexHtml/TreeBuilder/FormattingElement.php
R RemexHtml/TreeBuilder/InBody.php
R RemexHtml/TreeBuilder/InCaption.php
R RemexHtml/TreeBuilder/InCell.php
R RemexHtml/TreeBuilder/InColumnGroup.php
R RemexHtml/TreeBuilder/InForeignContent.php
R RemexHtml/TreeBuilder/InFrameset.php
R RemexHtml/TreeBuilder/InHead.php
R RemexHtml/TreeBuilder/InHeadNoscript.php
R RemexHtml/TreeBuilder/InPre.php
R RemexHtml/TreeBuilder/InRow.php
R RemexHtml/TreeBuilder/InSelect.php
R RemexHtml/TreeBuilder/InSelectInTable.php
R RemexHtml/TreeBuilder/InTable.php
R RemexHtml/TreeBuilder/InTableBody.php
R RemexHtml/TreeBuilder/InTableText.php
R RemexHtml/TreeBuilder/InTemplate.php
R RemexHtml/TreeBuilder/InTextarea.php
R RemexHtml/TreeBuilder/Initial.php
R RemexHtml/TreeBuilder/InsertionMode.php
R RemexHtml/TreeBuilder/Marker.php
R RemexHtml/TreeBuilder/SimpleStack.php
R RemexHtml/TreeBuilder/Stack.php
R RemexHtml/TreeBuilder/TemplateModeStack.php
R RemexHtml/TreeBuilder/Text.php
R RemexHtml/TreeBuilder/TreeBuilder.php
R RemexHtml/TreeBuilder/TreeBuilderError.php
R RemexHtml/TreeBuilder/TreeHandler.php
R RemexHtml/TreeBuilder/TreeMutationTracer.php
M composer.json
A tests/phplint/autoload.php
A tests/phplint/phplint
81 files changed, 45 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/libs/RemexHtml 
refs/changes/62/342562/1

diff --git a/src/DOM/DOMBuilder.php b/RemexHtml/DOM/DOMBuilder.php
similarity index 100%
rename from src/DOM/DOMBuilder.php
rename to RemexHtml/DOM/DOMBuilder.php
diff --git a/src/DOM/DOMFormatter.php b/RemexHtml/DOM/DOMFormatter.php
similarity index 87%
rename from src/DOM/DOMFormatter.php
rename to RemexHtml/DOM/DOMFormatter.php
index dad8a7d..2a84f0e 100644
--- a/src/DOM/DOMFormatter.php
+++ b/RemexHtml/DOM/DOMFormatter.php
@@ -14,7 +14,7 @@
/**
 * Non-recursively format a DOMElement.
 *
-* @param DOMElement $Element The element to format
+* @param DOMElement $element The element to format
 * @param string $contents The formatted contents of the element
 */
function formatDOMElement( \DOMElement $element, $contents );
diff --git a/src/DOM/DOMSerializer.php b/RemexHtml/DOM/DOMSerializer.php
similarity index 100%
rename from src/DOM/DOMSerializer.php
rename to RemexHtml/DOM/DOMSerializer.php
diff --git a/src/DOM/DOMUtils.php b/RemexHtml/DOM/DOMUtils.php
similarity index 100%
rename from src/DOM/DOMUtils.php

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Better path traversal prevention in TemplateParser.

2017-03-13 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342561 )

Change subject: Better path traversal prevention in TemplateParser.
..

Better path traversal prevention in TemplateParser.

In practise this probably doesn't matter, since template names
are not user controlled, and php isn't stupid enough to fall for
tricks with nulls (afaict). Nonetheless, the code from Title is
only meant to prevent url traversal, it is not meant to prevent
file system path traversal.

Change-Id: Id690576326d03744acc8fbbe78f4b7a4b4c04d7e
---
M includes/TemplateParser.php
1 file changed, 6 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/61/342561/1

diff --git a/includes/TemplateParser.php b/includes/TemplateParser.php
index 470a75c..f581a80 100644
--- a/includes/TemplateParser.php
+++ b/includes/TemplateParser.php
@@ -54,18 +54,11 @@
 * @throws UnexpectedValueException If $templateName attempts upwards 
directory traversal
 */
protected function getTemplateFilename( $templateName ) {
-   // Prevent upwards directory traversal using same methods as 
Title::secureAndSplit
+   // Prevent path traversal. Based on Language::isValidCode().
+   // This is for paranoia. The $templateName should never come 
from
+   // untrusted input.
if (
-   strpos( $templateName, '.' ) !== false &&
-   (
-   $templateName === '.' || $templateName === '..' 
||
-   strpos( $templateName, './' ) === 0 ||
-   strpos( $templateName, '../' ) === 0 ||
-   strpos( $templateName, '/./' ) !== false ||
-   strpos( $templateName, '/../' ) !== false ||
-   substr( $templateName, -2 ) === '/.' ||
-   substr( $templateName, -3 ) === '/..'
-   )
+   strcspn( $templateName, ":/\\\000&<>'\"%" ) !== strlen( 
$templateName )
) {
throw new UnexpectedValueException( "Malformed 
\$templateName: $templateName" );
}
@@ -128,6 +121,8 @@
$code = $this->compileForEval( $fileContents, $filename 
);
}
 
+   echo "About to eval:\n";
+   echo $code;
$renderer = eval( $code );
if ( !is_callable( $renderer ) ) {
throw new RuntimeException( "Requested template, 
{$templateName}, is not callable" );

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Clean up obsolete code in cosmetic_changes.py

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

Change subject: Clean up obsolete code in cosmetic_changes.py
..


Clean up obsolete code in cosmetic_changes.py

The exception handling is done in CurrentPageBot._save_page().

Change-Id: I082f49c7df2edf8910722910cca20ca486e575fe
---
M scripts/cosmetic_changes.py
1 file changed, 8 insertions(+), 15 deletions(-)

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



diff --git a/scripts/cosmetic_changes.py b/scripts/cosmetic_changes.py
index def3673..1fc260f 100644
--- a/scripts/cosmetic_changes.py
+++ b/scripts/cosmetic_changes.py
@@ -27,7 +27,7 @@
 """
 #
 # (C) xqt, 2009-2013
-# (C) Pywikibot team, 2006-2015
+# (C) Pywikibot team, 2006-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -71,20 +71,13 @@
 
 def treat_page(self):
 """Treat page with the cosmetic toolkit."""
-try:
-ccToolkit = cosmetic_changes.CosmeticChangesToolkit.from_page(
-self.current_page, False, self.getOption('ignore'))
-changedText = ccToolkit.change(self.current_page.get())
-if changedText is not False:
-self.put_current(new_text=changedText,
- summary=self.getOption('summary'),
- async=self.getOption('async'))
-except pywikibot.LockedPage:
-pywikibot.output("Page %s is locked?!"
- % self.current_page.title(asLink=True))
-except pywikibot.EditConflict:
-pywikibot.output("An edit conflict has occurred at %s."
- % self.current_page.title(asLink=True))
+ccToolkit = cosmetic_changes.CosmeticChangesToolkit.from_page(
+self.current_page, False, self.getOption('ignore'))
+changedText = ccToolkit.change(self.current_page.get())
+if changedText is not False:
+self.put_current(new_text=changedText,
+ summary=self.getOption('summary'),
+ async=self.getOption('async'))
 
 
 def main(*args):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I082f49c7df2edf8910722910cca20ca486e575fe
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Add another sandbox page to clean

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

Change subject: Add another sandbox page to clean
..


Add another sandbox page to clean

Change-Id: I339ff9b7528c19d45c8f10d4486bcb04be33d625
---
M scripts/clean_sandbox.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/scripts/clean_sandbox.py b/scripts/clean_sandbox.py
index ea00fd2..2019321 100755
--- a/scripts/clean_sandbox.py
+++ b/scripts/clean_sandbox.py
@@ -107,7 +107,7 @@
 'zh': '{{subst:User:Sz-iwbot/sandbox}}\n',
 }
 
-sandbox_titles = ('Q3938', )
+sandbox_titles = ('Q3938', 'Q28939665')
 
 # This is required for the text that is shown when you run this script
 # with the parameter -help.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I339ff9b7528c19d45c8f10d4486bcb04be33d625
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[trusty-compat]: Add export-dump command

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

Change subject: Add export-dump command
..


Add export-dump command

Also make import-dump more robust.

Bug: T70594
Change-Id: I4dcb74c28dde9625a798501965a3b9a50a45617d
---
M lib/mediawiki-vagrant.rb
A lib/mediawiki-vagrant/export_dump.rb
M lib/mediawiki-vagrant/import-dump.rb
A puppet/modules/mediawiki/files/export-mediawiki-dump
M puppet/modules/mediawiki/files/import-mediawiki-dump
M puppet/modules/mediawiki/manifests/init.pp
6 files changed, 46 insertions(+), 2 deletions(-)

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



diff --git a/lib/mediawiki-vagrant.rb b/lib/mediawiki-vagrant.rb
index fc1e2db..0efaf69 100644
--- a/lib/mediawiki-vagrant.rb
+++ b/lib/mediawiki-vagrant.rb
@@ -74,6 +74,11 @@
   ImportDump
 end
 
+command 'export-dump' do
+  require 'mediawiki-vagrant/export_dump'
+  ExportDump
+end
+
 command 'hiera' do
   require 'mediawiki-vagrant/hiera'
   Hiera
diff --git a/lib/mediawiki-vagrant/export_dump.rb 
b/lib/mediawiki-vagrant/export_dump.rb
new file mode 100644
index 000..8890d4f
--- /dev/null
+++ b/lib/mediawiki-vagrant/export_dump.rb
@@ -0,0 +1,18 @@
+module MediaWikiVagrant
+  class ExportDump < Vagrant.plugin(2, :command)
+def self.synopsis
+  'exports MediaWiki content as an XML dump'
+end
+
+def execute
+  if ['-h', '--help'].include? @argv.first
+@env.ui.info 'Usage: vagrant export-dump [-h]'
+return 0
+  end
+  opts = { extra_args: @argv.unshift('export-mediawiki-dump') }
+  with_target_vms(nil, single_target: true) do |vm|
+vm.action :ssh, ssh_opts: opts
+  end
+end
+  end
+end
diff --git a/lib/mediawiki-vagrant/import-dump.rb 
b/lib/mediawiki-vagrant/import-dump.rb
index a1a4561..c571463 100644
--- a/lib/mediawiki-vagrant/import-dump.rb
+++ b/lib/mediawiki-vagrant/import-dump.rb
@@ -5,7 +5,7 @@
 end
 
 def execute
-  if ['-h', '--help'].include? @argv.first
+  if ['-h', '--help'].include? @argv.first || @argv.empty?
 @env.ui.info 'Usage: vagrant import-dump dumpfile.xml [-h]'
 return 0
   end
diff --git a/puppet/modules/mediawiki/files/export-mediawiki-dump 
b/puppet/modules/mediawiki/files/export-mediawiki-dump
new file mode 100644
index 000..e090945
--- /dev/null
+++ b/puppet/modules/mediawiki/files/export-mediawiki-dump
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+# Command run in VM for `vagrant import-dump`
+. /etc/profile.d/set_MW_INSTALL_PATH.sh
+cd "$MW_INSTALL_PATH"
+/usr/local/bin/mwscript dumpBackup.php --full --include-files 
--output=gzip:/vagrant/tmp/vagrant-dump.xml.gz
+/usr/local/bin/mwscript dumpBackup.php --logs 
--output=gzip:/vagrant/tmp/vagrant-dump-logs.xml.gz
+
diff --git a/puppet/modules/mediawiki/files/import-mediawiki-dump 
b/puppet/modules/mediawiki/files/import-mediawiki-dump
index 27d3e12..c02bf1d 100644
--- a/puppet/modules/mediawiki/files/import-mediawiki-dump
+++ b/puppet/modules/mediawiki/files/import-mediawiki-dump
@@ -1,6 +1,15 @@
 #!/usr/bin/env bash
 # Command run in VM for `vagrant import-dump`
+
+FILE="/vagrant/$1"
+
 . /etc/profile.d/set_MW_INSTALL_PATH.sh
 cd "$MW_INSTALL_PATH"
-/usr/local/bin/mwscript importDump.php -- "/vagrant/$1"
+
+if [[ ! -f "/vagrant/$1" ]]; then
+  echo "\"$FILE\" does not exist" 1>&2
+  exit 1
+fi
+
+/usr/local/bin/mwscript importDump.php --uploads -- "$FILE"
 /usr/local/bin/mwscript rebuildrecentchanges.php
diff --git a/puppet/modules/mediawiki/manifests/init.pp 
b/puppet/modules/mediawiki/manifests/init.pp
index 8f1f739..de21365 100644
--- a/puppet/modules/mediawiki/manifests/init.pp
+++ b/puppet/modules/mediawiki/manifests/init.pp
@@ -185,6 +185,11 @@
 mode   => '0755',
 }
 
+file { '/usr/local/bin/export-mediawiki-dump':
+source => 'puppet:///modules/mediawiki/export-mediawiki-dump',
+mode   => '0755',
+}
+
 exec { 'update_all_databases':
 command => '/usr/local/bin/foreachwiki update.php --quick 
--doshared',
 cwd => $dir,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4dcb74c28dde9625a798501965a3b9a50a45617d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: trusty-compat
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]: Add export-dump command

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

Change subject: Add export-dump command
..


Add export-dump command

Also make import-dump more robust.

Bug: T70594
Change-Id: I4dcb74c28dde9625a798501965a3b9a50a45617d
---
M lib/mediawiki-vagrant.rb
A lib/mediawiki-vagrant/export_dump.rb
M lib/mediawiki-vagrant/import-dump.rb
A puppet/modules/mediawiki/files/export-mediawiki-dump
M puppet/modules/mediawiki/files/import-mediawiki-dump
M puppet/modules/mediawiki/manifests/init.pp
6 files changed, 46 insertions(+), 2 deletions(-)

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



diff --git a/lib/mediawiki-vagrant.rb b/lib/mediawiki-vagrant.rb
index fc1e2db..0efaf69 100644
--- a/lib/mediawiki-vagrant.rb
+++ b/lib/mediawiki-vagrant.rb
@@ -74,6 +74,11 @@
   ImportDump
 end
 
+command 'export-dump' do
+  require 'mediawiki-vagrant/export_dump'
+  ExportDump
+end
+
 command 'hiera' do
   require 'mediawiki-vagrant/hiera'
   Hiera
diff --git a/lib/mediawiki-vagrant/export_dump.rb 
b/lib/mediawiki-vagrant/export_dump.rb
new file mode 100644
index 000..8890d4f
--- /dev/null
+++ b/lib/mediawiki-vagrant/export_dump.rb
@@ -0,0 +1,18 @@
+module MediaWikiVagrant
+  class ExportDump < Vagrant.plugin(2, :command)
+def self.synopsis
+  'exports MediaWiki content as an XML dump'
+end
+
+def execute
+  if ['-h', '--help'].include? @argv.first
+@env.ui.info 'Usage: vagrant export-dump [-h]'
+return 0
+  end
+  opts = { extra_args: @argv.unshift('export-mediawiki-dump') }
+  with_target_vms(nil, single_target: true) do |vm|
+vm.action :ssh, ssh_opts: opts
+  end
+end
+  end
+end
diff --git a/lib/mediawiki-vagrant/import-dump.rb 
b/lib/mediawiki-vagrant/import-dump.rb
index a1a4561..c571463 100644
--- a/lib/mediawiki-vagrant/import-dump.rb
+++ b/lib/mediawiki-vagrant/import-dump.rb
@@ -5,7 +5,7 @@
 end
 
 def execute
-  if ['-h', '--help'].include? @argv.first
+  if ['-h', '--help'].include? @argv.first || @argv.empty?
 @env.ui.info 'Usage: vagrant import-dump dumpfile.xml [-h]'
 return 0
   end
diff --git a/puppet/modules/mediawiki/files/export-mediawiki-dump 
b/puppet/modules/mediawiki/files/export-mediawiki-dump
new file mode 100644
index 000..e090945
--- /dev/null
+++ b/puppet/modules/mediawiki/files/export-mediawiki-dump
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+# Command run in VM for `vagrant import-dump`
+. /etc/profile.d/set_MW_INSTALL_PATH.sh
+cd "$MW_INSTALL_PATH"
+/usr/local/bin/mwscript dumpBackup.php --full --include-files 
--output=gzip:/vagrant/tmp/vagrant-dump.xml.gz
+/usr/local/bin/mwscript dumpBackup.php --logs 
--output=gzip:/vagrant/tmp/vagrant-dump-logs.xml.gz
+
diff --git a/puppet/modules/mediawiki/files/import-mediawiki-dump 
b/puppet/modules/mediawiki/files/import-mediawiki-dump
index 27d3e12..c02bf1d 100644
--- a/puppet/modules/mediawiki/files/import-mediawiki-dump
+++ b/puppet/modules/mediawiki/files/import-mediawiki-dump
@@ -1,6 +1,15 @@
 #!/usr/bin/env bash
 # Command run in VM for `vagrant import-dump`
+
+FILE="/vagrant/$1"
+
 . /etc/profile.d/set_MW_INSTALL_PATH.sh
 cd "$MW_INSTALL_PATH"
-/usr/local/bin/mwscript importDump.php -- "/vagrant/$1"
+
+if [[ ! -f "/vagrant/$1" ]]; then
+  echo "\"$FILE\" does not exist" 1>&2
+  exit 1
+fi
+
+/usr/local/bin/mwscript importDump.php --uploads -- "$FILE"
 /usr/local/bin/mwscript rebuildrecentchanges.php
diff --git a/puppet/modules/mediawiki/manifests/init.pp 
b/puppet/modules/mediawiki/manifests/init.pp
index e94d439..fa4cc90 100644
--- a/puppet/modules/mediawiki/manifests/init.pp
+++ b/puppet/modules/mediawiki/manifests/init.pp
@@ -185,6 +185,11 @@
 mode   => '0755',
 }
 
+file { '/usr/local/bin/export-mediawiki-dump':
+source => 'puppet:///modules/mediawiki/export-mediawiki-dump',
+mode   => '0755',
+}
+
 exec { 'update_all_databases':
 command => '/usr/local/bin/foreachwiki update.php --quick 
--doshared',
 cwd => $dir,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4dcb74c28dde9625a798501965a3b9a50a45617d
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Gergő Tisza 
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[trusty-compat]: Add export-dump command

2017-03-13 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342560 )

Change subject: Add export-dump command
..

Add export-dump command

Also make import-dump more robust.

Bug: T70594
Change-Id: I4dcb74c28dde9625a798501965a3b9a50a45617d
---
M lib/mediawiki-vagrant.rb
A lib/mediawiki-vagrant/export_dump.rb
M lib/mediawiki-vagrant/import-dump.rb
A puppet/modules/mediawiki/files/export-mediawiki-dump
M puppet/modules/mediawiki/files/import-mediawiki-dump
M puppet/modules/mediawiki/manifests/init.pp
6 files changed, 46 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/60/342560/1

diff --git a/lib/mediawiki-vagrant.rb b/lib/mediawiki-vagrant.rb
index fc1e2db..0efaf69 100644
--- a/lib/mediawiki-vagrant.rb
+++ b/lib/mediawiki-vagrant.rb
@@ -74,6 +74,11 @@
   ImportDump
 end
 
+command 'export-dump' do
+  require 'mediawiki-vagrant/export_dump'
+  ExportDump
+end
+
 command 'hiera' do
   require 'mediawiki-vagrant/hiera'
   Hiera
diff --git a/lib/mediawiki-vagrant/export_dump.rb 
b/lib/mediawiki-vagrant/export_dump.rb
new file mode 100644
index 000..8890d4f
--- /dev/null
+++ b/lib/mediawiki-vagrant/export_dump.rb
@@ -0,0 +1,18 @@
+module MediaWikiVagrant
+  class ExportDump < Vagrant.plugin(2, :command)
+def self.synopsis
+  'exports MediaWiki content as an XML dump'
+end
+
+def execute
+  if ['-h', '--help'].include? @argv.first
+@env.ui.info 'Usage: vagrant export-dump [-h]'
+return 0
+  end
+  opts = { extra_args: @argv.unshift('export-mediawiki-dump') }
+  with_target_vms(nil, single_target: true) do |vm|
+vm.action :ssh, ssh_opts: opts
+  end
+end
+  end
+end
diff --git a/lib/mediawiki-vagrant/import-dump.rb 
b/lib/mediawiki-vagrant/import-dump.rb
index a1a4561..c571463 100644
--- a/lib/mediawiki-vagrant/import-dump.rb
+++ b/lib/mediawiki-vagrant/import-dump.rb
@@ -5,7 +5,7 @@
 end
 
 def execute
-  if ['-h', '--help'].include? @argv.first
+  if ['-h', '--help'].include? @argv.first || @argv.empty?
 @env.ui.info 'Usage: vagrant import-dump dumpfile.xml [-h]'
 return 0
   end
diff --git a/puppet/modules/mediawiki/files/export-mediawiki-dump 
b/puppet/modules/mediawiki/files/export-mediawiki-dump
new file mode 100644
index 000..e090945
--- /dev/null
+++ b/puppet/modules/mediawiki/files/export-mediawiki-dump
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+# Command run in VM for `vagrant import-dump`
+. /etc/profile.d/set_MW_INSTALL_PATH.sh
+cd "$MW_INSTALL_PATH"
+/usr/local/bin/mwscript dumpBackup.php --full --include-files 
--output=gzip:/vagrant/tmp/vagrant-dump.xml.gz
+/usr/local/bin/mwscript dumpBackup.php --logs 
--output=gzip:/vagrant/tmp/vagrant-dump-logs.xml.gz
+
diff --git a/puppet/modules/mediawiki/files/import-mediawiki-dump 
b/puppet/modules/mediawiki/files/import-mediawiki-dump
index 27d3e12..c02bf1d 100644
--- a/puppet/modules/mediawiki/files/import-mediawiki-dump
+++ b/puppet/modules/mediawiki/files/import-mediawiki-dump
@@ -1,6 +1,15 @@
 #!/usr/bin/env bash
 # Command run in VM for `vagrant import-dump`
+
+FILE="/vagrant/$1"
+
 . /etc/profile.d/set_MW_INSTALL_PATH.sh
 cd "$MW_INSTALL_PATH"
-/usr/local/bin/mwscript importDump.php -- "/vagrant/$1"
+
+if [[ ! -f "/vagrant/$1" ]]; then
+  echo "\"$FILE\" does not exist" 1>&2
+  exit 1
+fi
+
+/usr/local/bin/mwscript importDump.php --uploads -- "$FILE"
 /usr/local/bin/mwscript rebuildrecentchanges.php
diff --git a/puppet/modules/mediawiki/manifests/init.pp 
b/puppet/modules/mediawiki/manifests/init.pp
index 8f1f739..de21365 100644
--- a/puppet/modules/mediawiki/manifests/init.pp
+++ b/puppet/modules/mediawiki/manifests/init.pp
@@ -185,6 +185,11 @@
 mode   => '0755',
 }
 
+file { '/usr/local/bin/export-mediawiki-dump':
+source => 'puppet:///modules/mediawiki/export-mediawiki-dump',
+mode   => '0755',
+}
+
 exec { 'update_all_databases':
 command => '/usr/local/bin/foreachwiki update.php --quick 
--doshared',
 cwd => $dir,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4dcb74c28dde9625a798501965a3b9a50a45617d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: trusty-compat
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Another fix for Coordinate fields with spaces in their names

2017-03-13 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342557 )

Change subject: Another fix for Coordinate fields with spaces in their names
..


Another fix for Coordinate fields with spaces in their names

Change-Id: I0b6f57fc978bd94af11dde5285e34fa06408dcf5
---
M formats/CargoMapsFormat.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/formats/CargoMapsFormat.php b/formats/CargoMapsFormat.php
index 383033b..af7f9ce 100644
--- a/formats/CargoMapsFormat.php
+++ b/formats/CargoMapsFormat.php
@@ -93,6 +93,7 @@
// coordinate for this "row".
// @TODO - handle lists of coordinates as well.
foreach ( $coordinatesFields as $coordinatesField ) {
+   $coordinatesField = str_replace( ' ', '_', 
$coordinatesField );
$latValue = $valuesRow[$coordinatesField . '  
lat'];
$lonValue = $valuesRow[$coordinatesField . '  
lon'];
// @TODO - enforce the existence of a field

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0b6f57fc978bd94af11dde5285e34fa06408dcf5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Disable NFS on OSX by default

2017-03-13 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342559 )

Change subject: Disable NFS on OSX by default
..

Disable NFS on OSX by default

Three years ago we decided that the performance improvements offered by
NFS more than made up for the additional complexity that it added to the
system (4ee0463). After personally having several issues with the OSX
NFS server locking up randomly, I turned off NFS shares via `vagrant
config nfs_shares off` at least 18 months ago. We have a long list of
open and closed bugs that are related to NFS permissions issues or
problems on individual developer machines. After helping someone today
who seems to have run into
, I'm sick of it and
ready to undo the three year old decision that NFS is enough of
a performance improvement to warrant the additional complexity for the
average user.

This change leaves NFS shares as the default for Linux, BSD, FreeBSD,
and Solaris hosts. It also leaves the option for anyone to use `vagrant
config nfs_shares on` to enable NFS consciously for their local install.
I'm not disabling default support NFS (yet) for 'real' unix hosts in
part because I will need to figure out how to force NFS usage on
Wikimedia Labs hosts that are using MediaWiki-Vagrant and LXC. I know
from past testing that the notice LXC sharing system does not work with
our setup due to file ownership issues.

Change-Id: I77099422d50c7eb7c6b64186497afe373a09eb76
---
M lib/mediawiki-vagrant/settings/definitions.rb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/59/342559/1

diff --git a/lib/mediawiki-vagrant/settings/definitions.rb 
b/lib/mediawiki-vagrant/settings/definitions.rb
index b2952e5..5649173 100644
--- a/lib/mediawiki-vagrant/settings/definitions.rb
+++ b/lib/mediawiki-vagrant/settings/definitions.rb
@@ -44,7 +44,7 @@
 setting :nfs_shares,
   description: 'Use synced folders backed by NFS',
   help: "Enter 'yes' or 'no'. NFS is faster, but unsupported on Windows 
and with some encrypted filesystems on Linux",
-  default: defined?(Vagrant::Util::Platform) ? 
!Vagrant::Util::Platform.windows? : true,
+  default: %w[bsd freebsd linux 
solaris].include?(Vagrant::Util::Platform.platform),
   coercion: ->(_setting, new) { !!(new.to_s =~ /^(true|t|yes|y|1)$/i) }
 
 setting :nfs_force_v3,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77099422d50c7eb7c6b64186497afe373a09eb76
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] oojs/ui[master]: Theme: Use instanceof instead of in_array/class_uses

2017-03-13 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342558 )

Change subject: Theme: Use instanceof instead of in_array/class_uses
..

Theme: Use instanceof instead of in_array/class_uses

Follows-up 84edd70d.

Change-Id: Ia673c5317bb98e7231c4755ce0c7e3bc008062f9
---
M php/Theme.php
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/58/342558/1

diff --git a/php/Theme.php b/php/Theme.php
index 1d5b219..8badcaf 100644
--- a/php/Theme.php
+++ b/php/Theme.php
@@ -57,14 +57,13 @@
 */
public function updateElementClasses( Element $element ) {
$classes = $this->getElementClasses( $element );
-   $traits = class_uses( $element );
 
-   if ( in_array( IconElement::class, $traits ) ) {
+   if ( $element instanceof IconElement ) {
$element->getIconElement()
->removeClasses( $classes['off'] )
->addClasses( $classes['on'] );
}
-   if ( in_array( IndicatorElement::class, $traits ) ) {
+   if ( $element instanceof IndicatorElement ) {
$element->getIndicatorElement()
->removeClasses( $classes['off'] )
->addClasses( $classes['on'] );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia673c5317bb98e7231c4755ce0c7e3bc008062f9
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
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] mediawiki...Cargo[master]: Another fix for Coordinate fields with spaces in their names

2017-03-13 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342557 )

Change subject: Another fix for Coordinate fields with spaces in their names
..

Another fix for Coordinate fields with spaces in their names

Change-Id: I0b6f57fc978bd94af11dde5285e34fa06408dcf5
---
M formats/CargoMapsFormat.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/formats/CargoMapsFormat.php b/formats/CargoMapsFormat.php
index 383033b..af7f9ce 100644
--- a/formats/CargoMapsFormat.php
+++ b/formats/CargoMapsFormat.php
@@ -93,6 +93,7 @@
// coordinate for this "row".
// @TODO - handle lists of coordinates as well.
foreach ( $coordinatesFields as $coordinatesField ) {
+   $coordinatesField = str_replace( ' ', '_', 
$coordinatesField );
$latValue = $valuesRow[$coordinatesField . '  
lat'];
$lonValue = $valuesRow[$coordinatesField . '  
lon'];
// @TODO - enforce the existence of a field

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b6f57fc978bd94af11dde5285e34fa06408dcf5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Title: Remove outdated comment in loadRestrictionsFromRows()

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

Change subject: Title: Remove outdated comment in loadRestrictionsFromRows()
..


Title: Remove outdated comment in loadRestrictionsFromRows()

It has been refactored, and decodeExpiry() is now a method of Database.

Change-Id: I357b303317c877be944474db1331855adb1eb8fd
---
M includes/Title.php
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/includes/Title.php b/includes/Title.php
index 3ed6b8b..a5bb9c6 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -2943,8 +2943,6 @@
continue;
}
 
-   // This code should be refactored, now that 
it's being used more generally,
-   // But I don't really see any harm in leaving 
it in Block for now -werdna
$expiry = $dbr->decodeExpiry( $row->pr_expiry );
 
// Only apply the restrictions if they haven't 
expired!

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I357b303317c877be944474db1331855adb1eb8fd
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
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...RemexHtml[master]: Added testing for error counts, and disabled it

2017-03-13 Thread Tim Starling (Code Review)
Tim Starling has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342556 )

Change subject: Added testing for error counts, and disabled it
..

Added testing for error counts, and disabled it

Added tests for error counts, fixed a couple of resulting issues.
Reconsidered the utility of this approach, and hid the feature behind a
hard-coded option.

Change-Id: Ia9d36da83f9d3bf4c78a9efcf160f171e38fa3b3
---
M src/Tokenizer/Tokenizer.php
M src/TreeBuilder/InTable.php
M src/TreeBuilder/TreeBuilder.php
M tests/phpunit/TokenizerTest.php
M tests/phpunit/TreeBuilderTest.php
5 files changed, 48 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/libs/RemexHtml 
refs/changes/56/342556/1

diff --git a/src/Tokenizer/Tokenizer.php b/src/Tokenizer/Tokenizer.php
index 78b2383..0d84b15 100644
--- a/src/Tokenizer/Tokenizer.php
+++ b/src/Tokenizer/Tokenizer.php
@@ -675,9 +675,6 @@
 
if ( isset( $m[self::MD_DT_PUBLIC_WS] ) && 
$m[self::MD_DT_PUBLIC_WS][1] >= 0 ) {
// PUBLIC keyword found
-   if ( !$igerr && !$eof && !strlen( 
$m[self::MD_DT_PUBLIC_WS][0] ) ) {
-   $this->error( 'missing whitespace', 
$m[self::MD_DT_PUBLIC_WS][1] );
-   }
$public = $this->interpretDoctypeQuoted( $m,
self::MD_DT_PUBLIC_DQ, self::MD_DT_PUBLIC_SQ, 
$quirks );
if ( $public === null ) {
@@ -685,6 +682,8 @@
if ( !$eof && !$igerr ) {
$this->error( 'missing public 
identifier', $m[self::MD_DT_PUBLIC_WS][1] );
}
+   } elseif ( !$igerr && !$eof && !strlen( 
$m[self::MD_DT_PUBLIC_WS][0] ) ) {
+   $this->error( 'missing whitespace', 
$m[self::MD_DT_PUBLIC_WS][1] );
}
 
// Check for a system ID after the public ID
@@ -699,14 +698,13 @@
}
} elseif ( isset( $m[self::MD_DT_SYSTEM_WS] ) && 
$m[self::MD_DT_SYSTEM_WS][1] >= 0 ) {
// SYSTEM keyword found
-   if ( !$igerr && !strlen( $m[self::MD_DT_SYSTEM_WS][0] ) 
) {
-   $this->error( 'missing whitespace', 
$m[self::MD_DT_SYSTEM_WS][1] );
-   }
$system = $this->interpretDoctypeQuoted( $m,
self::MD_DT_SYSTEM_DQ, self::MD_DT_SYSTEM_SQ, 
$quirks );
if ( $system === null ) {
$quirks = true;
$this->error( 'missing system identifier', 
$m[self::MD_DT_SYSTEM_WS][1] );
+   } elseif ( !$igerr && !strlen( 
$m[self::MD_DT_SYSTEM_WS][0] ) ) {
+   $this->error( 'missing whitespace', 
$m[self::MD_DT_SYSTEM_WS][1] );
}
 
}
diff --git a/src/TreeBuilder/InTable.php b/src/TreeBuilder/InTable.php
index 4b03fb0..5827c7f 100644
--- a/src/TreeBuilder/InTable.php
+++ b/src/TreeBuilder/InTable.php
@@ -168,6 +168,7 @@
break;
 
default:
+   $builder->error( 'unexpected end tag in table, 
fostering', $sourceStart );
$builder->fosterParenting = true;
$dispatcher->inBody->endTag( $name, $sourceStart, 
$sourceLength );
$builder->fosterParenting = false;
diff --git a/src/TreeBuilder/TreeBuilder.php b/src/TreeBuilder/TreeBuilder.php
index 3523773..fe2a212 100644
--- a/src/TreeBuilder/TreeBuilder.php
+++ b/src/TreeBuilder/TreeBuilder.php
@@ -252,13 +252,22 @@
 * @param array $allowed An array with the HTML element names in the key
 */
public function checkUnclosed( $allowed, $pos ) {
+   if ( $this->ignoreErrors ) {
+   return;
+   }
+
$stack = $this->stack;
+   $unclosedErrors = [];
for ( $i = $stack->length() - 1; $i >= 0; $i-- ) {
$unclosedName = $stack->item( $i )->htmlName;
if ( !isset( $allowed[$unclosedName] ) ) {
-   $this->error( "closing unclosed 
<$unclosedName>", $pos );
+   $unclosedErrors[$unclosedName] = true;
}
}
+   if ( $unclosedErrors ) {
+   $names = implode( ', ', array_keys( $unclosedErrors ) );
+   $this->error( "closing unclosed $names", $pos );
+   }
}
 
/**
diff --git a/tests/phpunit/TokenizerTest.php b/tests/phpunit/TokenizerTest.php
index 5322471..db9cdb9 100644
--- a/tests/phpunit/TokenizerTest.php

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Restore blanked addresses overwritten on merge.

2017-03-13 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342554 )

Change subject: Restore blanked addresses overwritten on merge.
..

Restore blanked addresses overwritten on merge.

Restore blanked addresses overwritten on merge.

I feel like this is a pretty cautious approach to restoring the simplest cases 
where
blank addresses overwrote real addresses.

Bug: T159408

Change-Id: Ia10d5095073afb652b552d9af5c36b8f204d1d90
---
M sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php
A sites/all/modules/wmf_civicrm/update_restore_addresses.php
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
3 files changed, 217 insertions(+), 0 deletions(-)


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

diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php 
b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php
index 5263d4f..4bb13eb 100644
--- a/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php
+++ b/sites/all/modules/wmf_civicrm/tests/phpunit/MergeTest.php
@@ -1226,4 +1226,66 @@
 return $contact['id'];
   }
 
+  /**
+   * Test recovery where a blank email has overwritten a non-blank email on 
merge.
+   *
+   * In this case an email existed during merge that held no data. It was used
+   * on the merge, but now we want the lost data.
+   */
+  public function testRepairBlankedEmailOnMerge() {
+civicrm_api3('Setting', 'create', array(
+  'logging_no_trigger_permission' => 0,
+));
+civicrm_api3('Setting', 'create', array('logging' => 1));
+
+CRM_Core_DAO::executeQuery('DROP TABLE IF EXISTS blank_addresses');
+require_once __DIR__ . '/../../wmf_civicrm.install';
+require_once __DIR__ . '/../../update_restore_addresses.php';
+wmf_civicrm_update_7475();
+$this->replicateBlankedAddress();
+
+$address = $this->callAPISuccessGetSingle('Address', array('contact_id' => 
$this->contactID));
+$this->assertTrue(empty($address['street_address']));
+
+wmf_civicrm_fix_blanked_address($address['id']);
+$address = $this->callAPISuccessGetSingle('Address', array('contact_id' => 
$this->contactID));
+$this->assertEquals('25 Mousey Way', $address['street_address']);
+
+CRM_Core_DAO::executeQuery('DROP TABLE blank_addresses');
+
+civicrm_api3('Setting', 'create', array(
+  'logging_no_trigger_permission' => 1,
+));
+  }
+
+  /**
+   * Replicate the merge that would result in a blanked address.
+   */
+  protected function replicateBlankedAddress() {
+$this->contributionCreate(array(
+  'contact_id' => $this->contactID,
+  'receive_date' => '2010-01-01',
+  'invoice_id' => 1,
+  'trxn_id' => 1
+));
+$this->contributionCreate(array(
+  'contact_id' => $this->contactID2,
+  'receive_date' => '2012-01-01',
+  'invoice_id' => 2,
+  'trxn_id' => 2
+));
+$this->callAPISuccess('Address', 'create', array(
+  'street_address' => '25 Mousey Way',
+  'country_id' => 'US',
+  'contact_id' => $this->contactID,
+  'location_type_id' => 'Main',
+));
+$this->callAPISuccess('Address', 'create', array(
+  'street_address' => NULL,
+  'contact_id' => $this->contactID2,
+  'location_type_id' => 'Main',
+));
+$this->callAPISuccess('Job', 'process_batch_merge', array('mode' => 
'safe'));
+  }
+
 }
diff --git a/sites/all/modules/wmf_civicrm/update_restore_addresses.php 
b/sites/all/modules/wmf_civicrm/update_restore_addresses.php
new file mode 100644
index 000..467c7be
--- /dev/null
+++ b/sites/all/modules/wmf_civicrm/update_restore_addresses.php
@@ -0,0 +1,121 @@
+ array(
+  $addressID,
+  'Int'
+)
+  ));
+  while ($result->fetch()) {
+$logEntries[] = (array) $result;
+  }
+  if (count($logEntries) === 2
+&& (in_array($logEntries[0]['log_action'], array('Insert', 'Initialize'))
+  && $logEntries[1]['log_action'] === 'Update'
+)
+  ) {
+// we only have a create & an update, not a long complicated history.
+$dataFields = array(
+  'street_address',
+  'city',
+  'postal_code',
+  'state_province_id',
+  'country_id',
+  'supplemental_address_1',
+  'supplemental_address_2',
+  'supplemental_address_3',
+  'county_id',
+  'postal_code_suffix',
+  'name'
+);
+foreach ($dataFields as $dataField) {
+  if (!empty($logEntries[0][$dataField]) || 
!empty($logEntries[1][$dataField])) {
+// Not blank enough to process.
+return;
+  }
+}
+if ($logEntries[0]['contact_id'] == $logEntries[1]['contact_id']) {
+  // We are specifically trying to handle merged data at this stage.
+  // May extend if we identify other patterns.
+  return;
+}
+// We definitely have a situation where a blank record was inserted & 
then, on merge
+// was transferred to another contact. We have the log_conn_id & 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: E-notice fix.

2017-03-13 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342555 )

Change subject: E-notice fix.
..

E-notice fix.

This can be hit on unit tests

Change-Id: I0416b351d7740506d9f1a71188def814d3465a18
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/55/342555/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 64560a5..9fae35e 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -2875,7 +2875,7 @@
 
// Do we have any geo info for this address?
if (
-   $address['country_id'] == $usId &&
+   !empty($address['country_id']) &&  
$address['country_id']== $usId &&
!empty( $address['postal_code'] )
) {
$sql = "SELECT city, s.id AS state_id, 
latitude, longitude, timezone

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0416b351d7740506d9f1a71188def814d3465a18
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] wikimedia...crm[master]: Do not record dummy data 'N0NE PROVIDED' to the database,

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

Change subject: Do not record dummy data 'N0NE PROVIDED' to the database,
..


Do not record dummy data 'N0NE PROVIDED' to the database,

Also omit 'postal_code' => 0

Bug: T158268
Change-Id: I69f0c0f115c4b820a121716df3e87745970e23b1
---
A sites/all/modules/wmf_civicrm/tests/phpunit/AddressImportTest.php
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
2 files changed, 83 insertions(+), 1 deletion(-)

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



diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/AddressImportTest.php 
b/sites/all/modules/wmf_civicrm/tests/phpunit/AddressImportTest.php
new file mode 100644
index 000..fc576b6
--- /dev/null
+++ b/sites/all/modules/wmf_civicrm/tests/phpunit/AddressImportTest.php
@@ -0,0 +1,75 @@
+callAPISuccess('Contact', 'create', array(
+  'first_name' => 'Minnie', 'last_name' => 'Mouse', 'contact_type' => 
'Individual', 'email' => 'min...@mouse.org')
+);
+$this->contactID = $contact['id'];
+  }
+
+  public function tearDown() {
+CRM_Core_DAO::executeQuery("DELETE FROM civicrm_contact WHERE last_name = 
'Mouse'");
+  }
+
+  /**
+   * Test creating an address with void data does not create an address.
+   */
+  public function testAddressImportVoidData() {
+$msg = array(
+  'currency' => 'USD',
+  'date' => time(),
+  'last_name' => 'Mouse',
+  'email' => 'nob...@wikimedia.org',
+  'gateway' => 'test_gateway',
+  'gateway_txn_id' => mt_rand(),
+  'gross' => '1.23',
+  'payment_method' => 'cc',
+  'street_address' => 'N0NE PROVIDED',
+  'postal_code' => 0,
+);
+
+$contribution = wmf_civicrm_contribution_message_import($msg);
+$addresses = $this->callAPISuccess('Address', 'get', array('contact_id' => 
$contribution['contact_id']));
+$this->assertEquals(0, $addresses['count']);
+  }
+
+  /**
+   * Test creating an address with void data does not create an address.
+   *
+   * In this case the contact already exists.
+   */
+  public function testAddressImportVoidDataContactExists() {
+$msg = array(
+  'contact_id' => $this->contactID,
+  'currency' => 'USD',
+  'date' => time(),
+  'last_name' => 'Mouse',
+  'email' => 'nob...@wikimedia.org',
+  'gateway' => 'test_gateway',
+  'gateway_txn_id' => mt_rand(),
+  'gross' => '1.23',
+  'payment_method' => 'cc',
+  'street_address' => 'N0NE PROVIDED',
+  'postal_code' => 0,
+);
+
+$contribution = wmf_civicrm_contribution_message_import($msg);
+$addresses = $this->callAPISuccess('Address', 'get', array('contact_id' => 
$contribution['contact_id']));
+$this->assertEquals(0, $addresses['count']);
+  }
+
+}
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 546824d..64560a5 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -1716,7 +1716,6 @@
 'thankyou_date' => null,
 'recurring' => null,
 'utm_campaign' => null,
-'recurring' => null,
 'contact_id' => null,
 'contribution_recur_id' => null,
 'effort_id' => null,
@@ -1729,6 +1728,14 @@
 );
 $msg = $msg + $defaults;
 
+// Remove known dummy data.
+if ($msg['street_address'] === 'N0NE PROVIDED') {
+$msg['street_address'] = '';
+}
+if ($msg['postal_code'] === 0) {
+$msg['postal_code'] = '';
+}
+
 if ( empty( $msg['contribution_type_id'] ) ) {
 if ( empty( $msg['contribution_type'] ) ) {
 $msg['contribution_type'] = 
wmf_civicrm_get_message_contribution_type( $msg );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I69f0c0f115c4b820a121716df3e87745970e23b1
Gerrit-PatchSet: 5
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] mediawiki...DonationInterface[master]: [WIP] A few changes. distinguish between unstaged and norma...

2017-03-13 Thread Awight (Code Review)
Awight has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342553 )

Change subject: [WIP] A few changes.  distinguish between unstaged and 
normalized, split construct, validate and stage steps.
..

[WIP] A few changes.  distinguish between unstaged and normalized, split 
construct, validate and stage steps.

Bug: T159910
Change-Id: Ib29a85fec1c7ccf11b99c8538651cde792c75e15
---
M adyen_gateway/adyen.adapter.php
M amazon_gateway/amazon.adapter.php
M astropay_gateway/astropay.adapter.php
M extras/FraudFilter.php
M extras/banner_history/BannerHistoryLogIdProcessor.php
M extras/conversion_log/conversion_log.body.php
M extras/custom_filters/custom_filters.body.php
M extras/custom_filters/filters/ip_velocity/ip_velocity.body.php
M extras/custom_filters/filters/minfraud/minfraud.body.php
M extras/custom_filters/filters/referrer/referrer.body.php
M extras/custom_filters/filters/source/source.body.php
M extras/session_velocity/session_velocity.body.php
M gateway_common/DonationData.php
M gateway_common/GatewayType.php
M gateway_common/gateway.adapter.php
M gateway_forms/Form.php
M gateway_forms/Mustache.php
M gateway_forms/MustacheErrorForm.php
M globalcollect_gateway/GlobalCollectOrphanRectifier.php
M globalcollect_gateway/globalcollect.adapter.php
M globalcollect_gateway/orphan.adapter.php
M paypal_gateway/express_checkout/paypal_express.adapter.php
M paypal_gateway/legacy/paypal_legacy.adapter.php
M tests/phpunit/Adapter/Adyen/AdyenTest.php
M tests/phpunit/Adapter/Amazon/AmazonTest.php
M tests/phpunit/Adapter/AstroPay/AstroPayTest.php
M tests/phpunit/Adapter/GatewayAdapterTest.php
M tests/phpunit/Adapter/GlobalCollect/BankTransferTest.php
M tests/phpunit/Adapter/GlobalCollect/GlobalCollectOrphanAdapterTest.php
M tests/phpunit/Adapter/GlobalCollect/GlobalCollectTest.php
M tests/phpunit/Adapter/GlobalCollect/RealTimeBankTransferIdealTest.php
M tests/phpunit/Adapter/GlobalCollect/YandexTest.php
M tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php
M tests/phpunit/DonationInterfaceTestCase.php
M tests/phpunit/GatewayPageTest.php
35 files changed, 343 insertions(+), 353 deletions(-)


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

diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php
index 140fa6b..e94b086 100644
--- a/adyen_gateway/adyen.adapter.php
+++ b/adyen_gateway/adyen.adapter.php
@@ -98,23 +98,6 @@
//'deliveryAddressType',
);
 
-   // Add address fields for countries that use them.
-   $addressFields = array (
-   'billingAddress.street',
-   'billingAddress.city',
-   'billingAddress.postalCode',
-   'billingAddress.stateOrProvince',
-   'billingAddress.country',
-   'billingAddressType',
-   'billingAddress.houseNumberOrName',
-   );
-
-   if ( in_array( 'street', $this->getRequiredFields() ) )  {
-   $requestFields = array_merge( $requestFields, 
$addressFields );
-   }
-
-
-
$this->transactions[ 'donate' ] = array(
'request' => $requestFields,
'values' => array(
@@ -131,6 +114,30 @@
);
}
 
+   public function stageData() {
+   parent::stageData();
+
+   $this->tuneTransactions();
+   }
+
+   protected function tuneTransactions() {
+   if ( in_array( 'street', $this->getRequiredFields() ) )  {
+   // Add address fields for countries that use them.
+   $addressFields = array (
+   'billingAddress.street',
+   'billingAddress.city',
+   'billingAddress.postalCode',
+   'billingAddress.stateOrProvince',
+   'billingAddress.country',
+   'billingAddressType',
+   'billingAddress.houseNumberOrName',
+   );
+
+   $requestFields &= 
$this->transactions['donate']['request'];
+   $requestFields = array_merge( $requestFields, 
$addressFields );
+   }
+   }
+
protected function getAllowedPaymentMethods() {
return array(
'card',
diff --git a/amazon_gateway/amazon.adapter.php 
b/amazon_gateway/amazon.adapter.php
index 151bbd1..9a916cf 100644
--- a/amazon_gateway/amazon.adapter.php
+++ b/amazon_gateway/amazon.adapter.php
@@ -57,13 +57,12 @@
 
function __construct( $options = array() ) {
parent::__construct( $options );
+   }
 
-   if ( 

[MediaWiki-commits] [Gerrit] mediawiki...RemexHtml[master]: Fix utfnormal dependency to 1.1.0

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

Change subject: Fix utfnormal dependency to 1.1.0
..


Fix utfnormal dependency to 1.1.0

Per MW policy

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

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



diff --git a/composer.json b/composer.json
index 356c9dd..48f0d45 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,7 @@
],
"require": {
"ext-mbstring": "*",
-   "wikimedia/utfnormal": "1.*"
+   "wikimedia/utfnormal": "1.1.0"
},
"require-dev": {
"phpunit/phpunit": "4.*",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2567974fcbcfc1ec71ac24b604324b8c98638712
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/RemexHtml
Gerrit-Branch: master
Gerrit-Owner: Tim Starling 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...RemexHtml[master]: Fix missing breaks in switch statements

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

Change subject: Fix missing breaks in switch statements
..


Fix missing breaks in switch statements

What clown wrote this code, eh?

Testing is difficult without asserting error counts, which might be
added in a subsequent commit. Hopefully I now found all the missing
breaks by eye, although I haven't yet found a tool to automatically
detect them.

Change-Id: I118e51fec864db1f057b3609c2446b7622a35bbf
---
M src/TreeBuilder/InCell.php
M src/TreeBuilder/InRow.php
M src/TreeBuilder/InTableBody.php
M tests/local/tree-construction/remex01.dat
4 files changed, 45 insertions(+), 0 deletions(-)

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



diff --git a/src/TreeBuilder/InCell.php b/src/TreeBuilder/InCell.php
index 73798a0..f7f4003 100644
--- a/src/TreeBuilder/InCell.php
+++ b/src/TreeBuilder/InCell.php
@@ -32,6 +32,7 @@
}
$this->closeTheCell( $sourceStart )
->startTag( $name, $attrs, $selfClose, 
$sourceStart, $sourceLength );
+   break;
 
default:
$this->dispatcher->inBody->startTag(
diff --git a/src/TreeBuilder/InRow.php b/src/TreeBuilder/InRow.php
index 477c204..df4c8d6 100644
--- a/src/TreeBuilder/InRow.php
+++ b/src/TreeBuilder/InRow.php
@@ -85,6 +85,8 @@
$builder->pop( $sourceStart, $sourceLength );
$dispatcher->switchMode( Dispatcher::IN_TABLE_BODY )
->endTag( $name, $sourceStart, $sourceLength );
+   break;
+
case 'tbody':
case 'tfoot':
case 'thead':
@@ -100,6 +102,7 @@
$builder->pop( $sourceStart, 0 );
$dispatcher->switchMode( Dispatcher::IN_TABLE_BODY )
->endTag( $name, $sourceStart, $sourceLength );
+   break;
 
case 'body':
case 'caption':
diff --git a/src/TreeBuilder/InTableBody.php b/src/TreeBuilder/InTableBody.php
index 145a5d3..0547f45 100644
--- a/src/TreeBuilder/InTableBody.php
+++ b/src/TreeBuilder/InTableBody.php
@@ -84,6 +84,7 @@
$builder->clearStackBack( self::$tableBodyContext, 
$sourceStart );
$builder->pop( $sourceStart, $sourceLength );
$dispatcher->switchMode( Dispatcher::IN_TABLE );
+   break;
 
case 'body':
case 'caption':
diff --git a/tests/local/tree-construction/remex01.dat 
b/tests/local/tree-construction/remex01.dat
index b884384..4dabfe2 100644
--- a/tests/local/tree-construction/remex01.dat
+++ b/tests/local/tree-construction/remex01.dat
@@ -11,3 +11,43 @@
 | 
 |   "
 x"
+
+#data
+
+#errors
+[0] missing doctype
+#document
+| 
+|   
+|   
+| 
+|   
+| 
+|   
+| 
+|   
+| 
+|   id="1"
+| 
+|   id="2"
+
+#data
+
+#errors
+#document
+| 
+| 
+|   
+|   
+| 
+|   
+| 
+|   
+| 
+|   
+| 
+|   id="1"
+|   
+| id="2"
+| 
+|   id="3"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I118e51fec864db1f057b3609c2446b7622a35bbf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/RemexHtml
Gerrit-Branch: master
Gerrit-Owner: Tim Starling 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: textlib.py: DeprecationWarning: invalid escape sequence

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

Change subject: textlib.py: DeprecationWarning: invalid escape sequence
..


textlib.py: DeprecationWarning: invalid escape sequence

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

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



diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index 88adc31..764c270 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -1737,7 +1737,7 @@
 allstars = []
 starstext = removeDisabledParts(text)
 for star in starsList:
-regex = re.compile('(\{\{(?:template:|)%s\|.*?\}\}[\s]*)'
+regex = re.compile(r'(\{\{(?:template:|)%s\|.*?\}\}[\s]*)'
% star, re.I)
 found = regex.findall(starstext)
 if found:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I865cbb22dbc3f6a104eb5984a223289c5b01a7a7
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
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[master]: Rerun previous blank_address updates with slightly wider cat...

2017-03-13 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342552 )

Change subject: Rerun previous blank_address updates with slightly wider 
catchment.
..

Rerun previous blank_address updates with slightly wider catchment.

It seems we have some contacts whose addresses should have been removed, but 
were not. eg. id 408435 , contact_id1861137.

We have expanded the definition of 'insert without change' to exclude an 
changes where the
country, city, state, postal_code & street address remained null.

I've also added another place to ignore known null-updates.

Bug: T159396
Change-Id: I515d50ed1286eb5570bba69c9cfbf164fb1d07a1
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/52/342552/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index 3687e88..3c5f801 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -2804,3 +2804,15 @@
   civicrm_initialize();
   wmf_civicrm_create_financial_types(array('Benevity'));
 }
+
+/**
+ * Rerun 7845 & 7490 with a slightly bigger catchment.
+ *
+ * This means that addresses with updates that only affect bulk updates on 
things
+ * like geocode & is_primary will also be treated as 'non-updated' & removed
+ * from the db if blank.
+ */
+function wmf_civicrm_update_7505() {
+  wmf_civicrm_update_7485();
+  wmf_civicrm_update_7490();
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I515d50ed1286eb5570bba69c9cfbf164fb1d07a1
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] oojs/ui[master]: MediaWiki theme: Indicators shouldn't provide global 'progre...

2017-03-13 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342551 )

Change subject: MediaWiki theme: Indicators shouldn't provide global 
'progressive' flag
..

MediaWiki theme: Indicators shouldn't provide global 'progressive' flag

Bug: T157834
Change-Id: I89d7d21707b53b97d5012eed8fd0e42ffd2f39b5
---
M src/themes/mediawiki/indicators.json
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/51/342551/1

diff --git a/src/themes/mediawiki/indicators.json 
b/src/themes/mediawiki/indicators.json
index 91d0358..df32417 100644
--- a/src/themes/mediawiki/indicators.json
+++ b/src/themes/mediawiki/indicators.json
@@ -8,8 +8,7 @@
"global": true
},
"progressive": {
-   "color": "#36c",
-   "global": true
+   "color": "#36c"
},
"constructive": {
"color": "#36c"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I89d7d21707b53b97d5012eed8fd0e42ffd2f39b5
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/vagrant[master]: Add help page to elk role

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

Change subject: Add help page to elk role
..


Add help page to elk role

Change-Id: Id2cb43b1f4c3e423e8c083b34fe23035e5e83ad1
---
M puppet/modules/role/templates/elk/VagrantRoleElk.wiki.erb
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/puppet/modules/role/templates/elk/VagrantRoleElk.wiki.erb 
b/puppet/modules/role/templates/elk/VagrantRoleElk.wiki.erb
index a8dff6e..3b65829 100644
--- a/puppet/modules/role/templates/elk/VagrantRoleElk.wiki.erb
+++ b/puppet/modules/role/templates/elk/VagrantRoleElk.wiki.erb
@@ -1,2 +1,4 @@
-Kibana frontend: http://<%= @vhost_name %>:<%= @forwarded_port %>
+Provision an ELK stack ([https://www.elastic.co/products/elasticsearch 
ElasticSearch], [https://www.elastic.co/products/logstash Logstash], 
[https://www.elastic.co/products/kibana Kibana]) and send MediaWiki log 
messages there.
+
+Kibana GUI: [//<%= @vhost_name %><%= @port_fragment %> <%= @vhost_name %>]
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id2cb43b1f4c3e423e8c083b34fe23035e5e83ad1
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
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]: Use custom LogstashFormatter

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

Change subject: Use custom LogstashFormatter
..


Use custom LogstashFormatter

Change-Id: Iebd10e89958e8ada17ed0298f145987bf7b4394a
Depends-On: I9cc9f54c2987cf960343b5eca2a1c6d006b892bf
---
M puppet/modules/role/templates/elk/monolog.php.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/puppet/modules/role/templates/elk/monolog.php.erb 
b/puppet/modules/role/templates/elk/monolog.php.erb
index 1c78a74..1dec0a6 100644
--- a/puppet/modules/role/templates/elk/monolog.php.erb
+++ b/puppet/modules/role/templates/elk/monolog.php.erb
@@ -19,7 +19,7 @@
],
 ];
 $wgMWLoggerDefaultSpi['args'][0]['formatters']['logstash'] = [
-   'class' => '\\Monolog\\Formatter\\LogstashFormatter',
+   'class' => '\\MediaWiki\\Logger\\Monolog\\LogstashFormatter',
'args'  => [ 'mediawiki', php_uname( 'n' ), null, '', 1 ],
 ];
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iebd10e89958e8ada17ed0298f145987bf7b4394a
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
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...WikibaseLexeme[master]: Change docs format from .wiki to .md

2017-03-13 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342550 )

Change subject: Change docs format from .wiki to .md
..

Change docs format from .wiki to .md

It doesn't support proper syntax highlighting

Change-Id: I5fbf9d2f78e831a29404ff525f4af980021b6a55
---
R docs/change-op-serialization.md
1 file changed, 10 insertions(+), 10 deletions(-)


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

diff --git a/docs/change-op-serialization.wiki b/docs/change-op-serialization.md
similarity index 91%
rename from docs/change-op-serialization.wiki
rename to docs/change-op-serialization.md
index e055b7d..1457024 100644
--- a/docs/change-op-serialization.wiki
+++ b/docs/change-op-serialization.md
@@ -2,24 +2,24 @@
 
 See docs/change-op-serialization.wiki in Wikibase Git repository for general 
overview of syntax of change request data.
 
-== Lexeme entity elements ==
+## Lexeme entity elements
 
-=== Language ===
+### Language
 
 * A language is defined by adding a "language" key to the change request JSON 
array. The value should be a string containing the ID of an existing item. That 
item should be a about a language (for example French or Chinese), but we don't 
enforce that, and constraint reports should take care of such violations.
 * Language can't be null or empty.
 
 Example of a change request setting language to "Q666" can be seen below (only 
relevant parts of the request included in the example).
 
-
+```json
 {
...
"language": "Q666"
...
 }
-
+```
 
-=== Lemmas ===
+### Lemmas
 
 Structure used to define lemma data uses the syntax generally used in Wikibase 
for Term lists, ie. it is similar to what "core" Wikibase uses for labels of 
Items and Properties.
 
@@ -31,7 +31,7 @@
 
 Example of a change request setting lemma in language "en" to "colour" can be 
seen below (only relevant parts of the request included in the example).
 
-
+```json
 {
 ...
 "lemmas": {
@@ -39,18 +39,18 @@
}
...
 }
-
+```
 
-=== Lexical category ===
+### Lexical category
 * The lexical category is defined by adding a "lexicalCategory" key to the 
change request JSON array. The value should be a string containing the ID of an 
existing item. That item should be about a lexical category (for example verb 
or noun), but we don't enforce that, and constraint reports should take care of 
such violations.
 * Lexical category can't be null or empty.
 
 Example of a change request setting lexical category to "Q42" can be seen 
below (only relevant parts of the request included in the example).
 
-
+```json
 {
...
"lexicalCategory": "Q42"
...
 }
-
+```

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5fbf9d2f78e831a29404ff525f4af980021b6a55
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: mariadb: Repool db1054 with low weight after maintenance

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

Change subject: mariadb: Repool db1054 with low weight after maintenance
..


mariadb: Repool db1054 with low weight after maintenance

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

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index ea4b3c0..e497972 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -110,11 +110,11 @@
 #  'db1024' => 0,   # B1 1.4TB  64GB, old master
'db1021' => 0,   # B1 1.4TB  64GB, vslow, dump
'db1036' => 1,   # B2 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
-#  'db1054' => 1,   # A3 2.8TB  96GB, api, down for maintenance
+   'db1054' => 1,   # A3 2.8TB  96GB, api
'db1060' => 1,   # C2 2.8TB  96GB, api
 #  'db1063' => 0,   # D1 2.8TB 128GB
 #  'db1067' => 0,   # D1 2.8TB 160GB
-   'db1074' => 300, # A2 3.6TB 512GB, temp. api
+   'db1074' => 500, # A2 3.6TB 512GB
'db1076' => 500, # B1 3.6TB 512GB
'db1090' => 500, # C3 3.6TB 512GB
],
@@ -277,8 +277,8 @@
'db1021' => 1,
],
'api' => [
-   'db1074' => 1,
-   'db1060' => 1,
+   'db1054' => 1,
+   'db1060' => 10,
],
'watchlist' => [
'db1036' => 1,

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: mariadb: Repool db1054 with low weight after maintenance

2017-03-13 Thread Jcrespo (Code Review)
Jcrespo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342549 )

Change subject: mariadb: Repool db1054 with low weight after maintenance
..

mariadb: Repool db1054 with low weight after maintenance

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


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index ea4b3c0..e497972 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -110,11 +110,11 @@
 #  'db1024' => 0,   # B1 1.4TB  64GB, old master
'db1021' => 0,   # B1 1.4TB  64GB, vslow, dump
'db1036' => 1,   # B2 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
-#  'db1054' => 1,   # A3 2.8TB  96GB, api, down for maintenance
+   'db1054' => 1,   # A3 2.8TB  96GB, api
'db1060' => 1,   # C2 2.8TB  96GB, api
 #  'db1063' => 0,   # D1 2.8TB 128GB
 #  'db1067' => 0,   # D1 2.8TB 160GB
-   'db1074' => 300, # A2 3.6TB 512GB, temp. api
+   'db1074' => 500, # A2 3.6TB 512GB
'db1076' => 500, # B1 3.6TB 512GB
'db1090' => 500, # C3 3.6TB 512GB
],
@@ -277,8 +277,8 @@
'db1021' => 1,
],
'api' => [
-   'db1074' => 1,
-   'db1060' => 1,
+   'db1054' => 1,
+   'db1060' => 10,
],
'watchlist' => [
'db1036' => 1,

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Comments and todos

2017-03-13 Thread Awight (Code Review)
Awight has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342547 )

Change subject: Comments and todos
..

Comments and todos

Change-Id: I16be18f5618cb34b341b6c3b76c730b928f727c9
---
M gateway_common/GatewayPage.php
M gateway_common/donation.api.php
M gateway_common/gateway.adapter.php
3 files changed, 11 insertions(+), 1 deletion(-)


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

diff --git a/gateway_common/GatewayPage.php b/gateway_common/GatewayPage.php
index 8d32960..104c519 100644
--- a/gateway_common/GatewayPage.php
+++ b/gateway_common/GatewayPage.php
@@ -122,6 +122,7 @@
return;
}
 
+   // FIXME: Should have checked this before creating the adapter.
if ( $this->adapter->getGlobal( 'Enabled' ) !== true ) {
$this->logger->info( 'Displaying fail page for disabled 
gateway' );
$this->displayFailPage();
@@ -341,7 +342,8 @@
protected function handleDonationRequest() {
$this->setHeaders();
 
-   // TODO: this is where we should feed GPCS parameters into 
DonationData.
+   // TODO: This is where we should feed GPCS parameters into the 
gateway
+   // and DonationData, rather than harvest params in the adapter 
itself.
 
// dispatch forms/handling
if ( $this->adapter->checkTokens() ) {
diff --git a/gateway_common/donation.api.php b/gateway_common/donation.api.php
index d560699..8b2e1fa 100644
--- a/gateway_common/donation.api.php
+++ b/gateway_common/donation.api.php
@@ -30,6 +30,7 @@
$gatewayObj->revalidate();
if ( $gatewayObj->getAllErrors() ) {
$outputResult['errors'] = $gatewayObj->getAllErrors();
+   // FIXME: What is this junk?  Smaller API, like 
getResult()->addErrors
$this->getResult()->setIndexedTagName( 
$outputResult['errors'], 'error' );
$this->getResult()->addValue( null, 'result', 
$outputResult );
return;
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 8d7ed15..24bd3b0 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -237,6 +237,7 @@
$this->session_resetOnSwitch(); // Need to do this before 
creating DonationData
 
// FIXME: this should not have side effects like setting 
order_id_meta['final']
+   // TODO: On second thought, neither set data nor validate in 
this constructor.
$this->dataObj = new DonationData( $this, 
$options['external_data'] );
 
$this->setValidationErrors( 
$this->getOriginalValidationErrors() );
@@ -348,6 +349,8 @@
}
 
foreach ( $this->config['transformers'] as $className ) {
+   // TODO: Pass $this to the constructor so we can take 
gateway out
+   // of the interfaces.
$this->data_transformers[] = new $className();
}
}
@@ -896,10 +899,12 @@
$this->session_addDonorData();
if ( !$this->validatedOK() ){
//If the data didn't validate okay, prevent all data 
transmissions.
+   // TODO: Rename variable to "response".
$return = new PaymentTransactionResponse();
$return->setCommunicationStatus( false );
$return->setMessage( 'Failed data validation' );
foreach ( $this->getAllErrors() as $code => $error ) {
+   // TODO: Error should already be in a native 
format.
$return->addError( $code, array( 'message' => 
$error, 'logLevel' => LogLevel::INFO, 'debugInfo' => '' ) );
}
// TODO: should we set $this->transaction_response ?
@@ -1470,6 +1475,8 @@
/**
 * Parse the response to get the errors in a format we can log and 
otherwise deal with.
 * @return array a key/value array of codes (if they exist) and 
messages.
+* TODO: Move to a parsing class, where these are part of an interface
+* rather than empty although non-abstract.
 */
protected function parseResponseErrors( $response ) {
return array();

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

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Correct parameters to wfMessage

2017-03-13 Thread Awight (Code Review)
Awight has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342548 )

Change subject: Correct parameters to wfMessage
..

Correct parameters to wfMessage

FIXME: Wrap a more sane API than wfMessage.  Use the message class directly,
and pass params without c_u_f_a, maybe via the functional interface.

Change-Id: I43808d60c2763804823d0c7ad735c50edada9851
---
M gateway_common/MessageUtils.php
M gateway_common/WmfFramework.mediawiki.php
2 files changed, 11 insertions(+), 5 deletions(-)


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

diff --git a/gateway_common/MessageUtils.php b/gateway_common/MessageUtils.php
index e05cfdb..2ce5025 100644
--- a/gateway_common/MessageUtils.php
+++ b/gateway_common/MessageUtils.php
@@ -27,19 +27,24 @@
# look for the first message that exists
foreach ( $msg_keys as $m ){
if ( WmfFramework::messageExists( $m, $language ) ){
-   return WmfFramework::formatMessage( $m, $params 
);
+   // FIXME: Just use a sane function signature.
+   $varargs = array_merge( array( $m ), $params );
+   return call_user_func_array( 
'WmfFramework::formatMessage', $varargs );
}
}
 
# we found nothing in the requested language, return the first 
fallback message that exists
+   # FIXME: How is this different than the above loop?
foreach ( $msg_keys as $m ){
if ( WmfFramework::messageExists( $m, $language ) ){
-   return WmfFramework::formatMessage( $m, $params 
);
+   $varargs = array_merge( array( $m ), $params );
+   return call_user_func_array( 
'WmfFramework::formatMessage', $varargs );
}
}
 
# somehow we still don't have a message, return a default error 
message
-   return WmfFramework::formatMessage( $msg_keys[0], $params );
+   $varargs = array_merge( array( $msg_keys[0] ), $params );
+   return call_user_func_array( 'WmfFramework::formatMessage', 
$varargs );
}
 
/**
diff --git a/gateway_common/WmfFramework.mediawiki.php 
b/gateway_common/WmfFramework.mediawiki.php
index 37ecf9b..9c03541 100644
--- a/gateway_common/WmfFramework.mediawiki.php
+++ b/gateway_common/WmfFramework.mediawiki.php
@@ -31,8 +31,9 @@
return wfHostname();
}
 
-   static function formatMessage( $message_identifier /*, ... */ ) {
-   return call_user_func_array( 'wfMessage', func_get_args() 
)->text();
+   static function formatMessage( /* $message_identifier, ... */ ) {
+   $args = func_get_args();
+   return call_user_func_array( 'wfMessage', $args )->text();
}
 
static function getLanguageCode() {

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

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

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Using same result div id in embed as main page

2017-03-13 Thread EdouardHue (Code Review)
EdouardHue has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342546 )

Change subject: Using same result div id in embed as main page
..

Using same result div id in embed as main page

Main page uses #query-result but embed.html uses #query.
Also added a call to show #query-result after fetching result.

Bug: T160320
Change-Id: I191a90a2af67ff5fd1bc0281fc7dca6c9b2f0247
---
M embed.html
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/46/342546/1

diff --git a/embed.html b/embed.html
index 2bfd6e3..7628f9f 100644
--- a/embed.html
+++ b/embed.html
@@ -76,7 +76,7 @@
Error

 
-   
+   
Edit on query.Wikidata.org
 

@@ -185,8 +185,9 @@
api.query( query ).done( function() {
try {
browser.setResult( 
api.getResultRawData() );
-   browser.draw( $( '#result' ) );
+   browser.draw( $( '#query-result' ) );
$( '#progress' ).hide();
+   $( '#query-result' ).show();
} catch ( e ) {
$( '#progress' ).hide();
$( '#error' ).show();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I191a90a2af67ff5fd1bc0281fc7dca6c9b2f0247
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: EdouardHue 

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


[MediaWiki-commits] [Gerrit] mediawiki...SemanticForms[3.7]: Added use of Database::buildLike()

2017-03-13 Thread Brian Wolff (Code Review)
Brian Wolff has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342545 )

Change subject: Added use of Database::buildLike()
..


Added use of Database::buildLike()

Backport from PageForms bb42c6f401b9

Change-Id: I1c28fb97a4253c41c2c66d5bc9fb010afb42c8ea
---
M includes/SF_ValuesUtils.php
1 file changed, 8 insertions(+), 6 deletions(-)

Approvals:
  Brian Wolff: Verified; Looks good to me, approved



diff --git a/includes/SF_ValuesUtils.php b/includes/SF_ValuesUtils.php
index 2bc88da..3158a24 100644
--- a/includes/SF_ValuesUtils.php
+++ b/includes/SF_ValuesUtils.php
@@ -395,6 +395,7 @@
 
/**
* Returns a SQL condition for autocompletion substring value in a 
column.
+   *
* @param string $value_column Value column name
* @param string $substring Substring to look for
* @return SQL condition for use in WHERE clause
@@ -404,6 +405,8 @@
*/
public static function getSQLConditionForAutocompleteInColumn( $column, 
$substring, $replaceSpaces = true ) {
global $wgDBtype, $sfgAutocompleteOnAllChars;
+
+   $db = wfGetDB( DB_SLAVE );
 
// CONVERT() is also supported in PostgreSQL, but it doesn't
// seem to work the same way.
@@ -417,15 +420,14 @@
if ( $replaceSpaces ) {
$substring = str_replace( ' ', '_', $substring );
}
-   $substring = str_replace( "'", "\'", $substring );
-   $substring = str_replace( '_', '\_', $substring );
-   $substring = str_replace( '%', '\%', $substring );
 
if ( $sfgAutocompleteOnAllChars ) {
-   return "$column_value LIKE '%$substring%'";
+   return $column_value . $db->buildLike( $substring, 
$db->anyString() );
} else {
-   $spaceRepresentation = $replaceSpaces ? '\_' : ' ';
-   return "$column_value LIKE '$substring%' OR 
$column_value LIKE '%" . $spaceRepresentation . $substring . "%'";
+   $spaceRepresentation = $replaceSpaces ? '_' : ' ';
+   return $column_value . $db->buildLike( $substring, 
$db->anyString() ) .
+   ' OR ' .$column_value .
+   $db->buildLike( $db->anyString(), 
$spaceRepresentation . $substring, $db->anyString() );
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1c28fb97a4253c41c2c66d5bc9fb010afb42c8ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: 3.7
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] mediawiki...SemanticForms[3.7]: Added use of Database::buildLike()

2017-03-13 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342545 )

Change subject: Added use of Database::buildLike()
..

Added use of Database::buildLike()

Backport from PageForms bb42c6f401b9

Change-Id: I1c28fb97a4253c41c2c66d5bc9fb010afb42c8ea
---
M includes/SF_ValuesUtils.php
1 file changed, 8 insertions(+), 6 deletions(-)


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

diff --git a/includes/SF_ValuesUtils.php b/includes/SF_ValuesUtils.php
index 2bc88da..3158a24 100644
--- a/includes/SF_ValuesUtils.php
+++ b/includes/SF_ValuesUtils.php
@@ -395,6 +395,7 @@
 
/**
* Returns a SQL condition for autocompletion substring value in a 
column.
+   *
* @param string $value_column Value column name
* @param string $substring Substring to look for
* @return SQL condition for use in WHERE clause
@@ -404,6 +405,8 @@
*/
public static function getSQLConditionForAutocompleteInColumn( $column, 
$substring, $replaceSpaces = true ) {
global $wgDBtype, $sfgAutocompleteOnAllChars;
+
+   $db = wfGetDB( DB_SLAVE );
 
// CONVERT() is also supported in PostgreSQL, but it doesn't
// seem to work the same way.
@@ -417,15 +420,14 @@
if ( $replaceSpaces ) {
$substring = str_replace( ' ', '_', $substring );
}
-   $substring = str_replace( "'", "\'", $substring );
-   $substring = str_replace( '_', '\_', $substring );
-   $substring = str_replace( '%', '\%', $substring );
 
if ( $sfgAutocompleteOnAllChars ) {
-   return "$column_value LIKE '%$substring%'";
+   return $column_value . $db->buildLike( $substring, 
$db->anyString() );
} else {
-   $spaceRepresentation = $replaceSpaces ? '\_' : ' ';
-   return "$column_value LIKE '$substring%' OR 
$column_value LIKE '%" . $spaceRepresentation . $substring . "%'";
+   $spaceRepresentation = $replaceSpaces ? '_' : ' ';
+   return $column_value . $db->buildLike( $substring, 
$db->anyString() ) .
+   ' OR ' .$column_value .
+   $db->buildLike( $db->anyString(), 
$spaceRepresentation . $substring, $db->anyString() );
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c28fb97a4253c41c2c66d5bc9fb010afb42c8ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: 3.7
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Remove mariadb submodule

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

Change subject: Remove mariadb submodule
..


Remove mariadb submodule

Follow up to I9d18d0a8 where Jamie Crespo removed the mariadb submodule
from operations/puppet.git. This module does not seem to actually be
used in our MediaWiki-Vagrant configuration.

Change-Id: I1388c4e70806f2b3c48ca7108f6c33c09ad8d378
---
M .gitmodules
M .rubocop.yml
D puppet/modules/mariadb
3 files changed, 0 insertions(+), 5 deletions(-)

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



diff --git a/.gitmodules b/.gitmodules
index 12c3057..5b6ae2b 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,9 +4,6 @@
 [submodule "puppet/modules/nginx"]
path = puppet/modules/nginx
url = https://gerrit.wikimedia.org/r/operations/puppet/nginx
-[submodule "puppet/modules/mariadb"]
-   path = puppet/modules/mariadb
-   url = https://gerrit.wikimedia.org/r/operations/puppet/mariadb
 [submodule "puppet/modules/cdh"]
path = puppet/modules/cdh
url = https://gerrit.wikimedia.org/r/operations/puppet/cdh
diff --git a/.rubocop.yml b/.rubocop.yml
index 9e019fe..f7a8364 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -9,7 +9,6 @@
 - 'mediawiki-*/**/*'
 - 'puppet/modules/activemq/**/*'
 - 'puppet/modules/cdh/**/*'
-- 'puppet/modules/mariadb/**/*'
 - 'puppet/modules/nginx/**/*'
 - 'puppet/modules/stdlib/**/*'
 - 'puppet/modules/wikimetrics/**/*'
diff --git a/puppet/modules/mariadb b/puppet/modules/mariadb
deleted file mode 16
index b569099..000
--- a/puppet/modules/mariadb
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit b5690999702552cc7fea48b2206f4bb92191d8ca

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1388c4e70806f2b3c48ca7108f6c33c09ad8d378
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Hashar 
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]: Refactor RdfBuilder to handle properties metadata properly

2017-03-13 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342537 )

Change subject: Refactor RdfBuilder to handle properties metadata properly
..

Refactor RdfBuilder to handle properties metadata properly

Bug: T160382
Change-Id: Iaf79a0012e691445751644a194a67b8ae14fba1e
---
M repo/WikibaseRepo.entitytypes.php
A repo/includes/Rdf/PropertyRdfBuilder.php
M repo/includes/Rdf/RdfBuilder.php
A repo/tests/phpunit/data/rdf/PropertyRdfBuilder/P2_all.nt
A repo/tests/phpunit/data/rdf/PropertyRdfBuilder/P2_stubs.nt
A repo/tests/phpunit/data/rdf/entities/P2.json
A repo/tests/phpunit/includes/Rdf/PropertyRdfBuilderTest.php
7 files changed, 344 insertions(+), 72 deletions(-)


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

diff --git a/repo/WikibaseRepo.entitytypes.php 
b/repo/WikibaseRepo.entitytypes.php
index 1fbe0d2..21f36d1 100644
--- a/repo/WikibaseRepo.entitytypes.php
+++ b/repo/WikibaseRepo.entitytypes.php
@@ -20,9 +20,12 @@
 use Wikibase\DataModel\Entity\Property;
 use Wikibase\DataModel\Services\Lookup\LabelDescriptionLookup;
 use Wikibase\LanguageFallbackChain;
+use Wikibase\Rdf\PropertyRdfBuilder;
+use Wikibase\Rdf\RdfVocabulary;
 use Wikibase\Repo\WikibaseRepo;
 use Wikibase\View\EditSectionGenerator;
 use Wikibase\View\EntityTermsView;
+use Wikimedia\Purtle\RdfWriter;
 
 return array(
'item' => array(
@@ -76,5 +79,17 @@
'entity-factory-callback' => function() {
return Property::newFromType( '' );
},
+   'rdf-builder-factory-callback' => function(
+   $flavorFlags,
+   RdfVocabulary $vocabulary,
+   RdfWriter $writer,
+   $mentionedEntityTracker,
+   $dedupe
+   ) {
+   return new PropertyRdfBuilder(
+   $vocabulary,
+   $writer
+   );
+   }
)
 );
diff --git a/repo/includes/Rdf/PropertyRdfBuilder.php 
b/repo/includes/Rdf/PropertyRdfBuilder.php
new file mode 100644
index 000..9883007
--- /dev/null
+++ b/repo/includes/Rdf/PropertyRdfBuilder.php
@@ -0,0 +1,143 @@
+
+ */
+class PropertyRdfBuilder implements EntityRdfBuilder {
+
+   /**
+* @var RdfVocabulary
+*/
+   private $vocabulary;
+
+   /**
+* @var RdfWriter
+*/
+   private $writer;
+
+   /**
+* @param RdfVocabulary $vocabulary
+* @param RdfWriter $writer
+*/
+   public function __construct(
+   RdfVocabulary $vocabulary,
+   RdfWriter $writer
+   ) {
+   $this->vocabulary = $vocabulary;
+   $this->writer = $writer;
+   }
+
+   /**
+* Write predicates linking property entity to property predicates
+* @param string $id
+* @param boolean $isObjectProperty Is the property data or object 
property?
+*/
+   private function writePropertyPredicates( $id, $isObjectProperty ) {
+   $this->writer->say( RdfVocabulary::NS_ONTOLOGY, 'directClaim' 
)->is( RdfVocabulary::NSP_DIRECT_CLAIM, $id );
+   $this->writer->say( RdfVocabulary::NS_ONTOLOGY, 'claim' )->is( 
RdfVocabulary::NSP_CLAIM, $id );
+   $this->writer->say( RdfVocabulary::NS_ONTOLOGY, 
'statementProperty' )->is( RdfVocabulary::NSP_CLAIM_STATEMENT, $id );
+   $this->writer->say( RdfVocabulary::NS_ONTOLOGY, 
'statementValue' )->is( RdfVocabulary::NSP_CLAIM_VALUE, $id );
+   $this->writer->say( RdfVocabulary::NS_ONTOLOGY, 
'statementValueNormalized' )->is( RdfVocabulary::NSP_CLAIM_VALUE_NORM, $id );
+   $this->writer->say( RdfVocabulary::NS_ONTOLOGY, 'qualifier' 
)->is( RdfVocabulary::NSP_QUALIFIER, $id );
+   $this->writer->say( RdfVocabulary::NS_ONTOLOGY, 
'qualifierValue' )->is( RdfVocabulary::NSP_QUALIFIER_VALUE, $id );
+   $this->writer->say( RdfVocabulary::NS_ONTOLOGY, 
'qualifierValueNormalized' )->is( RdfVocabulary::NSP_QUALIFIER_VALUE_NORM, $id 
);
+   $this->writer->say( RdfVocabulary::NS_ONTOLOGY, 'reference' 
)->is( RdfVocabulary::NSP_REFERENCE, $id );
+   $this->writer->say( RdfVocabulary::NS_ONTOLOGY, 
'referenceValue' )->is( RdfVocabulary::NSP_REFERENCE_VALUE, $id );
+   $this->writer->say( RdfVocabulary::NS_ONTOLOGY, 
'referenceValueNormalized' )->is( RdfVocabulary::NSP_REFERENCE_VALUE_NORM, $id 
);
+   $this->writer->say( RdfVocabulary::NS_ONTOLOGY, 'novalue' 
)->is( RdfVocabulary::NSP_NOVALUE, $id );
+   // Always object properties
+   $this->writer->about( RdfVocabulary::NSP_CLAIM, $id )->a( 
'owl', 'ObjectProperty' );
+   $this->writer->about( RdfVocabulary::NSP_CLAIM_VALUE, $id )->a( 
'owl', 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: textlib.py: DeprecationWarning: invalid escape sequence

2017-03-13 Thread Mpaa (Code Review)
Mpaa has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342534 )

Change subject: textlib.py: DeprecationWarning: invalid escape sequence
..

textlib.py: DeprecationWarning: invalid escape sequence

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


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/34/342534/1

diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index 88adc31..764c270 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -1737,7 +1737,7 @@
 allstars = []
 starstext = removeDisabledParts(text)
 for star in starsList:
-regex = re.compile('(\{\{(?:template:|)%s\|.*?\}\}[\s]*)'
+regex = re.compile(r'(\{\{(?:template:|)%s\|.*?\}\}[\s]*)'
% star, re.I)
 found = regex.findall(starstext)
 if found:

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: MediaWiki Vagrant: always trigger rake job

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

Change subject: MediaWiki Vagrant: always trigger rake job
..


MediaWiki Vagrant: always trigger rake job

Change-Id: I6aa8e1318cb8a7b96a02544666c0a429f76bd1c1
---
M jjb/mediawiki-misc.yaml
M zuul/layout.yaml
2 files changed, 10 insertions(+), 2 deletions(-)

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



diff --git a/jjb/mediawiki-misc.yaml b/jjb/mediawiki-misc.yaml
index 154a838..f6f4340 100644
--- a/jjb/mediawiki-misc.yaml
+++ b/jjb/mediawiki-misc.yaml
@@ -31,6 +31,7 @@
 - project:
 name: 'mediawiki-vagrant'
 jobs:
+ - '{name}-rake-jessie'
  - 'mediawiki-vagrant-puppet-doc-publish'
 
 - project:
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1de9b7d..eaed02a 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -682,6 +682,11 @@
   - name: ^operations-puppet-rake-jessie$
 files:
   - '.*'
+  # Same for mediawiki/vagrant
+  - name: ^mediawiki-vagrant-rake-jessie$
+files:
+  - '.*'
+
   # Ditto for translatewiki which has puppet modules under /puppet
   - name: ^translatewiki-rake-jessie$
 files:
@@ -2018,8 +2023,10 @@
   - mw-tools-releng-tox-doc-publish
 
   - name: mediawiki/vagrant
-template:
-  - name: rake
+test:
+  - mediawiki-vagrant-rake-jessie
+gate-and-submit:
+  - mediawiki-vagrant-rake-jessie
 postmerge:
   - mediawiki-vagrant-puppet-doc-publish
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6aa8e1318cb8a7b96a02544666c0a429f76bd1c1
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: MediaWiki Vagrant: always trigger rake job

2017-03-13 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342520 )

Change subject: MediaWiki Vagrant: always trigger rake job
..

MediaWiki Vagrant: always trigger rake job

Change-Id: I6aa8e1318cb8a7b96a02544666c0a429f76bd1c1
---
M jjb/mediawiki-misc.yaml
M zuul/layout.yaml
2 files changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/20/342520/1

diff --git a/jjb/mediawiki-misc.yaml b/jjb/mediawiki-misc.yaml
index 154a838..f6f4340 100644
--- a/jjb/mediawiki-misc.yaml
+++ b/jjb/mediawiki-misc.yaml
@@ -31,6 +31,7 @@
 - project:
 name: 'mediawiki-vagrant'
 jobs:
+ - '{name}-rake-jessie'
  - 'mediawiki-vagrant-puppet-doc-publish'
 
 - project:
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1de9b7d..eaed02a 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -682,6 +682,11 @@
   - name: ^operations-puppet-rake-jessie$
 files:
   - '.*'
+  # Same for mediawiki/vagrant
+  - name: ^mediawiki-vagrant-rake-jessie$
+files:
+  - '.*'
+
   # Ditto for translatewiki which has puppet modules under /puppet
   - name: ^translatewiki-rake-jessie$
 files:
@@ -2018,8 +2023,10 @@
   - mw-tools-releng-tox-doc-publish
 
   - name: mediawiki/vagrant
-template:
-  - name: rake
+test:
+  - mediawiki-vagrant-rake-jessie
+gate-and-submit:
+  - mediawiki-vagrant-rake-jessie
 postmerge:
   - mediawiki-vagrant-puppet-doc-publish
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use executeOpHandlesInternal() in SwiftFileBackend

2017-03-13 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342516 )

Change subject: Use executeOpHandlesInternal() in SwiftFileBackend
..

Use executeOpHandlesInternal() in SwiftFileBackend

Instead calling doExecuteOpHandlesInternal() directly, use the
wrapper parent class method instead so that closeResources() is
called on all of the handles.

Change-Id: Iab0d4f7c08d155639a44f48147b78283059a6d24
---
M composer.json
M includes/libs/filebackend/FileBackendStore.php
M includes/libs/filebackend/SwiftFileBackend.php
3 files changed, 12 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/16/342516/1

diff --git a/composer.json b/composer.json
index af8635a..59d032b 100644
--- a/composer.json
+++ b/composer.json
@@ -45,7 +45,8 @@
"wikimedia/timestamp": "1.0.0",
"wikimedia/wait-condition-loop": "1.0.1",
"wikimedia/wrappedstring": "2.2.0",
-   "zordius/lightncandy": "0.23"
+   "zordius/lightncandy": "0.23",
+   "activecollab/etcd": "^1.0"
},
"require-dev": {
"composer/spdx-licenses": "1.1.4",
diff --git a/includes/libs/filebackend/FileBackendStore.php 
b/includes/libs/filebackend/FileBackendStore.php
index 7cb26c6..039bd42 100644
--- a/includes/libs/filebackend/FileBackendStore.php
+++ b/includes/libs/filebackend/FileBackendStore.php
@@ -1200,21 +1200,20 @@
 * to the order in which the handles where given.
 *
 * @param FileBackendStoreOpHandle[] $fileOpHandles
-*
-* @throws FileBackendError
 * @return StatusValue[] Map of StatusValue objects
+* @throws FileBackendError
 */
final public function executeOpHandlesInternal( array $fileOpHandles ) {
$ps = $this->scopedProfileSection( __METHOD__ . 
"-{$this->name}" );
 
foreach ( $fileOpHandles as $fileOpHandle ) {
if ( !( $fileOpHandle instanceof 
FileBackendStoreOpHandle ) ) {
-   throw new InvalidArgumentException( "Got a 
non-FileBackendStoreOpHandle object." );
+   throw new InvalidArgumentException( "Expected 
FileBackendStoreOpHandle object." );
} elseif ( $fileOpHandle->backend->getName() !== 
$this->getName() ) {
-   throw new InvalidArgumentException(
-   "Got a FileBackendStoreOpHandle for the 
wrong backend." );
+   throw new InvalidArgumentException( "Expected 
handle for this file backend." );
}
}
+
$res = $this->doExecuteOpHandlesInternal( $fileOpHandles );
foreach ( $fileOpHandles as $fileOpHandle ) {
$fileOpHandle->closeResources();
diff --git a/includes/libs/filebackend/SwiftFileBackend.php 
b/includes/libs/filebackend/SwiftFileBackend.php
index c50dfd7..d97c5cf 100644
--- a/includes/libs/filebackend/SwiftFileBackend.php
+++ b/includes/libs/filebackend/SwiftFileBackend.php
@@ -287,7 +287,7 @@
if ( !empty( $params['async'] ) ) { // deferred
$status->value = $opHandle;
} else { // actually write the object in Swift
-   $status->merge( current( 
$this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
+   $status->merge( current( 
$this->executeOpHandlesInternal( [ $opHandle ] ) ) );
}
 
return $status;
@@ -351,7 +351,7 @@
if ( !empty( $params['async'] ) ) { // deferred
$status->value = $opHandle;
} else { // actually write the object in Swift
-   $status->merge( current( 
$this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
+   $status->merge( current( 
$this->executeOpHandlesInternal( [ $opHandle ] ) ) );
}
 
return $status;
@@ -399,7 +399,7 @@
if ( !empty( $params['async'] ) ) { // deferred
$status->value = $opHandle;
} else { // actually write the object in Swift
-   $status->merge( current( 
$this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
+   $status->merge( current( 
$this->executeOpHandlesInternal( [ $opHandle ] ) ) );
}
 
return $status;
@@ -458,7 +458,7 @@
if ( !empty( $params['async'] ) ) { // deferred
$status->value = $opHandle;
} else { // actually move the object in Swift
-   $status->merge( current( 
$this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
+   $status->merge( current( 

[MediaWiki-commits] [Gerrit] integration/config[master]: Migrate apps-android-java-mwapi to nodepool

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

Change subject: Migrate apps-android-java-mwapi to nodepool
..


Migrate apps-android-java-mwapi to nodepool

It fails equally on permanent and Nodepool slaves though:

Error resolving plugin [id: 'ch.netzwerg.release', version: '1.1.0']
> Could not GET
> 'https://plugins.gradle.org/api/gradle/2.5/plugin/use/ch.netzwerg.release/1.1.0'.
> peer not authenticated

Bug: T119140
Change-Id: If6658a556272b91c2d44c26e32c39e0acd850de1
---
M jjb/mobile.yaml
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/jjb/mobile.yaml b/jjb/mobile.yaml
index 1a6a331..a0e462e 100644
--- a/jjb/mobile.yaml
+++ b/jjb/mobile.yaml
@@ -151,17 +151,16 @@
 
 - job-template:
 name: 'apps-android-java-mwapi'
-node: contintLabsSlave && UbuntuTrusty
+node: ci-jessie-wikimedia
 defaults: use-remoteonly-zuul
 concurrent: true
 properties:
  - build-discarder:
  days-to-keep: 30
- - throttle-one-per-node
-
 triggers:
  - zuul
 builders:
+ - castor-load
  - shell: |
  ./gradlew clean checkstyle build
 publishers:
@@ -170,6 +169,7 @@
  - gradle-reports-checkstyle
  - junit:
  results: '**/test-results/**/*.xml'
+ - castor-save
 
 - project:
 name: 'apps-android-java-mwapi'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If6658a556272b91c2d44c26e32c39e0acd850de1
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Migrate apps-android-java-mwapi to nodepool

2017-03-13 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342515 )

Change subject: Migrate apps-android-java-mwapi to nodepool
..

Migrate apps-android-java-mwapi to nodepool

It fails equally on permanent and Nodepool slaves though:

Error resolving plugin [id: 'ch.netzwerg.release', version: '1.1.0']
> Could not GET
> 'https://plugins.gradle.org/api/gradle/2.5/plugin/use/ch.netzwerg.release/1.1.0'.
> peer not authenticated

Bug: T119140
Change-Id: If6658a556272b91c2d44c26e32c39e0acd850de1
---
M jjb/mobile.yaml
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/15/342515/1

diff --git a/jjb/mobile.yaml b/jjb/mobile.yaml
index 1a6a331..a0e462e 100644
--- a/jjb/mobile.yaml
+++ b/jjb/mobile.yaml
@@ -151,17 +151,16 @@
 
 - job-template:
 name: 'apps-android-java-mwapi'
-node: contintLabsSlave && UbuntuTrusty
+node: ci-jessie-wikimedia
 defaults: use-remoteonly-zuul
 concurrent: true
 properties:
  - build-discarder:
  days-to-keep: 30
- - throttle-one-per-node
-
 triggers:
  - zuul
 builders:
+ - castor-load
  - shell: |
  ./gradlew clean checkstyle build
 publishers:
@@ -170,6 +169,7 @@
  - gradle-reports-checkstyle
  - junit:
  results: '**/test-results/**/*.xml'
+ - castor-save
 
 - project:
 name: 'apps-android-java-mwapi'

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[trusty-compat]: Branch for backwards compatibility with Trusty

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

Change subject: Branch for backwards compatibility with Trusty
..


Branch for backwards compatibility with Trusty

Bug: T136429
Change-Id: I60849ceedfc852a0a229928c52d4b1b0185e1186
---
M .gitreview
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/.gitreview b/.gitreview
index 94edce0..ee22331 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host=gerrit.wikimedia.org
 port=29418
 project=mediawiki/vagrant.git
-defaultbranch=master
+defaultbranch=trusty-compat
 defaultrebase=0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I60849ceedfc852a0a229928c52d4b1b0185e1186
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: trusty-compat
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Donation links in currencies which we'll automatically convert.

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

Change subject: Donation links in currencies which we'll automatically convert.
..


Donation links in currencies which we'll automatically convert.

Change-Id: I43043d474a90fa4854c9f48ef4e4de653c9832a6
---
M puppet/modules/payments/files/Main_Page.wiki
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  BryanDavis: Verified
  Ejegg: Looks good to me, approved



diff --git a/puppet/modules/payments/files/Main_Page.wiki 
b/puppet/modules/payments/files/Main_Page.wiki
index 7e50915..a0166ac 100644
--- a/puppet/modules/payments/files/Main_Page.wiki
+++ b/puppet/modules/payments/files/Main_Page.wiki
@@ -112,10 +112,12 @@
 
 * PayPal (Legacy integration)
 ** 
[{{fullurl:Special:PaypalLegacyGateway|appeal=JimmyQuote=paypal==en_source=Waystogive_medium=sitenotice_campaign=C11_Waystogive=paypal=Thank_You%2Fen_code=USD=en}}
 In US, English, USD - no amount specified]
+** 
[{{fullurl:Special:PaypalLegacyGateway|appeal=JimmyQuote=paypal==en_source=Waystogive_medium=sitenotice_campaign=C11_Waystogive=paypal=Thank_You%2Fen_code=AMD=1000=en}}
 In US, English, AMD - currency conversion required.]
 
 * PayPal Express Checkout
 ** 
[{{fullurl:Special:PaypalExpressGateway|appeal=JimmyQuote=paypal==en_source=Waystogive_medium=sitenotice_campaign=C11_Waystogive=paypal=Thank_You%2Fen_code=USD=en}}
 In US, English, USD - no amount specified]
 ** 
[{{fullurl:Special:PaypalExpressGateway|appeal=JimmyQuote=paypal=1=en_source=Waystogive_medium=sitenotice_campaign=C11_Waystogive=paypal=Thank_You%2Fen_code=USD=en}}
 Recurring, in US, English, USD - no amount specified]
+** 
[{{fullurl:Special:PaypalExpressGateway|appeal=JimmyQuote=paypal==en_source=Waystogive_medium=sitenotice_campaign=C11_Waystogive=paypal=Thank_You%2Fen_code=AMD=1000=en}}
 In US, English, AMD - currency conversion required.]
 
 * Gateway form chooser
 ** 
[{{fullurl:Special:GatewayFormChooser|uselang=en=en_code=USD=10=US_method=cc}}
 Credit card in US, English, USD]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I43043d474a90fa4854c9f48ef4e4de653c9832a6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
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] mediawiki/vagrant[master]: Remove mariadb submodule

2017-03-13 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342514 )

Change subject: Remove mariadb submodule
..

Remove mariadb submodule

Follow up to I9d18d0a8 where Jamie Crespo removed the mariadb submodule
from operations/puppet.git. This module does not seem to actually be
used in our MediaWiki-Vagrant configuration.

Change-Id: I1388c4e70806f2b3c48ca7108f6c33c09ad8d378
---
M .gitmodules
D puppet/modules/mariadb
2 files changed, 0 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/14/342514/1

diff --git a/.gitmodules b/.gitmodules
index 12c3057..5b6ae2b 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,9 +4,6 @@
 [submodule "puppet/modules/nginx"]
path = puppet/modules/nginx
url = https://gerrit.wikimedia.org/r/operations/puppet/nginx
-[submodule "puppet/modules/mariadb"]
-   path = puppet/modules/mariadb
-   url = https://gerrit.wikimedia.org/r/operations/puppet/mariadb
 [submodule "puppet/modules/cdh"]
path = puppet/modules/cdh
url = https://gerrit.wikimedia.org/r/operations/puppet/cdh
diff --git a/puppet/modules/mariadb b/puppet/modules/mariadb
deleted file mode 16
index b569099..000
--- a/puppet/modules/mariadb
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit b5690999702552cc7fea48b2206f4bb92191d8ca

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1388c4e70806f2b3c48ca7108f6c33c09ad8d378
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] oojs/ui[master]: MediaWiki theme: Align WindowManager to CSS Coding Guidelines

2017-03-13 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342512 )

Change subject: MediaWiki theme: Align WindowManager to CSS Coding Guidelines
..

MediaWiki theme: Align WindowManager to CSS Coding Guidelines

Change-Id: I4084e6cd46b6dbf5d0103f438ebd6a969cd70537
---
M src/themes/mediawiki/windows.less
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/12/342512/1

diff --git a/src/themes/mediawiki/windows.less 
b/src/themes/mediawiki/windows.less
index 427c079..85ab7c5 100644
--- a/src/themes/mediawiki/windows.less
+++ b/src/themes/mediawiki/windows.less
@@ -276,7 +276,7 @@
top: 1em;
bottom: 1em;
max-height: 100%;
-   max-height: e( 'calc(100% - 2em)' );
+   max-height: e( 'calc( 100% - 2em )' );
border: @border-dialog;
border-radius: @border-radius-default;
box-shadow: @box-shadow-dialog;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4084e6cd46b6dbf5d0103f438ebd6a969cd70537
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] oojs/ui[master]: MediaWiki theme: Use color palette color for dialog top bar.

2017-03-13 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342511 )

Change subject: MediaWiki theme: Use color palette color for dialog top bar.
..

MediaWiki theme: Use color palette color for dialog top bar.

Change-Id: I65d02edc21798dca6b872074eaab1eccd25c17b1
---
M src/themes/mediawiki/common.less
M src/themes/mediawiki/windows.less
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/11/342511/1

diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less
index 01fc4ec..ec70e35 100644
--- a/src/themes/mediawiki/common.less
+++ b/src/themes/mediawiki/common.less
@@ -88,6 +88,7 @@
 @border-disabled: @border-width-default solid @border-color-disabled;
 @border-disabled-filled: @border-width-default solid 
@border-color-disabled-filled;
 @border-dialog: @border-default;
+@border-dialog-bar: @border-width-default solid @border-color-dialog-bar;
 @border-menu: @border-default;
 
 @border-color-default: #a2a9b1;
@@ -102,6 +103,7 @@
 @border-color-erroneous: @color-erroneous;
 @border-color-readonly: #c8ccd1;
 @border-color-input-hover: @border-color-default-active;
+@border-color-dialog-bar: #c8ccd1;
 
 @border-radius-default: 2px;
 
diff --git a/src/themes/mediawiki/windows.less 
b/src/themes/mediawiki/windows.less
index 3aec15e..427c079 100644
--- a/src/themes/mediawiki/windows.less
+++ b/src/themes/mediawiki/windows.less
@@ -9,7 +9,7 @@
 
 .theme-oo-ui-messageDialog () {
&-content > .oo-ui-window-foot {
-   outline: @border-dialog; // Using `@border-dialog` var here as 
`outline` is `border` subsitute
+   outline: @border-dialog; // Using `@border-dialog` here as 
`outline` is `border` subsitute
}
 
&-title,
@@ -123,7 +123,7 @@
 
.oo-ui-window-body {
top: @size-dialog-bar-top;
-   outline: 1px solid rgba( 0, 0, 0, 0.2 );
+   outline: @border-dialog-bar; // Using 
`@border-dialog-bar` here as `outline` is `border` subsitute
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65d02edc21798dca6b872074eaab1eccd25c17b1
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] apps...java-mwapi[master]: Jenkins job validation (DO NOT SUBMIT)

2017-03-13 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342510 )

Change subject: Jenkins job validation (DO NOT SUBMIT)
..

Jenkins job validation (DO NOT SUBMIT)

Change-Id: I0cbfadb4363df19f3a3ff6819280e5ccbedc50b9
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/java-mwapi 
refs/changes/10/342510/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cbfadb4363df19f3a3ff6819280e5ccbedc50b9
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/java-mwapi
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Migrate mw-tools-scap-tox-doc-publish to Nodepool

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

Change subject: Migrate mw-tools-scap-tox-doc-publish to Nodepool
..


Migrate mw-tools-scap-tox-doc-publish to Nodepool

Inject ZUUL_PIPELINE=postmerge to benefit from castor.

Bug: T119140
Change-Id: I218eafe1f8b8b4b33de956ecb981f35c849517a7
---
M jjb/mediawiki-tools.yaml
1 file changed, 15 insertions(+), 2 deletions(-)

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



diff --git a/jjb/mediawiki-tools.yaml b/jjb/mediawiki-tools.yaml
index a60e82f..a4a64ab 100644
--- a/jjb/mediawiki-tools.yaml
+++ b/jjb/mediawiki-tools.yaml
@@ -7,7 +7,18 @@
 
 - job:
 name: 'mw-tools-scap-tox-doc-publish'
-node: contintLabsSlave && UbuntuTrusty
+node: ci-jessie-wikimedia
+parameters:
+  # Trigger castor
+  - string:
+  name: 'ZUUL_PIPELINE'
+  default: 'postmerge'
+  - string:
+  name: 'ZUUL_PROJECT'
+  default: 'MSCA'
+  - string:
+  name: 'ZUUL_BRANCH'
+  default: 'master'
 triggers:
   - pollscm:
   cron: '@hourly'
@@ -16,13 +27,15 @@
   url: 'https://phabricator.wikimedia.org/diffusion/MSCA/scap'
   branches:
 - 'origin/master'
-  wipe-workspace: true
 builders:
+  - castor-load
   - run-tox:
   venv: doc
   - doc-publish:
   docsrc: 'docs/_build/html'
   docdest: 'mw-tools-scap'
+publishers:
+  - castor-save
 
 # Job to run MW-CS patchsets against
 # mediwiki/core's includes/ directory for easier

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I218eafe1f8b8b4b33de956ecb981f35c849517a7
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


[MediaWiki-commits] [Gerrit] wikimedia...analytics[master]: Update transfer to es script for es 5.x

2017-03-13 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342509 )

Change subject: Update transfer to es script for es 5.x
..

Update transfer to es script for es 5.x

The scripted updates have slightly changed in 5.x. We now need
to provide the script name in the "inline" field for native scripts.

Change-Id: If08a89ee8a761fed256bbbe038c2862e32e45f43
---
M oozie/transfer_to_es/transferToES.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/analytics 
refs/changes/09/342509/1

diff --git a/oozie/transfer_to_es/transferToES.py 
b/oozie/transfer_to_es/transferToES.py
index e97027a..892d551 100644
--- a/oozie/transfer_to_es/transferToES.py
+++ b/oozie/transfer_to_es/transferToES.py
@@ -50,7 +50,7 @@
 updateData = {"update": {"_id": document.page_id}}
 if NOOP_WITHIN:
 updateDoc = {"script": {
-"script": "super_detect_noop",
+"inline": "super_detect_noop",
 "lang": "native",
 "params": {
 "handlers": {FIELD: "within " + NOOP_WITHIN + "%"},

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If08a89ee8a761fed256bbbe038c2862e32e45f43
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/analytics
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] integration/config[master]: Migrate mw-tools-scap-tox-doc-publish to Nodepool

2017-03-13 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342508 )

Change subject: Migrate mw-tools-scap-tox-doc-publish to Nodepool
..

Migrate mw-tools-scap-tox-doc-publish to Nodepool

Inject ZUUL_PIPELINE=postmerge to benefit from castor.

Bug: T119140
Change-Id: I218eafe1f8b8b4b33de956ecb981f35c849517a7
---
M jjb/mediawiki-tools.yaml
1 file changed, 15 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/08/342508/1

diff --git a/jjb/mediawiki-tools.yaml b/jjb/mediawiki-tools.yaml
index a60e82f..a4a64ab 100644
--- a/jjb/mediawiki-tools.yaml
+++ b/jjb/mediawiki-tools.yaml
@@ -7,7 +7,18 @@
 
 - job:
 name: 'mw-tools-scap-tox-doc-publish'
-node: contintLabsSlave && UbuntuTrusty
+node: ci-jessie-wikimedia
+parameters:
+  # Trigger castor
+  - string:
+  name: 'ZUUL_PIPELINE'
+  default: 'postmerge'
+  - string:
+  name: 'ZUUL_PROJECT'
+  default: 'MSCA'
+  - string:
+  name: 'ZUUL_BRANCH'
+  default: 'master'
 triggers:
   - pollscm:
   cron: '@hourly'
@@ -16,13 +27,15 @@
   url: 'https://phabricator.wikimedia.org/diffusion/MSCA/scap'
   branches:
 - 'origin/master'
-  wipe-workspace: true
 builders:
+  - castor-load
   - run-tox:
   venv: doc
   - doc-publish:
   docsrc: 'docs/_build/html'
   docdest: 'mw-tools-scap'
+publishers:
+  - castor-save
 
 # Job to run MW-CS patchsets against
 # mediwiki/core's includes/ directory for easier

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: MediaWiki theme: Ensure vertical alignment of dialog top bar...

2017-03-13 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342507 )

Change subject: MediaWiki theme: Ensure vertical alignment of dialog top bar 
items
..

MediaWiki theme: Ensure vertical alignment of dialog top bar items

Fix height and vertically align items of dialog top bar, also putting
values in central variable and cleaning up unnecessary properties.

Bug: T113469
Change-Id: I4fc8b851fce3e06cf74461d3ef736f6bc8ae3f00
---
M src/themes/mediawiki/common.less
M src/themes/mediawiki/windows.less
2 files changed, 11 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/07/342507/1

diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less
index 6732f3c..01fc4ec 100644
--- a/src/themes/mediawiki/common.less
+++ b/src/themes/mediawiki/common.less
@@ -76,11 +76,14 @@
 @size-icon: 24 / @oo-ui-font-size-browser / @oo-ui-font-size-default; // 
equals `1.875em`≈`24px` at base `font-size: 12.8px`
 @size-indicator: 12 / @oo-ui-font-size-browser / @oo-ui-font-size-default; // 
equals `0.9375em`≈`12px` at base `font-size: 12.8px`
 @size-toggleswitch-grip-min: 16px;
+@size-dialog-bar-top: 44 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `3.4375em`≈`44px` at base `font-size: 
12.8px`
 
 @width-button-combo-widget: @min-width-button-combo-widget;
 
 @height-icon-element: 100%;
 
+@margin-dialog-bar-button-framed: 6 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `0.46875em`≈`6px` at base `font-size: 
12.8px`
+
 @border-default: @border-width-default solid @border-color-default;
 @border-disabled: @border-width-default solid @border-color-disabled;
 @border-disabled-filled: @border-width-default solid 
@border-color-disabled-filled;
diff --git a/src/themes/mediawiki/windows.less 
b/src/themes/mediawiki/windows.less
index bc8bff6..3aec15e 100644
--- a/src/themes/mediawiki/windows.less
+++ b/src/themes/mediawiki/windows.less
@@ -64,7 +64,7 @@
}
 
.oo-ui-actionWidget {
-   min-height: 3.4em;
+   min-height: @size-dialog-bar-top;
.oo-ui-inline-spacing( 0 );
 
.oo-ui-buttonElement-button {
@@ -72,7 +72,7 @@
}
 
&.oo-ui-labelElement .oo-ui-labelElement-label {
-   line-height: 3.4;
+   line-height: @size-dialog-bar-top;
text-align: center;
}
 
@@ -118,31 +118,29 @@
 .theme-oo-ui-processDialog () {
&-content {
.oo-ui-window-head {
-   height: 3.4em;
+   height: @size-dialog-bar-top;
}
 
.oo-ui-window-body {
-   top: 3.4em;
+   top: @size-dialog-bar-top;
outline: 1px solid rgba( 0, 0, 0, 0.2 );
}
}
 
&-navigation {
position: relative;
-   height: 3.4em;
-   padding: 0 1em;
+   height: @size-dialog-bar-top;
}
 
&-location {
-   padding: 0.75em 0;
-   height: @size-icon;
+   height: @size-dialog-bar-top;
cursor: default;
text-align: center;
}
 
&-title {
font-weight: bold;
-   line-height: @size-icon;
+   line-height: @size-dialog-bar-top;
}
 
&-actions {
@@ -151,12 +149,10 @@
&-other {
.oo-ui-actionWidget {
&.oo-ui-buttonElement-framed {
-   margin: 0.5em;
+   margin: 
@margin-dialog-bar-button-framed;
}
 
&.oo-ui-buttonElement-frameless {
-   margin: 0;
-
.oo-ui-buttonElement-button {
padding: 0.75em 1em;
vertical-align: middle;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4fc8b851fce3e06cf74461d3ef736f6bc8ae3f00
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] wikimedia...analytics[master]: analytics - elasticsearch: communicate over HTTPS

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

Change subject: analytics - elasticsearch: communicate over HTTPS
..


analytics - elasticsearch: communicate over HTTPS

Move the discovery analytics job to HTTPS for communication with elasticsearch.

Bug: T157943
Change-Id: I2a057ae1b74c9001ee9fbdf63f3e25d547593816
---
M oozie/transfer_to_es/bundle.xml
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/oozie/transfer_to_es/bundle.xml b/oozie/transfer_to_es/bundle.xml
index f7f5182..1f54538 100644
--- a/oozie/transfer_to_es/bundle.xml
+++ b/oozie/transfer_to_es/bundle.xml
@@ -19,7 +19,7 @@
 
 
 elasticsearch_url
-http://elastic1017.eqiad.wmnet:9200
+https://elastic1017.eqiad.wmnet:9243
 
 
 
@@ -29,7 +29,7 @@
 
 
 elasticsearch_url
-http://elastic2010.codfw.wmnet:9200
+https://elastic2010.codfw.wmnet:9243
 
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a057ae1b74c9001ee9fbdf63f3e25d547593816
Gerrit-PatchSet: 3
Gerrit-Project: wikimedia/discovery/analytics
Gerrit-Branch: master
Gerrit-Owner: Gehel 
Gerrit-Reviewer: Bearloga 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Joal 
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...WikibaseQualityConstraints[master]: Refactor ConstraintLookup to accept PropertyId

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

Change subject: Refactor ConstraintLookup to accept PropertyId
..


Refactor ConstraintLookup to accept PropertyId

Bug: T102757
Change-Id: I37cdf73be794ca6c59ff49363bd29d14624eecbe
---
M includes/ConstraintCheck/DelegatingConstraintChecker.php
M includes/ConstraintLookup.php
M includes/ConstraintRepository.php
M tests/phpunit/ConstraintRepositoryTest.php
M tests/phpunit/ConstraintTest.php
M tests/phpunit/Fake/InMemoryConstraintLookup.php
M tests/phpunit/Fake/InMemoryConstraintLookupTest.php
7 files changed, 29 insertions(+), 23 deletions(-)

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



diff --git a/includes/ConstraintCheck/DelegatingConstraintChecker.php 
b/includes/ConstraintCheck/DelegatingConstraintChecker.php
index 639fdb1..119c62c 100644
--- a/includes/ConstraintCheck/DelegatingConstraintChecker.php
+++ b/includes/ConstraintCheck/DelegatingConstraintChecker.php
@@ -94,10 +94,9 @@
continue;
}
 
-   $propertyId = $statement->getPropertyId();
-   $numericPropertyId = $propertyId->getNumericId();
-
-   $constraints = 
$this->constraintLookup->queryConstraintsForProperty( $numericPropertyId );
+   $constraints = 
$this->constraintLookup->queryConstraintsForProperty(
+   $statement->getPropertyId()
+   );
 
$result = array_merge( $result, 
$this->checkConstraintsForStatementOnEntity( $constraints, $entity, $statement 
) );
}
diff --git a/includes/ConstraintLookup.php b/includes/ConstraintLookup.php
index 3edd5df..7e3fc55 100644
--- a/includes/ConstraintLookup.php
+++ b/includes/ConstraintLookup.php
@@ -2,14 +2,16 @@
 
 namespace WikibaseQuality\ConstraintReport;
 
+use Wikibase\DataModel\Entity\PropertyId;
+
 /**
  * @license GNU GPL v2+
  */
 interface ConstraintLookup {
/**
-* @param int $numericPropertyId
-*
+* @param PropertyId $propertyId
 * @return Constraint[]
+*
 */
-   public function queryConstraintsForProperty( $numericPropertyId );
+   public function queryConstraintsForProperty( PropertyId $propertyId );
 }
diff --git a/includes/ConstraintRepository.php 
b/includes/ConstraintRepository.php
index 0c7fe77..6a8d614 100644
--- a/includes/ConstraintRepository.php
+++ b/includes/ConstraintRepository.php
@@ -17,17 +17,16 @@
 class ConstraintRepository implements ConstraintLookup {
 
/**
-* @param int $numericPropertyId
-*
+* @param PropertyId $propertyId
 * @return Constraint[]
 */
-   public function queryConstraintsForProperty( $numericPropertyId ) {
+   public function queryConstraintsForProperty( PropertyId $propertyId ) {
$db = wfGetDB( DB_SLAVE );
 
$results = $db->select(
CONSTRAINT_TABLE,
'*',
-   array( 'pid' => $numericPropertyId )
+   array( 'pid' => $propertyId->getNumericId() )
);
 
return $this->convertToConstraints( $results );
diff --git a/tests/phpunit/ConstraintRepositoryTest.php 
b/tests/phpunit/ConstraintRepositoryTest.php
index 6ac5eeb..9501423 100644
--- a/tests/phpunit/ConstraintRepositoryTest.php
+++ b/tests/phpunit/ConstraintRepositoryTest.php
@@ -23,7 +23,7 @@
$this->insertTestData();
 
$repo = new ConstraintRepository();
-   $constraints = $repo->queryConstraintsForProperty( 1 );
+   $constraints = $repo->queryConstraintsForProperty( new 
PropertyId( 'P1' ) );
 
$this->assertEquals( true, is_array( $constraints) );
$this->assertEquals( 2, count( $constraints ) );
@@ -34,7 +34,7 @@
$this->insertTestData();
 
$repo = new ConstraintRepository();
-   $constraints = $repo->queryConstraintsForProperty( 2 );
+   $constraints = $repo->queryConstraintsForProperty(  new 
PropertyId( 'P2' ) );
 
$this->assertEquals( true, is_array( $constraints ) );
$this->assertEquals( 0, count( $constraints ) );
diff --git a/tests/phpunit/ConstraintTest.php b/tests/phpunit/ConstraintTest.php
index faf9a68..125d277 100644
--- a/tests/phpunit/ConstraintTest.php
+++ b/tests/phpunit/ConstraintTest.php
@@ -20,10 +20,10 @@
 
public function testConstructAndGetters() {
$repo = new ConstraintRepository();
-   $constraints = $repo->queryConstraintsForProperty( 1 );
+   $constraints = $repo->queryConstraintsForProperty( new 
PropertyId( 'P1' ) );
 
$this->assertEquals( 'Item', 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: mariadb: clear build related files

2017-03-13 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342506 )

Change subject: mariadb: clear build related files
..

mariadb: clear build related files

The module used to be in a standalone repository and thus had specific
cruft at its root which are all test/dev related. Remove them since they
are superseeded by the same material at the root of the repository.

Tested by running checks against the whole repository:

  bundle exec rake syntax
  bundle exec rake puppetlint

Change-Id: I7be086351585e422414aba889a2df9d0d95692d3
---
D modules/mariadb/.gitignore
D modules/mariadb/.gitreview
D modules/mariadb/.puppet-lint.rc
D modules/mariadb/Gemfile
D modules/mariadb/Rakefile
5 files changed, 0 insertions(+), 36 deletions(-)


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

diff --git a/modules/mariadb/.gitignore b/modules/mariadb/.gitignore
deleted file mode 100644
index 66f8ed3..000
--- a/modules/mariadb/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/Gemfile.lock
diff --git a/modules/mariadb/.gitreview b/modules/mariadb/.gitreview
deleted file mode 100644
index 81fa52e..000
--- a/modules/mariadb/.gitreview
+++ /dev/null
@@ -1,5 +0,0 @@
-[gerrit]
-host=gerrit.wikimedia.org
-port=29418
-project=operations/puppet/mariadb.git
-defaultbranch=master
diff --git a/modules/mariadb/.puppet-lint.rc b/modules/mariadb/.puppet-lint.rc
deleted file mode 100644
index b0d12b7..000
--- a/modules/mariadb/.puppet-lint.rc
+++ /dev/null
@@ -1 +0,0 @@
---no-80chars-check
diff --git a/modules/mariadb/Gemfile b/modules/mariadb/Gemfile
deleted file mode 100644
index 1416f0a..000
--- a/modules/mariadb/Gemfile
+++ /dev/null
@@ -1,10 +0,0 @@
-source 'https://rubygems.org'
-
-gem 'rake'
-gem 'puppet', '~> 3.7.0'
-# Puppet 3.7 fails on ruby 2.2+
-# https://tickets.puppetlabs.com/browse/PUP-3796
-gem 'safe_yaml', '~> 1.0.4'
-
-gem 'puppet-lint', '1.1.0'
-gem 'puppet-syntax'
diff --git a/modules/mariadb/Rakefile b/modules/mariadb/Rakefile
deleted file mode 100644
index a15ba1a..000
--- a/modules/mariadb/Rakefile
+++ /dev/null
@@ -1,19 +0,0 @@
-require 'bundler/setup'
-require 'puppet-lint/tasks/puppet-lint'
-require 'puppet-syntax/tasks/puppet-syntax'
-
-# To please Jenkins
-# https://github.com/rodjek/puppet-lint/issues/361
-PuppetLint.configuration.relative = true
-
-task :default => [:help]
-
-desc 'Run all build/tests commands (CI entry point)'
-task :test => [
-:syntax,
-:lint,
-]
-
-task :help do
-system "rake -T"
-end

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: QUnit.assert.equalHash: Correctly compare JSON representation

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

Change subject: QUnit.assert.equalHash: Correctly compare JSON representation
..

QUnit.assert.equalHash: Correctly compare JSON representation

The object returned by Object#toJSON is not the JSON representation
yet: its values have to be recursively converted by calling #toJSON
on them too. For example, see ve.dm.LinearSelection#toJSON (the return
value of which includes an actual ve.Range object).

JSON.stringify takes care of this, but we didn't here, causing
the diffs shown by QUnit in case of test failures when comparing
ve.dm.LinearSelections to be polluted with ve.Range's functions.
(For example, try changing one of 'expectedRangeOrSelection' values
in ve.ui.LinkAction tests.)

Rather than reimplement this, just use JSON.stringify and JSON.parse.

Change-Id: Ie9153de8072433725e599a97a100a2a6d29e4192
---
M tests/ve.qunit.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/05/342505/1

diff --git a/tests/ve.qunit.js b/tests/ve.qunit.js
index a7a2dbe..4bb3f0e 100644
--- a/tests/ve.qunit.js
+++ b/tests/ve.qunit.js
@@ -271,8 +271,8 @@
};
 
QUnit.assert.equalHash = function ( actual, expected, message ) {
-   actual = actual && actual.toJSON();
-   expected = expected && expected.toJSON();
+   actual = JSON.parse( JSON.stringify( actual ) );
+   expected = JSON.parse( JSON.stringify( expected ) );
QUnit.push( QUnit.equiv( actual, expected ), actual, expected, 
message );
};
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9153de8072433725e599a97a100a2a6d29e4192
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
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/mediawiki-config[master]: Add interwikisorting to CommonSettings $wikiTags

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

Change subject: Add interwikisorting to CommonSettings $wikiTags
..


Add interwikisorting to CommonSettings $wikiTags

Follow up to:
Ida52829518dc080407cd0a8d3f0174a6e3c76c46

Bug: T150183
Change-Id: Ia19469fbdfa3f5f904e6476270a82e797019d9e3
---
M wmf-config/CommonSettings.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 5e3a050..260b489 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -168,7 +168,8 @@
'commonsuploads', 'nonbetafeatures', 'group0', 
'group1', 'group2', 'wikipedia', 'nonglobal',
'wikitech', 'nonecho', 'mobilemainpagelegacy', 
'compact-language-links', 'nowikidatadescriptiontaglines',
'related-articles-footer-blacklisted-skins',
-   'top6-wikipedia'
+   'top6-wikipedia',
+   'interwikisorting',
] as $tag ) {
$dblist = MWWikiversions::readDbListFile( $tag );
if ( in_array( $wgDBname, $dblist ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia19469fbdfa3f5f904e6476270a82e797019d9e3
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Florianschmidtwelzow 
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]: Add interwikisorting to CommonSettings $wikiTags

2017-03-13 Thread Addshore (Code Review)
Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342504 )

Change subject: Add interwikisorting to CommonSettings $wikiTags
..

Add interwikisorting to CommonSettings $wikiTags

Follow up to:
Ida52829518dc080407cd0a8d3f0174a6e3c76c46

Bug: T150183
Change-Id: Ia19469fbdfa3f5f904e6476270a82e797019d9e3
---
M wmf-config/CommonSettings.php
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 5e3a050..260b489 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -168,7 +168,8 @@
'commonsuploads', 'nonbetafeatures', 'group0', 
'group1', 'group2', 'wikipedia', 'nonglobal',
'wikitech', 'nonecho', 'mobilemainpagelegacy', 
'compact-language-links', 'nowikidatadescriptiontaglines',
'related-articles-footer-blacklisted-skins',
-   'top6-wikipedia'
+   'top6-wikipedia',
+   'interwikisorting',
] as $tag ) {
$dblist = MWWikiversions::readDbListFile( $tag );
if ( in_array( $wgDBname, $dblist ) ) {

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: wmgUseInterwikiSorting true for group0

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

Change subject: wmgUseInterwikiSorting true for group0
..


wmgUseInterwikiSorting true for group0

Bug: T150183
Change-Id: Ida52829518dc080407cd0a8d3f0174a6e3c76c46
---
A dblists/interwikisorting.dblist
A docroot/noc/conf/interwikisorting.dblist
M wmf-config/InitialiseSettings.php
3 files changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/dblists/interwikisorting.dblist b/dblists/interwikisorting.dblist
new file mode 100644
index 000..c42ef8e
--- /dev/null
+++ b/dblists/interwikisorting.dblist
@@ -0,0 +1 @@
+%% group0.dblist
diff --git a/docroot/noc/conf/interwikisorting.dblist 
b/docroot/noc/conf/interwikisorting.dblist
new file mode 12
index 000..842a7bb
--- /dev/null
+++ b/docroot/noc/conf/interwikisorting.dblist
@@ -0,0 +1 @@
+../../../dblists/interwikisorting.dblist
\ No newline at end of file
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 035959a..37a1019 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -16977,6 +16977,7 @@
 
 'wmgUseInterwikiSorting' => [
'default' => false,
+   'interwikisorting' => true,
 ],
 
 'wgInterwikiSortingSort' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida52829518dc080407cd0a8d3f0174a6e3c76c46
Gerrit-PatchSet: 5
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Florianschmidtwelzow 
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...WikibaseQualityConstraints[master]: In-memory ConstraintLookup implementation for tests

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

Change subject: In-memory ConstraintLookup implementation for tests
..


In-memory ConstraintLookup implementation for tests

Bug: T102757
Change-Id: I7fd82702d64d08f5b785430e11c5369bf26eda12
---
A tests/phpunit/Fake/InMemoryConstraintLookup.php
A tests/phpunit/Fake/InMemoryConstraintLookupTest.php
2 files changed, 70 insertions(+), 0 deletions(-)

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



diff --git a/tests/phpunit/Fake/InMemoryConstraintLookup.php 
b/tests/phpunit/Fake/InMemoryConstraintLookup.php
new file mode 100644
index 000..a7898b8
--- /dev/null
+++ b/tests/phpunit/Fake/InMemoryConstraintLookup.php
@@ -0,0 +1,39 @@
+constraints = $constraints;
+   }
+
+   /**
+* @param int $numericPropertyId
+*
+* @return Constraint[]
+*/
+   public function queryConstraintsForProperty( $numericPropertyId ) {
+   return array_filter(
+   $this->constraints,
+   function ( Constraint $constraint ) use ( 
$numericPropertyId ) {
+   return 
$constraint->getPropertyId()->getNumericId() === $numericPropertyId;
+   }
+   );
+   }
+
+}
diff --git a/tests/phpunit/Fake/InMemoryConstraintLookupTest.php 
b/tests/phpunit/Fake/InMemoryConstraintLookupTest.php
new file mode 100644
index 000..6a2630f
--- /dev/null
+++ b/tests/phpunit/Fake/InMemoryConstraintLookupTest.php
@@ -0,0 +1,31 @@
+assertSame( [], $lookup->queryConstraintsForProperty( 2 
) );
+   }
+
+   public function 
testQuery_AddConstraintAndQueryWithItsProperty_ReturnsThatConstraint() {
+   $constraint = new Constraint( 'some id', new PropertyId( 'P2' 
), 'some type', [] );
+   $lookup = new InMemoryConstraintLookup( [ $constraint ] );
+
+   $this->assertSame( [ $constraint ], 
$lookup->queryConstraintsForProperty( 2 ) );
+   }
+
+   public function 
testQuery_AddSeveralConstraintsAndQueryForOne_ReturnsOnlyThatConstraint() {
+   $expectedConstraint = new Constraint( 'some id', new 
PropertyId( 'P2' ), 'some type', [] );
+   $otherConstraint = new Constraint( 'some id', new PropertyId( 
'P3' ), 'some type', [] );
+   $lookup = new InMemoryConstraintLookup( [ $expectedConstraint, 
$otherConstraint ] );
+
+   $this->assertSame( [ $expectedConstraint ], 
$lookup->queryConstraintsForProperty( 2 ) );
+   }
+
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7fd82702d64d08f5b785430e11c5369bf26eda12
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Aleksey Bekh-Ivanov (WMDE) 
Gerrit-Reviewer: Aleksey Bekh-Ivanov (WMDE) 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Olga Bode 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
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...WikibaseQualityConstraints[master]: Extracted ConstraintLookup one-method interface

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

Change subject: Extracted ConstraintLookup one-method interface
..


Extracted ConstraintLookup one-method interface

Bug: T102757
Change-Id: I01085791bdf01da5c2dd70bdbafe558629f3b00f
---
M includes/ConstraintCheck/DelegatingConstraintChecker.php
A includes/ConstraintLookup.php
M includes/ConstraintReportFactory.php
M includes/ConstraintRepository.php
4 files changed, 31 insertions(+), 15 deletions(-)

Approvals:
  Daniel Kinzler: Looks good to me, approved
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve



diff --git a/includes/ConstraintCheck/DelegatingConstraintChecker.php 
b/includes/ConstraintCheck/DelegatingConstraintChecker.php
index 30423d7..639fdb1 100644
--- a/includes/ConstraintCheck/DelegatingConstraintChecker.php
+++ b/includes/ConstraintCheck/DelegatingConstraintChecker.php
@@ -9,9 +9,8 @@
 use Wikibase\DataModel\Statement\Statement;
 use Wikibase\DataModel\Statement\StatementList;
 use Wikibase\DataModel\Statement\StatementListProvider;
-use 
WikibaseQuality\ConstraintReport\ConstraintCheck\Helper\ConstraintParameterParser;
 use WikibaseQuality\ConstraintReport\ConstraintCheck\Result\CheckResult;
-use WikibaseQuality\ConstraintReport\ConstraintRepository;
+use WikibaseQuality\ConstraintReport\ConstraintLookup;
 use WikibaseQuality\ConstraintReport\Constraint;
 
 /**
@@ -33,13 +32,6 @@
private $entityLookup;
 
/**
-* Class for helper functions for constraint checkers.
-*
-* @var ConstraintParameterParser
-*/
-   private $helper;
-
-   /**
 * @var ConstraintChecker[]
 */
private $checkerMap;
@@ -52,14 +44,19 @@
private $statements;
 
/**
+* @var ConstraintLookup
+*/
+   private $constraintLookup;
+
+   /**
 * @param EntityLookup $lookup
 * @param ConstraintChecker[] $checkerMap
+* @param ConstraintLookup $constraintLookup
 */
-   public function __construct( EntityLookup $lookup, array $checkerMap ) {
+   public function __construct( EntityLookup $lookup, array $checkerMap, 
ConstraintLookup $constraintLookup ) {
$this->entityLookup = $lookup;
$this->checkerMap = $checkerMap;
-   $this->helper = new ConstraintParameterParser();
-   $this->constraintRepository = new ConstraintRepository();
+   $this->constraintLookup = $constraintLookup;
}
 
/**
@@ -100,7 +97,7 @@
$propertyId = $statement->getPropertyId();
$numericPropertyId = $propertyId->getNumericId();
 
-   $constraints = 
$this->constraintRepository->queryConstraintsForProperty( $numericPropertyId );
+   $constraints = 
$this->constraintLookup->queryConstraintsForProperty( $numericPropertyId );
 
$result = array_merge( $result, 
$this->checkConstraintsForStatementOnEntity( $constraints, $entity, $statement 
) );
}
diff --git a/includes/ConstraintLookup.php b/includes/ConstraintLookup.php
new file mode 100644
index 000..3edd5df
--- /dev/null
+++ b/includes/ConstraintLookup.php
@@ -0,0 +1,15 @@
+delegatingConstraintChecker === null ) {
-   $this->delegatingConstraintChecker = new 
DelegatingConstraintChecker( $this->lookup, $this->getConstraintCheckerMap( 
$this->lookup ) );
+   $this->delegatingConstraintChecker = new 
DelegatingConstraintChecker(
+   $this->lookup,
+   $this->getConstraintCheckerMap(),
+   new ConstraintRepository()
+   );
}
 
return $this->delegatingConstraintChecker;
diff --git a/includes/ConstraintRepository.php 
b/includes/ConstraintRepository.php
index 5078b4d..0c7fe77 100644
--- a/includes/ConstraintRepository.php
+++ b/includes/ConstraintRepository.php
@@ -14,7 +14,7 @@
  * @author BP2014N1
  * @license GNU GPL v2+
  */
-class ConstraintRepository {
+class ConstraintRepository implements ConstraintLookup {
 
/**
 * @param int $numericPropertyId

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I01085791bdf01da5c2dd70bdbafe558629f3b00f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Aleksey Bekh-Ivanov (WMDE) 
Gerrit-Reviewer: Aleksey Bekh-Ivanov (WMDE) 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: 

[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Fake ConstraintChecker implementation for tests

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

Change subject: Fake ConstraintChecker implementation for tests
..


Fake ConstraintChecker implementation for tests

Bug: T102757
Change-Id: I287befac0cf93ca533a1125b67ebd82a182e04be
---
A tests/phpunit/Fake/FakeChecker.php
A tests/phpunit/Fake/FakeCheckerTest.php
2 files changed, 87 insertions(+), 0 deletions(-)

Approvals:
  Daniel Kinzler: Looks good to me, approved
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve



diff --git a/tests/phpunit/Fake/FakeChecker.php 
b/tests/phpunit/Fake/FakeChecker.php
new file mode 100644
index 000..9a9a797
--- /dev/null
+++ b/tests/phpunit/Fake/FakeChecker.php
@@ -0,0 +1,36 @@
+status = $status;
+   }
+
+   /**
+* @see ConstraintChecker::checkConstraint
+*/
+   public function checkConstraint(
+   Statement $statement,
+   Constraint $constraint,
+   EntityDocument $entity = null
+   ) {
+   return new CheckResult(
+   $statement, $constraint->getConstraintTypeQid(), [], 
$this->status
+   );
+   }
+}
diff --git a/tests/phpunit/Fake/FakeCheckerTest.php 
b/tests/phpunit/Fake/FakeCheckerTest.php
new file mode 100644
index 000..4dc8ed0
--- /dev/null
+++ b/tests/phpunit/Fake/FakeCheckerTest.php
@@ -0,0 +1,51 @@
+dummy( Statement::class );
+   $result = $checker->checkConstraint(
+   $statement,
+   $this->dummy( Constraint::class )
+   );
+
+   $this->assertSame( $statement, $result->getStatement() );
+   }
+
+   public function 
testCheckConstraint_ResultContainsNameOfPassedConstraint() {
+   $checker = new FakeChecker();
+
+   $constraintTypeId = 'constraint id';
+   $result = $checker->checkConstraint(
+   $this->dummy( Statement::class ),
+   new Constraint( 'some guid', $this->dummy( 
PropertyId::class ), $constraintTypeId, [] )
+   );
+
+   $this->assertSame( $constraintTypeId, 
$result->getConstraintName() );
+   }
+
+   public function 
testCheckConstraint_CreatedWithSomeStatus_ReturnsThatStatusInResult() {
+   $expectedStatus = 'some status';
+
+   $checker = new FakeChecker( $expectedStatus );
+   $result = $checker->checkConstraint(
+   $this->dummy( Statement::class ),
+   $this->dummy( Constraint::class )
+   );
+
+   $this->assertSame( $expectedStatus, $result->getStatus() );
+   }
+
+   private function dummy( $class ) {
+   return $this->prophesize( $class )->reveal();
+   }
+
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I287befac0cf93ca533a1125b67ebd82a182e04be
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Aleksey Bekh-Ivanov (WMDE) 
Gerrit-Reviewer: Aleksey Bekh-Ivanov (WMDE) 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Olga Bode 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Add another sandbox page to clean

2017-03-13 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342503 )

Change subject: Add another sandbox page to clean
..

Add another sandbox page to clean

Change-Id: I339ff9b7528c19d45c8f10d4486bcb04be33d625
---
M scripts/clean_sandbox.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/03/342503/1

diff --git a/scripts/clean_sandbox.py b/scripts/clean_sandbox.py
index ea00fd2..2019321 100755
--- a/scripts/clean_sandbox.py
+++ b/scripts/clean_sandbox.py
@@ -107,7 +107,7 @@
 'zh': '{{subst:User:Sz-iwbot/sandbox}}\n',
 }
 
-sandbox_titles = ('Q3938', )
+sandbox_titles = ('Q3938', 'Q28939665')
 
 # This is required for the text that is shown when you run this script
 # with the parameter -help.

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[trusty-compat]: Branch for backwards compatibility with Trusty

2017-03-13 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342502 )

Change subject: Branch for backwards compatibility with Trusty
..

Branch for backwards compatibility with Trusty

Bug: T136429
Change-Id: I60849ceedfc852a0a229928c52d4b1b0185e1186
---
M .gitreview
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/02/342502/1

diff --git a/.gitreview b/.gitreview
index 94edce0..ee22331 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host=gerrit.wikimedia.org
 port=29418
 project=mediawiki/vagrant.git
-defaultbranch=master
+defaultbranch=trusty-compat
 defaultrebase=0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60849ceedfc852a0a229928c52d4b1b0185e1186
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: trusty-compat
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Merge remote-tracking branch 'origin/jessie-migration'

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

Change subject: Merge remote-tracking branch 'origin/jessie-migration'
..


Merge remote-tracking branch 'origin/jessie-migration'

Bug: T136429
Change-Id: I06977ae84f6a12fe3290f63d60837eb90ccdb8df
---
M .gitreview
M Gemfile
M Gemfile.lock
M Rakefile
M Vagrantfile
M puppet/modules/thumbor/templates/20-thumbor-wikimedia.conf.erb
6 files changed, 1 insertion(+), 30 deletions(-)

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



diff --git a/.gitreview b/.gitreview
index 2e61006..94edce0 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host=gerrit.wikimedia.org
 port=29418
 project=mediawiki/vagrant.git
-defaultbranch=jessie-migration
+defaultbranch=master
 defaultrebase=0
diff --git a/Gemfile b/Gemfile
index 93cebad..ac5462f 100644
--- a/Gemfile
+++ b/Gemfile
@@ -8,13 +8,8 @@
   gem 'rubocop', '~> 0.35.1', require: false
   gem 'puppet', '~> 3.7.0'
   gem 'puppet-lint', '1.1.0'
-<<< HEAD   (798067 migrate to elasticsearch 5)
-  gem 'puppet', '~> 3.7.0'
   gem 'puppetlabs_spec_helper', '< 2.0.0', require: false
   gem 'puppet-strings', '~> 1.0.0'
-===
-  gem 'puppetlabs_spec_helper', '< 2.0.0', require: false
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
   # Puppet 3.7 fails on ruby 2.2+
   # https://tickets.puppetlabs.com/browse/PUP-3796
   gem 'safe_yaml', '~> 1.0.4'
diff --git a/Gemfile.lock b/Gemfile.lock
index ee92462..28f7bc5 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -68,11 +68,7 @@
   domain_name (~> 0.5)
 httpclient (2.8.0)
 i18n (0.7.0)
-<<< HEAD   (798067 migrate to elasticsearch 5)
-json_pure (2.0.2)
-===
 json_pure (2.0.3)
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
 listen (3.0.8)
   rb-fsevent (~> 0.9, >= 0.9.4)
   rb-inotify (~> 0.9, >= 0.9.7)
@@ -113,11 +109,8 @@
   hiera (~> 1.0)
   json_pure
 puppet-lint (1.1.0)
-<<< HEAD   (798067 migrate to elasticsearch 5)
 puppet-strings (1.0.0)
   yard (~> 0.9.5)
-===
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
 puppet-syntax (2.3.0)
   rake
 puppetlabs_spec_helper (1.1.1)
@@ -196,10 +189,7 @@
   pry-byebug
   puppet (~> 3.7.0)
   puppet-lint (= 1.1.0)
-<<< HEAD   (798067 migrate to elasticsearch 5)
   puppet-strings (~> 1.0.0)
-===
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
   puppetlabs_spec_helper (< 2.0.0)
   rake (~> 10.4.2)
   rspec (~> 3.1, >= 3.1.0)
diff --git a/Rakefile b/Rakefile
index 8af3559..2bec87d 100644
--- a/Rakefile
+++ b/Rakefile
@@ -12,10 +12,7 @@
 require 'cucumber/rake/task'
 require 'puppet-lint/tasks/puppet-lint'
 require 'puppet-syntax/tasks/puppet-syntax'
-<<< HEAD   (798067 migrate to elasticsearch 5)
 require 'puppet-strings/tasks/generate'
-===
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
 require 'rspec/core/rake_task'
 require 'rubocop/rake_task'
 require 'yard'
diff --git a/Vagrantfile b/Vagrantfile
index e93837a..3030f7b 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -38,14 +38,10 @@
   raise <<-EOS
 
   The deprecated mediawiki-vagrant plugin is installed.
-<<< HEAD   (798067 migrate to elasticsearch 5)
 
   Please remove it by running `vagrant plugin uninstall mediawiki-vagrant`.
 
   See https://phabricator.wikimedia.org/T156380 for details.
-===
-  Please remove it by running `vagrant plugin uninstall mediawiki-vagrant`.
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
   EOS
 end
 
@@ -67,12 +63,7 @@
 
   # VMWare Fusion provider. Enable with `--provider=vmware_fusion`
   config.vm.provider :vmware_fusion do |_vw, override|
-<<< HEAD   (798067 migrate to elasticsearch 5)
-override.vm.box = 'puppetlabs/ubuntu-14.04-64-puppet'
-
-===
 override.vm.box = 'dhoppe/debian-8.6.0-amd64-nocm'
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
 override.vm.network :private_network, ip: settings[:static_ip]
   end
 
diff --git a/puppet/modules/thumbor/templates/20-thumbor-wikimedia.conf.erb 
b/puppet/modules/thumbor/templates/20-thumbor-wikimedia.conf.erb
index ffaa947..d1a7e69 100644
--- a/puppet/modules/thumbor/templates/20-thumbor-wikimedia.conf.erb
+++ b/puppet/modules/thumbor/templates/20-thumbor-wikimedia.conf.erb
@@ -62,8 +62,6 @@
 
 LOADER_EXCERPT_LENGTH = 4096
 
-LOADER_EXCERPT_LENGTH = 4096
-
 # 2 minutes, for situations where an engine failed to clean up after itself
 HTTP_LOADER_TEMP_FILE_TIMEOUT = 120
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I06977ae84f6a12fe3290f63d60837eb90ccdb8df
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Merge remote-tracking branch 'origin/jessie-migration'

2017-03-13 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342501 )

Change subject: Merge remote-tracking branch 'origin/jessie-migration'
..

Merge remote-tracking branch 'origin/jessie-migration'

Bug: T136429
Change-Id: I06977ae84f6a12fe3290f63d60837eb90ccdb8df
---
M .gitreview
M Gemfile
M Gemfile.lock
M Rakefile
M Vagrantfile
M puppet/modules/thumbor/templates/20-thumbor-wikimedia.conf.erb
6 files changed, 1 insertion(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/01/342501/1

diff --git a/.gitreview b/.gitreview
index 2e61006..94edce0 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host=gerrit.wikimedia.org
 port=29418
 project=mediawiki/vagrant.git
-defaultbranch=jessie-migration
+defaultbranch=master
 defaultrebase=0
diff --git a/Gemfile b/Gemfile
index 93cebad..ac5462f 100644
--- a/Gemfile
+++ b/Gemfile
@@ -8,13 +8,8 @@
   gem 'rubocop', '~> 0.35.1', require: false
   gem 'puppet', '~> 3.7.0'
   gem 'puppet-lint', '1.1.0'
-<<< HEAD   (798067 migrate to elasticsearch 5)
-  gem 'puppet', '~> 3.7.0'
   gem 'puppetlabs_spec_helper', '< 2.0.0', require: false
   gem 'puppet-strings', '~> 1.0.0'
-===
-  gem 'puppetlabs_spec_helper', '< 2.0.0', require: false
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
   # Puppet 3.7 fails on ruby 2.2+
   # https://tickets.puppetlabs.com/browse/PUP-3796
   gem 'safe_yaml', '~> 1.0.4'
diff --git a/Gemfile.lock b/Gemfile.lock
index ee92462..28f7bc5 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -68,11 +68,7 @@
   domain_name (~> 0.5)
 httpclient (2.8.0)
 i18n (0.7.0)
-<<< HEAD   (798067 migrate to elasticsearch 5)
-json_pure (2.0.2)
-===
 json_pure (2.0.3)
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
 listen (3.0.8)
   rb-fsevent (~> 0.9, >= 0.9.4)
   rb-inotify (~> 0.9, >= 0.9.7)
@@ -113,11 +109,8 @@
   hiera (~> 1.0)
   json_pure
 puppet-lint (1.1.0)
-<<< HEAD   (798067 migrate to elasticsearch 5)
 puppet-strings (1.0.0)
   yard (~> 0.9.5)
-===
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
 puppet-syntax (2.3.0)
   rake
 puppetlabs_spec_helper (1.1.1)
@@ -196,10 +189,7 @@
   pry-byebug
   puppet (~> 3.7.0)
   puppet-lint (= 1.1.0)
-<<< HEAD   (798067 migrate to elasticsearch 5)
   puppet-strings (~> 1.0.0)
-===
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
   puppetlabs_spec_helper (< 2.0.0)
   rake (~> 10.4.2)
   rspec (~> 3.1, >= 3.1.0)
diff --git a/Rakefile b/Rakefile
index 8af3559..2bec87d 100644
--- a/Rakefile
+++ b/Rakefile
@@ -12,10 +12,7 @@
 require 'cucumber/rake/task'
 require 'puppet-lint/tasks/puppet-lint'
 require 'puppet-syntax/tasks/puppet-syntax'
-<<< HEAD   (798067 migrate to elasticsearch 5)
 require 'puppet-strings/tasks/generate'
-===
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
 require 'rspec/core/rake_task'
 require 'rubocop/rake_task'
 require 'yard'
diff --git a/Vagrantfile b/Vagrantfile
index e93837a..3030f7b 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -38,14 +38,10 @@
   raise <<-EOS
 
   The deprecated mediawiki-vagrant plugin is installed.
-<<< HEAD   (798067 migrate to elasticsearch 5)
 
   Please remove it by running `vagrant plugin uninstall mediawiki-vagrant`.
 
   See https://phabricator.wikimedia.org/T156380 for details.
-===
-  Please remove it by running `vagrant plugin uninstall mediawiki-vagrant`.
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
   EOS
 end
 
@@ -67,12 +63,7 @@
 
   # VMWare Fusion provider. Enable with `--provider=vmware_fusion`
   config.vm.provider :vmware_fusion do |_vw, override|
-<<< HEAD   (798067 migrate to elasticsearch 5)
-override.vm.box = 'puppetlabs/ubuntu-14.04-64-puppet'
-
-===
 override.vm.box = 'dhoppe/debian-8.6.0-amd64-nocm'
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
 override.vm.network :private_network, ip: settings[:static_ip]
   end
 
diff --git a/puppet/modules/thumbor/templates/20-thumbor-wikimedia.conf.erb 
b/puppet/modules/thumbor/templates/20-thumbor-wikimedia.conf.erb
index ffaa947..d1a7e69 100644
--- a/puppet/modules/thumbor/templates/20-thumbor-wikimedia.conf.erb
+++ b/puppet/modules/thumbor/templates/20-thumbor-wikimedia.conf.erb
@@ -62,8 +62,6 @@
 
 LOADER_EXCERPT_LENGTH = 4096
 
-LOADER_EXCERPT_LENGTH = 4096
-
 # 2 minutes, for situations where an engine failed to clean up after itself
 HTTP_LOADER_TEMP_FILE_TIMEOUT = 120
 

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

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

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[jessie-migration]: Merge remote-tracking branch 'origin/jessie-migration'

2017-03-13 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342500 )

Change subject: Merge remote-tracking branch 'origin/jessie-migration'
..

Merge remote-tracking branch 'origin/jessie-migration'

Bug: T136429
Change-Id: I06977ae84f6a12fe3290f63d60837eb90ccdb8df
---
M Gemfile
M Gemfile.lock
M Rakefile
M Vagrantfile
M puppet/modules/thumbor/templates/20-thumbor-wikimedia.conf.erb
5 files changed, 0 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/00/342500/1

diff --git a/Gemfile b/Gemfile
index 93cebad..ac5462f 100644
--- a/Gemfile
+++ b/Gemfile
@@ -8,13 +8,8 @@
   gem 'rubocop', '~> 0.35.1', require: false
   gem 'puppet', '~> 3.7.0'
   gem 'puppet-lint', '1.1.0'
-<<< HEAD   (798067 migrate to elasticsearch 5)
-  gem 'puppet', '~> 3.7.0'
   gem 'puppetlabs_spec_helper', '< 2.0.0', require: false
   gem 'puppet-strings', '~> 1.0.0'
-===
-  gem 'puppetlabs_spec_helper', '< 2.0.0', require: false
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
   # Puppet 3.7 fails on ruby 2.2+
   # https://tickets.puppetlabs.com/browse/PUP-3796
   gem 'safe_yaml', '~> 1.0.4'
diff --git a/Gemfile.lock b/Gemfile.lock
index ee92462..28f7bc5 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -68,11 +68,7 @@
   domain_name (~> 0.5)
 httpclient (2.8.0)
 i18n (0.7.0)
-<<< HEAD   (798067 migrate to elasticsearch 5)
-json_pure (2.0.2)
-===
 json_pure (2.0.3)
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
 listen (3.0.8)
   rb-fsevent (~> 0.9, >= 0.9.4)
   rb-inotify (~> 0.9, >= 0.9.7)
@@ -113,11 +109,8 @@
   hiera (~> 1.0)
   json_pure
 puppet-lint (1.1.0)
-<<< HEAD   (798067 migrate to elasticsearch 5)
 puppet-strings (1.0.0)
   yard (~> 0.9.5)
-===
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
 puppet-syntax (2.3.0)
   rake
 puppetlabs_spec_helper (1.1.1)
@@ -196,10 +189,7 @@
   pry-byebug
   puppet (~> 3.7.0)
   puppet-lint (= 1.1.0)
-<<< HEAD   (798067 migrate to elasticsearch 5)
   puppet-strings (~> 1.0.0)
-===
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
   puppetlabs_spec_helper (< 2.0.0)
   rake (~> 10.4.2)
   rspec (~> 3.1, >= 3.1.0)
diff --git a/Rakefile b/Rakefile
index 8af3559..2bec87d 100644
--- a/Rakefile
+++ b/Rakefile
@@ -12,10 +12,7 @@
 require 'cucumber/rake/task'
 require 'puppet-lint/tasks/puppet-lint'
 require 'puppet-syntax/tasks/puppet-syntax'
-<<< HEAD   (798067 migrate to elasticsearch 5)
 require 'puppet-strings/tasks/generate'
-===
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
 require 'rspec/core/rake_task'
 require 'rubocop/rake_task'
 require 'yard'
diff --git a/Vagrantfile b/Vagrantfile
index e93837a..3030f7b 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -38,14 +38,10 @@
   raise <<-EOS
 
   The deprecated mediawiki-vagrant plugin is installed.
-<<< HEAD   (798067 migrate to elasticsearch 5)
 
   Please remove it by running `vagrant plugin uninstall mediawiki-vagrant`.
 
   See https://phabricator.wikimedia.org/T156380 for details.
-===
-  Please remove it by running `vagrant plugin uninstall mediawiki-vagrant`.
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
   EOS
 end
 
@@ -67,12 +63,7 @@
 
   # VMWare Fusion provider. Enable with `--provider=vmware_fusion`
   config.vm.provider :vmware_fusion do |_vw, override|
-<<< HEAD   (798067 migrate to elasticsearch 5)
-override.vm.box = 'puppetlabs/ubuntu-14.04-64-puppet'
-
-===
 override.vm.box = 'dhoppe/debian-8.6.0-amd64-nocm'
->>> BRANCH (7f1378 Fix zookeper package and enable kafka log rotation.)
 override.vm.network :private_network, ip: settings[:static_ip]
   end
 
diff --git a/puppet/modules/thumbor/templates/20-thumbor-wikimedia.conf.erb 
b/puppet/modules/thumbor/templates/20-thumbor-wikimedia.conf.erb
index ffaa947..d1a7e69 100644
--- a/puppet/modules/thumbor/templates/20-thumbor-wikimedia.conf.erb
+++ b/puppet/modules/thumbor/templates/20-thumbor-wikimedia.conf.erb
@@ -62,8 +62,6 @@
 
 LOADER_EXCERPT_LENGTH = 4096
 
-LOADER_EXCERPT_LENGTH = 4096
-
 # 2 minutes, for situations where an engine failed to clean up after itself
 HTTP_LOADER_TEMP_FILE_TIMEOUT = 120
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I06977ae84f6a12fe3290f63d60837eb90ccdb8df
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: jessie-migration
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]: Revert "facilities: add codfw PDUs"

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

Change subject: Revert "facilities: add codfw PDUs"
..


Revert "facilities: add codfw PDUs"

This change is making einsteinium/tegmen fail their puppet runs:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Failed to submit 'replace catalog' command for einsteinium.wikimedia.org to 
PuppetDB at nitrogen.eqiad.wmnet:443: [413 Request Entity Too Large] 
413 Request Entity Too Large413 Request Entity Too 
Largenginx/1.11.3
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

This reverts commit a8ae74c26aed0d45c43fcaa2c9adeb718854bce6.

Change-Id: I3eafb0868d61541991528bbe607c2ed087acd945
---
M modules/facilities/manifests/init.pp
M modules/facilities/manifests/monitor_pdu_3phase.pp
M modules/facilities/manifests/monitor_pdu_service.pp
3 files changed, 2 insertions(+), 182 deletions(-)

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



diff --git a/modules/facilities/manifests/init.pp 
b/modules/facilities/manifests/init.pp
index de6ae48..ff62c90 100644
--- a/modules/facilities/manifests/init.pp
+++ b/modules/facilities/manifests/init.pp
@@ -174,165 +174,4 @@
 row  => 'd',
 site => 'eqiad',
 }
-
-facilities::monitor_pdu_3phase { 'ps1-a1-codfw':
-ip   => '10.193.0.25',
-row  => 'a',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-a2-codfw':
-ip   => '10.193.0.26',
-row  => 'a',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-a3-codfw':
-ip   => '10.193.0.27',
-row  => 'a',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-a4-codfw':
-ip   => '10.193.0.28',
-row  => 'a',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-a5-codfw':
-ip   => '10.193.0.29',
-row  => 'a',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-a6-codfw':
-ip   => '10.193.0.30',
-row  => 'a',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-a7-codfw':
-ip   => '10.193.0.31',
-row  => 'a',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-a8-codfw':
-ip   => '10.193.0.32',
-row  => 'a',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-b1-codfw':
-ip   => '10.193.0.33',
-row  => 'b',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-b2-codfw':
-ip   => '10.193.0.34',
-row  => 'b',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-b3-codfw':
-ip   => '10.193.0.35',
-row  => 'b',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-b4-codfw':
-ip   => '10.193.0.36',
-row  => 'b',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-b5-codfw':
-ip   => '10.193.0.37',
-row  => 'b',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-b6-codfw':
-ip   => '10.193.0.38',
-row  => 'b',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-b7-codfw':
-ip   => '10.193.0.39',
-row  => 'b',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-b8-codfw':
-ip   => '10.193.0.40',
-row  => 'b',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-c1-codfw':
-ip   => '10.193.0.41',
-row  => 'c',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-c2-codfw':
-ip   => '10.193.0.42',
-row  => 'c',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-c3-codfw':
-ip   => '10.193.0.43',
-row  => 'c',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-c4-codfw':
-ip   => '10.193.0.44',
-row  => 'c',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-c5-codfw':
-ip   => '10.193.0.45',
-row  => 'c',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-c6-codfw':
-ip   => '10.193.0.46',
-row  => 'c',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-c7-codfw':
-ip   => '10.193.0.47',
-row  => 'c',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-c8-codfw':
-ip   => '10.193.0.48',
-row  => 'c',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-d1-codfw':
-ip   => '10.193.0.49',
-row  => 'd',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-d2-codfw':
-

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "facilities: add codfw PDUs"

2017-03-13 Thread Filippo Giunchedi (Code Review)
Hello Giuseppe Lavagetto, Faidon Liambotis, Alexandros Kosiaris, jenkins-bot,

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

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

to review the following change.


Change subject: Revert "facilities: add codfw PDUs"
..

Revert "facilities: add codfw PDUs"

This change is making einsteinium/tegmen fail their puppet runs:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Failed to submit 'replace catalog' command for einsteinium.wikimedia.org to 
PuppetDB at nitrogen.eqiad.wmnet:443: [413 Request Entity Too Large] 
413 Request Entity Too Large413 Request Entity Too 
Largenginx/1.11.3
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

This reverts commit a8ae74c26aed0d45c43fcaa2c9adeb718854bce6.

Change-Id: I3eafb0868d61541991528bbe607c2ed087acd945
---
M modules/facilities/manifests/init.pp
M modules/facilities/manifests/monitor_pdu_3phase.pp
M modules/facilities/manifests/monitor_pdu_service.pp
3 files changed, 2 insertions(+), 182 deletions(-)


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

diff --git a/modules/facilities/manifests/init.pp 
b/modules/facilities/manifests/init.pp
index de6ae48..ff62c90 100644
--- a/modules/facilities/manifests/init.pp
+++ b/modules/facilities/manifests/init.pp
@@ -174,165 +174,4 @@
 row  => 'd',
 site => 'eqiad',
 }
-
-facilities::monitor_pdu_3phase { 'ps1-a1-codfw':
-ip   => '10.193.0.25',
-row  => 'a',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-a2-codfw':
-ip   => '10.193.0.26',
-row  => 'a',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-a3-codfw':
-ip   => '10.193.0.27',
-row  => 'a',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-a4-codfw':
-ip   => '10.193.0.28',
-row  => 'a',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-a5-codfw':
-ip   => '10.193.0.29',
-row  => 'a',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-a6-codfw':
-ip   => '10.193.0.30',
-row  => 'a',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-a7-codfw':
-ip   => '10.193.0.31',
-row  => 'a',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-a8-codfw':
-ip   => '10.193.0.32',
-row  => 'a',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-b1-codfw':
-ip   => '10.193.0.33',
-row  => 'b',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-b2-codfw':
-ip   => '10.193.0.34',
-row  => 'b',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-b3-codfw':
-ip   => '10.193.0.35',
-row  => 'b',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-b4-codfw':
-ip   => '10.193.0.36',
-row  => 'b',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-b5-codfw':
-ip   => '10.193.0.37',
-row  => 'b',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-b6-codfw':
-ip   => '10.193.0.38',
-row  => 'b',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-b7-codfw':
-ip   => '10.193.0.39',
-row  => 'b',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-b8-codfw':
-ip   => '10.193.0.40',
-row  => 'b',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-c1-codfw':
-ip   => '10.193.0.41',
-row  => 'c',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-c2-codfw':
-ip   => '10.193.0.42',
-row  => 'c',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-c3-codfw':
-ip   => '10.193.0.43',
-row  => 'c',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-c4-codfw':
-ip   => '10.193.0.44',
-row  => 'c',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-c5-codfw':
-ip   => '10.193.0.45',
-row  => 'c',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-c6-codfw':
-ip   => '10.193.0.46',
-row  => 'c',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-c7-codfw':
-ip   => '10.193.0.47',
-row  => 'c',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-c8-codfw':
-ip   => '10.193.0.48',
-row  => 'c',
-site => 'codfw',
-}
-facilities::monitor_pdu_3phase { 'ps1-d1-codfw':
-ip   => '10.193.0.49',
-row  => 

[MediaWiki-commits] [Gerrit] operations/switchdc[master]: Add redis switching task, some more stages boilerplate

2017-03-13 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342498 )

Change subject: Add redis switching task, some more stages boilerplate
..

Add redis switching task, some more stages boilerplate

Change-Id: Ie82b24192fbc182793e7425c628e85cea67b5c08
---
M switchdc/stages/__init__.py
M switchdc/stages/t01_example.py
A switchdc/stages/t05_redis.py
3 files changed, 157 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/switchdc 
refs/changes/98/342498/1

diff --git a/switchdc/stages/__init__.py b/switchdc/stages/__init__.py
index e69de29..6fc6798 100644
--- a/switchdc/stages/__init__.py
+++ b/switchdc/stages/__init__.py
@@ -0,0 +1,22 @@
+import os
+
+import yaml
+
+
+config_dir = os.environ.get('CONFIG_DIR', '/etc/switchdc')
+
+
+def get_module_config_dir(name):
+return os.path.join(config_dir, 'stages.d', name)
+
+
+def get_module_config(name):
+module_config_file = os.path.join(get_module_config_dir(name), 
'config.yaml')
+try:
+with open(module_config_file, 'r') as fh:
+config = yaml.load(fh)
+except:
+# TODO: log something?
+config = {}
+
+return config
diff --git a/switchdc/stages/t01_example.py b/switchdc/stages/t01_example.py
index b0cca69..ac71fd8 100644
--- a/switchdc/stages/t01_example.py
+++ b/switchdc/stages/t01_example.py
@@ -1,9 +1,15 @@
 from switchdc import remote
 from switchdc.log import logger
-
+from switchdc.stages import get_module_config_dir
 
 __title__ = "Example task description"
 
+# Standard location for config files specific to this module:
+# ${CONFIG_DIR}/stages.d/t01_example
+conf = get_module_config_dir(__name__)
+# Tests should go in switchdc/tests/test_t01_example.py and fixture files in
+# switchdc/tests/fixtures/stages.d/t01_example
+
 
 def execute(dc_from, dc_to):
 """Entry point to execute this task
diff --git a/switchdc/stages/t05_redis.py b/switchdc/stages/t05_redis.py
new file mode 100644
index 000..8d1a6aa
--- /dev/null
+++ b/switchdc/stages/t05_redis.py
@@ -0,0 +1,128 @@
+from collections import defaultdict
+
+import redis
+import yaml
+
+from switchdc.log import logger
+from switchdc.stages import get_module_config, get_module_config_dir
+from switchdc import remote
+
+__title__ = 'Switch the redis replication between datacenters'
+
+config = get_module_config('t05_redis')
+config_dir = get_module_config_dir('t05_redis')
+
+REDIS_PASSWORD = config.get('redis_password', None)
+
+
+class RedisInstance(object):
+
+def __init__(self, ip, port, db=0, password=REDIS_PASSWORD):
+self.host = ip
+self.port = port
+self.db = db
+self.password = password
+# The client will be lazily initialized once we need it
+self.client = redis.StrictRedis(self.host, self.port, self.db, 
self.password)
+
+@property
+def is_master(self):
+self.client.info('replication')['role'] == 'master'
+
+@property
+def slave_of(self):
+data = self.client.info('replication')
+try:
+return '{}:{}'.format(data['master_host'], data['master_port'])
+except:
+return None
+
+def stop_replica(self):
+self.client.slaveof()
+
+def start_replica(self, master):
+self.client.slaveof(master.host, master.port)
+
+def __str__(self):
+return "{}:{}".format(self.host, self.port)
+
+
+class RedisShards(object):
+
+def __init__(self, cluster):
+self.shards = defaultdict(dict)
+with open('{}/modules/{}/{}.yaml'.format(
+config['config_dir'], __name__, cluster)) as fh:
+data = yaml.load(fh)
+for dc, shards in data.items():
+for shard, redis_data in shards.items():
+self.shards[dc][shard] = RedisInstance(redis_data['host'],
+   redis_data['port'])
+
+@property
+def hosts(self):
+hosts = set()
+for _, shards in self.shards.items():
+for _, instance in shards.items():
+hosts.add(instance.host)
+return list(hosts)
+
+@property
+def datacenters(self):
+return self.shards.keys()
+
+def stop_replica(self, dc):
+for _, instance in self.shards[dc].items():
+if instance.is_master:
+logger.warning("Instance %s is already master, doing nothing",
+instance)
+instance.stop_replica()
+if not instance.is_master:
+raise ValueError(
+"Instance %s is still a slave of %s, aborting" %
+(instance, instance.slave_of))
+
+def start_replica(self, dc, dc_master):
+for shard, instance in self.shards[dc].items():
+master = self.shards[dc_master][shard]
+if instance.slaveof == str(master):
+

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Ruthenium VisualDiff: Test w/ local Parsoid instead of prod ...

2017-03-13 Thread Volans (Code Review)
Volans has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/338950 )

Change subject: Ruthenium VisualDiff: Test w/ local Parsoid instead of prod 
Parsoid
..


Ruthenium VisualDiff: Test w/ local Parsoid instead of prod Parsoid

* This mirrors the round trip testing which is run against the
  dev. version of parsoid run locally.

* Volans updated code to use hieradata to configure the 8142
  port used in multiple places in the config.

Change-Id: I185489f5732f4698d635b888958ed11bb3b2ca86
---
A hieradata/role/common/parsoid/testing.yaml
R modules/parsoid/templates/parsoid-testing.nginx.conf.erb
M modules/role/manifests/parsoid/rt_client.pp
M modules/role/manifests/parsoid/testing.pp
M modules/role/manifests/parsoid/vd_client.pp
M modules/testreduce/manifests/client.pp
M modules/testreduce/templates/parsoid-rt-client.config.js.erb
M modules/testreduce/templates/parsoid-vd-client.config.js.erb
8 files changed, 16 insertions(+), 9 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, but someone else must approve
  Mobrovac: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Volans: Looks good to me, approved



diff --git a/hieradata/role/common/parsoid/testing.yaml 
b/hieradata/role/common/parsoid/testing.yaml
new file mode 100644
index 000..ada7b11
--- /dev/null
+++ b/hieradata/role/common/parsoid/testing.yaml
@@ -0,0 +1 @@
+parsoid::testing::parsoid_port: 8142
diff --git a/modules/parsoid/files/parsoid-testing.nginx.conf 
b/modules/parsoid/templates/parsoid-testing.nginx.conf.erb
similarity index 93%
rename from modules/parsoid/files/parsoid-testing.nginx.conf
rename to modules/parsoid/templates/parsoid-testing.nginx.conf.erb
index a1b4759..6cca999 100644
--- a/modules/parsoid/files/parsoid-testing.nginx.conf
+++ b/modules/parsoid/templates/parsoid-testing.nginx.conf.erb
@@ -27,7 +27,7 @@
 # parsoid (used for a specific test case below)
 location  /parsoid {
 rewrite /parsoid/(.*) /$1  break;
-proxy_pass http://localhost:8142;
+proxy_pass http://localhost:<%= @parsoid_port %>;
 proxy_redirect off;
 proxy_set_header   Host $host;
 }
@@ -39,4 +39,3 @@
 proxy_set_header   Host $host;
 }
 }
-
diff --git a/modules/role/manifests/parsoid/rt_client.pp 
b/modules/role/manifests/parsoid/rt_client.pp
index 96bdafc..9b2a52a 100644
--- a/modules/role/manifests/parsoid/rt_client.pp
+++ b/modules/role/manifests/parsoid/rt_client.pp
@@ -12,5 +12,6 @@
 
 testreduce::client { 'parsoid-rt-client':
 instance_name => 'parsoid-rt-client',
+parsoid_port  => hiera('parsoid::testing::parsoid_port'),
 }
 }
diff --git a/modules/role/manifests/parsoid/testing.pp 
b/modules/role/manifests/parsoid/testing.pp
index 984eaf8..351393f 100644
--- a/modules/role/manifests/parsoid/testing.pp
+++ b/modules/role/manifests/parsoid/testing.pp
@@ -5,8 +5,10 @@
 description => 'Parsoid server (rt-testing, visual-diffing, etc.)'
 }
 
+$parsoid_port = hiera('parsoid::testing::parsoid_port')
+
 class { '::parsoid':
-port  => 8142,
+port  => $parsoid_port,
 settings_file => '/srv/deployment/parsoid/deploy/src/localsettings.js',
 deployment=> 'git',
 }
@@ -46,8 +48,8 @@
 }
 
 nginx::site { 'nginx-parsoid-testing':
-source => 'puppet:///modules/parsoid/parsoid-testing.nginx.conf',
-notify => Service['nginx'],
+content => template('parsoid/parsoid-testing.nginx.conf.erb'),
+notify  => Service['nginx'],
 }
 
 ferm::service { 'nginx-parsoid-testing':
diff --git a/modules/role/manifests/parsoid/vd_client.pp 
b/modules/role/manifests/parsoid/vd_client.pp
index bc7cb3d..7da781e 100644
--- a/modules/role/manifests/parsoid/vd_client.pp
+++ b/modules/role/manifests/parsoid/vd_client.pp
@@ -5,5 +5,6 @@
 
 testreduce::client { 'parsoid-vd-client':
 instance_name => 'parsoid-vd-client',
+parsoid_port  => hiera('parsoid::testing::parsoid_port'),
 }
 }
diff --git a/modules/testreduce/manifests/client.pp 
b/modules/testreduce/manifests/client.pp
index ffcf516..e19bf7e 100644
--- a/modules/testreduce/manifests/client.pp
+++ b/modules/testreduce/manifests/client.pp
@@ -6,7 +6,8 @@
 #   Name of the testreduce client service
 #
 define testreduce::client(
-$instance_name
+$instance_name,
+$parsoid_port,
 ) {
 file { "/etc/testreduce/${instance_name}.config.js":
 content => template("testreduce/${instance_name}.config.js.erb"),
diff --git a/modules/testreduce/templates/parsoid-rt-client.config.js.erb 
b/modules/testreduce/templates/parsoid-rt-client.config.js.erb
index 4052c1d..23312e7 100644
--- a/modules/testreduce/templates/parsoid-rt-client.config.js.erb
+++ b/modules/testreduce/templates/parsoid-rt-client.config.js.erb
@@ -20,7 +20,7 @@

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[wmf/1.29.0-wmf.15]: Make incoming link counting compatible with 5.x

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

Change subject: Make incoming link counting compatible with 5.x
..


Make incoming link counting compatible with 5.x

Update incoming link counting job with the 5.x code. This is also
backwards compatible with 2.x. Without it jobs enqueued by the
saneitizer will fail link counting.

Change-Id: I4cf56ced43f9283eecb38359b88797b103752983
---
M includes/BuildDocument/RedirectsAndIncomingLinks.php
1 file changed, 1 insertion(+), 4 deletions(-)

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



diff --git a/includes/BuildDocument/RedirectsAndIncomingLinks.php 
b/includes/BuildDocument/RedirectsAndIncomingLinks.php
index 5008a2f..91ea607 100644
--- a/includes/BuildDocument/RedirectsAndIncomingLinks.php
+++ b/includes/BuildDocument/RedirectsAndIncomingLinks.php
@@ -182,12 +182,9 @@
$search = new \Elastica\Search( $type->getIndex()->getClient() 
);
$search->addIndex( $type->getIndex() );
$search->addType( $type );
-   $search->setOption(
-   \Elastica\Search::OPTION_SEARCH_TYPE,
-   \Elastica\Search::OPTION_SEARCH_TYPE_COUNT
-   );
$search->setQuery( $bool );
$search->getQuery()->addParam( 'stats', 'link_count' );
+   $search->getQuery()->setSize( 0 );
 
return $search;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4cf56ced43f9283eecb38359b88797b103752983
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.29.0-wmf.15
Gerrit-Owner: DCausse 
Gerrit-Reviewer: EBernhardson 
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...WikibaseQualityConstraints[master]: Refactor ConstraintLookup to accept PropertyId

2017-03-13 Thread Aleksey Bekh-Ivanov (WMDE) (Code Review)
Aleksey Bekh-Ivanov (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342497 )

Change subject: Refactor ConstraintLookup to accept PropertyId
..

Refactor ConstraintLookup to accept PropertyId

Bug: T102757
Change-Id: I37cdf73be794ca6c59ff49363bd29d14624eecbe
---
M includes/ConstraintCheck/DelegatingConstraintChecker.php
M includes/ConstraintLookup.php
M includes/ConstraintRepository.php
M tests/phpunit/ConstraintRepositoryTest.php
M tests/phpunit/ConstraintTest.php
M tests/phpunit/Fake/InMemoryConstraintLookup.php
M tests/phpunit/Fake/InMemoryConstraintLookupTest.php
7 files changed, 28 insertions(+), 22 deletions(-)


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

diff --git a/includes/ConstraintCheck/DelegatingConstraintChecker.php 
b/includes/ConstraintCheck/DelegatingConstraintChecker.php
index 639fdb1..119c62c 100644
--- a/includes/ConstraintCheck/DelegatingConstraintChecker.php
+++ b/includes/ConstraintCheck/DelegatingConstraintChecker.php
@@ -94,10 +94,9 @@
continue;
}
 
-   $propertyId = $statement->getPropertyId();
-   $numericPropertyId = $propertyId->getNumericId();
-
-   $constraints = 
$this->constraintLookup->queryConstraintsForProperty( $numericPropertyId );
+   $constraints = 
$this->constraintLookup->queryConstraintsForProperty(
+   $statement->getPropertyId()
+   );
 
$result = array_merge( $result, 
$this->checkConstraintsForStatementOnEntity( $constraints, $entity, $statement 
) );
}
diff --git a/includes/ConstraintLookup.php b/includes/ConstraintLookup.php
index 3edd5df..7e3fc55 100644
--- a/includes/ConstraintLookup.php
+++ b/includes/ConstraintLookup.php
@@ -2,14 +2,16 @@
 
 namespace WikibaseQuality\ConstraintReport;
 
+use Wikibase\DataModel\Entity\PropertyId;
+
 /**
  * @license GNU GPL v2+
  */
 interface ConstraintLookup {
/**
-* @param int $numericPropertyId
-*
+* @param PropertyId $propertyId
 * @return Constraint[]
+*
 */
-   public function queryConstraintsForProperty( $numericPropertyId );
+   public function queryConstraintsForProperty( PropertyId $propertyId );
 }
diff --git a/includes/ConstraintRepository.php 
b/includes/ConstraintRepository.php
index 0c7fe77..6a8d614 100644
--- a/includes/ConstraintRepository.php
+++ b/includes/ConstraintRepository.php
@@ -17,17 +17,16 @@
 class ConstraintRepository implements ConstraintLookup {
 
/**
-* @param int $numericPropertyId
-*
+* @param PropertyId $propertyId
 * @return Constraint[]
 */
-   public function queryConstraintsForProperty( $numericPropertyId ) {
+   public function queryConstraintsForProperty( PropertyId $propertyId ) {
$db = wfGetDB( DB_SLAVE );
 
$results = $db->select(
CONSTRAINT_TABLE,
'*',
-   array( 'pid' => $numericPropertyId )
+   array( 'pid' => $propertyId->getNumericId() )
);
 
return $this->convertToConstraints( $results );
diff --git a/tests/phpunit/ConstraintRepositoryTest.php 
b/tests/phpunit/ConstraintRepositoryTest.php
index 6ac5eeb..e63936f 100644
--- a/tests/phpunit/ConstraintRepositoryTest.php
+++ b/tests/phpunit/ConstraintRepositoryTest.php
@@ -23,7 +23,7 @@
$this->insertTestData();
 
$repo = new ConstraintRepository();
-   $constraints = $repo->queryConstraintsForProperty( 1 );
+   $constraints = $repo->queryConstraintsForProperty( new 
PropertyId('P1') );
 
$this->assertEquals( true, is_array( $constraints) );
$this->assertEquals( 2, count( $constraints ) );
@@ -34,7 +34,7 @@
$this->insertTestData();
 
$repo = new ConstraintRepository();
-   $constraints = $repo->queryConstraintsForProperty( 2 );
+   $constraints = $repo->queryConstraintsForProperty(  new 
PropertyId('P2') );
 
$this->assertEquals( true, is_array( $constraints ) );
$this->assertEquals( 0, count( $constraints ) );
diff --git a/tests/phpunit/ConstraintTest.php b/tests/phpunit/ConstraintTest.php
index faf9a68..1d64438 100644
--- a/tests/phpunit/ConstraintTest.php
+++ b/tests/phpunit/ConstraintTest.php
@@ -20,7 +20,7 @@
 
public function testConstructAndGetters() {
$repo = new ConstraintRepository();
-   $constraints = $repo->queryConstraintsForProperty( 1 );
+   $constraints = $repo->queryConstraintsForProperty( new 
PropertyId('P1') );
 
   

[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Do not allow null in Lexeme::setLexicalCategory and setLanguage

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

Change subject: Do not allow null in Lexeme::setLexicalCategory and setLanguage
..


Do not allow null in Lexeme::setLexicalCategory and setLanguage

This feature is not needed any more after we removed it from the
relevant ChangeOps. Note that it is not even tested.

setId() behaves the same and does not allow null to be set, even if
the constructor does.

Change-Id: I569236ee068b843a812fcb9b4e52e35ad8cd2591
---
M src/DataModel/Lexeme.php
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Daniel Kinzler: Looks good to me, approved
  Aleksey Bekh-Ivanov (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/src/DataModel/Lexeme.php b/src/DataModel/Lexeme.php
index 094dbb8..cdabe56 100644
--- a/src/DataModel/Lexeme.php
+++ b/src/DataModel/Lexeme.php
@@ -209,9 +209,9 @@
}
 
/**
-* @param ItemId|null $lexicalCategory
+* @param ItemId $lexicalCategory
 */
-   public function setLexicalCategory( ItemId $lexicalCategory = null ) {
+   public function setLexicalCategory( ItemId $lexicalCategory ) {
$this->lexicalCategory = $lexicalCategory;
}
 
@@ -223,9 +223,9 @@
}
 
/**
-* @param ItemId|null $language
+* @param ItemId $language
 */
-   public function setLanguage( ItemId $language = null ) {
+   public function setLanguage( ItemId $language ) {
$this->language = $language;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I569236ee068b843a812fcb9b4e52e35ad8cd2591
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Aleksey Bekh-Ivanov (WMDE) 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: WMDE-leszek 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Don't use $this as a function argument

2017-03-13 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342496 )

Change subject: Don't use $this as a function argument
..

Don't use $this as a function argument

PHP 7.1 adds the limitation that $this cannot be used as a function
parameter. Ensure forward compatability by renaming the parameters.

Bug: T160144
Change-Id: I33d2ab1ffeeeb32e3a467cc146ee8feef0255258
---
M tests/phpunit/includes/search/SearchIndexFieldTest.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/96/342496/1

diff --git a/tests/phpunit/includes/search/SearchIndexFieldTest.php 
b/tests/phpunit/includes/search/SearchIndexFieldTest.php
index a5a1b7a..6b12229 100644
--- a/tests/phpunit/includes/search/SearchIndexFieldTest.php
+++ b/tests/phpunit/includes/search/SearchIndexFieldTest.php
@@ -46,7 +46,7 @@
$this->assertFalse( $field1->merge( $field2 ) );
 
$field1->setMergeCallback(
-   function ( $this, $that ) {
+   function ( $a, $b ) {
return "test";
}
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I33d2ab1ffeeeb32e3a467cc146ee8feef0255258
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] operations/puppet[production]: facilities: add codfw PDUs

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

Change subject: facilities: add codfw PDUs
..


facilities: add codfw PDUs

Extend facilities::monitor_pdu_service to include row and site. The latter is
used to pick which snmp community to use. The site needs to be explictly passed
since $::site will be 'eqiad' even when adding codfw PDUs.

Bug: T148541
Change-Id: Ie89355600e7e1d345056e086d946b76780cb408e
---
M modules/facilities/manifests/init.pp
M modules/facilities/manifests/monitor_pdu_3phase.pp
M modules/facilities/manifests/monitor_pdu_service.pp
3 files changed, 182 insertions(+), 2 deletions(-)

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



diff --git a/modules/facilities/manifests/init.pp 
b/modules/facilities/manifests/init.pp
index ff62c90..de6ae48 100644
--- a/modules/facilities/manifests/init.pp
+++ b/modules/facilities/manifests/init.pp
@@ -174,4 +174,165 @@
 row  => 'd',
 site => 'eqiad',
 }
+
+facilities::monitor_pdu_3phase { 'ps1-a1-codfw':
+ip   => '10.193.0.25',
+row  => 'a',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-a2-codfw':
+ip   => '10.193.0.26',
+row  => 'a',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-a3-codfw':
+ip   => '10.193.0.27',
+row  => 'a',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-a4-codfw':
+ip   => '10.193.0.28',
+row  => 'a',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-a5-codfw':
+ip   => '10.193.0.29',
+row  => 'a',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-a6-codfw':
+ip   => '10.193.0.30',
+row  => 'a',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-a7-codfw':
+ip   => '10.193.0.31',
+row  => 'a',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-a8-codfw':
+ip   => '10.193.0.32',
+row  => 'a',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-b1-codfw':
+ip   => '10.193.0.33',
+row  => 'b',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-b2-codfw':
+ip   => '10.193.0.34',
+row  => 'b',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-b3-codfw':
+ip   => '10.193.0.35',
+row  => 'b',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-b4-codfw':
+ip   => '10.193.0.36',
+row  => 'b',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-b5-codfw':
+ip   => '10.193.0.37',
+row  => 'b',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-b6-codfw':
+ip   => '10.193.0.38',
+row  => 'b',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-b7-codfw':
+ip   => '10.193.0.39',
+row  => 'b',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-b8-codfw':
+ip   => '10.193.0.40',
+row  => 'b',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-c1-codfw':
+ip   => '10.193.0.41',
+row  => 'c',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-c2-codfw':
+ip   => '10.193.0.42',
+row  => 'c',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-c3-codfw':
+ip   => '10.193.0.43',
+row  => 'c',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-c4-codfw':
+ip   => '10.193.0.44',
+row  => 'c',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-c5-codfw':
+ip   => '10.193.0.45',
+row  => 'c',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-c6-codfw':
+ip   => '10.193.0.46',
+row  => 'c',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-c7-codfw':
+ip   => '10.193.0.47',
+row  => 'c',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-c8-codfw':
+ip   => '10.193.0.48',
+row  => 'c',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-d1-codfw':
+ip   => '10.193.0.49',
+row  => 'd',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-d2-codfw':
+ip   => '10.193.0.50',
+row  => 'd',
+site => 'codfw',
+}
+facilities::monitor_pdu_3phase { 'ps1-d3-codfw':
+ip   => '10.193.0.51',
+row  => 'd',
+site => 'codfw',
+}
+

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[wmf/1.29.0-wmf.15]: Make incoming link counting compatible with 5.x

2017-03-13 Thread DCausse (Code Review)
DCausse has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342495 )

Change subject: Make incoming link counting compatible with 5.x
..

Make incoming link counting compatible with 5.x

Update incoming link counting job with the 5.x code. This is also
backwards compatible with 2.x. Without it jobs enqueued by the
saneitizer will fail link counting.

Change-Id: I4cf56ced43f9283eecb38359b88797b103752983
---
M includes/BuildDocument/RedirectsAndIncomingLinks.php
1 file changed, 1 insertion(+), 4 deletions(-)


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

diff --git a/includes/BuildDocument/RedirectsAndIncomingLinks.php 
b/includes/BuildDocument/RedirectsAndIncomingLinks.php
index 5008a2f..91ea607 100644
--- a/includes/BuildDocument/RedirectsAndIncomingLinks.php
+++ b/includes/BuildDocument/RedirectsAndIncomingLinks.php
@@ -182,12 +182,9 @@
$search = new \Elastica\Search( $type->getIndex()->getClient() 
);
$search->addIndex( $type->getIndex() );
$search->addType( $type );
-   $search->setOption(
-   \Elastica\Search::OPTION_SEARCH_TYPE,
-   \Elastica\Search::OPTION_SEARCH_TYPE_COUNT
-   );
$search->setQuery( $bool );
$search->getQuery()->addParam( 'stats', 'link_count' );
+   $search->getQuery()->setSize( 0 );
 
return $search;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4cf56ced43f9283eecb38359b88797b103752983
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.29.0-wmf.15
Gerrit-Owner: DCausse 
Gerrit-Reviewer: EBernhardson 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [L10N] Add L10N from wikibase for clean_sandbox.py

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

Change subject: [L10N] Add L10N from wikibase for clean_sandbox.py
..


[L10N] Add L10N from wikibase for clean_sandbox.py

- also allow multiple wikibase items

Change-Id: I67cfd82219fb423d3cbab2a00259a31245a5ff5d
---
M scripts/clean_sandbox.py
1 file changed, 8 insertions(+), 43 deletions(-)

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



diff --git a/scripts/clean_sandbox.py b/scripts/clean_sandbox.py
index 252a6b7..ea00fd2 100755
--- a/scripts/clean_sandbox.py
+++ b/scripts/clean_sandbox.py
@@ -107,43 +107,7 @@
 'zh': '{{subst:User:Sz-iwbot/sandbox}}\n',
 }
 
-sandboxTitle = {
-'commons': u'Project:Sandbox',
-'wikidata': 'Project:Sandbox',
-'als': u'Project:Sandchaschte',
-'ar': u'Project:ملعب',
-'arz': u'Project:السبوره',
-'az': u'Vikipediya:Qaralama dəftəri',
-'bar': u'Project:Spuiwiesn',
-'cs': u'Project:Pískoviště',
-'da': u'Project:Sandkassen',
-'de': u'Project:Spielwiese',
-'en': u'Project:Sandbox',
-'eo': 'Project:Provejo',
-'fa': [u'Project:صفحه تمرین', u'Project:آشنایی با ویرایش'],
-'fi': u'Project:Hiekkalaatikko',
-'fr': u'Project:Bac à sable',
-'he': u'Project:ארגז חול',
-'id': u'Project:Bak pasir',
-'it': u'Project:Pagina delle prove',
-'ja': u'Project:サンドボックス',
-'ko': u'Project:연습장',
-'ksh': u'Project:Shpillplaz',
-'mzn': u'Project:چنگ‌مویی صفحه',
-'nds': u'Project:Speelwisch',
-'nl': u'Project:Zandbak',
-'no': u'Project:Sandkasse',
-'pl': u'Project:Brudnopis',
-'pt': u'Project:Página de testes',
-'ru': u'Project:Песочница',
-'simple': u'Project:Sandbox',
-'sco': u'Project:Saundbox',
-'sr': u'Project:Песак',
-'sv': u'Project:Sandlådan',
-'th': u'Project:ทดลองเขียน',
-'tr': u'Vikipedi:Deneme tahtası',
-'zh': u'Project:沙盒',
-}
+sandbox_titles = ('Q3938', )
 
 # This is required for the text that is shown when you run this script
 # with the parameter -help.
@@ -180,14 +144,15 @@
 pywikibot.error(u'No content is given for pages, exiting.')
 raise RuntimeError
 if not self.generator:
-if self.site.code not in sandboxTitle:
+pages = []
+for item in sandbox_titles:
+p = self.site.page_from_repository(item)
+if p is not None:
+pages.append(p)
+if not pages:
 pywikibot.bot.suggest_help(missing_generator=True)
 raise RuntimeError
-local_sandbox_title = sandboxTitle[self.site.code]
-if not isinstance(local_sandbox_title, list):
-local_sandbox_title = [local_sandbox_title]
-self.generator = [pywikibot.Page(self.site, page_name) for
-  page_name in local_sandbox_title]
+self.generator = pages
 
 def run(self):
 """Run bot."""

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I67cfd82219fb423d3cbab2a00259a31245a5ff5d
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [WIP][BUG]Correctly compare Coordinate

2017-03-13 Thread Lokal Profil (Code Review)
Lokal Profil has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342494 )

Change subject: [WIP][BUG]Correctly compare Coordinate
..

[WIP][BUG]Correctly compare Coordinate

Current comparison of Coordinate requires `_entity` to be set and
also compares `globe`. As these can take multiple forms yet still
be equivalent a separate `__eq__` is needed.

This is similar to the solution required for WbQuantity.

WIP pending:
* https://gerrit.wikimedia.org/r/#/c/334912/
* Tests

Bug:T160282
Change-Id: I6584e60782db554da46736cc9f12f47772ed91b1
---
M pywikibot/__init__.py
1 file changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/94/342494/1

diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index 273e538..43a57fb 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -235,6 +235,18 @@
 
 _items = ('lat', 'lon', 'globe')
 
+def __eq__(self, other):
+"""Override equality to handle different globe representations."""
+if isinstance(other, self.__class__):
+self_dict = self.__dict__.copy()
+other_dict = other.__dict__.copy()
+self_dict['_entity'] = self.entity
+other_dict['_entity'] = other.entity
+del self_dict['globe']
+del other_dict['globe']
+return self_dict == other_dict
+return NotImplemented
+
 def __init__(self, lat, lon, alt=None, precision=None, globe='earth',
  typ="", name="", dim=None, site=None, entity=''):
 """

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6584e60782db554da46736cc9f12f47772ed91b1
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Lokal Profil 

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Make incoming link counting compatible with 5.x

2017-03-13 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342493 )

Change subject: Make incoming link counting compatible with 5.x
..

Make incoming link counting compatible with 5.x

Update incoming link counting job with the 5.x code. This is also
backwards compatible with 2.x. Without it jobs enqueued by the
saneitizer will fail link counting.

Change-Id: I4cf56ced43f9283eecb38359b88797b103752983
---
M includes/BuildDocument/RedirectsAndIncomingLinks.php
1 file changed, 1 insertion(+), 4 deletions(-)


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

diff --git a/includes/BuildDocument/RedirectsAndIncomingLinks.php 
b/includes/BuildDocument/RedirectsAndIncomingLinks.php
index 5008a2f..91ea607 100644
--- a/includes/BuildDocument/RedirectsAndIncomingLinks.php
+++ b/includes/BuildDocument/RedirectsAndIncomingLinks.php
@@ -182,12 +182,9 @@
$search = new \Elastica\Search( $type->getIndex()->getClient() 
);
$search->addIndex( $type->getIndex() );
$search->addType( $type );
-   $search->setOption(
-   \Elastica\Search::OPTION_SEARCH_TYPE,
-   \Elastica\Search::OPTION_SEARCH_TYPE_COUNT
-   );
$search->setQuery( $bool );
$search->getQuery()->addParam( 'stats', 'link_count' );
+   $search->getQuery()->setSize( 0 );
 
return $search;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4cf56ced43f9283eecb38359b88797b103752983
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...ApprovedRevs[master]: Changed display of redirect pages in Special:ApprovedRevs

2017-03-13 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342488 )

Change subject: Changed display of redirect pages in Special:ApprovedRevs
..


Changed display of redirect pages in Special:ApprovedRevs

Change-Id: I475c0492dc4dddf6279784dc84a240c275755f10
---
M SpecialApprovedRevsPage.php
1 file changed, 10 insertions(+), 1 deletion(-)

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



diff --git a/SpecialApprovedRevsPage.php b/SpecialApprovedRevsPage.php
index 1e411ca..a9b4822 100644
--- a/SpecialApprovedRevsPage.php
+++ b/SpecialApprovedRevsPage.php
@@ -247,7 +247,16 @@
} else {
$linkRenderer = null;
}
-   $pageLink = ApprovedRevs::makeLink( $linkRenderer, $title );
+
+   // Create page link - special handling for redirects.
+   $params = array();
+   if ( $title->isRedirect() ) {
+   $params['redirect'] = 'no';
+   }
+   $pageLink = ApprovedRevs::makeLink( $linkRenderer, $title, 
null, array(), $params );
+   if ( $title->isRedirect() ) {
+   $pageLink = "$pageLink";
+   }
 
if ( $this->mMode == 'all' ) {
global $wgUser, $wgOut, $wgLang;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I475c0492dc4dddf6279784dc84a240c275755f10
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ApprovedRevs
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/switchdc[master]: Initial import

2017-03-13 Thread Volans (Code Review)
Volans has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342492 )

Change subject: Initial import
..

Initial import

Bug: T160178
Change-Id: I6c64268e5a86be13afaa6d8185a6b1533fe71770
---
A .gitignore
A setup.py
A switchdc/__init__.py
A switchdc/log.py
A switchdc/menu.py
A switchdc/remote.py
A switchdc/stages/__init__.py
A switchdc/stages/t01_example.py
A switchdc/switch.py
A tox.ini
10 files changed, 351 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/switchdc 
refs/changes/92/342492/1

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..83769f1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+/.eggs
+/.tox
+/*.egg-info
+/.coverage
+/setup.cfg
+/.venv
+/logs
+*.pyc
diff --git a/setup.py b/setup.py
new file mode 100644
index 000..6946858
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python
+"""Package configuration."""
+
+from setuptools import find_packages, setup
+
+setup(
+author='Riccardo Coccioli',
+author_email='rcocci...@wikimedia.org',
+description='Datacenter switchover automation',
+entry_points={
+'console_scripts': [
+'switchdc = switchdc.switch:main',
+],
+},
+install_requires=['pyyaml'],
+name='switchdc',
+packages=find_packages(),
+version='0.0.1',
+zip_safe=False,
+)
diff --git a/switchdc/__init__.py b/switchdc/__init__.py
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/switchdc/__init__.py
diff --git a/switchdc/log.py b/switchdc/log.py
new file mode 100644
index 000..db644e6
--- /dev/null
+++ b/switchdc/log.py
@@ -0,0 +1,12 @@
+import logging
+
+logger = logging.getLogger(__name__)
+
+
+_log_formatter = logging.Formatter(
+fmt='%(asctime)s [%(levelname)s %(filename)s:%(lineno)s in %(funcName)s] 
%(message)s')
+_log_handler = logging.FileHandler('/var/log/switchdc.log')
+_log_handler.setFormatter(_log_formatter)
+logger.addHandler(_log_handler)
+logger.raiseExceptions = False
+logger.setLevel(logging.INFO)
diff --git a/switchdc/menu.py b/switchdc/menu.py
new file mode 100644
index 000..1ab9f51
--- /dev/null
+++ b/switchdc/menu.py
@@ -0,0 +1,113 @@
+from switchdc.log import logger
+
+
+class Menu(object):
+"""Menu class."""
+
+def __init__(self, title, parent=None):
+"""Menu constructor
+
+Arguments:
+title  -- the menu title to be show
+parent -- reference to a parent menu if this is a submenu. [optional, 
default: None]
+"""
+self.title = title
+self.parent = parent
+self.items = []
+
+@property
+def status(self):
+"""Getter for the menu status, returns a string representation of the 
status of it's tasks."""
+completed, total = Menu.calculate_status(self)
+return '{completed}/{total}'.format(completed=completed, total=total)
+
+def append(self, item):
+"""Append an item or a submenu to this menu.
+
+Arguments:
+item -- the item to append
+"""
+if type(item) == Menu:
+item.parent = self
+self.items.append(item)
+
+def run(self):
+"""For menu run is equivalent to show."""
+self.show()
+
+def show(self):
+"""Print the menu to stdout."""
+print(self.title)
+for i, item in enumerate(self.items):
+print(' {i: >2} [{status}] {title}'.format(i=i + 1, 
title=item.title, status=item.status))
+
+if self.parent is not None:
+print('  b - Back to parent menu')
+
+print('  q - Quit')
+
+@staticmethod
+def calculate_status(menu):
+"""Calculate the status of a menu, checking the status of all it's 
tasks recursively.
+
+Arguments:
+menu -- the meny for which to calculate the status
+"""
+completed = 0
+total = 0
+for item in menu.items:
+item_type = type(item)
+if item_type == Menu:
+sub_completed, sub_total = Menu.calculate_status(item)
+completed += sub_completed
+total += sub_total
+elif item_type == Item:
+total += 1
+if item.status != Item.todo:
+completed += 1
+
+return completed, total
+
+
+class Item(object):
+"""Menu item class."""
+
+statuses = ('TODO', 'PASS', 'FAIL')  # Status labels
+todo, success, failed = statuses  # Valid statuses variables
+
+def __init__(self, title, function, args=None, kwargs=None):
+"""Item constructor.
+
+Arguments
+title-- the item's title to be shown in the menu
+function -- the function to call when the task is run
+args -- the list of positional arguments to pass to the function. 
[optional, default: None]
+kwargs   -- the dictionary of keyword arguments to pass to the 

[MediaWiki-commits] [Gerrit] mediawiki...ApprovedRevs[master]: Changed display of redirect pages in Special:ApprovedRevs

2017-03-13 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342488 )

Change subject: Changed display of redirect pages in Special:ApprovedRevs
..

Changed display of redirect pages in Special:ApprovedRevs

Change-Id: I475c0492dc4dddf6279784dc84a240c275755f10
---
M SpecialApprovedRevsPage.php
1 file changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ApprovedRevs 
refs/changes/88/342488/2

diff --git a/SpecialApprovedRevsPage.php b/SpecialApprovedRevsPage.php
index 1e411ca..a9b4822 100644
--- a/SpecialApprovedRevsPage.php
+++ b/SpecialApprovedRevsPage.php
@@ -247,7 +247,16 @@
} else {
$linkRenderer = null;
}
-   $pageLink = ApprovedRevs::makeLink( $linkRenderer, $title );
+
+   // Create page link - special handling for redirects.
+   $params = array();
+   if ( $title->isRedirect() ) {
+   $params['redirect'] = 'no';
+   }
+   $pageLink = ApprovedRevs::makeLink( $linkRenderer, $title, 
null, array(), $params );
+   if ( $title->isRedirect() ) {
+   $pageLink = "$pageLink";
+   }
 
if ( $this->mMode == 'all' ) {
global $wgUser, $wgOut, $wgLang;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I475c0492dc4dddf6279784dc84a240c275755f10
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ApprovedRevs
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Show better error for anons on Special:EmailUser

2017-03-13 Thread EddieGP (Code Review)
EddieGP has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342491 )

Change subject: Show better error for anons on Special:EmailUser
..

Show better error for anons on Special:EmailUser

When a anon user visits Special:EmailUser, the PermissionError message
is shown (as only members of the group "user" (all logged in users) are
allowed to do this). There is a better error message, which tells "You
must be logged in and have a valid email adress in your preferences."
available, but was only shown to users who are logged in but did not
have a valid mail adress in their settings, because the check for the
permission "emailuser" happened before the check for the valid mail
(which returns false for anon users). Exchanging the order of those
makes the right error message appear.

Bug: T160309
Change-Id: I26175df1f7577937d9781950058ca458984ce2cb
---
M includes/specials/SpecialEmailuser.php
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/91/342491/1

diff --git a/includes/specials/SpecialEmailuser.php 
b/includes/specials/SpecialEmailuser.php
index 085b68d..a69406c 100644
--- a/includes/specials/SpecialEmailuser.php
+++ b/includes/specials/SpecialEmailuser.php
@@ -231,14 +231,15 @@
return 'usermaildisabled';
}
 
-   if ( !$user->isAllowed( 'sendemail' ) ) {
-   return 'badaccess';
-   }
-
+   // Run this before $user->isAllowed, to show appropriate 
message to anons (T160309)
if ( !$user->isEmailConfirmed() ) {
return 'mailnologin';
}
 
+   if ( !$user->isAllowed( 'sendemail' ) ) {
+   return 'badaccess';
+   }
+
if ( $user->isBlockedFromEmailuser() ) {
wfDebug( "User is blocked from sending e-mail.\n" );
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Throttle for event request on IRC

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

Change subject: Throttle for event request on IRC
..


Throttle for event request on IRC

Remove old throttles

Change-Id: I92d4f599e3befe1973fd7034840425042b4e8ae8
---
M wmf-config/throttle.php
1 file changed, 7 insertions(+), 23 deletions(-)

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



diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index 3d092a7..e1a117a 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -39,30 +39,14 @@
'value' => 200,
 ];
 
-$wmgThrottlingExceptions[] = [ // T158762
-   'from' => '2017-03-11T13:00 +0:00',
-   'to' => '2017-03-11T21:00 +0:00',
-   'IP' => '200.72.159.4',
-   'dbname' => [ 'eswiki', 'enwiki' ],
-   'value' => 40 // 30 expected
+// 
https://pt.wikipedia.org/wiki/Wikip%C3%A9dia:Edit-a-thon/Atividades_em_portugu%C3%AAs/Neuroci%C3%AAncia_e_Matem%C3%A1tica_III
+$wmgThrottlingExceptions[] = [ // Requested on IRC
+   'from' => '2017-03-13T17:00 +0:00',
+   'to' => '2017-03-13T20:00 +0:00',
+   'IP' => '143.107.45.11',
+   'dbname' => [ 'ptwiki', 'commonswiki' ],
+   'value' => 30 // 20 expected
 ];
-
-$wmgThrottlingExceptions[] = [ // T159803
-   'from' => '2017-03-10T18:00 +1:00',
-   'to' => '2017-03-10T23:090 +1:00',
-   'IP' => '195.76.195.27',
-   'dbname' => [ 'cawiki', 'commonswiki' ],
-   'value' => 40 // +20 expected
-];
-
-$wmgThrottlingExceptions[] = [ // T159957
-   'from' => '2017-03-11T0:00 -5:00',
-   'to' => '2017-03-11T18:00 -5:00',
-   'IP' => [ '38.125.33.54', '38.125.15.118' ],
-   'dbname' => [ 'enwiki', 'commonswiki' ],
-   'value' => 250 // 200 editors, maybe 75 accounts
-];
-
 
 ## Add throttling definitions above.
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I92d4f599e3befe1973fd7034840425042b4e8ae8
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Reedy 
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]: elasticsearch: align static and persistent config

2017-03-13 Thread Gehel (Code Review)
Gehel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342490 )

Change subject: elasticsearch: align static and persistent config
..

elasticsearch: align static and persistent config

settings can be configured in elasticsearch.yml or overridden at runtime. This
aligns the elasticsearch.yml configuration file with the settings configured
on the cluster.

Change-Id: If34f95e2b46bd8922de34d6fb6b942ad064b3b28
---
M modules/elasticsearch/templates/elasticsearch_5.yml.erb
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/90/342490/1

diff --git a/modules/elasticsearch/templates/elasticsearch_5.yml.erb 
b/modules/elasticsearch/templates/elasticsearch_5.yml.erb
index 23e84a6..306a868 100644
--- a/modules/elasticsearch/templates/elasticsearch_5.yml.erb
+++ b/modules/elasticsearch/templates/elasticsearch_5.yml.erb
@@ -282,7 +282,7 @@
 cluster.routing.allocation.node_concurrent_recoveries: 2
 
 # Set to throttle throughput when recovering (eg. 100mb, by default 20mb):
-indices.recovery.max_bytes_per_sec: 20mb
+indices.recovery.max_bytes_per_sec: 40mb
 
 
 ## Discovery ##
@@ -364,9 +364,9 @@
 ##
 cluster.routing.allocation.disk.threshold_enabled: true
 # Stop allocating new shards to nodes with 85% disk utilization
-cluster.routing.allocation.disk.watermark.low: 0.90
+cluster.routing.allocation.disk.watermark.low: 0.75
 # Move shards off of nodes with 95% disk utilization
-cluster.routing.allocation.disk.watermark.high: 0.95
+cluster.routing.allocation.disk.watermark.high: 0.80
 # Check disk utilization every 60 seconds
 cluster.info.update.interval: 60s
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Throttle for event request on IRC

2017-03-13 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342489 )

Change subject: Throttle for event request on IRC
..

Throttle for event request on IRC

Remove old throttles

Change-Id: I92d4f599e3befe1973fd7034840425042b4e8ae8
---
M wmf-config/throttle.php
1 file changed, 6 insertions(+), 23 deletions(-)


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

diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index 3d092a7..3955cc7 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -39,30 +39,13 @@
'value' => 200,
 ];
 
-$wmgThrottlingExceptions[] = [ // T158762
-   'from' => '2017-03-11T13:00 +0:00',
-   'to' => '2017-03-11T21:00 +0:00',
-   'IP' => '200.72.159.4',
-   'dbname' => [ 'eswiki', 'enwiki' ],
-   'value' => 40 // 30 expected
+$wmgThrottlingExceptions[] = [ // Requested on IRC
+   'from' => '2017-03-13T17:00 +0:00',
+   'to' => '2017-03-13T20:00 +0:00',
+   'IP' => '143.107.45.11',
+   'dbname' => [ 'ptwiki', 'commonswiki' ],
+   'value' => 30 // 20 expected
 ];
-
-$wmgThrottlingExceptions[] = [ // T159803
-   'from' => '2017-03-10T18:00 +1:00',
-   'to' => '2017-03-10T23:090 +1:00',
-   'IP' => '195.76.195.27',
-   'dbname' => [ 'cawiki', 'commonswiki' ],
-   'value' => 40 // +20 expected
-];
-
-$wmgThrottlingExceptions[] = [ // T159957
-   'from' => '2017-03-11T0:00 -5:00',
-   'to' => '2017-03-11T18:00 -5:00',
-   'IP' => [ '38.125.33.54', '38.125.15.118' ],
-   'dbname' => [ 'enwiki', 'commonswiki' ],
-   'value' => 250 // 200 editors, maybe 75 accounts
-];
-
 
 ## Add throttling definitions above.
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Disable completion suggester update jobs

2017-03-13 Thread Gehel (Code Review)
Gehel has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342487 )

Change subject: Disable completion suggester update jobs
..


Disable completion suggester update jobs

cluster is being upgraded to elastic5, the update of these indices will be
managed manually as the train rollout.

Change-Id: I45cdaff25812c4f984e67d30d97319009b94ffa5
---
M modules/mediawiki/manifests/maintenance/cirrussearch.pp
1 file changed, 10 insertions(+), 10 deletions(-)

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



diff --git a/modules/mediawiki/manifests/maintenance/cirrussearch.pp 
b/modules/mediawiki/manifests/maintenance/cirrussearch.pp
index 7352ba5..4a590ba 100644
--- a/modules/mediawiki/manifests/maintenance/cirrussearch.pp
+++ b/modules/mediawiki/manifests/maintenance/cirrussearch.pp
@@ -11,17 +11,17 @@
 # to 7am UTC. The `|| true` statement ensures one failing wiki doesn't
 # fail the entire job. This job, as of mar 2015, takes around 5 hours
 # to run.
-cron { 'cirrus_build_completion_indices_eqiad':
-command => '/usr/local/bin/expanddblist all | xargs -I{} -P 4 sh -c 
\'/usr/local/bin/mwscript 
extensions/CirrusSearch/maintenance/updateSuggesterIndex.php --wiki={} 
--masterTimeout=10m --replicationTimeout=5400 --cluster=eqiad --optimize > 
/var/log/mediawiki/cirrus-suggest/{}.eqiad.log 2>&1 || true\'',
-minute  => 30,
-hour=> 2,
-}
+#cron { 'cirrus_build_completion_indices_eqiad':
+#command => '/usr/local/bin/expanddblist all | xargs -I{} -P 4 sh -c 
\'/usr/local/bin/mwscript 
extensions/CirrusSearch/maintenance/updateSuggesterIndex.php --wiki={} 
--masterTimeout=10m --replicationTimeout=5400 --cluster=eqiad --optimize > 
/var/log/mediawiki/cirrus-suggest/{}.eqiad.log 2>&1 || true\'',
+#minute  => 30,
+#hour=> 2,
+#}
 
-cron { 'cirrus_build_completion_indices_codfw':
-command => '/usr/local/bin/expanddblist all | xargs -I{} -P 4 sh -c 
\'/usr/local/bin/mwscript 
extensions/CirrusSearch/maintenance/updateSuggesterIndex.php --wiki={} 
--masterTimeout=10m --replicationTimeout=5400 --cluster=codfw --optimize > 
/var/log/mediawiki/cirrus-suggest/{}.codfw.log 2>&1 || true\'',
-minute  => 30,
-hour=> 2,
-}
+#cron { 'cirrus_build_completion_indices_codfw':
+#command => '/usr/local/bin/expanddblist all | xargs -I{} -P 4 sh -c 
\'/usr/local/bin/mwscript 
extensions/CirrusSearch/maintenance/updateSuggesterIndex.php --wiki={} 
--masterTimeout=10m --replicationTimeout=5400 --cluster=codfw --optimize > 
/var/log/mediawiki/cirrus-suggest/{}.codfw.log 2>&1 || true\'',
+#minute  => 30,
+#hour=> 2,
+#}
 
 # Push sanitze jobs to the jobqueue every 2 hours
 cron { 'cirrus_sanitize_jobs':

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

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

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


  1   2   3   >